{"record":{"id":"d605116acc4b9854","repo":"Comfy-Org/ComfyUI","slug":"expected-1-or-2-input-images-but-got-n-images","errorCode":null,"errorMessage":"Expected 1 or 2 input images, but got {n_images}.","messagePattern":"Expected 1 or 2 input images, but got (.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_wan.py","lineNumber":281,"sourceCode":"        # width: int = 1024,\n        # height: int = 1024,\n        seed: int = 0,\n        watermark: bool = False,\n    ):\n        n_images = get_number_of_images(image)\n        if n_images not in (1, 2):\n            raise ValueError(f\"Expected 1 or 2 input images, but got {n_images}.\")\n        images = []\n        for i in image:\n            images.append(\"data:image/png;base64,\" + tensor_to_base64_string(i, total_pixels=4096 * 4096))","sourceCodeStart":263,"sourceCodeEnd":299,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_wan.py#L263-L299","documentation":"Error \"Expected 1 or 2 input images, but got {n_images}.\" thrown in Comfy-Org/ComfyUI.","triggerScenarios":"Thrown at comfy_api_nodes/nodes_wan.py:281 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide 1 or 2 input images."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}