CQL preflight rejects zero-slot COMFY_AUTOGROW_V3 inputs even when template min is 0

Open Beginner friendly
#907 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
86/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
cli

Research direction

Start in comfy_cli/cql/engine.py at _check_autogrow_required(), then reproduce the issue with the provided comfy run command and workflow. Confirm that a required autogrow input with template.min set to 0 is accepted, while genuinely positive lower bounds remain rejected.

Written by the indexing model from the issue text.

Description

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
  1. 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]
    }
  }
}
  1. Confirm the live /object_info schema for TextEncodeQwenImage21.images declares COMFY_AUTOGROW_V3 with template.min: 0.
  2. 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.

Dominant language
Python
Stars
974
Forks
152
Avg merge
1d 17h
Merged PRs (30d)
83

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Comfy-Org/comfy-cli

All issues in Comfy-Org/comfy-cli

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.