arkennemasis fal · Flux LoRA Inpainting · $0.035/MP
The everyday masked-inpaint node, with LoRAs attached
- image
- mask
- images
- image_paths
- seed
- has_nsfw_concepts
- timings
- prompt
- info
If you want the general-purpose hosted inpaint - image, mask, prompt, strength, LoRAs - this is it. $0.035 per megapixel, no separate Fill-specific settings, no reference-image sockets to reason about. The Krea-flavoured sibling is the same shape with Krea's aesthetic baked in; this one is Flux Dev, which means it behaves the way most Flux tutorials you've read assume.
Why masked inpainting is still worth the faff
Instruction editors are better than masks for most "change this to that" requests and they don't need a mask at all. What they can't do is leave the rest of your frame alone - they read the whole picture into context and emit a whole new one, so everything drifts slightly and it compounds when you chain edits. A mask doesn't drift, and this node gives you the denoise dial as a number instead of a sentence. When the surroundings have to survive untouched, that's the argument, and it's still a good one.
Inputs
image- the picture to edit, one per run.mask- a ComfyUIMASK. Paint the area you want changed. The node converts ComfyUI's convention (1 = masked) into the RGBA form fal expects (transparent = edit here) and resizes the mask to the image so it lines up.strength, default 0.85 (0.01–1) - 1.0 remakes the region completely, low values barely touch it. This is your "how different" control and it's the reason to use a mask instead of an instruction.prompt- describe only what goes in the hole. Describing the whole scene invites the model to be creative about parts you were happy with.loras- multiline JSON, LoRA entries with weights and a scale, merged together. Empty leaves it out, and they load on fal's side (URLs, not local files).num_inference_steps28 (1–50),guidance_scale3.5 (0–35),seed,num_images1–4,enable_safety_checker(on),output_format(jpeg/png),acceleration.image_size(defaultsquare_hd) withimage_size_width/image_size_heightforcustom(16–14142, step 16).
The four shared widgets at the bottom apply to every fal node in this pack: max_cost_usd (default $20, checked before anything is uploaded, 0 = no cap), reuse_identical_run (on - a byte-identical request returns the files you already paid for, including after a ComfyUI restart), extra_json (JSON merged into the request last, for fields with no box), and max_concurrent (default 1: one paid fal call at a time across the run).
Outputs
images for preview or save; image_paths for where it wrote them under output/fal/fal-ai_flux-lora_inpainting/; seed for reproducibility; prompt echoing what was sent; has_nsfw_concepts for when the safety checker blanks a result; timings and info for diagnostics, with info carrying the request id and cost estimate.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/Hishamahmer/comfyui-arkennemasis
ComfyUI-Manager alternative: search comfyui-arkennemasis, or Install via Git URL with the repo. Restart ComfyUI and find the node under arkennemasis/fal/Image/Flux. Nothing to download; the fal provider needs no extra pip packages.
# .env, in the folder with run_nvidia_gpu.bat
FAL_KEY=your-key-from-fal.ai/dashboard/keys
No key field on the node - the file is the only source, which is why a key can't be baked into a workflow you share.
Snags
Inverted mask. The single most common mistake. If everything except your painted region changed, an upstream node handed you the inverse mask.
Mask stretched. It's resized to the image dimensions, so a mask authored at a different aspect ratio gets squashed and your boundary shifts.
Billed on the full frame. Megapixels of the image, not the masked region. A tiny touch-up on a 2MP canvas costs like a 2MP generation. Watch the badge before queueing four images.
Guidance that came from a local tutorial. 3.5 is right for this endpoint; don't borrow the 30 that the Fill node uses.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | The prompt to generate an image from. | |
| image_size | COMBO | square_hd | The size of the generated image. 'custom' uses the width and height below. |
| image_size_width | INT | 102416–14142 | Width in pixels when image_size is 'custom'. |
| image_size_height | INT | 102416–14142 | Height in pixels when image_size is 'custom'. |
| num_inference_steps | INT | 281–50 | The number of inference steps to perform. |
| seed | INT | -1-1–2147483647 | The 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. |
| loras | STRING | 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. JSON. Empty leaves it out. | |
| guidance_scale | FLOAT | 3.500–35 | 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. |
| num_images | INT | 11–4 | The number of images to generate. This is always set to 1 for streaming output. |
| enable_safety_checker | BOOLEAN | true | If set to true, the safety checker will be enabled. |
| output_format | COMBO | jpeg | The format of the generated image. |
| acceleration | COMBO | none | Acceleration level for image generation. 'regular' balances speed and quality. |
| image | IMAGE | URL of image to use for inpainting. or img2img | |
| strength | FLOAT | 0.850.01–1 | The strength to use for inpainting/image-to-image. Only used if the image_url is provided. 1.0 is completely remakes the image while 0.0 preserves the original. |
| mask | MASK | The mask to area to Inpaint in. | |
| max_cost_usdopt | FLOAT | 20.00–100000 | Safety 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_runopt | BOOLEAN | true | If 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_jsonopt | STRING | Advanced: 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_concurrentopt | INT | 11–32 | How 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)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| image_paths | STRING | — |
| seed | INT | — |
| has_nsfw_concepts | STRING | — |
| timings | STRING | — |
| prompt | STRING | — |
| info | STRING | JSON: request id, cost estimate, saved files and fal's full answer. |