Nodes/Node_Fun_ComfyUI/Replicate flux fill pro
ComfyUI Node

Replicate flux fill pro

Flux Fill Pro over the API — inpaint and outpaint without the GPU

By nofunstudio·Created 2 years ago·Updated about a month ago· 9
Replicate flux fill pro
  • mask
  • image
  • image
  • generation_info
api_token
promptmovie poster
steps50
guidance3.0
outpaintZoom out 2x
output_formatpng
safety_tolerance6

Replicate flux fill pro is a wrapper around black-forest-labs/flux-fill-pro running on Replicate's servers. You feed it an image, optionally a mask, and a direction or instruction, and it returns an inpainted or outpaited result - extended beyond the borders, filled in, whatever the prompt asks. The whole point is that none of it runs on your machine. No 24GB of VRAM, no FLUX weights on disk, no sampler tuning. You trade that for an API token and per-call pricing.

This is the API version of the same Flux Fill that's been ComfyUI's default inpainting workhorse since November 2024 - the "official" FLUX.1 Fill model. The nice part for beginners: this node wraps the whole thing in one box. Give it an image, type what you want, hit queue, get an image out the other side. The heavy lifting happens as a single synchronous replicate.run() call, so the node blocks while the job runs and returns when it's done.

The inputs that matter, from the author's own schema:

  • api_token - your Replicate token. Paste it here or set the REPLICATE_API_TOKEN environment variable. Empty token = error on the first run.
  • prompt - what to do. Default is "movie poster", which is a hint at the signature move: outpaint a poster or composition outward.
  • outpaint (default "Zoom out 2x") - the outpaint direction. This is the fun one. "Zoom out 2x" expands the composition outward and the model invents the surrounding scene. This is what makes it feel like magic - you can zoom out of an image endlessly, adding context the original never had.
  • mask (optional) - feed a mask to constrain the edit to a region. Without it, the node outpaints in the given direction.
  • steps (default 50), guidance (default 3), output_format (png/jpg), safety_tolerance (default 6, 0–10) - the higher the tolerance, the more the safety filter backs off. Lower it if the model is refusing stuff you'd rather it handle.

Outputs are image (wire it into whatever you're building next, or just look at it) and generation_info, a string with the raw Replicate response if you want the request ID or metadata for later.

Where the community's hard-won experience matters: the KB is blunt that every encode/decode pass is lossy, and the classic mistake is compositing the outpainted result on top of the original - that degrades the whole image. If you outpaint, treat the API's returned image as the new full frame, not as a patch. Also remember that instruction editing and traditional masking diverged hard in this space: for "change this one thing and leave the rest alone," Flux Fill with a mask is still the honest tool, which is exactly what this node gives you when you wire in a mask.

Install is the pack standard - ComfyUI Manager search "Node Fun", or clone https://github.com/nofunstudio/Node_Fun_ComfyUI into custom_nodes and run pip install -r requirements.txt (the replicate package is one of the two dependencies the pack actually needs). Outputs land in output/API/Replicate/ with a metadata/ subfolder alongside.

One honest caveat: this is a paid API, so every queue run costs real money, and it's a single blocking call - if the job takes two minutes, your ComfyUI thread sits there. For one-off "zoom out 2x" moments it's unbeatable. For batch inpainting you'll want the local model and this pack's sister pack might not be what you're looking for.

CategoryReplicate

Inputs (9)

NameTypeDefaultDescription
api_tokenSTRING
promptSTRINGmovie poster
stepsINT501–200
guidanceFLOAT3.00–20
outpaintSTRINGZoom out 2x
output_formatCOMBOpng2 options: png, jpg
safety_toleranceINT60–10
maskoptIMAGE
imageoptIMAGE

Outputs (2)

NameTypeDescription
imageIMAGE
generation_infoSTRING