FIX 增加模型不存在的处理

FIX 修复视频剪裁问题
This commit is contained in:
2025-07-10 17:26:25 +08:00
parent 3bc4d84e31
commit c91e506fd5
4 changed files with 159 additions and 7 deletions

View File

@@ -119,7 +119,7 @@ class VideoCut:
os.remove(files[0])
except:
pass
return (video, {"waveform": audio, "sample_rate": info["audio_fps"]},)
return (video/255.0, {"waveform": audio, "sample_rate": info["audio_fps"]} if "audio_fps" in info else None,)
except:
traceback.print_exc()
raise Exception("Cut Failed")
@@ -234,7 +234,7 @@ class VideoCutByFramePoint:
os.remove(output)
except:
pass
return (video, {"waveform": audio, "sample_rate": info["audio_fps"]},)
return (video/255.0, {"waveform": audio, "sample_rate": info["audio_fps"]},)
except:
traceback.print_exc()
raise Exception("Cut Failed")