Update app.py
Browse files167 unmodified lines16816917017117217317417517617717817918018118218318418518618718818919025 unmodified lines216217218219220221222223224167 unmodified lines _, unexpected = self.unet.load_state_dict(motion_module_state_dict, strict=False) assert len(unexpected) == 0 return gr.Dropdown.update()
def resize_image(input_path, output_path, new_width, new_height): # Open the image image = Image.open(input_path)
# Resize the image while maintaining the aspect ratio image.thumbnail((new_width, new_height))
# Save the resized image to the specified output path image.save(output_path)
print("Image resized and saved successfully.") return output_path def animate( self,25 unmodified lines generator = torch.Generator(device="cuda") generator.manual_seed(seed)
init_image = resize_image(init_image, 'resized.png', 512, 512) sample = pipeline( prompt_textbox,app.py+19