Spaces:
Paused
Paused
Update app_i2v.py
Browse files- app_i2v.py +10 -2
app_i2v.py
CHANGED
@@ -18,12 +18,12 @@ def create_demo() -> gr.Blocks:
|
|
18 |
image_path: str,
|
19 |
prompt: str,
|
20 |
negative_prompt: str,
|
|
|
21 |
width: int = 512,
|
22 |
height: int = 320,
|
23 |
num_frames: int = 100,
|
24 |
frame_rate: int = 20,
|
25 |
num_inference_steps: int = 30,
|
26 |
-
seed: int = 8,
|
27 |
progress=gr.Progress(),
|
28 |
):
|
29 |
generator = torch.Generator(device=device).manual_seed(seed)
|
@@ -85,6 +85,14 @@ def create_demo() -> gr.Blocks:
|
|
85 |
lines=2,
|
86 |
)
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
i2vid_generate = gr.Button(
|
89 |
"Generate Video",
|
90 |
variant="primary",
|
@@ -97,7 +105,7 @@ def create_demo() -> gr.Blocks:
|
|
97 |
|
98 |
i2vid_generate.click(
|
99 |
fn=image_to_video,
|
100 |
-
inputs=[i2vid_image_path, i2vid_prompt, i2vid_negative_prompt],
|
101 |
outputs=[i2vid_output, i2vid_generated_cost],
|
102 |
)
|
103 |
|
|
|
18 |
image_path: str,
|
19 |
prompt: str,
|
20 |
negative_prompt: str,
|
21 |
+
seed: int = 8,
|
22 |
width: int = 512,
|
23 |
height: int = 320,
|
24 |
num_frames: int = 100,
|
25 |
frame_rate: int = 20,
|
26 |
num_inference_steps: int = 30,
|
|
|
27 |
progress=gr.Progress(),
|
28 |
):
|
29 |
generator = torch.Generator(device=device).manual_seed(seed)
|
|
|
85 |
lines=2,
|
86 |
)
|
87 |
|
88 |
+
i2vid_seed = gr.Slider(
|
89 |
+
label="Seed",
|
90 |
+
minimum=0,
|
91 |
+
maximum=2**32,
|
92 |
+
step=1,
|
93 |
+
value=8,
|
94 |
+
)
|
95 |
+
|
96 |
i2vid_generate = gr.Button(
|
97 |
"Generate Video",
|
98 |
variant="primary",
|
|
|
105 |
|
106 |
i2vid_generate.click(
|
107 |
fn=image_to_video,
|
108 |
+
inputs=[i2vid_image_path, i2vid_prompt, i2vid_negative_prompt, i2vid_seed],
|
109 |
outputs=[i2vid_output, i2vid_generated_cost],
|
110 |
)
|
111 |
|