Bria Image Replace Background
Product-photo background swaps without cutting out anything by hand
- image
- referenceImages
- advancedFeatures.watermark.image
- image
Background removal is the most commoditized operation in the ecosystem, and background replacement is where it stops being commoditized. Plain RMBG-style removal gives you a cutout; this node gives you a cutout and then regenerates the background around it - subject kept, new scene painted in from your prompt, in one pass on Bria's servers. It's the product-photo and portrait-headshot workhorse of this pack, and it's also the most feature-rich Bria node on the list, so let's sort the settings that matter from the ones you'll never touch.
What you actually set
- image - required. The subject you're keeping.
- width / height - required, 128–2048 in steps of 64. This is the output canvas the new background is generated at, not the input resolution. If you want the result to stay the same size as the source, set these to match.
- positivePrompt - optional but basically required in spirit: describe the new background. "Studio backdrop, soft gradient, warm light" is a complete sentence to this model.
- providerSettings.bria.mode - an enum of
base/high_control/fast. This is the speed-vs-prompt-adherence trade:high_controlfollows a detailed prompt more closely,fastis for cranking through a batch. - providerSettings.bria.originalQuality - default on. Keeps the source resolution; turn it off and the output is scaled to ~1MP while preserving aspect ratio. Leave it on unless you're batch-testing.
The settings you can mostly ignore
referenceImages is the interesting optional - an IMAGE batch that acts as a style/look reference for the new background, useful when you want several product shots to share one scene. enhanceReferenceImages and refinePrompt both default on and both do what they say (auto-sharpen references, auto-rewrite your prompt for better results). forceBackgroundDetection only matters if your source already has an alpha channel and the model is skipping detection. seed, numberResults, negativePrompt, safety, output format - all standard, all optional.
Output is a single IMAGE socket. Into Save Image, or straight into an upscale node if you need a hero-size version.
Install
Same one-time setup as the rest of the Runware pack - Manager → search Runware, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Runware/ComfyUI-Runware
pip install -r ComfyUI-Runware/requirements.txt
Restart, add your Runware API key (Settings → Runware API key or RUNWARE_API_KEY). No models download; everything runs cloud-side and the request returns a native IMAGE tensor.
Gotchas
The trap here is forgetting the width/height are the output canvas, not "the source size." Set them once and save the workflow and you're fine. Second: background replacement is two billed steps on the API in effect - detect the subject, generate the background - so it costs more than a plain RMBG call, and numberResults multiplies that. And before you build a product pipeline on it, the FIBO-family licensing rules don't apply here - but Bria's other weights have had license caveats in the past, so glance at the model terms if you're shipping. For personal headshots and product mockups, this node is the fastest path from "photo on a desk" to "photo on a seamless studio background" that exists in ComfyUI.
Inputs (27)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| width | INT | 1024128–2048 | Width of the generated media in pixels. |
| height | INT | 1024128–2048 | Height of the generated media in pixels. |
| referenceImagesopt | IMAGE | — | |
| advancedFeatures.watermark.imageopt | IMAGE | — | |
| positivePromptopt | STRING | Text prompt describing elements to include in the generated output. | |
| negativePromptopt | STRING | Prompt to guide what to exclude from generation. Ignored when guidance is disabled (CFGScale ≤ 1). | |
| seedopt | INT | 00–9223372036854776000 | Random seed for reproducible generation. When not provided, a random seed is generated in the unsigned 32-bit range. |
| numberResultsopt | INT | 11–20 | Number of results to generate. Each result uses a different seed, producing variations of the same parameters. |
| advancedFeaturesopt | BOOLEAN | false | Enable to set advancedFeatures. Off uses the model's default. |
| advancedFeatures.watermark.bgColoropt | STRING | Background color in hex format. | |
| advancedFeatures.watermark.displayPositionopt | COMBO | (default) | Watermark position. |
| advancedFeatures.watermark.fontColoropt | STRING | Text color in hex format. | |
| advancedFeatures.watermark.opacityopt | BOOLEAN | false | Enable to set advancedFeatures.watermark.opacity. Off uses the model's default. |
| advancedFeatures.watermark.opacity_valueopt | FLOAT | 0.100.1–1 | Watermark opacity. |
| advancedFeatures.watermark.textopt | STRING | Watermark text. | |
| providerSettings.bria.enhanceReferenceImagesopt | BOOLEAN | true | Apply additional enhancement to reference images. |
| providerSettings.bria.forceBackgroundDetectionopt | BOOLEAN | false | Force background detection even with existing alpha channel. |
| providerSettings.bria.modeopt | COMBO | base | Background generation behavior controlling quality, prompt adherence and speed. |
| providerSettings.bria.originalQualityopt | BOOLEAN | true | Retain original image resolution. When disabled, output is scaled to 1MP while preserving the original aspect ratio. |
| providerSettings.bria.refinePromptopt | BOOLEAN | true | Automatically refine and optimize prompt. |
| safetyopt | BOOLEAN | false | Enable to set safety. Off uses the model's default. |
| safety.checkContentopt | BOOLEAN | false | Enable or disable content safety checking. |
| ttlopt | BOOLEAN | false | Enable to set ttl. Off uses the model's default. |
| ttl_valueopt | INT | 60 | Time-to-live (TTL) in seconds for generated content. Only applies when `outputType` is `URL`. |
| outputFormatopt | COMBO | JPG | File format for the generated image. |
| outputQualityopt | INT | 9520–99 | Compression quality of the output. Higher values preserve quality but increase file size. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |