Describe the bug
comfy run rejects a valid Qwen Image 2.1 text-to-image workflow when TextEncodeQwenImage21.images has no reference images. This blocks comfy-mcp's run_workflow tool as well, because it wraps comfy run.
The ComfyUI server accepts and executes the identical API prompt through POST /prompt; only the client-side CQL preflight rejects it.
To Reproduce
Environment:
comfy-cli 1.20.0
- ComfyUI with
TextEncodeQwenImage21 available
- Use a Qwen Image 2.1 text-to-image workflow containing this node input (with no
images.* link):
{
"452": {
"class_type": "TextEncodeQwenImage21",
"inputs": {
"prompt": "a golden retriever puppy",
"negative_prompt": "",
"resolution": 1024,
"clip": ["453", 0]
}
}
}
- Confirm the live
/object_info schema for TextEncodeQwenImage21.images declares COMFY_AUTOGROW_V3 with template.min: 0.
- Run the complete API-format workflow:
comfy run --workflow qwen-api.json --host 127.0.0.1 --port 8188 --wait --json
Actual behavior
The CLI rejects the workflow before submitting it:
workflow_unknown_nodes
node 452: required autogrow input 'images' has no connected slots — the server will reject this node
The same prompt, submitted directly to POST /prompt, returns a prompt_id, completes successfully, and produces an image.
Expected behavior
A required autogrow input whose template declares min: 0 should be allowed to have zero expanded slots. The CLI should submit this valid text-to-image graph.
Likely fix
In comfy_cli/cql/engine.py, _check_autogrow_required() currently treats port.required as sufficient. It should also respect the autogrow lower bound, e.g. only emit autogrow_no_slots when port.autogrow_limits[0] > 0.
This preserves rejection for genuinely required autogrow inputs while allowing Qwen Image 2.1 text-to-image workflows with no reference images.
Additional context
This is not a ComfyUI server bug: the server schema explicitly permits zero images and accepts the request. It is a comfy-cli CQL preflight validation bug that manifests through comfy-mcp.
Describe the bug
comfy runrejects a valid Qwen Image 2.1 text-to-image workflow whenTextEncodeQwenImage21.imageshas no reference images. This blockscomfy-mcp'srun_workflowtool as well, because it wrapscomfy run.The ComfyUI server accepts and executes the identical API prompt through
POST /prompt; only the client-side CQL preflight rejects it.To Reproduce
Environment:
comfy-cli 1.20.0TextEncodeQwenImage21availableimages.*link):{ "452": { "class_type": "TextEncodeQwenImage21", "inputs": { "prompt": "a golden retriever puppy", "negative_prompt": "", "resolution": 1024, "clip": ["453", 0] } } }/object_infoschema forTextEncodeQwenImage21.imagesdeclaresCOMFY_AUTOGROW_V3withtemplate.min: 0.Actual behavior
The CLI rejects the workflow before submitting it:
The same prompt, submitted directly to
POST /prompt, returns aprompt_id, completes successfully, and produces an image.Expected behavior
A required autogrow input whose template declares
min: 0should be allowed to have zero expanded slots. The CLI should submit this valid text-to-image graph.Likely fix
In
comfy_cli/cql/engine.py,_check_autogrow_required()currently treatsport.requiredas sufficient. It should also respect the autogrow lower bound, e.g. only emitautogrow_no_slotswhenport.autogrow_limits[0] > 0.This preserves rejection for genuinely required autogrow inputs while allowing Qwen Image 2.1 text-to-image workflows with no reference images.
Additional context
This is not a ComfyUI server bug: the server schema explicitly permits zero images and accepts the request. It is a
comfy-cliCQL preflight validation bug that manifests throughcomfy-mcp.