Skip to content

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

Description

@brunocasado

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions