Skip to content

Commit c176b21

Browse files
authored
extend possible duration range for Kling O1 StartEndFrame node (#11451)
1 parent 91bf6b6 commit c176b21

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

comfy_api_nodes/nodes_kling.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ def define_schema(cls) -> IO.Schema:
858858
tooltip="A text prompt describing the video content. "
859859
"This can include both positive and negative descriptions.",
860860
),
861-
IO.Combo.Input("duration", options=["5", "10"]),
861+
IO.Int.Input("duration", default=5, min=3, max=10, display_mode=IO.NumberDisplay.slider),
862862
IO.Image.Input("first_frame"),
863863
IO.Image.Input(
864864
"end_frame",
@@ -897,6 +897,10 @@ async def execute(
897897
validate_string(prompt, min_length=1, max_length=2500)
898898
if end_frame is not None and reference_images is not None:
899899
raise ValueError("The 'end_frame' input cannot be used simultaneously with 'reference_images'.")
900+
if duration not in (5, 10) and end_frame is None and reference_images is None:
901+
raise ValueError(
902+
"Duration is only supported for 5 or 10 seconds if there is no end frame or reference images."
903+
)
900904
validate_image_dimensions(first_frame, min_width=300, min_height=300)
901905
validate_image_aspect_ratio(first_frame, (1, 2.5), (2.5, 1))
902906
image_list: list[OmniParamImage] = [

0 commit comments

Comments
 (0)