MogensR commited on
Commit
3074b94
·
verified ·
1 Parent(s): 8be72f0

Update streamlit_app.py

Browse files
Files changed (1) hide show
  1. streamlit_app.py +3 -1
streamlit_app.py CHANGED
@@ -105,10 +105,12 @@ def process_video(uploaded_video, background, bg_type, progress_callback=None):
105
 
106
  if progress_callback:
107
  progress_callback("🚀 Stage 1: Creating transparent video (matting & segmentation)...")
 
108
  transparent_path, audio_path = stage1_create_transparent_video(
109
  tmp_vid_path,
110
  sam2_predictor=sam2_predictor,
111
- matanyone_processor=matanyone_processor
 
112
  )
113
  if not transparent_path or not os.path.exists(transparent_path):
114
  raise RuntimeError("Stage 1 failed: Transparent video not created")
 
105
 
106
  if progress_callback:
107
  progress_callback("🚀 Stage 1: Creating transparent video (matting & segmentation)...")
108
+ # >>> CHANGE: pass a short watchdog timeout so hangs surface quickly
109
  transparent_path, audio_path = stage1_create_transparent_video(
110
  tmp_vid_path,
111
  sam2_predictor=sam2_predictor,
112
+ matanyone_processor=matanyone_processor,
113
+ mat_timeout_sec=60
114
  )
115
  if not transparent_path or not os.path.exists(transparent_path):
116
  raise RuntimeError("Stage 1 failed: Transparent video not created")