Spaces:
Runtime error
Runtime error
bugfix
Browse files
app.py
CHANGED
|
@@ -476,6 +476,10 @@ with gr.Blocks(title="Diffusion as Shader") as demo:
|
|
| 476 |
right_column = gr.Column(scale=1)
|
| 477 |
|
| 478 |
with right_column:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 479 |
tracking_video = gr.Video(label="Tracking Video")
|
| 480 |
|
| 481 |
apply_tracking_btn = gr.Button("5. Generate Video", variant="primary", size="lg", interactive=False)
|
|
@@ -521,17 +525,12 @@ with gr.Blocks(title="Diffusion as Shader") as demo:
|
|
| 521 |
mt_repaint_upload = gr.UploadButton("Upload Repaint Image (Optional)", file_types=["image"])
|
| 522 |
mt_repaint_preview = gr.Image(label="Repaint Image Preview")
|
| 523 |
|
| 524 |
-
# 上传文件后更新预览
|
| 525 |
mt_repaint_upload.upload(
|
| 526 |
-
fn=update_source_preview,
|
| 527 |
inputs=[mt_repaint_upload],
|
| 528 |
outputs=[mt_repaint_preview]
|
| 529 |
)
|
| 530 |
-
|
| 531 |
-
# Add run button for Motion Transfer tab
|
| 532 |
-
mt_run_btn = gr.Button("4. Generate Tracking", variant="primary", size="lg")
|
| 533 |
-
|
| 534 |
-
# Connect to process function, but don't apply tracking
|
| 535 |
mt_run_btn.click(
|
| 536 |
fn=process_motion_transfer,
|
| 537 |
inputs=[
|
|
@@ -544,7 +543,7 @@ with gr.Blocks(title="Diffusion as Shader") as demo:
|
|
| 544 |
inputs=[tracking_video],
|
| 545 |
outputs=[apply_tracking_btn]
|
| 546 |
)
|
| 547 |
-
|
| 548 |
with gr.TabItem("Camera Control"):
|
| 549 |
gr.Markdown("Camera Control is not available in Huggingface Space, please deploy our [GitHub project](https://github.com/IGL-HKUST/DiffusionAsShader) on your own machine")
|
| 550 |
|
|
|
|
| 476 |
right_column = gr.Column(scale=1)
|
| 477 |
|
| 478 |
with right_column:
|
| 479 |
+
|
| 480 |
+
gr.Markdown("### 4. Generate Tracking Video")
|
| 481 |
+
gr.Markdown("'Generate Tracking Video' is used to preserve all motion from the Source. You need to generate tracking video before producing the final result.")
|
| 482 |
+
mt_run_btn = gr.Button("Generate Tracking", variant="primary", size="lg")
|
| 483 |
tracking_video = gr.Video(label="Tracking Video")
|
| 484 |
|
| 485 |
apply_tracking_btn = gr.Button("5. Generate Video", variant="primary", size="lg", interactive=False)
|
|
|
|
| 525 |
mt_repaint_upload = gr.UploadButton("Upload Repaint Image (Optional)", file_types=["image"])
|
| 526 |
mt_repaint_preview = gr.Image(label="Repaint Image Preview")
|
| 527 |
|
|
|
|
| 528 |
mt_repaint_upload.upload(
|
| 529 |
+
fn=update_source_preview,
|
| 530 |
inputs=[mt_repaint_upload],
|
| 531 |
outputs=[mt_repaint_preview]
|
| 532 |
)
|
| 533 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 534 |
mt_run_btn.click(
|
| 535 |
fn=process_motion_transfer,
|
| 536 |
inputs=[
|
|
|
|
| 543 |
inputs=[tracking_video],
|
| 544 |
outputs=[apply_tracking_btn]
|
| 545 |
)
|
| 546 |
+
|
| 547 |
with gr.TabItem("Camera Control"):
|
| 548 |
gr.Markdown("Camera Control is not available in Huggingface Space, please deploy our [GitHub project](https://github.com/IGL-HKUST/DiffusionAsShader) on your own machine")
|
| 549 |
|