Z-Image Turbo Inpainting: Complete Guide to 3 Approaches (Native Nodes / KJNodes / SAM3)
"I just want to remove the stranger from my photo — not regenerate the whole image!" This is the most common scenario for Z-Image Turbo users. The official team has promised a Z-Image-Edit variant and a dedicated Inpainting ControlNet, but neither has shipped yet. The good news: Z-Image-Turbo by itself, combined with ComfyUI, already delivers solid inpainting results. Popular community tutorials (NerdyRodent / Prompting Pixels) have distilled three mature routes — pure native nodes, KJNodes enhancement, and SAM3 smart segmentation. This article breaks down the node wiring, use cases, and selection advice for all three.
1. Inpainting Basics: Masks, Latents, and Turbo's Quirks
How Inpainting Works
Inpainting (local redraw) is about telling the model: "only change this region, keep everything else." In ComfyUI, that "region" is a mask, and "only this part" is enforced through three mechanisms:
- VAE Encode (for Inpainting): When encoding the original image into latent space, noise is injected into the masked region while the rest keeps its original latent information
- InpaintModelConditioning: Injects mask info into the sampler so the model knows which areas to regenerate
- Differential Diffusion (optional): Replaces hard mask boundaries with progressive mask weights for more natural edge blending
Z-Image Turbo Specifics
- 8-step distilled model: Use
FlowMatchEulerDiscreteScheduler, 8 steps is enough, no CFG needed (CFG 1.0) - The three-piece model set: Z-Image-Turbo checkpoint (fp16 or GGUF) + Qwen3-4B text encoder + flux_ae VAE
- Native resolution: 1024×1024 is optimal; keep the redraw region at original resolution
2. Option 1: Pure Native Nodes (Zero Dependencies)
The most basic, dependency-free approach — only built-in ComfyUI nodes, no custom node packs required.
Node Wiring
Load Image → Right-click → Open in Mask Editor (paint mask) → Save
├── → VAE Encode (for Inpainting) → InpaintModelConditioning → KSampler → VAEDecode → Preview
└── → (mask output) ───────────────────────────↗
Steps
- Load image: Load the target image with the
Load Imagenode - Paint the mask: Right-click Load Image →
Open in Mask Editor, brush over the region to redraw (object, person, text, etc.), click Save - Encode:
VAE Encode (for Inpainting)takes image + mask, outputs noise-injected latents - Inject conditioning:
InpaintModelConditioningtakes latents + positive/negative prompts - Sample:
KSampler, 8 steps, CFG 1.0, sampler FlowMatchEulerDiscrete - Decode:
VAEDecode→PreviewImage
Pros & Cons
| Pros | Cons |
|---|---|
| Zero dependencies, works in any ComfyUI out of the box | Mask edges can be harsh — a "patchwork" look |
| Fewest nodes, easy to learn and debug | Hand-painting masks is tedious; complex outlines are hard to draw precisely |
| Great for small fixes (blemishes, small objects) | Large-area redraws blend less well with surrounding light/shadow |
3. Option 2: KJNodes Enhancement (GrowMaskWithBlur)
The harsh mask edges from Option 1 can be dramatically improved with GrowMaskWithBlur from the KJNodes custom node pack. It expands the mask by a few pixels and applies blur, letting the redrawn area blend smoothly with its surroundings.
Node Wiring
Load Image → Right-click → Open in Mask Editor → Save
├── → GrowMaskWithBlur (KJNodes) → VAE Encode (for Inpainting) → InpaintModelConditioning → KSampler → VAEDecode → Preview
└── → (mask) ────────────────────────────↗
GrowMaskWithBlur Parameters
| Parameter | Recommended | Notes |
|---|---|---|
| grow | 8 - 16 px | Mask expansion; larger covers more area |
| blur | 8 - 16 px | Edge blur radius; larger = softer transition |
| iterations | 1 - 2 | Usually 1 is enough |
Advanced: Differential Diffusion
To kill the "patchwork" look entirely, add the Differential Diffusion node (from KJNodes or the Fooocus Inpaint wrapper). It uses grayscale mask weights instead of a binary mask, making the model "half-commit" near edges for much more natural blending.
Best Use Cases
- Medium-area edits: outfit changes, watermark removal, background element swaps
- Outputs where edge quality matters
- Combined with
Inpaint Crop & Stitch(crop the region, sample separately, stitch back) to slash VRAM usage on large images
4. Option 3: SAM3 Smart Segmentation (Text Prompt / Point Click)
Tired of hand-painting masks? SAM3 (Segment Anything Model 3) — Meta's latest segmentation model — can isolate any object from a single sentence description. The ComfyUI ecosystem offers two routes: ComfyUI-SAM3 (community node pack by wouterverweirder) or ComfyUI's native SAM 3.1 nodes (built into recent versions).
Installation
- Install
ComfyUI-SAM3via ComfyUI Manager - Download
sam3.ptand place it inComfyUI/models/sam3/ - Restart ComfyUI
Method A: Text-Prompt Segmentation (SAM3Grounding)
Load Image → SAM3 Segmentation (prompt: "person", "car"...) → mask
→ GrowMaskWithBlur → VAE Encode (for Inpainting) → InpaintModelConditioning → KSampler → VAEDecode
Node parameters:
| Parameter | Description |
|---|---|
| prompt | Text description of the object to segment, ≤32 tokens; separate multiple subjects with commas + :N for counts, e.g. eye:2, window panels:4 |
| threshold | Confidence threshold, default 0.5; raise it if you get false positives |
| min_width / min_height | Minimum object size (pixels), filters small noise |
Method B: Point-Click Segmentation (SAM3PointCollector)
When text isn't precise enough (e.g., "the third person"), use the SAM3 Point Collector node to click directly on the target in the image — the model generates a precise mask from point prompts. Ideal for: picking one specific object among similar ones, or complex outlines.
Best Use Cases
- Precise person/object extraction for redraws (background swap, outfit change, removing bystanders)
- Per-frame video segmentation (SAM3 supports video tracking — video inpainting)
- Point-click fallback when prompts can't describe what you mean
5. Comparison & Selection Guide
| Dimension | Option 1: Native | Option 2: KJNodes | Option 3: SAM3 |
|---|---|---|---|
| Dependencies | None | KJNodes pack | ComfyUI-SAM3 + sam3.pt |
| Mask creation | Hand-painted | Hand-painted + auto grow/blur | Text prompt / point click |
| Edge quality | Fair | Good | Good |
| Automation | Low | Medium | High |
| Learning curve | ⭐ Easiest | ⭐⭐ | ⭐⭐⭐ |
| Best for | Quick small fixes | Medium areas, blend quality | Precise segmentation, batch work |
Rule of thumb:
- Quick blemish fix → Option 1
- Outfit change / watermark removal / background element swap → Option 2
- Precise person/object extraction, complex outlines → Option 3
- Maximum quality → SAM3 mask + Option 2's GrowMaskWithBlur + Differential Diffusion
6. Advanced Techniques
1. Inpaint Crop & Stitch (VRAM-friendly large images)
ComfyUI-Inpaint-CropAndStitchCustom crops the redraw region, samples it separately, and stitches it back seamlessly. For 2K/4K images, VRAM usage drops from "full-image sampling" to "local sampling" — runs fine on an RTX 4060.
2. ControlNet Union 2.1 (near-official redraw)
In December 2025, the community released the Z-Image-Turbo Fun Controlnet Union 2.1 model patch (HuggingFace). Combined with ComfyUI's new node, it enables more advanced inpainting — the masked region follows extra control conditions (lineart, depth, pose), perfect for "redraw while preserving structure." NerdyRodent published a matching free workflow.
3. Outpainting (expansion)
The ConditioningZeroOut node clears conditioning outside the mask; combined with a suitable mask you can expand outward — turning 1024×1024 into a 1536×1024 panorama composition.
4. Complete Workflow Template (25-node community solution)
The high-rated community workflow (Prompting Pixels, 78 downloads) uses three models:
z-image-turbo-fp8-e4m3fn.safetensors(UNETLoader)qwen_3_4b.safetensors(CLIPLoader)ae.safetensors(VAELoader, flux_ae)
Core node chain: LoadImage → SAM3 (Grounding/PointCollector/Segmentation) → ImageToMask → InpaintCropImproved → GrowMaskWithBlur → VAE Encode (for Inpainting) → InpaintModelConditioning → KSampler → VAEDecode → InpaintStitchImproved → Image Comparer.
Conclusion
Z-Image-Turbo has no official inpainting model yet, but three community routes are mature: native nodes for quick fixes, KJNodes for edge blending, and SAM3 for "describe-it-don't-draw-it" masking. When Z-Image-Omni-Base and Z-Image-Edit finally ship, these workflows will migrate seamlessly to official editing capabilities — but until then, mastering these three approaches means your Z-Image Turbo already handles 90% of local redraw needs.