Comfy-Org/ComfyUI · error · ValueError
'thinking' can only be disabled for text-to-image; enable it
Error message
'thinking' can only be disabled for text-to-image; enable it when using reference images.
What it means
Raised by ByteDanceSeedreamNodeV2 when the 'thinking' toggle is disabled (advanced input, default True) while reference images are connected. Seedream's prompt-optimization reasoning can only be turned off for pure text-to-image requests; image-conditioned requests must keep it enabled.
Source
Thrown at comfy_api_nodes/nodes_bytedance.py:1010
)
if out_num_pixels > 16_777_216:
raise ValueError(
f"Maximum image resolution for the selected model is 16.78MP, but {mp_provided:.2f}MP provided."
)
image_tensors: list[Input.Image] = [t for t in images_dict.values() if t is not None]
n_input_images = sum(get_number_of_images(t) for t in image_tensors)
max_num_of_images = 14 if model_id == "seedream-5-0-260128" else 10
if n_input_images > max_num_of_images:
raise ValueError(
f"Maximum of {max_num_of_images} reference images are supported, but {n_input_images} received."
)
if sequential_image_generation == "auto" and n_input_images + max_images > 15:
raise ValueError(
"The maximum number of generated images plus the number of reference images cannot exceed 15."
)
if not thinking and n_input_images > 0:
raise ValueError(
"'thinking' can only be disabled for text-to-image; enable it when using reference images."
)
reference_images_urls: list[str] = []
if image_tensors:
for tensor in image_tensors:
validate_image_aspect_ratio(tensor, (1, 3), (3, 1))
reference_images_urls = await upload_images_to_comfyapi(
cls,
image_tensors,
max_images=n_input_images,
mime_type="image/png",
wait_label="Uploading reference images",
)
optimize_prompt_options = None
if n_input_images == 0:
optimize_prompt_options = Seedream5OptimizePromptOptions(thinking="enabled" if thinking else "disabled")View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Re-enable 'thinking' (leave it True) whenever reference images are connected.
- Remove the reference images if you truly want thinking disabled.
- Keep thinking at its default True unless the request is pure text-to-image.
Example fix
// before thinking: false images: [reference.png] // -> raises // after thinking: true images: [reference.png] // passes
Defensive patterns
Strategy: validation
Validate before calling
if image_tensors: # any reference images connected
thinking = True # force-enable; cannot be off for i2i Prevention
- Treat thinking=True as the only valid setting in image-conditioned workflows.
- Audit node configs copied between t2i and i2i graphs.
When it happens
Trigger: Connecting any image input (model dict 'images' with non-None tensors) and setting thinking=False in the node's advanced settings.
Common situations: Turning off thinking to save time on a text-to-image workflow, then adding a reference image later without re-enabling it; copying a node configuration between t2i and i2i workflows.
Related errors
- Only a single input image is supported.
- Minimum image resolution for the selected model is 3.68MP, b
- Minimum image resolution that the selected model can generat
- Maximum image resolution for the selected model is {max_pixe
- Maximum of {max_num_of_images} reference images are supporte
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/96a375f70497e628.
Report an issue: GitHub.