{"record":{"id":"f2ad8689f2724493","repo":"Comfy-Org/ComfyUI","slug":"only-one-input-image-is-supported-f2ad86","errorCode":null,"errorMessage":"Only one input image is supported.","messagePattern":"Only one input image is supported\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_topaz.py","lineNumber":187,"sourceCode":"    @classmethod\n    async def execute(\n        cls,\n        model: str,\n        image: Input.Image,\n        prompt: str = \"\",\n        subject_detection: str = \"All\",\n        face_enhancement: bool = True,\n        face_enhancement_creativity: float = 1.0,\n        face_enhancement_strength: float = 0.8,\n        crop_to_fill: bool = False,\n        output_width: int = 0,\n        output_height: int = 0,\n        creativity: int = 3,\n        face_preservation: bool = True,\n        color_preservation: bool = True,\n    ) -> IO.NodeOutput:\n        if get_number_of_images(image) != 1:\n            raise ValueError(\"Only one input image is supported.\")\n        download_url = await upload_images_to_comfyapi(\n            cls, image, max_images=1, mime_type=\"image/png\", total_pixels=4096 * 4096\n        )\n        initial_response = await sync_op(\n            cls,\n            ApiEndpoint(path=\"/proxy/topaz/image/v1/enhance-gen/async\", method=\"POST\"),\n            response_model=ImageAsyncTaskResponse,\n            data=ImageEnhanceRequest(\n                model=model,\n                prompt=prompt,\n                subject_detection=subject_detection,\n                face_enhancement=face_enhancement,\n                face_enhancement_creativity=face_enhancement_creativity,\n                face_enhancement_strength=face_enhancement_strength,\n                crop_to_fill=crop_to_fill,\n                output_width=output_width if output_width else None,\n                output_height=output_height if output_height else None,\n                creativity=creativity,","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_topaz.py#L169-L205","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Pick a single frame before the node (e.g. index the batch: image[0:1] or use a batch-splitting node).","Set the upstream loader's batch size to 1.","For per-frame enhancement of a video, route through the Topaz video nodes instead of the image node."],"exampleFix":"// before: passing a batch\nenhanced = topaz_image_enhance(image=frames)  # ValueError if len(frames) != 1\n// after: select one image\nenhanced = topaz_image_enhage(image=frames[0:1])","handlingStrategy":"validation","validationCode":"if get_number_of_images(image) != 1:\n    image = image[0:1]  # or split the batch and loop","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep a 'select single image' node in your palette when working with Topaz image nodes.","Set image loaders to batch size 1 by default in enhancement workflows."],"tags":["topaz","image","batch","validation","api-nodes"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}