Update app.py
Browse files
app.py
CHANGED
@@ -4,8 +4,8 @@ from diffusers import I2VGenXLPipeline
|
|
4 |
from diffusers.utils import export_to_gif, load_image
|
5 |
import tempfile
|
6 |
|
7 |
-
|
8 |
-
device = "cuda" if torch.cuda.is_available() else "cpu"
|
9 |
|
10 |
# Initialize the pipeline with CUDA support
|
11 |
pipeline = I2VGenXLPipeline.from_pretrained("ali-vilab/i2vgen-xl", torch_dtype=torch.float16, variant="fp16")
|
|
|
4 |
from diffusers.utils import export_to_gif, load_image
|
5 |
import tempfile
|
6 |
|
7 |
+
def initialize_pipeline():
|
8 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
9 |
|
10 |
# Initialize the pipeline with CUDA support
|
11 |
pipeline = I2VGenXLPipeline.from_pretrained("ali-vilab/i2vgen-xl", torch_dtype=torch.float16, variant="fp16")
|