{"record":{"id":"3d2e2450d58dd9b3","repo":"Comfy-Org/ComfyUI","slug":"maximum-image-resolution-for-the-selected-model-is-3d2e24","errorCode":null,"errorMessage":"Maximum image resolution for the selected model is 16.78MP, but {mp_provided:.2f}MP provided.","messagePattern":"Maximum image resolution for the selected model is 16\\.78MP, but (.+?)MP provided\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_bytedance.py","lineNumber":994,"sourceCode":"                raise ValueError(\n                    f\"Minimum image resolution for the selected model is 0.92MP, but {mp_provided:.2f}MP provided.\"\n                )\n            if out_num_pixels > 4_194_304:\n                raise ValueError(\n                    f\"Maximum image resolution for the selected model is 4.19MP, but {mp_provided:.2f}MP provided.\"\n                )\n        else:\n            if (\"seedream-4-5\" in model_id or \"seedream-5-0\" in model_id) and out_num_pixels < 3_686_400:\n                raise ValueError(\n                    f\"Minimum image resolution for the selected model is 3.68MP, but {mp_provided:.2f}MP provided.\"\n                )\n            if \"seedream-4-0\" in model_id and out_num_pixels < 921_600:\n                raise ValueError(\n                    f\"Minimum image resolution that the selected model can generate is 0.92MP, \"\n                    f\"but {mp_provided:.2f}MP provided.\"\n                )\n            if out_num_pixels > 16_777_216:\n                raise ValueError(\n                    f\"Maximum image resolution for the selected model is 16.78MP, but {mp_provided:.2f}MP provided.\"\n                )\n\n        image_tensors: list[Input.Image] = [t for t in images_dict.values() if t is not None]\n        n_input_images = sum(get_number_of_images(t) for t in image_tensors)\n        max_num_of_images = 14 if model_id == \"seedream-5-0-260128\" else 10\n        if n_input_images > max_num_of_images:\n            raise ValueError(\n                f\"Maximum of {max_num_of_images} reference images are supported, but {n_input_images} received.\"\n            )\n        if sequential_image_generation == \"auto\" and n_input_images + max_images > 15:\n            raise ValueError(\n                \"The maximum number of generated images plus the number of reference images cannot exceed 15.\"\n            )\n        if not thinking and n_input_images > 0:\n            raise ValueError(\n                \"'thinking' can only be disabled for text-to-image; enable it when using reference images.\"\n            )","sourceCodeStart":976,"sourceCodeEnd":1012,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_bytedance.py#L976-L1012","documentation":"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.)","triggerScenarios":"Any non-Pro model with width*height > 16777216, e.g. custom 5120x3840 (19.66MP) or an extreme custom preset.","commonSituations":"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).","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."],"exampleFix":"// before\nsize_preset: Custom\nwidth: 6240, height: 4992 // 31.1MP -> raises\n\n// after\nsize_preset: Custom\nwidth: 4096, height: 4096 // 16.78MP at the limit -> passes","handlingStrategy":"validation","validationCode":"NON_PRO_MAX = 16_777_216\nif w * h > NON_PRO_MAX:\n    scale = (NON_PRO_MAX / (w * h)) ** 0.5\n    w, h = int(w * scale), int(h * scale)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Sanity-check custom width/height for typos before queueing.","Tile + upscale locally instead of requesting >16.78MP."],"tags":["bytedance","seedream","resolution-validation","api-nodes"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}