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

arkennemasis fal · Flux LoRA Inpainting · $0.035/MP

The everyday masked-inpaint node, with LoRAs attached

By Hishamahmer·Created 3 months ago·Updated 9 days ago· 11
arkennemasis fal · Flux LoRA Inpainting · $0.035/MP
  • image
  • mask
  • images
  • image_paths
  • seed
  • has_nsfw_concepts
  • timings
  • prompt
  • info
◄prompt►
◄image_sizesquare_hd►
◄image_size_width1024►
◄image_size_height1024►
◄num_inference_steps28►
◄seed-1►
◄loras►
◄guidance_scale3.50►
◄num_images1►
◄enable_safety_checkertrue►
◄output_formatjpeg►
◄accelerationnone►
◄strength0.85►
◄max_cost_usd20.0►
◄reuse_identical_runtrue►
◄extra_json►
◄max_concurrent1►

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 ComfyUI MASK. 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_steps 28 (1–50), guidance_scale 3.5 (0–35), seed, num_images 1–4, enable_safety_checker (on), output_format (jpeg/png), acceleration.
  • image_size (default square_hd) with image_size_width / image_size_height for custom (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.

Categoryarkennemasis/fal/Image/Flux

Inputs (19)

NameTypeDefaultDescription
promptSTRINGThe prompt to generate an image from.
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_scaleFLOAT3.500–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.
output_formatCOMBOjpegThe format of the generated image.
accelerationCOMBOnoneAcceleration level for image generation. 'regular' balances speed and quality.
imageIMAGEURL of image to use for inpainting. or img2img
strengthFLOAT0.850.01–1The 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.
maskMASKThe mask to area to Inpaint in.
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—
seedINT—
has_nsfw_conceptsSTRING—
timingsSTRING—
promptSTRING—
infoSTRINGJSON: request id, cost estimate, saved files and fal's full answer.