Comfy-Org/ComfyUI · error · ValueError
Maximum image resolution for the selected model is 4.19MP, b
Error message
Maximum image resolution for the selected model is 4.19MP, but {mp_provided:.2f}MP provided. What it means
Raised by ByteDanceSeedreamNodeV2 in the is_pro branch when the resolved output size exceeds 4,194,304 pixels (4.19MP). Seedream 5.0 Pro caps output at 4.19MP (max_width=3136, max_height=2496 in its input schema), and the node enforces this locally before the API call.
Source
Thrown at comfy_api_nodes/nodes_bytedance.py:980
fail_on_partial = model.get("fail_on_partial", False)
w = h = None
for label, tw, th in presets:
if label == size_preset:
w, h = tw, th
break
if w is None or h is None:
w, h = width, height
out_num_pixels = w * h
mp_provided = out_num_pixels / 1_000_000.0
if is_pro:
if out_num_pixels < 921_600:
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]View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Choose a Pro preset from RECOMMENDED_PRESETS_SEEDREAM_5_PRO or set custom width/height so width*height <= 4194304 (e.g. 2560x1600).
- Use 'seedream 5.0 lite' or 'seedream-4-5' when you need outputs above 4.19MP (they allow up to 16.78MP).
- Downscale afterwards locally instead of asking Pro for an oversized render.
Example fix
// before model: seedream 5.0 pro size_preset: Custom width: 3840, height: 2160 // 8.29MP -> raises // after model: seedream 5.0 pro size_preset: Custom width: 2560, height: 1600 // 4.10MP -> passes
Defensive patterns
Strategy: validation
Validate before calling
PRO_MAX = 4_194_304
assert width * height <= PRO_MAX, f'5.0 Pro max 4.19MP, got {width*height/1e6:.2f}MP' Prevention
- Clamp Pro requests to <= 4.19MP (e.g. 2560x1600).
- Do not reuse 4K presets from Seedream 4.5 with 5.0 Pro.
- Prefer the built-in Pro presets over custom sizes.
When it happens
Trigger: Model 'seedream 5.0 pro' with width*height > 4194304, e.g. a 4K preset like 3840x2160 (8.29MP) or custom 3136x2496 with a preset that multiplies over the cap.
Common situations: Reusing a 4K preset built for Seedream 4.5 (which allows up to 16.78MP) after switching the model to 5.0 Pro; assuming all Seedream tiers share the same maximum resolution.
Related errors
- Minimum image resolution for the selected model is 0.92MP, b
- Maximum image resolution for the selected model is 16.78MP,
- 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/e6ea62f9cccbb9b7.
Report an issue: GitHub.