FLUX.1 [dev] Fill with LoRAs

edit

fal-ai/flux-lora-fill

FLUX.1 Fill: purpose-built inpainting and outpainting with LoRA support.

Runs the dedicated FLUX.1 Fill model rather than plain dev inpainting, which is why its guidance default sits at 30 instead of 3.5. It can paste the untouched original back around the fill and even place a provided image into the masked region. Reach for it when fill quality matters more than raw speed.

Parameters

Schema facts from the fal API; the notes are ours.

Required

image_urlstringrequired

Input image for image-to-image, editing or video conditioning.

Raw schema description

URL of image to use for fill operation

mask_urlstringrequired

Mask defining which region gets repainted in inpainting.

Raw schema description

The mask to area to Inpaint in.

Optional

promptstring

The text description of what to generate.

Tip: If your LoRA used a trigger word, include it. Describe the scene around the subject normally.

Raw schema description

The prompt to generate an image from.

image_sizeobject

Output resolution, as a preset name or explicit width and height.

Raw schema description

The size of the generated image.

num_inference_stepsintegerdefault: 28150

Number of denoising steps per image. More steps, more refinement, more latency.

Tip: Defaults are tuned per model. Cutting steps in half is the quickest way to trade quality for speed.

Raw schema description

The number of inference steps to perform.

seedinteger

Random seed. Same seed plus same inputs gives a nearly identical image.

Tip: Fix the seed when comparing LoRA scales or parameters, so the only thing changing is the thing you are testing.

Raw schema description

The same seed and the same prompt given to the same version of the model will output the same image every time.

loraslistdefault: []

List of LoRA weights to load, each with a path (URL or HF repo) and a scale.

In the atelier: Which bracelets the painter wears for this painting, and how hard he leans on each.

Tip: Order does not matter; scales do. Start every LoRA at 1.0 and adjust one at a time.

Watch out: Stacking three strong LoRAs usually degrades all of them. Lower each scale when combining.

Raw schema description

The LoRAs to use for the image generation. You can use any number of LoRAs and they will be merged together to generate the final image.

guidance_scalenumberdefault: 302835

How strictly generation follows the prompt (classifier-free guidance).

In the atelier: How tightly you hold the painter to the brief. Too tight and the work gets stiff and oversaturated; too loose and he wanders.

Tip: Stay near the endpoint default. Adjust in steps of 0.5.

Raw schema description

The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you.

sync_modebooleandefault: false

Returns media as a data URI instead of a hosted URL, and skips storing it.

Tip: Useful for privacy; awkward for big files. Most workflows leave it off.

Raw schema description

If `True`, the media will be returned as a data URI and the output data won't be available in the request history.

num_imagesintegerdefault: 114

How many images to generate in one call.

Raw schema description

The number of images to generate. This is always set to 1 for streaming output.

enable_safety_checkerbooleandefault: true

Runs a safety filter on outputs.

Raw schema description

If set to true, the safety checker will be enabled.

output_formatenumdefault: jpegjpeg | png

File format of the result: jpeg, png or webp.

Raw schema description

The format of the generated image.

accelerationenumdefault: nonenone | regular

Speed and cost preset for the generation backend.

Tip: 'regular' balances quality and latency. Use higher acceleration for drafts and iteration.

Raw schema description

Acceleration level for image generation. 'regular' balances speed and quality.

paste_backbooleandefault: true

Pastes the original image back over everything outside the mask, so only the filled region contains new pixels.

Raw schema description

Specifies whether to paste-back the original image onto to the non-inpainted areas of the output

fill_imageobject

An image to place into the masked area instead of generating one from scratch.

Tip: Handy for product swaps: mask the slot, fill with the product shot, let the model blend.

Raw schema description

Use an image fill input to fill in particular images into the masked area.

resize_to_originalbooleandefault: false

Resizes the image back to the original size. Use when you wish to preserve the exact image size as the originally provided image.

Call it

import { fal } from "@fal-ai/client";

const result = await fal.subscribe("fal-ai/flux-lora-fill", {
  input: {
    "image_url": "https://your-cdn.com/input.jpg",
    "mask_url": "...",
    "loras": [
      {
        "path": "https://your-cdn.com/lora.safetensors",
        "scale": 1
      }
    ]
  },
  logs: true,
});
console.log(result.data);