Spaces:
Runtime error
Runtime error
Update app.py
Browse files167 unmodified lines16816917017117217317425 unmodified lines200201202203204205167 unmodified lines_, unexpected = self.unet.load_state_dict(motion_module_state_dict, strict=False)assert len(unexpected) == 0return gr.Dropdown.update()def animate(self,25 unmodified linesgenerator = torch.Generator(device="cuda")generator.manual_seed(seed)sample = pipeline(prompt_textbox,167 unmodified lines16816917017117217317417517617717817918018118218318418518618718818919025 unmodified lines216217218219220221222223224167 unmodified lines_, unexpected = self.unet.load_state_dict(motion_module_state_dict, strict=False)assert len(unexpected) == 0return gr.Dropdown.update()def resize_image(input_path, output_path, new_width, new_height):# Open the imageimage = Image.open(input_path)# Resize the image while maintaining the aspect ratioimage.thumbnail((new_width, new_height))# Save the resized image to the specified output pathimage.save(output_path)print("Image resized and saved successfully.")return output_pathdef animate(self,25 unmodified linesgenerator = 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