mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-31 08:40:19 +08:00
Raise error if as_trimmed call fails
This commit is contained in:
parent
803808b1b1
commit
e1558efbea
@ -222,7 +222,10 @@ class VideoSlice(io.ComfyNode):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def execute(cls, video, start_time, duration) -> io.NodeOutput:
|
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):
|
class VideoExtension(ComfyExtension):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user