Comfy-Org/ComfyUI · error · ValueError

Minimum image resolution that the selected model can generat

Error message

Minimum image resolution that the selected model can generate is 0.92MP, but {mp_provided:.2f}MP provided.

What it means

Seedream 4.0 enforces its own lower bound of 921,600 pixels (0.92MP). The node checks this only when 'seedream-4-0' is in the model string and raises with the computed megapixel value when the requested size is smaller.

Source

Thrown at comfy_api_nodes/nodes_bytedance.py:710

        model = SEEDREAM_MODELS[model]
        validate_string(prompt, strip_whitespace=True, min_length=1)
        w = h = None
        for label, tw, th in RECOMMENDED_PRESETS_SEEDREAM_4:
            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 ("seedream-4-5" in model or "seedream-5-0" in model) and out_num_pixels < 3686400:
            raise ValueError(
                f"Minimum image resolution for the selected model is 3.68MP, " f"but {mp_provided:.2f}MP provided."
            )
        if "seedream-4-0" in model and out_num_pixels < 921600:
            raise ValueError(
                f"Minimum image resolution that the selected model can generate is 0.92MP, "
                f"but {mp_provided:.2f}MP provided."
            )
        max_pixels = 10_404_496 if "seedream-5-0" in model else 16_777_216
        if out_num_pixels > max_pixels:
            raise ValueError(
                f"Maximum image resolution for the selected model is {max_pixels / 1_000_000:.2f}MP, "
                f"but {mp_provided:.2f}MP provided."
            )
        n_input_images = get_number_of_images(image) if image is not None else 0
        max_num_of_images = 14 if model == "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."

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Increase width*height to >= 921600 pixels (960x960 or larger).
  2. Use a recommended Seedream 4.0 preset.
  3. Downscale the output locally if a smaller image is needed.

Example fix

// before
model: 'seedream-4-0', width: 512, height: 512
// after
model: 'seedream-4-0', width: 1024, height: 1024
Defensive patterns

Strategy: validation

Validate before calling

if 'seedream-4-0' in model and width * height < 921_600:
    width = height = 1024  # smallest compliant square

Prevention

When it happens

Trigger: Model contains 'seedream-4-0' and w*h < 921600 - e.g. 512x512 (0.26MP) custom size.

Common situations: Small test generations at 512x512; thumbnails requested via custom size; preset label missing so custom 512 values are used.

Related errors


AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14). Data as JSON: /api/errors/f6ae50e04ff48185. Report an issue: GitHub.