Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -6,9 +6,9 @@ import torch
|
|
6 |
# Ensure dependencies are installed
|
7 |
os.system("pip install -r requirements.txt")
|
8 |
|
9 |
-
# Model Load
|
10 |
model_id = "stabilityai/stable-video-diffusion-img2vid"
|
11 |
-
pipe = StableVideoDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float32)
|
12 |
pipe.to("cpu") # Ensure model runs on CPU
|
13 |
|
14 |
# Function to Generate Video
|
@@ -23,5 +23,3 @@ iface = gr.Interface(fn=generate_video, inputs="text", outputs="video")
|
|
23 |
|
24 |
# Launch Gradio Server on Hugging Face Space
|
25 |
iface.launch(server_name="0.0.0.0", server_port=int(os.getenv("PORT", 7860)))
|
26 |
-
|
27 |
-
|
|
|
6 |
# Ensure dependencies are installed
|
7 |
os.system("pip install -r requirements.txt")
|
8 |
|
9 |
+
# Model Load (CPU Compatible)
|
10 |
model_id = "stabilityai/stable-video-diffusion-img2vid"
|
11 |
+
pipe = StableVideoDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float32) # Float32 use karo
|
12 |
pipe.to("cpu") # Ensure model runs on CPU
|
13 |
|
14 |
# Function to Generate Video
|
|
|
23 |
|
24 |
# Launch Gradio Server on Hugging Face Space
|
25 |
iface.launch(server_name="0.0.0.0", server_port=int(os.getenv("PORT", 7860)))
|
|
|
|