Model Details
GenFill V2 performs generative fill (inpainting) on an image you provide. You pass a source image, a binary black-and-white mask marking the region to change, and a short text instruction describing what should appear there. The model regenerates only the masked area and blends it into the surrounding pixels, matching the existing lighting, perspective, and style. Its standout is that outputs are commercially safe and cleared for risk-free business use, so generated content can ship in production work without licensing worry.
## Best for - Adding an object or element inside a precise region of a photo (a product on a shelf, a prop on a table, a sign on a wall) - Removing an unwanted element by masking it and instructing a replacement (clear a person from a background, swap a label) - Localized retouching and repair where only one area should change and the rest must stay pixel-identical - Product and marketing imagery where the result must be safe to use commercially
## Choose another model when - You want a brand-new image from a text prompt with no source image — use a text-to-image model - You want to restyle or transform the whole image rather than fill one masked region — use a general image-to-image / image-editing model - You need to extend the canvas beyond the image borders (outpainting) — this model fills inside a mask only and does not expand the frame
## Tips - The `mask_url` image must match the source dimensions exactly; white pixels mark the region to fill, black pixels are preserved - Clean, well-aligned mask edges prevent visible seams — ragged masks leave artifacts at the boundary - Keep the mask close to the size of the object you want; oversized masks invite unwanted background changes, and very small masks leave too little room for fine detail - Write a concrete `instruction` for only what belongs in the masked area, not a full-scene description
## Advanced Configuration
### steps_num Number of inference steps, 20–50 (default 30). Higher values can improve detail and coherence at the cost of latency; lower values are faster. Leave it at the default unless you need to trade quality against speed.
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", }, }); ```


