From e1558efbea8b4bb7430a58fa6f97026fc7c311f0 Mon Sep 17 00:00:00 2001 From: Austin Mroz Date: Tue, 27 Jan 2026 12:03:37 -0800 Subject: [PATCH] Raise error if as_trimmed call fails --- comfy_extras/nodes_video.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/comfy_extras/nodes_video.py b/comfy_extras/nodes_video.py index aa6f32055..be8283336 100644 --- a/comfy_extras/nodes_video.py +++ b/comfy_extras/nodes_video.py @@ -222,7 +222,10 @@ class VideoSlice(io.ComfyNode): @classmethod def execute(cls, video, start_time, duration) -> io.NodeOutput: - return io.NodeOutput(video.as_trimmed(start_time, duration)) + trimmed = video.as_trimmed(start_time, duration) + if trimmed is not None: + return io.NodeOutput(trimmed) + raise ValueError(f"Failed to slice video:\nSource duration: {video.get_duration()}\nStart time: {start_time}\nTarget duration: {duration}") class VideoExtension(ComfyExtension):