yyang181 commited on
Commit
e07d0cd
·
1 Parent(s): c2a5690
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -175,6 +175,7 @@ def encode_frames_to_video(frames_dir: str, out_path: str, fps: float):
175
 
176
  # ----------------- MAIN PIPELINE (CUDA-only) -----------------
177
  def run_pipeline_cuda(bw_video_path: str, ref_image_path: str, user_config: dict, debug_shapes: bool) -> str:
 
178
  if not torch.cuda.is_available():
179
  raise RuntimeError("未检测到 GPU。此 Space 仅支持 ZeroGPU (CUDA)。")
180
 
@@ -203,7 +204,7 @@ def run_pipeline_cuda(bw_video_path: str, ref_image_path: str, user_config: dict
203
 
204
  # 3) 配置(字段与 main.py 一致;值从 UI 合并)
205
  default_config = {
206
- "FirstFrameIsNotExemplar": False,
207
  "d16_batch_path": "input", # parity only
208
  "ref_path": "ref", # parity only
209
  "output": "result", # parity only
@@ -291,6 +292,8 @@ def run_pipeline_cuda(bw_video_path: str, ref_image_path: str, user_config: dict
291
  if not config['FirstFrameIsNotExemplar']:
292
  msk = msk[:, 1:3, :, :] if msk is not None else None
293
 
 
 
294
  info = data['info']
295
  frame = info['frame'][0]
296
  shape = info['shape']
 
175
 
176
  # ----------------- MAIN PIPELINE (CUDA-only) -----------------
177
  def run_pipeline_cuda(bw_video_path: str, ref_image_path: str, user_config: dict, debug_shapes: bool) -> str:
178
+ print(bw_video_path, ref_image_path)
179
  if not torch.cuda.is_available():
180
  raise RuntimeError("未检测到 GPU。此 Space 仅支持 ZeroGPU (CUDA)。")
181
 
 
204
 
205
  # 3) 配置(字段与 main.py 一致;值从 UI 合并)
206
  default_config = {
207
+ "FirstFrameIsNotExemplar": True,
208
  "d16_batch_path": "input", # parity only
209
  "ref_path": "ref", # parity only
210
  "output": "result", # parity only
 
292
  if not config['FirstFrameIsNotExemplar']:
293
  msk = msk[:, 1:3, :, :] if msk is not None else None
294
 
295
+ print(rgb.shape, msk.shape)
296
+
297
  info = data['info']
298
  frame = info['frame'][0]
299
  shape = info['shape']