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

arkennemasis fal · Flux Krea LoRA Inpainting · $0.035/MP

Mask one region, leave the rest of the pixels alone

By Hishamahmer·Created 3 months ago·Updated 9 days ago· 11
arkennemasis fal · Flux Krea LoRA Inpainting · $0.035/MP
  • image
  • mask
  • images
  • image_paths
  • timings
  • seed
  • has_nsfw_concepts
  • 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►

Every other node in this family regenerates the whole frame and hopes the untouched parts come back looking the same. This one takes a mask and is only supposed to change what's inside it. $0.035 per megapixel, hosted, LoRA-capable.

That property - the unmasked pixels stay put - is the reason masked inpainting still has a job in 2026, when instruction editors handle most "change this to that" requests better and without a mask. An edit model reads the whole image into context and emits a whole new one, so everything drifts a little, and it compounds across a chain. A mask doesn't drift. If you're compositing into a frame where the surroundings must survive, this is the tool.

Inputs

The mask pair is the whole point:

  • image - the picture to edit. A IMAGE socket, one picture.
  • mask - a ComfyUI MASK. The pack does the translation for you: ComfyUI masks are 1 where they're set, and this uploads an RGBA PNG that's transparent where you painted. It also resizes the mask to your image's dimensions, so a mask drawn at another resolution still lines up.
  • strength, default 0.85 (0.01–1). 1.0 remakes the region outright, low values barely move it. This is the dial that makes inpainting worth doing by hand - "a bit darker" is a number here, not a sentence.

Then the usual generative settings: prompt (describe only what should appear in the hole - describing the rest of the scene just gives the model ideas), num_inference_steps default 28 (1–50), guidance_scale default 3.5 (0–35), seed, num_images 1–4, enable_safety_checker, output_format, acceleration.

loras is a multiline JSON string: LoRA entries with weights and scale, merged together. Empty leaves it out. They load on fal's side, so it's URLs - not your local models/loras folder.

image_size plus image_size_width / image_size_height (16–14142, step 16) are also on the node, defaulting to square_hd. Worth a glance: a size that disagrees with your source framing is a quiet way to get a subtly recomposed result back.

Below the model's own fields: max_cost_usd (default 20, checked before upload, 0 = off), reuse_identical_run (on by default - identical inputs and settings return the already-paid files), extra_json, and max_concurrent (default 1 across all fal nodes in a run).

Outputs

images for preview/save, image_paths for the files under output/fal/fal-ai_flux-krea-lora_inpainting/, then timings, seed, prompt, has_nsfw_concepts and info - the last of which carries the request id, the cost estimate and fal's raw answer.

Install

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

ComfyUI-Manager users can search comfyui-arkennemasis and let it handle the install. Nothing exotic in requirements.txt - httpx for the pack's unrelated Codex nodes; the fal provider runs on the standard library. Restart ComfyUI; the node appears under arkennemasis/fal/Image/Flux.

Then the key. One line in the .env in the folder with run_nvidia_gpu.bat:

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

No key widget on the node - that's deliberate, so a key can't ride along in a shared workflow.

Things that bite

Mask inverted in your head. Paint where you want the change, same as any ComfyUI inpaint node; the conversion to "transparent = edit here" happens inside the node. If your output changed everything except the region you painted, you've almost certainly wired a mask from an upstream node that produced the inverse.

Mask doesn't match the image. It gets resized to the image's dimensions, so it will line up - but a mask built at a wildly different aspect ratio gets stretched and your boundary moves.

Inpainting is billed on the whole image's megapixels, not the masked area, so a tiny touch-up on a big canvas costs like a big generation. The badge on the node is honest about it.

Black output. That's the safety checker, not a bug. has_nsfw_concepts will confirm it. Turning the checker off requires fal account authorization.

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. 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 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—
timingsSTRING—
seedINT—
has_nsfw_conceptsSTRING—
promptSTRING—
infoSTRINGJSON: request id, cost estimate, saved files and fal's full answer.