Comfy-Org/ComfyUI · error · ValueError

Only one input image is supported.

Error message

Only one input image is supported.

What it means

The Topaz image-enhance v1 node accepts exactly one image per request. get_number_of_images(image) != 1 (a batch of 0 or >= 2) raises ValueError before upload. The Topaz enhance-gen endpoint processes a single source image, so batches are rejected client-side.

Source

Thrown at comfy_api_nodes/nodes_topaz.py:187

    @classmethod
    async def execute(
        cls,
        model: str,
        image: Input.Image,
        prompt: str = "",
        subject_detection: str = "All",
        face_enhancement: bool = True,
        face_enhancement_creativity: float = 1.0,
        face_enhancement_strength: float = 0.8,
        crop_to_fill: bool = False,
        output_width: int = 0,
        output_height: int = 0,
        creativity: int = 3,
        face_preservation: bool = True,
        color_preservation: bool = True,
    ) -> IO.NodeOutput:
        if get_number_of_images(image) != 1:
            raise ValueError("Only one input image is supported.")
        download_url = await upload_images_to_comfyapi(
            cls, image, max_images=1, mime_type="image/png", total_pixels=4096 * 4096
        )
        initial_response = await sync_op(
            cls,
            ApiEndpoint(path="/proxy/topaz/image/v1/enhance-gen/async", method="POST"),
            response_model=ImageAsyncTaskResponse,
            data=ImageEnhanceRequest(
                model=model,
                prompt=prompt,
                subject_detection=subject_detection,
                face_enhancement=face_enhancement,
                face_enhancement_creativity=face_enhancement_creativity,
                face_enhancement_strength=face_enhancement_strength,
                crop_to_fill=crop_to_fill,
                output_width=output_width if output_width else None,
                output_height=output_height if output_height else None,
                creativity=creativity,

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Pick a single frame before the node (e.g. index the batch: image[0:1] or use a batch-splitting node).
  2. Set the upstream loader's batch size to 1.
  3. For per-frame enhancement of a video, route through the Topaz video nodes instead of the image node.

Example fix

// before: passing a batch
enhanced = topaz_image_enhance(image=frames)  # ValueError if len(frames) != 1
// after: select one image
enhanced = topaz_image_enhage(image=frames[0:1])
Defensive patterns

Strategy: validation

Validate before calling

if get_number_of_images(image) != 1:
    image = image[0:1]  # or split the batch and loop

Prevention

When it happens

Trigger: Passing a batched IMAGE tensor (e.g. from a node that emits multiple frames, or a Load Image batch) into the Topaz Image Enhance node.

Common situations: Upstream nodes that implicitly batch (image loaders with batch > 1, grids/filmstrips from video frames); splitting attention — the user intended to enhance each frame separately.

Related errors


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