Comfy-Org/ComfyUI · error · ValueError
Maximum image resolution for the selected model is 16.78MP,
Error message
Maximum image resolution for the selected model is 16.78MP, but {mp_provided:.2f}MP provided. What it means
Raised by ByteDanceSeedreamNodeV2 in the non-Pro branch when the output size exceeds 16,777,216 pixels (16.78MP), the hard ceiling for Seedream 4.0/4.5/5.0 lite. (Seedream 5.0 Pro has its own lower 4.19MP cap handled earlier.)
Source
Thrown at comfy_api_nodes/nodes_bytedance.py:994
raise ValueError(
f"Minimum image resolution for the selected model is 0.92MP, but {mp_provided:.2f}MP provided."
)
if out_num_pixels > 4_194_304:
raise ValueError(
f"Maximum image resolution for the selected model is 4.19MP, but {mp_provided:.2f}MP provided."
)
else:
if ("seedream-4-5" in model_id or "seedream-5-0" in model_id) and out_num_pixels < 3_686_400:
raise ValueError(
f"Minimum image resolution for the selected model is 3.68MP, but {mp_provided:.2f}MP provided."
)
if "seedream-4-0" in model_id and out_num_pixels < 921_600:
raise ValueError(
f"Minimum image resolution that the selected model can generate is 0.92MP, "
f"but {mp_provided:.2f}MP provided."
)
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."
)View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Cap width*height at 16.78MP, e.g. 4096x4096 or 4992x3360.
- Tile the generation (generate at max size, then upscale locally) instead of exceeding the ceiling.
- Double-check custom width/height for accidental large values.
Example fix
// before size_preset: Custom width: 6240, height: 4992 // 31.1MP -> raises // after size_preset: Custom width: 4096, height: 4096 // 16.78MP at the limit -> passes
Defensive patterns
Strategy: validation
Validate before calling
NON_PRO_MAX = 16_777_216
if w * h > NON_PRO_MAX:
scale = (NON_PRO_MAX / (w * h)) ** 0.5
w, h = int(w * scale), int(h * scale) Prevention
- Sanity-check custom width/height for typos before queueing.
- Tile + upscale locally instead of requesting >16.78MP.
When it happens
Trigger: Any non-Pro model with width*height > 16777216, e.g. custom 5120x3840 (19.66MP) or an extreme custom preset.
Common situations: Pushing for print-resolution single-shot outputs; typo in width/height (e.g. 6240x4992 exceeds the cap despite being the widget maximums for some presets).
Related errors
- Minimum image resolution for the selected model is 0.92MP, b
- Maximum image resolution for the selected model is 4.19MP, b
- Only {len(urls)} of {len(response.data)} images were generat
- 'thinking' can only be disabled for text-to-image; enable it
- Only a single input image is supported.
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/3d2e2450d58dd9b3.
Report an issue: GitHub.