Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
import subprocess
|
2 |
-
subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True
|
3 |
-
|
4 |
subprocess.run('pip install av==12.0.0', shell=True)
|
5 |
|
6 |
import gradio as gr
|
7 |
import spaces
|
8 |
-
|
9 |
import torch
|
10 |
import os
|
11 |
from glob import glob
|
@@ -49,10 +49,10 @@ def sample(
|
|
49 |
seed: Optional[int] = -1,
|
50 |
randomize_seed: bool = True,
|
51 |
# motion_bucket_id: int = 127,
|
52 |
-
fps_id: int =
|
53 |
# version: str = "svd_xt",
|
54 |
# cond_aug: float = 0.02,
|
55 |
-
|
56 |
device: str = "cuda",
|
57 |
output_folder: str = "outputs",
|
58 |
progress=gr.Progress(track_tqdm=True)
|
@@ -157,11 +157,11 @@ with gr.Blocks() as demo:
|
|
157 |
)
|
158 |
generate_btn = gr.Button("Generate Video")
|
159 |
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
|
166 |
# image.upload(fn=resize_image, inputs=image, outputs=image, queue=False)
|
167 |
|
|
|
1 |
import subprocess
|
2 |
+
subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True
|
3 |
+
subprocess.run('pip install bitsandbytes', shell=True)
|
4 |
subprocess.run('pip install av==12.0.0', shell=True)
|
5 |
|
6 |
import gradio as gr
|
7 |
import spaces
|
8 |
+
import gradio.helpers
|
9 |
import torch
|
10 |
import os
|
11 |
from glob import glob
|
|
|
49 |
seed: Optional[int] = -1,
|
50 |
randomize_seed: bool = True,
|
51 |
# motion_bucket_id: int = 127,
|
52 |
+
fps_id: int = 30,
|
53 |
# version: str = "svd_xt",
|
54 |
# cond_aug: float = 0.02,
|
55 |
+
decoding_t: int = 3, # Number of frames decoded at a time! This eats most VRAM. Reduce if necessary.
|
56 |
device: str = "cuda",
|
57 |
output_folder: str = "outputs",
|
58 |
progress=gr.Progress(track_tqdm=True)
|
|
|
157 |
)
|
158 |
generate_btn = gr.Button("Generate Video")
|
159 |
|
160 |
+
with gr.Accordion("Advanced options", open=False):
|
161 |
+
seed = gr.Slider(label="Seed", value=42, randomize=True, minimum=0, maximum=max_64_bit_int, step=1)
|
162 |
+
randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
|
163 |
+
motion_bucket_id = gr.Slider(label="Motion bucket id", info="Controls how much motion to add/remove from the image", value=127, minimum=1, maximum=255)
|
164 |
+
fps_id = gr.Slider(label="Frames per second", info="The length of your video in seconds will be 25/fps", value=6, minimum=5, maximum=30)
|
165 |
|
166 |
# image.upload(fn=resize_image, inputs=image, outputs=image, queue=False)
|
167 |
|