Skip to content
ComfyDeploy

Flux Fill Inpainting (Native)

Paint a mask over the area you want to change, describe what should go there, and Flux Fill fills it in. A simple starting point for inpainting with Flux.

Flux Fill Inpainting (Native) example output

How it works

This is a compact 18-node workflow that uses only core ComfyUI nodes and no custom packages. UNETLoader loads flux1-fill-dev.safetensors, DualCLIPLoader loads clip_l and t5xxl_fp16, and VAELoader loads ae.safetensors.

The image is loaded with LoadImage, which also carries the mask you paint, and scaled with ImageScaleToMaxDimension. InpaintModelConditioning combines the positive and negative prompt conditioning with the image, VAE and mask. FluxGuidance sets the guidance value, and DifferentialDiffusion makes the model blend the edited area softly into the surroundings.

KSampler runs the denoising, VAEDecode converts the result back to pixels, and SaveImage writes the output. A MaskToImage and ImageToMask pair is used to prepare the mask.

Tips

  • Write the prompt about the new content only, as in the example that adds rabbit ears and a red scarf.
  • Mask slightly beyond the object you want to replace so the edge blends cleanly.
  • Make several smaller edits one after another rather than one very large mask.
  • Reduce the maximum dimension if you want faster runs while testing.
  • Because this graph uses only core nodes, it is easy to extend later, for example by adding a LoRA loader after the model or a second pass for polish.

What you can use it for

  • Add accessories or clothing to a portrait
  • Remove or replace an object
  • Fix a small area of a generated image
  • Local edits without changing the rest of the picture

Run it in three steps

  1. Open the template

    Click Run on ComfyDeploy. The workflow, its custom nodes and models are set up for you on a cloud machine.

  2. Add your inputs

    Provide image with a painted mask and text prompt in the playground or the ComfyUI editor.

  3. Run, share or deploy

    Run it on an L40S, share it with your team as a playground, or deploy it as an API endpoint.

Frequently asked questions

What GPU does this Flux Fill workflow need?

It is set to run on an L40S GPU on ComfyDeploy.

How do I make the mask?

Right-click the Load Image node and open the mask editor, paint over the area to change, save, then write a prompt describing the new content.

How do I run it as an API?

Deploy it on ComfyDeploy and call the endpoint with an image and prompt. The workflow has a ComfyDeploy node, so check which inputs you expose before deploying.

Related workflows

All Flux workflows