Nodes/arkennemasis - ChatGPT / Codex / fal AI nodes/arkennemasis fal · Flux LoRA Fill · $0.035/MP
ComfyUI Node

arkennemasis fal · Flux LoRA Fill · $0.035/MP

The inpainter that can be handed elements to insert

By Hishamahmer·Created 3 months ago·Updated 9 days ago· 11
arkennemasis fal · Flux LoRA Fill · $0.035/MP
  • image
  • mask
  • fill_image_fill_image_1
  • fill_image_fill_image_2
  • fill_image_fill_image_3
  • fill_image_fill_image_4
  • fill_image_fill_image_5
  • fill_image_fill_image_6
  • images
  • image_paths
  • timings
  • has_nsfw_concepts
  • prompt
  • seed
  • info
◄prompt►
◄image_sizesquare_hd►
◄image_size_width1024►
◄image_size_height1024►
◄num_inference_steps28►
◄seed-1►
◄loras►
◄guidance_scale30.00►
◄num_images1►
◄enable_safety_checkertrue►
◄output_formatjpeg►
◄accelerationnone►
◄paste_backtrue►
◄fill_image_in_context_fillfalse►
◄fill_image_use_promptfalse►
◄resize_to_originalfalse►
◄max_cost_usd20.0►
◄reuse_identical_runtrue►
◄extra_json►
◄max_concurrent1►

Flux Fill is BFL's purpose-trained inpainting and outpainting model, and it's the last one that was actually trained for masks - nothing comparable has shipped since, which is why it's still the answer when an edit model's whole-frame rewrite isn't acceptable. This node exposes the LoRA flavour of it, and it goes one step further than a normal inpaint: you can hand it pictures to place inside the hole.

What makes it different

Most inpainters generate something plausible in the masked region. Fill can be given a reference element and told to fit that in - the six fill_image_fill_image_1…_6 sockets on the node are exactly that, and each can carry a batch. The tooltip is precise about ordering: socket 1 first, then socket 2, and within a socket, in order. That's how you tell it "put this lamp here and that rug there" instead of hoping.

The second thing to know is guidance_scale, which defaults to 30 here with a range of 28–35. If you've internalised Flux's usual 3.5, that number will look like a typo. It isn't - it's the Fill endpoint's own convention, and it's why trying to be clever with a low guidance value produces mush.

The inputs that matter

  • image - the picture being edited. mask - a ComfyUI MASK; the node converts it to the RGBA convention fal expects (transparent where you painted) and resizes it to your image.
  • prompt - tooltip says empty leaves it out, so a mask-only fill with no text is legitimate.
  • paste_back (default true) - composite the original back over everything outside the mask. This is the setting that gives you bit-identical surroundings, so leave it on unless you specifically want the whole frame re-rendered.
  • fill_image_in_context_fill (default false) - uses the provided fill image in context with the base image "to fill in more faithfully", and the tooltip warns it increases the price. This is the one to flip when the inserted element keeps landing in the wrong lighting.
  • fill_image_use_prompt (default false) - use the prompt as well as the reference image.
  • resize_to_original (default false) - turn on to get the exact original dimensions back. Handy when the endpoint's chosen size keeps nudging your framing.
  • loras - multiline JSON of LoRA entries with weights and scale, merged together. Empty leaves them out.

Plus image_size / image_size_width / image_size_height, num_inference_steps (28), seed, num_images, enable_safety_checker, output_format, acceleration, and the pack's shared max_cost_usd, reuse_identical_run, extra_json and max_concurrent.

Outputs

images → preview or save. image_paths → output/fal/fal-ai_flux-lora-fill/. Then has_nsfw_concepts, prompt, seed, timings and info.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/Hishamahmer/comfyui-arkennemasis

or search comfyui-arkennemasis in Manager. Restart, then find it under arkennemasis/fal/Image/Flux. Keys go in .env next to run_nvidia_gpu.bat:

FAL_KEY=your-key-from-fal.ai/dashboard/keys

Realistic problems

Guidance at 3.5. A common first mistake, carried over from local Flux habits. The Fill range starts at 28 for a reason.

Prices that jump when you connect a fill image. fill_image_in_context_fill explicitly costs more, and it's the kind of setting you enable for a hard composite and forget to switch off. Also note the whole image's megapixels are billed, not the masked area.

Mask and image disagreeing. The mask is resized to the image, so it lines up - but paint the region you want changed, not the region you want to keep.

Empty output region. If the fill produces something blank or nonsensical, check whether paste_back is fighting you, and whether a stray reference socket is carrying a placeholder tile. The pack treats placeholder tiles as "no image", which is the right behaviour and also means a connected-but-empty socket quietly does nothing.

Categoryarkennemasis/fal/Image/Flux

Inputs (28)

NameTypeDefaultDescription
promptSTRINGThe prompt to generate an image from. Empty leaves it out.
image_sizeCOMBOsquare_hdThe size of the generated image. 'custom' uses the width and height below.
image_size_widthINT102416–14142Width in pixels when image_size is 'custom'.
image_size_heightINT102416–14142Height in pixels when image_size is 'custom'.
num_inference_stepsINT281–50The number of inference steps to perform.
seedINT-1-1–2147483647The same seed and the same prompt given to the same version of the model will output the same image every time. -1 leaves it to the model.
lorasSTRINGThe 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. JSON. Empty leaves it out.
guidance_scaleFLOAT30.0028–35The 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.
num_imagesINT11–4The number of images to generate. This is always set to 1 for streaming output.
enable_safety_checkerBOOLEANtrueIf set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images.
output_formatCOMBOjpegThe format of the generated image.
accelerationCOMBOnoneAcceleration level for image generation. 'regular' balances speed and quality.
imageIMAGEURL of image to use for fill operation
maskMASKThe mask to area to Inpaint in.
paste_backBOOLEANtrueSpecifies whether to paste-back the original image onto to the non-inpainted areas of the output
fill_image_in_context_fillBOOLEANfalseUses the provided fill image in context with the base image to fill in more faithfully. Will increase price.
fill_image_use_promptBOOLEANfalseWhether to use the prompt as well in the generation, along with the redux image.
resize_to_originalBOOLEANfalseResizes the image back to the original size. Use when you wish to preserve the exact image size as the originally provided image.
fill_image_fill_image_1optIMAGEURLs of images to be filled into the masked area. Each socket may carry a batch; they are sent in socket order (the first picture of socket 1 is number 1).
fill_image_fill_image_2optIMAGEURLs of images to be filled into the masked area. Each socket may carry a batch; they are sent in socket order (the first picture of socket 1 is number 1).
fill_image_fill_image_3optIMAGEURLs of images to be filled into the masked area. Each socket may carry a batch; they are sent in socket order (the first picture of socket 1 is number 1).
fill_image_fill_image_4optIMAGEURLs of images to be filled into the masked area. Each socket may carry a batch; they are sent in socket order (the first picture of socket 1 is number 1).
fill_image_fill_image_5optIMAGEURLs of images to be filled into the masked area. Each socket may carry a batch; they are sent in socket order (the first picture of socket 1 is number 1).
fill_image_fill_image_6optIMAGEURLs of images to be filled into the masked area. Each socket may carry a batch; they are sent in socket order (the first picture of socket 1 is number 1).
max_cost_usdoptFLOAT20.00–100000Safety cap. If the estimated cost of this run is above this many US dollars the node stops BEFORE sending anything to fal. 0 = no cap.
reuse_identical_runoptBOOLEANtrueIf these exact inputs (the settings AND the same pictures/clips/audio) were already paid for and the files are still in output/fal, return them instead of paying again - also after a ComfyUI restart. Turn off for a fresh take with the same settings.
extra_jsonoptSTRINGAdvanced: a JSON object merged into the request last, for any fal field this node has no box for. Example: {"seed": 7}. Leave empty normally.
max_concurrentoptINT11–32How many paid fal calls may run at the same time in one run, across every fal node. 1 (default) = one after another. This node starts its paid part only while fewer than this many fal calls are running. Once any fal node fails, the ones still waiting are not started, so nothing more is billed.

Outputs (7)

NameTypeDescription
imagesIMAGE—
image_pathsSTRING—
timingsSTRING—
has_nsfw_conceptsSTRING—
promptSTRING—
seedINT—
infoSTRINGJSON: request id, cost estimate, saved files and fal's full answer.