> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# BriaExpandImage - ComfyUI Built-in Node Documentation

> Bria Expand Image expands an image beyond its original borders by generating new content with Bria.

Bria Expand Image expands an image beyond its original borders by generating new content with Bria. It lets you choose a target aspect ratio, a custom ratio, or define a canvas with manual placement of the original image. The expansion can be guided with a text prompt, and Bria will generate one automatically if the prompt is left empty.

## Inputs

| Parameter                   | Description                                                                                                                                                                                                                                                                                                                                 | Data Type | Required    | Range                                                                                                                                                   |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `image`                     | The input image to be expanded.                                                                                                                                                                                                                                                                                                             | IMAGE     | Yes         | —                                                                                                                                                       |
| `expand_mode`               | Target shape of the expanded image: a preset aspect ratio, a custom ratio, or manual placement of the original image on a canvas. Manual is the only mode that can reach a canvas taller than 1:2. Selecting `custom_ratio` reveals `ratio_width` and `ratio_height`. Selecting `manual` reveals the canvas and image placement parameters. | COMBO     | Yes         | `"1:1"`<br />`"2:3"`<br />`"3:2"`<br />`"3:4"`<br />`"4:3"`<br />`"4:5"`<br />`"5:4"`<br />`"9:16"`<br />`"16:9"`<br />`"custom_ratio"`<br />`"manual"` |
| `ratio_width`               | Width side of the target ratio: 21 and 9 give 21:9. Default: 21.                                                                                                                                                                                                                                                                            | INT       | Conditional | 1–100                                                                                                                                                   |
| `ratio_height`              | Height side of the target ratio: 21 and 9 give 21:9. Bria only accepts width/height between 0.5 and 3.0, so anything taller than 1:2 needs the manual mode. Default: 9.                                                                                                                                                                     | INT       | Conditional | 1–100                                                                                                                                                   |
| `canvas_width`              | Width of the output canvas in pixels. Default: 1000.                                                                                                                                                                                                                                                                                        | INT       | Conditional | 64–5000                                                                                                                                                 |
| `canvas_height`             | Height of the output canvas in pixels. Default: 1000.                                                                                                                                                                                                                                                                                       | INT       | Conditional | 64–5000                                                                                                                                                 |
| `image_width`               | Width of the original image inside the canvas. Default: 500.                                                                                                                                                                                                                                                                                | INT       | Conditional | 1–5000                                                                                                                                                  |
| `image_height`              | Height of the original image inside the canvas. Default: 500.                                                                                                                                                                                                                                                                               | INT       | Conditional | 1–5000                                                                                                                                                  |
| `image_x`                   | X position of the image's top-left corner inside the canvas; may fall outside the canvas, cropping the image. Default: 250.                                                                                                                                                                                                                 | INT       | Conditional | -5000–5000                                                                                                                                              |
| `image_y`                   | Y position of the image's top-left corner inside the canvas; may fall outside the canvas, cropping the image. Default: 250.                                                                                                                                                                                                                 | INT       | Conditional | -5000–5000                                                                                                                                              |
| `prompt`                    | Optional description of the expanded scene; when empty, Bria generates one from the image. Default: empty string.                                                                                                                                                                                                                           | STRING    | No          | Any string                                                                                                                                              |
| `negative_prompt`           | An optional negative prompt for the expansion. Default: empty string.                                                                                                                                                                                                                                                                       | STRING    | No          | Any string                                                                                                                                              |
| `seed`                      | Seed for the random generation process. Default: 42.                                                                                                                                                                                                                                                                                        | INT       | No          | 1–2147483647                                                                                                                                            |
| `moderation`                | Moderation settings. When set to `true`, additional moderation options are shown.                                                                                                                                                                                                                                                           | COMBO     | No          | `"false"`<br />`"true"`                                                                                                                                 |
| `prompt_content_moderation` | If enabled, moderates the prompt content. Default: false. Only available when `moderation` is `true`.                                                                                                                                                                                                                                       | BOOLEAN   | Conditional | true/false                                                                                                                                              |
| `visual_input_moderation`   | If enabled, moderates the visual input. Default: false. Only available when `moderation` is `true`.                                                                                                                                                                                                                                         | BOOLEAN   | Conditional | true/false                                                                                                                                              |
| `visual_output_moderation`  | If enabled, moderates the visual output. Default: false. Only available when `moderation` is `true`.                                                                                                                                                                                                                                        | BOOLEAN   | Conditional | true/false                                                                                                                                              |

When `expand_mode` is `custom_ratio`, `ratio_width` and `ratio_height` define a target aspect ratio. Bria only accepts width-to-height ratios between 0.5 and 3.0. If the ratio is outside this range, an error is raised and the `manual` mode should be used instead.

When `expand_mode` is `manual`, the original image is placed on a canvas at the specified size and position. The image may extend outside the canvas, in which case the outside portion is cropped.

When `moderation` is `true`, the three moderation booleans are sent to Bria. When `moderation` is `false`, they are ignored.

## Outputs

| Output Name | Description                                                                               | Data Type |
| ----------- | ----------------------------------------------------------------------------------------- | --------- |
| `image`     | The expanded image generated by Bria.                                                     | IMAGE     |
| `prompt`    | The prompt used for the expansion; auto-generated by Bria when the prompt input is empty. | STRING    |

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/BriaExpandImage/en.md)

***

**Source fingerprint (SHA-256):** `d2c9431837f200ccbcb39037f7b26013494c4dea3d40d899db4e717ddbbea71c`
