From 94848eda600a07c28675f5753a11b2c212c146ed Mon Sep 17 00:00:00 2001 From: Adababy Date: Wed, 9 Sep 2026 20:37:10 +0800 Subject: [PATCH] [Bugfix] Fix unreachable None guard in Molmo2 get_candidate_target_fps (#55893) Signed-off-by: shaolila Co-authored-by: shaolila --- vllm/multimodal/video.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vllm/multimodal/video.py b/vllm/multimodal/video.py index 2cc2aa9887..854b5572b3 100644 --- a/vllm/multimodal/video.py +++ b/vllm/multimodal/video.py @@ -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 "