> ## 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.

# BriaReplaceImageBackground - ComfyUI Built-in Node Documentation

> This node replaces the background of an image with a new one generated by Bria.

This node replaces the background of an image with a new one generated by Bria. The new background can be described with a text prompt or guided by reference images. The subject's pixels are preserved while the background is generated around them.

## Inputs

### Common Inputs

| Parameter          | Description                                                                                                                                        | Data Type      | Required | Range                                |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | -------- | ------------------------------------ |
| `image`            | The input image whose background will be replaced.                                                                                                 | IMAGE          | Yes      |                                      |
| `background`       | Describe the new background with a prompt, or guide it with reference images.                                                                      | DYNAMIC\_COMBO | Yes      | `"prompt"`<br />`"reference images"` |
| `original_quality` | Return the input's exact pixel size instead of scaling the result to about 1 megapixel. A large input then returns a large image. (default: false) | BOOLEAN        | No       | `true`<br />`false`                  |
| `seed`             | The same seed usually returns the same background; the automatic prompt refinement can still vary it. (default: 42)                                | INT            | No       | 0 to 2147483647                      |
| `moderation`       | Moderation settings. (default: "false")                                                                                                            | DYNAMIC\_COMBO | No       | `"false"`<br />`"true"`              |

### Prompt Inputs

Shown when `background` is set to `"prompt"`.

| Parameter       | Description                                                                                                                                          | Data Type | Required | Range                                        |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------- | -------------------------------------------- |
| `prompt`        | Description of the new background. A hex color code such as #FF5733 produces a solid color background. Must be at least 1 character long.            | STRING    | Yes      |                                              |
| `mode`          | `high_control` follows the prompt most closely, `base` is a balanced default and `fast` trades detail for speed.                                     | COMBO     | Yes      | `"high_control"`<br />`"base"`<br />`"fast"` |
| `refine_prompt` | Rewrite the prompt for better results, which also translates non-English prompts. Turn it off to send the prompt exactly as written. (default: true) | BOOLEAN   | No       | `true`<br />`false`                          |

### Reference Images Inputs

Shown when `background` is set to `"reference images"`.

| Parameter            | Description                                                                                                                                                                                                                         | Data Type | Required | Range               |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------- | ------------------- |
| `ref_images`         | Growable slot: connect 1 to 10 images guiding the new background; they do not need to share a size. Every reference changes the result, so a few consistent ones beat many conflicting ones. A batched input counts once per image. | IMAGE     | Yes      | 1 to 10 images      |
| `enhance_ref_images` | Extra processing of the reference images for better results. (default: true)                                                                                                                                                        | BOOLEAN   | No       | `true`<br />`false` |

### Moderation Inputs

Shown when `moderation` is set to `"true"`.

| Parameter                   | Description                                            | Data Type | Required | Range               |
| --------------------------- | ------------------------------------------------------ | --------- | -------- | ------------------- |
| `prompt_content_moderation` | Enable moderation for prompt content. (default: false) | BOOLEAN   | No       | `true`<br />`false` |
| `visual_input_moderation`   | Enable moderation for visual input. (default: false)   | BOOLEAN   | No       | `true`<br />`false` |
| `visual_output_moderation`  | Enable moderation for visual output. (default: false)  | BOOLEAN   | No       | `true`<br />`false` |

**Note:** The `ref_images` input accepts a maximum of 10 images; providing more than 10 returns an error. The `prompt` field must contain at least 1 character. When `original_quality` is false, the input image is downscaled to about 1 megapixel before processing.

## Outputs

| Output Name      | Description                                                        | Data Type |
| ---------------- | ------------------------------------------------------------------ | --------- |
| `image`          | The image with the new background.                                 | IMAGE     |
| `refined_prompt` | The prompt Bria generated from, empty on the reference-image path. | 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/BriaReplaceImageBackground/en.md)

***

**Source fingerprint (SHA-256):** `62c29d61983c9656d2ea2954518404c62d76961c3deba0e10d63e787d0b0b106`
