Spaces:
Runtime error
Runtime error
Commit ·
c2b832e
1
Parent(s): aecac1f
improve meta device error
Browse files
app.py
CHANGED
|
@@ -691,16 +691,6 @@ with gr.Blocks(title="SAM2 Video (Transformers) - Interactive Segmentation", the
|
|
| 691 |
|
| 692 |
ckpt_radio.change(_on_ckpt_change, inputs=[GLOBAL_STATE, ckpt_radio], outputs=[ckpt_progress])
|
| 693 |
|
| 694 |
-
# Also retrigger session re-init if a video already loaded
|
| 695 |
-
def _rebind_session_after_ckpt(s: AppState):
|
| 696 |
-
ensure_session_for_current_model(s)
|
| 697 |
-
# Reset pending box corner to avoid mismatched state
|
| 698 |
-
if s is not None:
|
| 699 |
-
s.pending_box_start = None
|
| 700 |
-
return gr.update()
|
| 701 |
-
|
| 702 |
-
ckpt_radio.change(_rebind_session_after_ckpt, inputs=[GLOBAL_STATE], outputs=[])
|
| 703 |
-
|
| 704 |
def _sync_frame_idx(state_in: AppState, idx: int):
|
| 705 |
if state_in is not None:
|
| 706 |
state_in.current_frame_idx = int(idx)
|
|
|
|
| 691 |
|
| 692 |
ckpt_radio.change(_on_ckpt_change, inputs=[GLOBAL_STATE, ckpt_radio], outputs=[ckpt_progress])
|
| 693 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 694 |
def _sync_frame_idx(state_in: AppState, idx: int):
|
| 695 |
if state_in is not None:
|
| 696 |
state_in.current_frame_idx = int(idx)
|