Spaces:
Running
on
Zero
Running
on
Zero
guardiancc
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -13,8 +13,7 @@ pipe = CogVideoXImageToVideoPipeline.from_pretrained(
|
|
13 |
def generate_video(prompt, image):
|
14 |
# Ensure the generator is on the same device as the model
|
15 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
16 |
-
pipe.
|
17 |
-
pipe.vae.enable_slicing()
|
18 |
generator = torch.Generator(device=device).manual_seed(42)
|
19 |
|
20 |
video = pipe(
|
|
|
13 |
def generate_video(prompt, image):
|
14 |
# Ensure the generator is on the same device as the model
|
15 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
16 |
+
pipe.to("cuda")
|
|
|
17 |
generator = torch.Generator(device=device).manual_seed(42)
|
18 |
|
19 |
video = pipe(
|