diff --git a/scripts/sampling/simple_video_sample.py b/scripts/sampling/simple_video_sample.py index 29a8b858..cb01abc3 100644 --- a/scripts/sampling/simple_video_sample.py +++ b/scripts/sampling/simple_video_sample.py @@ -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}!" )