exception_during_inner_validation error only in API invocation
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 155
Description
I am having an issue where the below error is thrown when i trigger the below prompt via the API interface. The same workflow works just fine when i trigger from UI. Wonder if the json request is malformed somehow when running it as a API request.
`{
"error": {
"type": "prompt_outputs_failed_validation",
"message": "Prompt outputs failed validation",
"details": "Exception when validating inner node: tuple index out of range",
"extra_info": {}
},
"node_errors": {
"35": {
"errors": [
{
"type": "exception_during_inner_validation",
"message": "Exception when validating inner node",
"details": "tuple index out of range",
"extra_info": {
"input_name": "input_dataset_name",
"input_config": [
"TEXT",
{
"tooltip": "Input dataset name"
}
],
"exception_message": "tuple index out of range",
"exception_type": "IndexError",
"traceback": [
" File \"/ComfyUI/execution.py\", line 822, in validate_inputs\n r = await validate_inputs(prompt_id, prompt, o_id, validated)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
" File \"/ComfyUI/execution.py\", line 804, in validate_inputs\n received_type = r[val[1]]\n ~^^^^^^^^\n"
],
"linked_node": [
"35",
1
]
}
}
],
"dependent_outputs": [
"33",
"76",
"42",
"38",
"32",
"35"
],
"class_type": "UploadDatasetConductor"
},
"46": {
"errors": [
{
"type": "exception_during_inner_validation",
"message": "Exception when validating inner node",
"details": "tuple index out of range",
"extra_info": {
"input_name": "image",
"input_config": [
"IMAGE",
{}
],
"exception_message": "tuple index out of range",
"exception_type": "IndexError",
"traceback": [
" File \"/ComfyUI/execution.py\", line 822, in validate_inputs\n r = await validate_inputs(prompt_id, prompt, o_id, validated)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
" File \"/ComfyUI/execution.py\", line 804, in validate_inputs\n received_type = r[val[1]]\n ~^^^^^^^^\n"
],
"linked_node": [
"46",
1
]
}
}
],
"dependent_outputs": [
"76",
"42",
"38",
"32",
"35"
],
"class_type": "ExtractImagesFromDataset"
},
"36": {
"errors": [
{
"type": "exception_during_inner_validation",
"message": "Exception when validating inner node",
"details": "tuple index out of range",
"extra_info": {
"input_name": "image_paths",
"input_config": [
"TEXT",
{
"tooltip": "List of original image file paths"
}
],
"exception_message": "tuple index out of range",
"exception_type": "IndexError",
"traceback": [
" File \"/ComfyUI/execution.py\", line 822, in validate_inputs\n r = await validate_inputs(prompt_id, prompt, o_id, validated)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
" File \"/ComfyUI/execution.py\", line 804, in validate_inputs\n received_type = r[val[1]]\n ~^^^^^^^^\n"
],
"linked_node": [
"36",
0
]
}
}
],
"dependent_outputs": [
"42",
"38",
"32",
"35"
],
"class_type": "ExtractImagesFromDataset"
}
}
}`
I am trying to invoke the below prompt
```
{
"prompt": {
"1": {
"inputs": {
"dataset_name": "s-dataset-d6148b5bce",
"output_prefix": "outputs",
"n_seq": 1,
"n_frames": 1
},
"class_type": "LoadDatasetConductor",
"_meta": {
"title": "Load Winchester Dataset from Conductor"
}
},
"16": {
"inputs": {
"model_name": "net_g_latest.pth"
},
"class_type": "UpscaleModelLoader",
"_meta": {
"title": "Load Upscale Model"
}
},
"32": {
"inputs": {
"dataset_descriptor": "name: Comet Run @ ComfyUI outputs ({dataset_id})\ndescription: Running only Comet on ComfyUI outputs ( {dataset_id})\npipeline: winchester@0.3.0\nproject_id: genesis_dev\npermissions:\n viewers:\n - synth-core\n owners:\n - achauhan2\nconfig:\n worker_preset: vfxplatform2023-32cpu-0gpu-240GB-300GB-1.0\n distribute:\n first_task: render2scene\n input_dataset_id: {dataset_id}\n winchester_version: latest\n mirage: true \n comet:\n enable: true\n exposure:\n mask:\n erode:\n enable:true\n percent_image_width: 4.24\n sensor_config:\n capture_settings:\n dfov: 95\n disable_resolution_limit: false\n optics:\n wave:\n step: 20\n cpu_compute: true\n display:\n mode: cpu",
"input_dataset_name": [
"35",
1
]
},
"class_type": "RunCometPipeline",
"_meta": {
"title": "Run Comet Pipeline on Dataset"
}
},
"33": {
"inputs": {
"preview": "",
"source": [
"32",
0
]
},
"class_type": "PreviewAny",
"_meta": {
"title": "Preview Any"
}
},
"35": {
"inputs": {
"dataset_name": "s-dataset-hellotest",
"output_prefix": "outputs",
"source_dataset_name": [
"1",
0
],
"local_paths": [
"1",
1
],
"dependency": [
"39",
0
]
},
"class_type": "UploadDatasetConductor",
"_meta": {
"title": "Upload Winchester Dataset to Conductor"
}
},
"36": {
"inputs": {
"file_pattern": "setcam\\.scene\\.comet_ae_mask\\.\\d+\\.exr",
"local_paths": [
"1",
1
]
},
"class_type": "ExtractImagesFromDataset",
"_meta": {
"title": "Extract Images from Winchester Dataset"
}
},
"37": {
"inputs": {
"hdr_images": [
"46",
1
]
},
"class_type": "ConvertHDRtoLDR",
"_meta": {
"title": "Convert HDR to LDR"
}
},
"38": {
"inputs": {
"image_paths": [
"46",
0
],
"images": [
"40",
0
]
},
"class_type": "SaveImageToWinchesterDataset",
"_meta": {
"title": "Save Image to Winchester Dataset"
}
},
"39": {
"inputs": {
"string_a": [
"38",
0
],
"string_b": [
"42",
0
],
"delimiter": ""
},
"class_type": "StringConcatenate",
"_meta": {
"title": "Concatenate"
}
},
"40": {
"inputs": {
"ldr_images": [
"44",
0
],
"upsampled_hdr_images": [
"41",
0
]
},
"class_type": "LDRtoHDRMatting",
"_meta": {
"title": "LDR to HDR Matting"
}
},
"41": {
"inputs": {
"upscale_method": "bicubic",
"width": 10060,
"height": 10060,
"crop": "disabled",
"image": [
"46",
1
]
},
"class_type": "ImageScale",
"_meta": {
"title": "Upscale Image"
}
},
"42": {
"inputs": {
"image_paths": [
"36",
0
],
"images": [
"43",
0
]
},
"class_type": "SaveImageToWinchesterDataset",
"_meta": {
"title": "Save Image to Winchester Dataset"
}
},
"43": {
"inputs": {
"upscale_method": "bicubic",
"width": 10060,
"height": 10060,
"crop": "disabled",
"image": [
"36",
1
]
},
"class_type": "ImageScale",
"_meta": {
"title": "Upscale Image"
}
},
"44": {
"inputs": {
"upscale_method": "bicubic",
"width": 10060,
"height": 10060,
"crop": "disabled",
"image": [
"45",
0
]
},
"class_type": "ImageScale",
"_meta": {
"title": "Upscale Image"
}
},
"45": {
"inputs": {
"upscale_model": [
"16",
0
],
"image": [
"61",
0
]
},
"class_type": "ImageUpscaleWithModel",
"_meta": {
"title": "Upscale Image (using Model)"
}
},
"46": {
"inputs": {
"file_pattern": "setcam\\.scene\\.\\d+\\.exr",
"local_paths": [
"1",
1
]
},
"class_type": "ExtractImagesFromDataset",
"_meta": {
"title": "Extract Images from Winchester Dataset"
}
},
"61": {
"inputs": {
"prompt": "Add a pair of aviator sunglasses to the person in the image.",
"resolution": "4K",
"aspect_ratio": "1: 1",
"credentials_path": "s3://secrets/autoqa_system-connect",
"project": "cybertron-gcp-island-test-0rxn",
"image": [
"75:74",
0
]
},
"class_type": "NanaBananaImageEditing",
"_meta": {
"title": "Nano Banana Image Editing"
}
},
"76": {
"inputs": {
"images": [
"40",
0
]
},
"class_type": "PreviewImage",
"_meta": {
"title": "Preview Image"
}
},
"75: 72": {
"inputs": {
"prompt": "cartoon, anime, drawing, painting, illustration,3D render, CGI, video game, unrealistic, stylized, blurry, out of focus, duplicate, watermark",
"clip": [
"75: 66",
0
],
"vae": [
"75: 63",
0
],
"image": [
"75: 70",
0
]
},
"class_type": "TextEncodeQwenImageEdit",
"_meta": {
"title": "TextEncodeQwenImageEdit"
}
},
"75: 63": {
"inputs": {
"vae_name": "qwen_image_vae.safetensors"
},
"class_type": "VAELoader",
"_meta": {
"title": "Load VAE"
}
},
"75: 64": {
"inputs": {
"strength": 1,
"model": [
"75: 65",
0
]
},
"class_type": "CFGNorm",
"_meta": {
"title": "CFGNorm"
}
},
"75: 65": {
"inputs": {
"shift": 3,
"model": [
"75: 69",
0
]
},
"class_type": "ModelSamplingAuraFlow",
"_meta": {
"title": "ModelSamplingAuraFlow"
}
},
"75: 66": {
"inputs": {
"clip_name": "qwen_2.5_vl_7b_fp8_scaled.safetensors",
"type": "qwen_image",
"device": "default"
},
"class_type": "CLIPLoader",
"_meta": {
"title": "Load CLIP"
}
},
"75: 67": {
"inputs": {
"pixels": [
"75: 70",
0
],
"vae": [
"75: 63",
0
]
},
"class_type": "VAEEncode",
"_meta": {
"title": "VAE Encode"
}
},
"75: 68": {
"inputs": {
"seed": 825366418786109,
"steps": 20,
"cfg": 2.5,
"sampler_name": "euler",
"scheduler": "simple",
"denoise": 1,
"model": [
"75: 64",
0
],
"positive": [
"75: 71",
0
],
"negative": [
"75: 72",
0
],
"latent_image": [
"75: 67",
0
]
},
"class_type": "KSampler",
"_meta": {
"title": "KSampler"
}
},
"75: 69": {
"inputs": {
"lora_name": "Qwen-Image-Lightning-4steps-V1.0.safetensors",
"strength_model": 1,
"model": [
"75: 73",
0
]
},
"class_type": "LoraLoaderModelOnly",
"_meta": {
"title": "LoraLoaderModelOnly"
}
},
"75: 70": {
"inputs": {
"upscale_method": "lanczos",
"megapixels": 1,
"image": [
"37",
0
]
},
"class_type": "ImageScaleToTotalPixels",
"_meta": {
"title": "Scale Image to Total Pixels"
}
},
"75: 73": {
"inputs": {
"unet_name": "qwen_image_edit_fp8_e4m3fn.safetensors",
"weight_dtype": "default"
},
"class_type": "UNETLoader",
"_meta": {
"title": "Load Diffusion Model"
}
},
"75: 74": {
"inputs": {
"samples": [
"75: 68",
0
],
"vae": [
"75: 63",
0
]
},
"class_type": "VAEDecode",
"_meta": {
"title": "VAE Decode"
}
},
"75: 71": {
"inputs": {
"prompt": "Make the character photorealistic. DO NOT change the pose, position, or gaze direction of the character. DO NOT CHANGE THE DIRECTION THEIR HEAD AND EYES ARE FACING. DO NOT make any changes to the camera or the background.",
"clip": [
"75: 66",
0
],
"vae": [
"75: 63",
0
],
"image": [
"75: 70",
0
]
},
"class_type": "TextEncodeQwenImageEdit",
"_meta": {
"title": "TextEncodeQwenImageEdit"
}
}
}
}
```
Contributor guide
Research direction
The traceback identifies execution.py lines 804 and 822, where API prompt inputs are validated; start by reading that validation path and compare how the same workflow is submitted through the UI and API. Reproduce the supplied prompt, especially nodes 35, 36, and 46, and determine why validation raises IndexError; done means the API request validates without the reported exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100