Spaces:
Running
on
Zero
Running
on
Zero
unknown
commited on
Commit
·
b4b2ce3
1
Parent(s):
7972d8f
remove temporal
Browse files
app.py
CHANGED
@@ -130,7 +130,7 @@ class FoleyController:
|
|
130 |
prompt_textbox,
|
131 |
negative_prompt_textbox,
|
132 |
ip_adapter_scale,
|
133 |
-
temporal_scale,
|
134 |
sampler_dropdown,
|
135 |
sample_step_slider,
|
136 |
cfg_scale_slider,
|
@@ -154,7 +154,7 @@ class FoleyController:
|
|
154 |
if seed_textbox != "":
|
155 |
torch.manual_seed(int(seed_textbox))
|
156 |
generator.manual_seed(int(seed_textbox))
|
157 |
-
max_frame_nums =
|
158 |
frames, duration = read_frames_with_moviepy(input_video, max_frame_nums=max_frame_nums)
|
159 |
if duration >= 10:
|
160 |
duration = 10
|
@@ -181,7 +181,7 @@ class FoleyController:
|
|
181 |
negative_prompt=negative_prompt_textbox,
|
182 |
ip_adapter_image_embeds=image_embeddings,
|
183 |
image=time_condition,
|
184 |
-
controlnet_conditioning_scale=float(
|
185 |
num_inference_steps=sample_step_slider,
|
186 |
height=256,
|
187 |
width=1024,
|
@@ -247,7 +247,7 @@ with gr.Blocks(css=css) as demo:
|
|
247 |
|
248 |
cfg_scale_slider = gr.Slider(label="CFG Scale", value=7.5, minimum=0, maximum=20)
|
249 |
ip_adapter_scale = gr.Slider(label="Visual Content Scale", value=1.0, minimum=0, maximum=1)
|
250 |
-
temporal_scale = gr.Slider(label="Temporal Align Scale", value=0., minimum=0., maximum=1.0)
|
251 |
|
252 |
with gr.Row():
|
253 |
seed_textbox = gr.Textbox(label="Seed", value=42)
|
@@ -265,7 +265,7 @@ with gr.Blocks(css=css) as demo:
|
|
265 |
prompt_textbox,
|
266 |
negative_prompt_textbox,
|
267 |
ip_adapter_scale,
|
268 |
-
temporal_scale,
|
269 |
sampler_dropdown,
|
270 |
sample_step_slider,
|
271 |
cfg_scale_slider,
|
@@ -276,13 +276,13 @@ with gr.Blocks(css=css) as demo:
|
|
276 |
|
277 |
gr.Examples(
|
278 |
examples= [
|
279 |
-
['examples/videos/51701454.mp4', 'seagulls', '', 1.0,
|
280 |
-
['examples/videos/42.mp4', '', '', 1.0,
|
281 |
-
['examples/videos/1.mp4', '', '', 1.0,
|
282 |
-
['examples/videos/2.mp4', '', '', 1.0,
|
283 |
-
['examples/videos/3.mp4', '', '', 1.0,
|
284 |
],
|
285 |
-
inputs=[init_img,prompt_textbox,negative_prompt_textbox,ip_adapter_scale,
|
286 |
)
|
287 |
|
288 |
demo.queue(10)
|
|
|
130 |
prompt_textbox,
|
131 |
negative_prompt_textbox,
|
132 |
ip_adapter_scale,
|
133 |
+
# temporal_scale,
|
134 |
sampler_dropdown,
|
135 |
sample_step_slider,
|
136 |
cfg_scale_slider,
|
|
|
154 |
if seed_textbox != "":
|
155 |
torch.manual_seed(int(seed_textbox))
|
156 |
generator.manual_seed(int(seed_textbox))
|
157 |
+
max_frame_nums = 15
|
158 |
frames, duration = read_frames_with_moviepy(input_video, max_frame_nums=max_frame_nums)
|
159 |
if duration >= 10:
|
160 |
duration = 10
|
|
|
181 |
negative_prompt=negative_prompt_textbox,
|
182 |
ip_adapter_image_embeds=image_embeddings,
|
183 |
image=time_condition,
|
184 |
+
controlnet_conditioning_scale=float(0),
|
185 |
num_inference_steps=sample_step_slider,
|
186 |
height=256,
|
187 |
width=1024,
|
|
|
247 |
|
248 |
cfg_scale_slider = gr.Slider(label="CFG Scale", value=7.5, minimum=0, maximum=20)
|
249 |
ip_adapter_scale = gr.Slider(label="Visual Content Scale", value=1.0, minimum=0, maximum=1)
|
250 |
+
# temporal_scale = gr.Slider(label="Temporal Align Scale", value=0., minimum=0., maximum=1.0)
|
251 |
|
252 |
with gr.Row():
|
253 |
seed_textbox = gr.Textbox(label="Seed", value=42)
|
|
|
265 |
prompt_textbox,
|
266 |
negative_prompt_textbox,
|
267 |
ip_adapter_scale,
|
268 |
+
# temporal_scale,
|
269 |
sampler_dropdown,
|
270 |
sample_step_slider,
|
271 |
cfg_scale_slider,
|
|
|
276 |
|
277 |
gr.Examples(
|
278 |
examples= [
|
279 |
+
['examples/videos/51701454.mp4', 'seagulls', '', 1.0, 'DDIM', 25, 7.5, 10014024412012338096],
|
280 |
+
['examples/videos/42.mp4', '', '', 1.0, 'DDIM', 25, 7.5, 42],
|
281 |
+
['examples/videos/1.mp4', '', '', 1.0, 'DDIM', 25, 7.5, 93493458],
|
282 |
+
['examples/videos/2.mp4', '', '', 1.0, 'DDIM', 25, 7.5, 51972214],
|
283 |
+
['examples/videos/3.mp4', '', '', 1.0, 'DDIM', 25, 7.5, 92530687],
|
284 |
],
|
285 |
+
inputs=[init_img,prompt_textbox,negative_prompt_textbox,ip_adapter_scale,sampler_dropdown,sample_step_slider,cfg_scale_slider,seed_textbox],
|
286 |
)
|
287 |
|
288 |
demo.queue(10)
|