Comfy-Org/ComfyUI · error · ValueError

kling-image-o1 does not support series generation.

Error message

kling-image-o1 does not support series generation.

What it means

Raised by OmniProImageNode.execute when series generation is enabled (series_amount != 'disabled') and model_name is 'kling-image-o1'. The o1 image model has no series (multi-image story set) output, so result_type='series' requests are rejected client-side before the API call.

Source

Thrown at comfy_api_nodes/nodes_kling.py:1449

        seed: int = 0,
    ) -> IO.NodeOutput:
        _ = seed
        if model_name == "kling-image-o1" and resolution == "4K":
            raise ValueError("4K resolution is not supported for kling-image-o1 model.")
        prompt = normalize_omni_prompt_references(prompt)
        validate_string(prompt, min_length=1, max_length=2500)
        image_list: list[OmniImageParamImage] = []
        if reference_images is not None:
            if get_number_of_images(reference_images) > 10:
                raise ValueError("The maximum number of reference images is 10.")
            for i in reference_images:
                validate_image_dimensions(i, min_width=300, min_height=300)
                validate_image_aspect_ratio(i, (1, 2.5), (2.5, 1))
            for i in await upload_images_to_comfyapi(cls, reference_images, wait_label="Uploading reference image"):
                image_list.append(OmniImageParamImage(image=i))
        use_series = series_amount != "disabled"
        if use_series and model_name == "kling-image-o1":
            raise ValueError("kling-image-o1 does not support series generation.")
        response = await sync_op(
            cls,
            ApiEndpoint(path="/proxy/kling/v1/images/omni-image", method="POST"),
            response_model=TaskStatusResponse,
            data=OmniProImageRequest(
                model_name=model_name,
                prompt=prompt,
                resolution=resolution.lower(),
                aspect_ratio=aspect_ratio,
                image_list=image_list if image_list else None,
                result_type="series" if use_series else None,
                series_amount=int(series_amount) if use_series else None,
            ),
        )
        if response.code:
            raise RuntimeError(
                f"Kling request failed. Code: {response.code}, Message: {response.message}, Data: {response.data}"
            )

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Set series_amount to 'disabled' when using kling-image-o1
  2. Keep series generation on the non-o1 kling-image models
  3. If multiple o1 variations are needed, loop the node with different seeds/prompts

Example fix

// before
model_name = "kling-image-o1"
series_amount = "4"

// after
model_name = "kling-image-o1"
series_amount = "disabled"
Defensive patterns

Strategy: validation

Validate before calling

def o1_series_ok(model_name: str, series_amount: str) -> bool:
    return model_name != "kling-image-o1" or series_amount == "disabled"

Prevention

When it happens

Trigger: model_name='kling-image-o1' with the series_amount combo set to anything other than 'disabled' (e.g. '4').

Common situations: A workflow built for kling-image-2 series generation is switched to o1 to try the newer model, leaving series_amount populated.

Related errors


AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14). Data as JSON: /api/errors/249e12dc1c4567c5. Report an issue: GitHub.