Skip to content

Commit

Permalink
Fix visualization images not being in float32, fix steps showing up a…
Browse files Browse the repository at this point in the history
…s None when using S. Cus. node
  • Loading branch information
Kosinkadink committed Jul 11, 2024
1 parent ce99718 commit 8ba2923
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion animatediff/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,8 @@ def generate_context_visualization(context_opts: ContextOptionsGroup, model: Mod

if start_step is None:
start_step = 0 # use this in case start_step is provided, to display accurate step
if steps is None:
steps = len(sigmas)

for i, t in enumerate(sigmas):
# make context_opts reflect current step/sigma
Expand Down Expand Up @@ -674,5 +676,5 @@ def generate_context_visualization(context_opts: ContextOptionsGroup, model: Mod
repeat_count += 1

images = torch.stack(all_imgs)
images = images.movedim(1, -1)
images = images.movedim(1, -1).to(torch.float32)
return images

0 comments on commit 8ba2923

Please sign in to comment.