{"record":{"id":"80e9184446e9383b","repo":"Comfy-Org/ComfyUI","slug":"output-dimensions-output-width-x-output-height","errorCode":null,"errorMessage":"Output dimensions ({output_width}x{output_height}) exceed maximum allowed resolution of {max_output_dimension}x{max_output_dimension} pixels. Use a smaller input image or lower scale factor.","messagePattern":"Output dimensions \\((.+?)x(.+?)\\) exceed maximum allowed resolution of (.+?)x(.+?) pixels\\. Use a smaller input image or lower scale factor\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_magnific.py","lineNumber":364,"sourceCode":"                        continue\n                    output_dim = max_dim * candidate\n                    if output_dim <= max_output_dimension:\n                        scale = candidate\n                        max_input_pixels = None\n                        break\n                    downscale_ratio = output_dim / max_output_dimension\n                    if downscale_ratio <= 2.0:\n                        scale = candidate\n                        max_input_dim = max_output_dimension // candidate\n                        scale_ratio = max_input_dim / max_dim\n                        max_input_pixels = int(width * height * scale_ratio * scale_ratio)\n                        break\n\n                if max_input_pixels is not None:\n                    image = downscale_image_tensor(image, total_pixels=max_input_pixels)\n                requested_scale = scale\n            else:\n                raise ValueError(\n                    f\"Output dimensions ({output_width}x{output_height}) exceed maximum allowed \"\n                    f\"resolution of {max_output_dimension}x{max_output_dimension} pixels. \"\n                    f\"Use a smaller input image or lower scale factor.\"\n                )\n\n        final_height, final_width = get_image_dimensions(image)\n        price_usd = _calculate_magnific_upscale_price_usd(final_width, final_height, requested_scale)\n\n        initial_res = await sync_op(\n            cls,\n            ApiEndpoint(path=\"/proxy/freepik/v1/ai/image-upscaler-precision-v2\", method=\"POST\"),\n            response_model=TaskResponse,\n            data=ImageUpscalerPrecisionV2Request(\n                image=(await upload_images_to_comfyapi(cls, image, max_images=1, total_pixels=None))[0],\n                scale_factor=requested_scale,\n                flavor=flavor,\n                sharpen=sharpen,\n                smart_grain=smart_grain,","sourceCodeStart":346,"sourceCodeEnd":382,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_magnific.py#L346-L382","documentation":"Raised by the Magnific precision upscaler v2 node (comfy_api_nodes/nodes_magnific.py:364) when scaled output width or height exceeds 10,060 px and auto_downscale is disabled. The precision endpoint caps each dimension at 10060; with auto_downscale on, the node lowers the scale and downsizes the input instead of erroring.","triggerScenarios":"auto_downscale=False with e.g. a 6000x4000 input at 4x → 24000x16000 exceeds the 10060 per-side cap; any tall/wide image whose longest side times scale > 10060.","commonSituations":"Panoramic or extreme-aspect images whose one dimension blows past the cap even though total pixels seem fine; users chaining upscalers with auto_downscale off for determinism.","solutions":["Enable auto_downscale.","Or pick a smaller scale_factor so width*scale and height*scale both stay ≤ 10060.","Or pre-downscale/crop the long side of the input image."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"MAX_DIM = 10060\nscale = int(scale_factor.strip(\"x\"))\nif image.shape[-2] * scale > MAX_DIM or image.shape[-3] * scale > MAX_DIM:\n    scale_factor = f\"{MAX_DIM // max(image.shape[-2], image.shape[-3])}x\"  # or enable auto_downscale","typeGuard":null,"tryCatchPattern":null,"preventionTips":["The precision endpoint caps each side at 10060px, not total pixels — check the long side.","Panoramas: crop or downscale the long dimension before high-scale upscales."],"tags":["magnific","upscale","dimension-limit","precision-v2","input-validation","comfy-api-nodes"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}