Nodes/ComfyUI Assistant Node/PVL Kontext Dev Inpaint (fal.ai)
ComfyUI Node

PVL Kontext Dev Inpaint (fal.ai)

Kontext editing, masked and LoRA-loaded, no local weights

By pvlprk·Created about a year ago·Updated 8 months ago· 1
PVL Kontext Dev Inpaint (fal.ai)
  • image
  • mask
  • reference_image
  • IMAGE
prompt
steps30
CFG2.5
strength0.88
num_images1
enable_safety_checkertrue
output_formatpng
sync_modefalse
accelerationnone
seed-1
lora1_name
lora1_scale1.0
lora2_name
lora2_scale1.0
lora3_name
lora3_scale1.0

Flux Kontext is BFL's instruction-based editor: feed it an image plus a sentence and it edits - clothing swaps, background changes, the famously good watermark removal - with strong character consistency because it consumes the reference in-context rather than through an adapter. The catch locally is the 12B weights and, depending on your use, the licensing. This node skips the weights entirely: it wraps fal.ai's fal-ai/flux-kontext-lora/inpaint endpoint, so you get Kontext's editing and a real mask, plus up to three LoRAs and an optional reference image, all running on fal's hardware.

The combination is genuinely useful. Plain Kontext, like most instruction editors, rewrites the whole frame and can drift on regions you didn't mention. Slap a mask on it and you contain the damage to the area you drew - which is exactly the "bolt a mask back on around the editor" pattern the KB's inpainting essay documents people reaching for.

How it works

The node base64-encodes your image, converts your mask (MASK tensor, 1.0 = edit region) to an image, and - if you've connected one - your reference_image too, then POSTs the lot to the fal endpoint. Kontext's LoRA-family pipeline means lora1_name/lora2_name/lora3_name (strings) each pair with a _scale (-2 to 2) and get injected server-side; the LoRA names are whatever the fal deployment exposes, not your local filenames.

Inputs that matter

  • image, mask, and prompt are required. The mask is what keeps the edit local.
  • reference_image (optional) is the character/identity reference - this is where Kontext's in-context consistency earns its keep.
  • strength (0.88), steps (30), CFG (2.5) - standard diffusion dials; Kontext prefers low CFG.
  • acceleration (none/regular/high), num_images (1-4), output_format (jpeg/png), enable_safety_checker (on by default here), seed (-1 = random).

One IMAGE output.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/pvlprk/comfyui-pvl-api-nodes

Restart, set FAL_KEY in the launching environment (fal.ai/dashboard). The pack's requirements.txt is heavier than this node needs, but Manager installs it regardless.

Where people get burned

  • LoRA names are fal-side. You can't point it at a LoRA sitting in your models/loras folder; the string must match something the fal deployment knows. Leave lora*_name empty until you've confirmed what's available.
  • It's paid cloud inference, and Kontext is a big model - runs can take a while, so don't set the workflow up to fire hundreds of calls.
  • Censorship carries over. Kontext's known weight-level filtering is in play via the API; if that's a problem for your content, the KB notes Qwen-Image-Edit is the Apache-2.0-licensed alternative that doesn't carry those terms.
  • Mask + strong strength can still leak edits outside the mask on the LoRA-family pipeline - check the region borders before you commit to a batch.
CategoryPVL_tools_FAL

Inputs (19)

NameTypeDefaultDescription
imageIMAGE
maskMASK
promptSTRING
stepsINT301–100
CFGFLOAT2.51–20
strengthFLOAT0.880–1
num_imagesINT11–4
enable_safety_checkerBOOLEANtrue
output_formatCOMBOpng2 options: jpeg, png
sync_modeBOOLEANfalse
accelerationCOMBOnone3 options: none, regular, high
reference_imageoptIMAGE
seedoptINT-1-1–4294967295
lora1_nameoptSTRING
lora1_scaleoptFLOAT1.0-2–2
lora2_nameoptSTRING
lora2_scaleoptFLOAT1.0-2–2
lora3_nameoptSTRING
lora3_scaleoptFLOAT1.0-2–2

Outputs (1)

NameTypeDescription
IMAGEIMAGE