Spaces:
Paused
Paused
| from diffusers import DiffusionPipeline | |
| import torch, gradio as gr | |
| model_id = "alibaba-pai/Wan2.5-i2v-a14b" | |
| device = "cuda" if torch.cuda.is_available() else "cpu" | |
| pipe = DiffusionPipeline.from_pretrained(model_id, dtype=torch.float16 if torch.cuda.is_available() else torch.float32).to(device) | |
| def generate(prompt): | |
| result = pipe(prompt).images[0] | |
| return result | |
| demo = gr.Interface(fn=generate, inputs="text", outputs="image", title="Tenexa Video Generator") | |
| demo.launch() | |