Spaces:
Runtime error
Runtime error
| from diffusers import DiffusionPipeline | |
| import gradio as gr | |
| import torch | |
| pipe = DiffusionPipeline.from_pretrained("cerspense/zeroscope_v2_576w", torch_dtype=torch.float16) | |
| pipe.to("cuda") | |
| def generate(prompt): | |
| video_frames = pipe(prompt, num_inference_steps=25).frames | |
| return video_frames[0] # return first frame or full video logic | |
| gr.Interface(fn=generate, inputs="text", outputs="image").launch() | |