Chao Xu commited on
Commit
03177fd
โ€ข
1 Parent(s): 3d7a60f

disable queue for the beginning steps

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -55,8 +55,8 @@ _BBOX_1 = "Predicting bounding box for the input image..."
55
  _BBOX_2 = "Bounding box adjusted. Continue adjusting or **Run Generation**."
56
  _BBOX_3 = "Bounding box predicted. Adjust it using sliders or **Run Generation**."
57
  _SAM = "Preprocessing the input image... (safety check, SAM segmentation, *etc*.)"
58
- _GEN_1 = "Predicting multi-view images... (may take \~21 seconds) <br> Images will be shown in the bottom right blocks."
59
- _GEN_2 = "Predicting nearby views and generating mesh... (may take \~43 seconds) <br> Mesh will be shown on the right."
60
  _DONE = "Done! Mesh is shown on the right. <br> If it is not satisfactory, please select **Retry view** checkboxes for inaccurate views and click **Regenerate selected view(s)** at the bottom."
61
  _REGEN_1 = "Selected view(s) are regenerated. You can click **Regenerate nearby views and mesh**. <br> Alternatively, if the regenerated view(s) are still not satisfactory, you can repeat the previous step (select the view and regenerate)."
62
  _REGEN_2 = "Regeneration done. Mesh is shown on the right."
@@ -586,13 +586,13 @@ def run_demo(
586
  tmp_func = lambda x: False if not x else gr.update(visible=False)
587
  disable_func = lambda x: gr.update(interactive=False)
588
  enable_func = lambda x: gr.update(interactive=True)
589
- image_block.change(disable_func, inputs=run_btn, outputs=run_btn
590
  ).success(fn=refresh,
591
  inputs=[tmp_dir],
592
- outputs=[tmp_dir, rerun_idx, bbox_block, sam_block, elev_output, vis_output, mesh_output, regen_view_btn, regen_mesh_btn, *views, *btn_retrys]
593
- # ).success(disable_func, inputs=run_btn, outputs=run_btn
594
- ).success(fn=tmp_func, inputs=[image_block], outputs=[placeholder]
595
- ).success(fn=partial(update_guide, _BBOX_1), outputs=[guide_text]
596
  ).success(fn=init_bbox,
597
  inputs=[image_block],
598
  outputs=[bbox_block, *bbox_sliders]
 
55
  _BBOX_2 = "Bounding box adjusted. Continue adjusting or **Run Generation**."
56
  _BBOX_3 = "Bounding box predicted. Adjust it using sliders or **Run Generation**."
57
  _SAM = "Preprocessing the input image... (safety check, SAM segmentation, *etc*.)"
58
+ _GEN_1 = "Predicting multi-view images... (may take \~13 seconds) <br> Images will be shown in the bottom right blocks."
59
+ _GEN_2 = "Predicting nearby views and generating mesh... (may take \~35 seconds) <br> Mesh will be shown on the right."
60
  _DONE = "Done! Mesh is shown on the right. <br> If it is not satisfactory, please select **Retry view** checkboxes for inaccurate views and click **Regenerate selected view(s)** at the bottom."
61
  _REGEN_1 = "Selected view(s) are regenerated. You can click **Regenerate nearby views and mesh**. <br> Alternatively, if the regenerated view(s) are still not satisfactory, you can repeat the previous step (select the view and regenerate)."
62
  _REGEN_2 = "Regeneration done. Mesh is shown on the right."
 
586
  tmp_func = lambda x: False if not x else gr.update(visible=False)
587
  disable_func = lambda x: gr.update(interactive=False)
588
  enable_func = lambda x: gr.update(interactive=True)
589
+ image_block.change(disable_func, inputs=run_btn, outputs=run_btn, queue=False
590
  ).success(fn=refresh,
591
  inputs=[tmp_dir],
592
+ outputs=[tmp_dir, rerun_idx, bbox_block, sam_block, elev_output, vis_output, mesh_output, regen_view_btn, regen_mesh_btn, *views, *btn_retrys],
593
+ queue=False
594
+ ).success(fn=tmp_func, inputs=[image_block], outputs=[placeholder], queue=False
595
+ ).success(fn=partial(update_guide, _BBOX_1), outputs=[guide_text], queue=False
596
  ).success(fn=init_bbox,
597
  inputs=[image_block],
598
  outputs=[bbox_block, *bbox_sliders]