{"record":{"id":"e6ea62f9cccbb9b7","repo":"Comfy-Org/ComfyUI","slug":"maximum-image-resolution-for-the-selected-model-is-e6ea62","errorCode":null,"errorMessage":"Maximum image resolution for the selected model is 4.19MP, but {mp_provided:.2f}MP provided.","messagePattern":"Maximum image resolution for the selected model is 4\\.19MP, but (.+?)MP provided\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_bytedance.py","lineNumber":980,"sourceCode":"        fail_on_partial = model.get(\"fail_on_partial\", False)\n\n        w = h = None\n        for label, tw, th in presets:\n            if label == size_preset:\n                w, h = tw, th\n                break\n        if w is None or h is None:\n            w, h = width, height\n\n        out_num_pixels = w * h\n        mp_provided = out_num_pixels / 1_000_000.0\n        if is_pro:\n            if out_num_pixels < 921_600:\n                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]","sourceCodeStart":962,"sourceCodeEnd":998,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_bytedance.py#L962-L998","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nmodel: seedream 5.0 pro\nsize_preset: Custom\nwidth: 3840, height: 2160 // 8.29MP -> raises\n\n// after\nmodel: seedream 5.0 pro\nsize_preset: Custom\nwidth: 2560, height: 1600 // 4.10MP -> passes","handlingStrategy":"validation","validationCode":"PRO_MAX = 4_194_304\nassert width * height <= PRO_MAX, f'5.0 Pro max 4.19MP, got {width*height/1e6:.2f}MP'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"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"}