yonigozlan HF Staff commited on
Commit
87e5c0e
·
1 Parent(s): bee8dcd
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -560,6 +560,10 @@ def reset_session() -> tuple[AppState, Image.Image, int, int, str]:
560
  slider_minmax = gr.update(minimum=0, maximum=max(GLOBAL_STATE.num_frames - 1, 0), interactive=True)
561
  slider_value = gr.update(value=current_idx)
562
  status = "Session reset. Prompts cleared; video preserved."
 
 
 
 
563
  return GLOBAL_STATE, preview_img, slider_minmax, slider_value, status
564
 
565
 
 
560
  slider_minmax = gr.update(minimum=0, maximum=max(GLOBAL_STATE.num_frames - 1, 0), interactive=True)
561
  slider_value = gr.update(value=current_idx)
562
  status = "Session reset. Prompts cleared; video preserved."
563
+ # clear and reload model and processor
564
+ GLOBAL_STATE.model = None
565
+ GLOBAL_STATE.processor = None
566
+ ensure_session_for_current_model()
567
  return GLOBAL_STATE, preview_img, slider_minmax, slider_value, status
568
 
569