Comfy-Org/ComfyUI · error · ValueError

This image cannot be upscaled by Bria at any multiplier: it…

Error message

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.

What it means

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.

Solutions

  1. Crop or split the image into squarer tiles, upscale each, and reassemble.
  2. Reduce the extreme aspect ratio before upscaling (letterbox or resize proportionally).
  3. Use a different upscaler (local model) for extreme aspect ratios.

Example fix

# before: 8192x1024 panorama straight into Bria upscale
# after: tile it
.tiles = split_horizontal(image, overlap=64); results = [bria_upscale(t) for t in tiles]; image = stitch_horizontal(results)
Defensive patterns

Strategy: validation

Validate before calling

h, w = get_image_dimensions(image)
# short side gets enlarged to BRIA_MIN_SHORT_SIDE; resulting long side must fit
worst_long = max(w, h) * (BRIA_MIN_SHORT_SIDE / min(w, h))
if worst_long > BRIA_MAX_OUTPUT_SIDE:
    raise UserError('Image too elongated for Bria upscale - crop/tile first.')

Prevention

When it happens

Trigger: 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.

Common situations: Panoramas, ultra-wide strips (e.g. 8000x200), or tall storyboard strips fed straight into the upscaler.

Related errors


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

Appendix: source

Thrown at comfy_api_nodes/nodes_bria.py:739

        if _upscaled_output_side(height, width, multiplier) > BRIA_MAX_OUTPUT_SIDE:
            candidates = [c for c in (4, 2) if c <= multiplier]
            if not auto_downscale:
                predicted = _upscaled_output_side(height, width, multiplier)
                raise ValueError(
                    f"Bria can upscale up to a maximum output dimension of {BRIA_MAX_OUTPUT_SIDE} pixels: "
                    f"input is {width}x{height}, x{multiplier} would be {predicted} pixels on the long side. "
                    f"Enable auto_downscale, or use a smaller input image or a lower multiplier."
                )
            fitted = next(
                (c for c in candidates if _upscaled_output_side(height, width, c) <= BRIA_MAX_OUTPUT_SIDE), None
            )
            if fitted is not None:
                multiplier = fitted
            else:
                shrinkable = next((c for c in sorted(candidates) if _smallest_output_side(height, width, c)
                                   <= BRIA_MAX_OUTPUT_SIDE), None)
                if shrinkable is None:
                    raise ValueError(
                        f"This image cannot be upscaled by Bria at any multiplier: it is {width}x{height}, and "
                        f"Bria first enlarges the short side to {BRIA_MIN_SHORT_SIDE} pixels, which pushes the "
                        f"long side past the {BRIA_MAX_OUTPUT_SIDE} pixel limit. Crop it to a squarer shape first."
                    )
                multiplier = shrinkable
                image = downscale_image_tensor_by_max_side(image, max_side=BRIA_MAX_OUTPUT_SIDE // multiplier)
        response = await sync_op(
            cls,
            ApiEndpoint(path="/proxy/bria/v2/image/edit/increase_resolution", method="POST"),
            data=BriaIncreaseResolutionRequest(
                image=await upload_image_to_comfyapi(cls, image, total_pixels=None, wait_label="Uploading image"),
                desired_increase=multiplier,
                visual_input_content_moderation=moderation.get("visual_input_moderation", False),
                visual_output_content_moderation=moderation.get("visual_output_moderation", False),
            ),
            response_model=BriaStatusResponse,
        )
        response = await poll_op(

View on GitHub (pinned to 1c6d8d45b3)