Comfy-Org/ComfyUI · error · ValueError

A maximum of 3 reference images is supported; got {len(refer

Error message

A maximum of 3 reference images is supported; got {len(reference_images)} (a batched input counts once per image).

What it means

Error "A maximum of 3 reference images is supported; got {len(reference_images)} (a batched input counts once per image)." thrown in Comfy-Org/ComfyUI.

Source

Thrown at comfy_api_nodes/nodes_qwen.py:396

        seed: int = 42,
        prompt_extend: bool = True,
        watermark: bool = False,
    ):
        validate_string(model["prompt"], strip_whitespace=False, min_length=1)
        reference_images = [image for key in model["images"] for image in model["images"][key]]
        if len(reference_images) > 3:
            raise ValueError(
                f"A maximum of 3 reference images is supported; got {len(reference_images)} "
                f"(a batched input counts once per image)."
            )

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Use at most 3 reference images.

When it happens

Trigger: Thrown at comfy_api_nodes/nodes_qwen.py:396 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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