Logo
Profile

bria / genfill/v2

Fill a masked region of your image with new content described by a text instruction, using a commercially safe generative-fill model.

0.04 per megapixel of image

Model Input

Input

Describe what should be generated inside the masked region of the source image.

The source image to edit.

A binary black-and-white mask the same size as the source image. White marks the region to fill; black is preserved.

Random seed for reproducibility. The same seed, instruction, image, and mask produce the same result.

Min: 20 - Max: 50

Number of inference steps (20-50). Higher values can improve detail at the cost of latency.

You need to be logged in to run this model and view results.
Log in

Model Output

Output

preview
Generated in 20.146 seconds
Logs (1 lines)

Model Example Requests

Examples

5iPkxLrawYJS2bsgqxUMMtnn50xxsba1Nh8YzWs6sZ

Model Details

Model Details

Bria GenFill V2 performs generative fill (inpainting) on your image. You supply a source image, a binary mask marking the region you want to change, and a short text instruction describing what should appear there. GenFill V2 generates new content that fills only the masked area while blending naturally into the surrounding pixels, matching the existing lighting, perspective, and style. Use it to add objects, replace elements, repair damage, or extend scenes inside a precise region you control.

Bria models are trained exclusively on fully licensed data, making outputs safe and risk-free for commercial use.

## Features - Region-precise editing — changes are confined to the white area of your mask, leaving the rest of the image untouched - Instruction-driven — describe the fill in plain language instead of tuning low-level parameters - Seamless blending — generated content adopts the source image's lighting, color, and depth of field - Commercial-safe — built on licensed training data for risk-free commercial output

## What it's good at - Adding or replacing objects in a specific part of a photo (e.g. placing a product, a person, or a prop) - Removing-and-replacing unwanted elements by masking them and instructing a replacement - Localized retouching and scene extension where you need tight control over what changes

## Tips - Write a concise, concrete instruction describing only what belongs in the masked region - Keep the masked area proportionate to the object you want — overly large masks invite unwanted background changes - Reuse a `seed` to reproduce a result, or change it to explore alternatives

## Limitations - Quality depends on mask accuracy; ragged or misaligned masks produce visible seams - Very small masks may not give the model enough room to render fine detail

## Advanced Configuration

### mask_url A black-and-white mask image that selects the region to fill. White pixels mark the area GenFill V2 will regenerate; black pixels are preserved from the source. The mask must be the same dimensions as the source image, otherwise the regions will not line up. This is supplied as a URL alongside `image_url`.

```js input: { image_url: "...", mask_url: "https://.../mask.png", instruction: "a red flower" } ```

### steps_num The number of inference steps, accepted in the range 20–50 (default 30). Higher values can improve detail and coherence at the cost of longer generation time; lower values are faster. Leave it at the default unless you specifically need to trade quality against latency.

```js input: { image_url: "...", mask_url: "...", instruction: "...", steps_num: 40 } ```

To run via the ModelRunner JavaScript client: ```js import { modelrunner } from "@modelrunner/client";

const result = await modelrunner.subscribe("bria/genfill/v2", { input: { image_url: "https://media.modelrunner.ai/example-source.png", mask_url: "https://media.modelrunner.ai/example-mask.png", instruction: "a beautiful colorful butterfly", }, }); ```