Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,9 +3,7 @@ import torch
|
|
| 3 |
from diffusers import I2VGenXLPipeline
|
| 4 |
from diffusers.utils import export_to_gif, load_image
|
| 5 |
import tempfile
|
| 6 |
-
import spaces
|
| 7 |
|
| 8 |
-
@spaces.GPU
|
| 9 |
def initialize_pipeline(device):
|
| 10 |
# Initialize the pipeline with CUDA support
|
| 11 |
pipeline = I2VGenXLPipeline.from_pretrained("ali-vilab/i2vgen-xl", torch_dtype=torch.float16, variant="fp16")
|
|
@@ -67,7 +65,7 @@ with gr.Blocks() as demo:
|
|
| 67 |
|
| 68 |
text_generate_button.click(
|
| 69 |
fn=generate_gif,
|
| 70 |
-
inputs=[text_prompt,
|
| 71 |
outputs=text_output_video
|
| 72 |
)
|
| 73 |
|
|
@@ -92,4 +90,4 @@ with gr.Blocks() as demo:
|
|
| 92 |
)
|
| 93 |
|
| 94 |
# Launch the interface
|
| 95 |
-
demo.launch()
|
|
|
|
| 3 |
from diffusers import I2VGenXLPipeline
|
| 4 |
from diffusers.utils import export_to_gif, load_image
|
| 5 |
import tempfile
|
|
|
|
| 6 |
|
|
|
|
| 7 |
def initialize_pipeline(device):
|
| 8 |
# Initialize the pipeline with CUDA support
|
| 9 |
pipeline = I2VGenXLPipeline.from_pretrained("ali-vilab/i2vgen-xl", torch_dtype=torch.float16, variant="fp16")
|
|
|
|
| 65 |
|
| 66 |
text_generate_button.click(
|
| 67 |
fn=generate_gif,
|
| 68 |
+
inputs=[text_prompt, None, text_negative_prompt, text_num_inference_steps, text_guidance_scale, text_seed],
|
| 69 |
outputs=text_output_video
|
| 70 |
)
|
| 71 |
|
|
|
|
| 90 |
)
|
| 91 |
|
| 92 |
# Launch the interface
|
| 93 |
+
demo.launch()
|