Skip to content

Commit

Permalink
Solved bug where input_image wasn't yet defined/
Browse files Browse the repository at this point in the history
  • Loading branch information
JPABotermans authored Sep 25, 2024
1 parent 1659a1c commit 71bf1bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/sampling/simple_video_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,10 @@ def sample(

if h % 64 != 0 or w % 64 != 0:
width, height = map(lambda x: x - x % 64, (w, h))
input_image = input_image.resize((width, height))
if image.mode == "RGBA":
input_image = input_image.resize((width, height))
else:
input_image = image.resize((width, height))
print(
f"WARNING: Your image is of size {h}x{w} which is not divisible by 64. We are resizing to {height}x{width}!"
)
Expand Down

0 comments on commit 71bf1bd

Please sign in to comment.