Spaces:
Runtime error
Runtime error
Update webgui.py
Browse files
webgui.py
CHANGED
@@ -325,7 +325,49 @@ with gr.Blocks() as demo:
|
|
325 |
</div>
|
326 |
""")
|
327 |
|
328 |
-
def generate_video(uploaded_img, uploaded_audio, facemask_dilation_ratio=default_values["facemask_dilation_ratio"],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
facecrop_dilation_ratio=default_values["facecrop_dilation_ratio"],
|
330 |
context_frames=default_values["context_frames"],
|
331 |
context_overlap=default_values["context_overlap"],
|
@@ -339,32 +381,24 @@ with gr.Blocks() as demo:
|
|
339 |
length=default_values["length"] ):
|
340 |
|
341 |
final_output_path = process_video(
|
342 |
-
uploaded_img,
|
|
|
|
|
|
|
|
|
|
|
343 |
)
|
344 |
-
output_video= final_output_path
|
345 |
return final_output_path
|
346 |
|
347 |
generate_button.click(
|
348 |
generate_video,
|
349 |
inputs=[
|
350 |
uploaded_img,
|
351 |
-
uploaded_audio
|
352 |
-
# width,
|
353 |
-
# height,
|
354 |
-
# length,
|
355 |
-
# seed,
|
356 |
-
# facemask_dilation_ratio,
|
357 |
-
# facecrop_dilation_ratio,
|
358 |
-
# context_frames,
|
359 |
-
# context_overlap,
|
360 |
-
# cfg,
|
361 |
-
# steps,
|
362 |
-
# sample_rate,
|
363 |
-
# fps,
|
364 |
-
# device
|
365 |
],
|
366 |
outputs=output_video,
|
367 |
-
|
368 |
)
|
369 |
parser = argparse.ArgumentParser(description='EchoMimic')
|
370 |
parser.add_argument('--server_name', type=str, default='0.0.0.0', help='Server name')
|
|
|
325 |
</div>
|
326 |
""")
|
327 |
|
328 |
+
# def generate_video(uploaded_img, uploaded_audio, facemask_dilation_ratio=default_values["facemask_dilation_ratio"],
|
329 |
+
# facecrop_dilation_ratio=default_values["facecrop_dilation_ratio"],
|
330 |
+
# context_frames=default_values["context_frames"],
|
331 |
+
# context_overlap=default_values["context_overlap"],
|
332 |
+
# cfg=default_values["cfg"],
|
333 |
+
# steps=default_values["steps"],
|
334 |
+
# sample_rate=default_values["sample_rate"],
|
335 |
+
# fps=default_values["fps"],
|
336 |
+
# device=default_values["device"],
|
337 |
+
# width=default_values["width"],
|
338 |
+
# height=default_values["height"],
|
339 |
+
# length=default_values["length"] ):
|
340 |
+
|
341 |
+
# final_output_path = process_video(
|
342 |
+
# uploaded_img, uploaded_audio, width, height, length, seed, facemask_dilation_ratio, facecrop_dilation_ratio, context_frames, context_overlap, cfg, steps, sample_rate, fps, device
|
343 |
+
# )
|
344 |
+
# output_video= final_output_path
|
345 |
+
# return final_output_path
|
346 |
+
|
347 |
+
# generate_button.click(
|
348 |
+
# generate_video,
|
349 |
+
# inputs=[
|
350 |
+
# uploaded_img,
|
351 |
+
# uploaded_audio,
|
352 |
+
# # width,
|
353 |
+
# # height,
|
354 |
+
# # length,
|
355 |
+
# # seed,
|
356 |
+
# # facemask_dilation_ratio,
|
357 |
+
# # facecrop_dilation_ratio,
|
358 |
+
# # context_frames,
|
359 |
+
# # context_overlap,
|
360 |
+
# # cfg,
|
361 |
+
# # steps,
|
362 |
+
# # sample_rate,
|
363 |
+
# # fps,
|
364 |
+
# # device
|
365 |
+
# ],
|
366 |
+
# outputs=output_video,
|
367 |
+
# show_api=False
|
368 |
+
# )
|
369 |
+
def generate_video(uploaded_img, uploaded_audio,
|
370 |
+
facemask_dilation_ratio=default_values["facemask_dilation_ratio"],
|
371 |
facecrop_dilation_ratio=default_values["facecrop_dilation_ratio"],
|
372 |
context_frames=default_values["context_frames"],
|
373 |
context_overlap=default_values["context_overlap"],
|
|
|
381 |
length=default_values["length"] ):
|
382 |
|
383 |
final_output_path = process_video(
|
384 |
+
uploaded_img,
|
385 |
+
uploaded_audio, width, height,
|
386 |
+
length, facemask_dilation_ratio,
|
387 |
+
facecrop_dilation_ratio, context_frames,
|
388 |
+
context_overlap, cfg, steps,
|
389 |
+
sample_rate, fps, device
|
390 |
)
|
391 |
+
output_video = final_output_path
|
392 |
return final_output_path
|
393 |
|
394 |
generate_button.click(
|
395 |
generate_video,
|
396 |
inputs=[
|
397 |
uploaded_img,
|
398 |
+
uploaded_audio
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
399 |
],
|
400 |
outputs=output_video,
|
401 |
+
show_progress=True
|
402 |
)
|
403 |
parser = argparse.ArgumentParser(description='EchoMimic')
|
404 |
parser.add_argument('--server_name', type=str, default='0.0.0.0', help='Server name')
|