Superside Z-Image Turbo Inpaint+LoRA
Z-Image Turbo inpainting with your own LoRA, in one fal call
- image
- mask
- image
- info
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 asSetLatentNoiseMask. 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+ matchingscale- three stackable slots (fal's max). Gotcha: it must be a raw download URL. For a HuggingFace file that meanshttps://huggingface.co/.../resolve/main/name.safetensors. A/blob/URL is an HTML page and will silently fail to download. TheZ-Image LoRA Trainerin 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_resolutionis on. The defaultimage_sizepresets 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 Upscalerafterward. - 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. - Moderation →
enable_safety_checkeris 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.
Inputs (23)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| mask | MASK | — | |
| prompt | STRING | — | |
| api_key | STRING | — | |
| lora_1_urlopt | STRING | diffusers_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_scaleopt | FLOAT | 1.000–8 | Strength of lora_1_url. Ignored if lora_1_url is empty. |
| lora_2_urlopt | STRING | Slot 2 of 3. Any LoRA, stacked on top of slot 1 in the same call. | |
| lora_2_scaleopt | FLOAT | 1.000–8 | Strength of lora_2_url. Ignored if lora_2_url is empty. |
| lora_3_urlopt | STRING | Slot 3 of 3 (fal's max). Any LoRA, stacked with slots 1 and 2. | |
| lora_3_scaleopt | FLOAT | 1.000–8 | Strength of lora_3_url. Ignored if lora_3_url is empty. |
| strengthopt | FLOAT | 0.400–1 | Inpaint strength - same role as a KSampler's denoise. 1.0 = fully regenerate the masked area, 0.0 = keep it untouched. |
| num_inference_stepsopt | INT | 81–8 | Z-Image Turbo is a distilled few-step model; 8 is its max. |
| seedopt | INT | -1-1–2147483647 | -1 = random |
| num_imagesopt | INT | 11–4 | — |
| image_sizeopt | COMBO | auto | "auto" keeps the input image's own size/aspect ratio. |
| control_scaleopt | FLOAT | 0.750–1 | Strength of the structural conditioning taken from the input image. |
| control_startopt | FLOAT | 0.000–1 | — |
| control_endopt | FLOAT | 0.800–1 | — |
| enable_prompt_expansionopt | BOOLEAN | false | — |
| enable_safety_checkeropt | BOOLEAN | true | — |
| output_formatopt | COMBO | png | 3 options: png, jpeg, webp |
| accelerationopt | COMBO | regular | 3 options: none, regular, high |
| match_input_resolutionopt | BOOLEAN | true | Generate 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)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| info | STRING | — |