hkchengrex commited on
Commit
de7e6de
·
verified ·
1 Parent(s): b5fb89e

Update mmaudio/eval_utils.py

Browse files
Files changed (1) hide show
  1. mmaudio/eval_utils.py +3 -0
mmaudio/eval_utils.py CHANGED
@@ -174,6 +174,9 @@ def load_video(video_path: Path, duration_sec: float, load_all_frames: bool = Tr
174
  v2.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]),
175
  ])
176
 
 
 
 
177
  output_frames, all_frames, orig_fps = read_frames(video_path,
178
  list_of_fps=[_CLIP_FPS, _SYNC_FPS],
179
  start_sec=0,
 
174
  v2.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]),
175
  ])
176
 
177
+ if not isinstance(video_path, Path) and not isinstance(video_path, str):
178
+ # for gradio>6.0, video_path is a namespace
179
+ video_path = Path(video_path.value)
180
  output_frames, all_frames, orig_fps = read_frames(video_path,
181
  list_of_fps=[_CLIP_FPS, _SYNC_FPS],
182
  start_sec=0,