Nodes/comfyui-superside-nodes/Superside Z-Image Turbo Inpaint+LoRA
ComfyUI Node

Superside Z-Image Turbo Inpaint+LoRA

Z-Image Turbo inpainting with your own LoRA, in one fal call

By Superside·Created about a month ago·Updated 3 days ago· 1
Superside Z-Image Turbo Inpaint+LoRA
  • image
  • mask
  • image
  • info
prompt
api_key
lora_1_url
lora_1_scale1.00
lora_2_url
lora_2_scale1.00
lora_3_url
lora_3_scale1.00
strength0.40
num_inference_steps8
seed-1
num_images1
image_sizeauto
control_scale0.75
control_start0.00
control_end0.80
enable_prompt_expansionfalse
enable_safety_checkertrue
output_formatpng
accelerationregular
match_input_resolutiontrue

The masked-inpaint chain in local ComfyUI is a known song: VAEEncode, SetLatentNoiseMask, a LoRA loader, a KSampler at some denoise, VAEDecode. It works, and on a 12GB card it also takes a while. This node replaces that whole chain with one fal.ai call to fal-ai/z-image/turbo/inpaint/lora - Tongyi-MAI's Z-Image Turbo, the 6B distilled model that became the community's default for fast photorealism, running on someone else's GPU, with up to three LoRAs stacked in. Same mask, same denoise dial, none of the VRAM.

Why masked inpainting is still the right tool

Instruction editors (Wan 2.5 I2I, GPT Image, the whole full-frame edit crowd) take your whole image into context and emit a whole new one - so the parts you didn't ask about drift a little each pass. Masked inpainting doesn't: you say "touch exactly this region," and everything outside it stays put. This node is that argument applied to Z-Image. If you need a face locked while you regenerate the shirt, this is the node.

The inputs that matter

  • image, mask, prompt, api_key - required. The mask follows ComfyUI's convention: white = area to regenerate, same as SetLatentNoiseMask. Any mask source works - GrowMaskWithBlur, a region selector, whatever.
  • strength - the denoise dial, default 0.4. 1.0 fully regenerates the masked area; 0.4 is a light pass. This is the first knob to reach for.
  • lora_1_url/lora_2_url/lora_3_url + matching scale - three stackable slots (fal's max). Gotcha: it must be a raw download URL. For a HuggingFace file that means https://huggingface.co/.../resolve/main/name.safetensors. A /blob/ URL is an HTML page and will silently fail to download. The Z-Image LoRA Trainer in this pack outputs exactly the right URL format.
  • match_input_resolution (default ON) - requests generation at your input's size (rounded to a multiple of 16) instead of fal's small preset sizes, which look flat on a cropped high-res photo. Leave it on.
  • num_inference_steps - max 8. Z-Image Turbo is a distilled few-step model; it's not a bug that the slider stops at 8.

Outputs: image (IMAGE) and info (STRING - the fal result URL, handy for bookkeeping).

Installing

Same as the rest of the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/Superside/comfyui-superside-nodes.git
pip install -r requirements.txt

restart, and grab it under Superside (or via ComfyUI Manager). No models download - the model lives on fal. The api_key input takes your fal key; leave it blank and the node falls back to FAL_KEY. You pay per call and your image plus mask ship to fal's servers - for client work, keep that in mind.

Common issues

  • "Flat" results on a high-res crop → make sure match_input_resolution is on. The default image_size presets sit around a 512px short side, which looks soft pasted back into a big photo.
  • Detail ceiling around ~2048px → asking the endpoint for more than a ~2048px long edge doesn't add detail; it silently falls back to a fixed square size (confirmed empirically in the pack's source). If you need more, pair this with the pack's Crystal Upscaler afterward.
  • LoRA does nothing → check the URL is /resolve/, not /blob/, and that the scale isn't 0. Stacking more than one LoRA also tends to degrade Z-Image quality - the KB's own finding is that multiple LoRAs at once collapse quality.
  • Moderationenable_safety_checker is on by default and it's fal's filter, not yours. You can flip the toggle; you can't bypass what the host enforces.

For the "I want to inpaint with a model I actually like and my own trained LoRA, but my GPU is busy being a laptop" case, this is hard to beat. Just read the URL rules first.

CategorySuperside

Inputs (23)

NameTypeDefaultDescription
imageIMAGE
maskMASK
promptSTRING
api_keySTRING
lora_1_urloptSTRINGdiffusers_lora_file URL (e.g. from Superside Z-Image LoRA Trainer, or a HuggingFace '/resolve/main/<file>.safetensors' raw URL - a '/blob/' URL is an HTML page and won't download). Slot 1 of 3.
lora_1_scaleoptFLOAT1.000–8Strength of lora_1_url. Ignored if lora_1_url is empty.
lora_2_urloptSTRINGSlot 2 of 3. Any LoRA, stacked on top of slot 1 in the same call.
lora_2_scaleoptFLOAT1.000–8Strength of lora_2_url. Ignored if lora_2_url is empty.
lora_3_urloptSTRINGSlot 3 of 3 (fal's max). Any LoRA, stacked with slots 1 and 2.
lora_3_scaleoptFLOAT1.000–8Strength of lora_3_url. Ignored if lora_3_url is empty.
strengthoptFLOAT0.400–1Inpaint strength - same role as a KSampler's denoise. 1.0 = fully regenerate the masked area, 0.0 = keep it untouched.
num_inference_stepsoptINT81–8Z-Image Turbo is a distilled few-step model; 8 is its max.
seedoptINT-1-1–2147483647-1 = random
num_imagesoptINT11–4
image_sizeoptCOMBOauto"auto" keeps the input image's own size/aspect ratio.
control_scaleoptFLOAT0.750–1Strength of the structural conditioning taken from the input image.
control_startoptFLOAT0.000–1
control_endoptFLOAT0.800–1
enable_prompt_expansionoptBOOLEANfalse
enable_safety_checkeroptBOOLEANtrue
output_formatoptCOMBOpng3 options: png, jpeg, webp
accelerationoptCOMBOregular3 options: none, regular, high
match_input_resolutionoptBOOLEANtrueGenerate at the input image's own resolution (rounded to a multiple of 16) instead of fal's image_size preset. fal's 'auto'/enum presets default to a small size (~512px short side) which looks flat/soft on a cropped high-res photo - enable this to keep full detail. Disable to use the image_size dropdown above instead.

Outputs (2)

NameTypeDescription
imageIMAGE
infoSTRING