[Bugfix] Fix unreachable None guard in Molmo2 get_candidate_target_fps (#55893)

Signed-off-by: shaolila <shaolila@buaa.edu.cn>
Co-authored-by: shaolila <shaolila@buaa.edu.cn>
This commit is contained in:
Adababy
2026-09-09 12:37:10 +00:00
committed by GitHub
co-authored by shaolila
parent c7e9816c6a
commit 94848eda60
+3 -2
View File
@@ -911,12 +911,13 @@ class Molmo2VideoBackend(VideoLoader):
ValueError: sampling_fps=2 must divide video_fps=5 to produce
consistent frame steps.
"""
if sampling_fps is None:
raise ValueError("sampling_fps must be provided")
video_fps = int(video_fps)
sampling_fps = int(sampling_fps)
max_fps = int(max_fps)
if sampling_fps is None:
raise ValueError("sampling_fps must be provided")
if video_fps <= 0 or sampling_fps <= 0:
raise ValueError(
"video_fps and sampling_fps must be positive "