{"record":{"id":"c5255659c9f46896","repo":"Comfy-Org/ComfyUI","slug":"this-image-cannot-be-upscaled-by-bria-at-any-multi","errorCode":null,"errorMessage":"This image cannot be upscaled by Bria at any multiplier: it is {width}x{height}, and Bria first enlarges the short side to {BRIA_MIN_SHORT_SIDE} pixels, which pushes the long side past the {BRIA_MAX_OUTPUT_SIDE} pixel limit. Crop it to a squarer shape first.","messagePattern":"This image cannot be upscaled by Bria at any multiplier: it is (.+?)x(.+?), and Bria first enlarges the short side to (.+?) pixels, which pushes the long side past the (.+?) pixel limit\\. Crop it to a squarer shape first\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_bria.py","lineNumber":739,"sourceCode":"        if _upscaled_output_side(height, width, multiplier) > BRIA_MAX_OUTPUT_SIDE:\n            candidates = [c for c in (4, 2) if c <= multiplier]\n            if not auto_downscale:\n                predicted = _upscaled_output_side(height, width, multiplier)\n                raise ValueError(\n                    f\"Bria can upscale up to a maximum output dimension of {BRIA_MAX_OUTPUT_SIDE} pixels: \"\n                    f\"input is {width}x{height}, x{multiplier} would be {predicted} pixels on the long side. \"\n                    f\"Enable auto_downscale, or use a smaller input image or a lower multiplier.\"\n                )\n            fitted = next(\n                (c for c in candidates if _upscaled_output_side(height, width, c) <= BRIA_MAX_OUTPUT_SIDE), None\n            )\n            if fitted is not None:\n                multiplier = fitted\n            else:\n                shrinkable = next((c for c in sorted(candidates) if _smallest_output_side(height, width, c)\n                                   <= BRIA_MAX_OUTPUT_SIDE), None)\n                if shrinkable is None:\n                    raise ValueError(\n                        f\"This image cannot be upscaled by Bria at any multiplier: it is {width}x{height}, and \"\n                        f\"Bria first enlarges the short side to {BRIA_MIN_SHORT_SIDE} pixels, which pushes the \"\n                        f\"long side past the {BRIA_MAX_OUTPUT_SIDE} pixel limit. Crop it to a squarer shape first.\"\n                    )\n                multiplier = shrinkable\n                image = downscale_image_tensor_by_max_side(image, max_side=BRIA_MAX_OUTPUT_SIDE // multiplier)\n        response = await sync_op(\n            cls,\n            ApiEndpoint(path=\"/proxy/bria/v2/image/edit/increase_resolution\", method=\"POST\"),\n            data=BriaIncreaseResolutionRequest(\n                image=await upload_image_to_comfyapi(cls, image, total_pixels=None, wait_label=\"Uploading image\"),\n                desired_increase=multiplier,\n                visual_input_content_moderation=moderation.get(\"visual_input_moderation\", False),\n                visual_output_content_moderation=moderation.get(\"visual_output_moderation\", False),\n            ),\n            response_model=BriaStatusResponse,\n        )\n        response = await poll_op(","sourceCodeStart":721,"sourceCodeEnd":757,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_bria.py#L721-L757","documentation":"Hardest Bria upscale failure: Bria first enlarges the short side to BRIA_MIN_SHORT_SIDE pixels, and for extremely elongated images that enlargement alone pushes the long side past BRIA_MAX_OUTPUT_SIDE. No multiplier (not even after downscaling candidates) can satisfy the limit, so the node tells you to crop to a squarer shape.","triggerScenarios":"auto_downscale is on, no candidate multiplier (4, 2) fits, and even _smallest_output_side exceeds the cap - i.e. an image so wide/tall that short-side normalization blows the long-side budget.","commonSituations":"Panoramas, ultra-wide strips (e.g. 8000x200), or tall storyboard strips fed straight into the upscaler.","solutions":["Crop or split the image into squarer tiles, upscale each, and reassemble.","Reduce the extreme aspect ratio before upscaling (letterbox or resize proportionally).","Use a different upscaler (local model) for extreme aspect ratios."],"exampleFix":"# before: 8192x1024 panorama straight into Bria upscale\n# after: tile it\n.tiles = split_horizontal(image, overlap=64); results = [bria_upscale(t) for t in tiles]; image = stitch_horizontal(results)","handlingStrategy":"validation","validationCode":"h, w = get_image_dimensions(image)\n# short side gets enlarged to BRIA_MIN_SHORT_SIDE; resulting long side must fit\nworst_long = max(w, h) * (BRIA_MIN_SHORT_SIDE / min(w, h))\nif worst_long > BRIA_MAX_OUTPUT_SIDE:\n    raise UserError('Image too elongated for Bria upscale - crop/tile first.')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check aspect ratio before Bria upscaling: extremely wide/tall images must be tiled.","Keep the short side at or above BRIA_MIN_SHORT_SIDE so no enlargement is needed."],"tags":["comfyui","bria","upscale","limits","aspect-ratio"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}