Z-Image Pro Studio (Fast Preview, Polish & Detail Daemon)
All-in-one ComfyUI custom nodes and workflows for Z-Image: 4-Stage Fast Preview & Polish Switch, 16-channel resolution presets, AuraFlow Flow-Matching Detail Daemon, 5-part selective SAM detailers, 1.5x refiner & quality finisher, and built-in VRAM cleanup.
ComfyUI-Z-Image-Pro-Studio

An integrated, model-agnostic ComfyUI studio rig and custom node pack for Z-Image (supporting both standard .safetensors BF16/FP8 models via workflows/Z_Image_Pro_Studio.json and quantized .gguf Q4–Q8 models via workflows/Z_Image_Pro_Studio_GGUF.json).
It combines community-standard ComfyUI nodes and native Flow-Matching studio controllers into one streamlined 6-Zone pipeline featuring 4-Stage Fast Preview & Selective Polish, 5-part selective FaceDetailer refinement, a 1.5x full-frame diffusion refiner + quality finisher, and built-in VRAM cleanup — all structured so a first-time run works with zero missing-file validation errors.
Hardware Compatibility: Runs on any Z-Image-capable GPU (8GB–12GB+ VRAM; BF16, FP8, and GGUF Q4–Q8 supported). All optional detailers, upscalers, and SageAttention patching are bypassed by default so base generation stays fast and lightweight on any card.
Verification Environment: Tested and verified on NVIDIA RTX 3080 Ti (12GB VRAM).
Visual Quick-Start (Zero-Error Setup in 3 Clicks)

Key Features
-
Zero-Error First Run (Model- & LoRA-Agnostic)
- Ships with no bundled or promoted diffusion models or LoRAs — select any Z-Image
.safetensorsmodel inZ_Image_Pro_Studio.json(or any.ggufQ4–Q8 model inZ_Image_Pro_Studio_GGUF.json), and drop your own LoRAs into the emptyPower Lora Loader. - Every optional loader (
SAMLoader, 5 YOLO detectors,RealESRGAN_x2,PathchSageAttentionKJ) and all Zone 4 / Zone 5 groups ship bypassed by default, preventing missing-file validation errors before you download optional extras.
- Ships with no bundled or promoted diffusion models or LoRAs — select any Z-Image
-
4-Stage Fast Preview & Selective Polish (
ZImageStudioPreviewPolishSwitch)- Mode 1 (
Fast Preview): Runs Stage 1 sampling only (8 steps,CFG 1.0,euler / simplefor Turbo), caches the preview in RAM, and blocks downstream detailers and disk saves so you can iterate drafts cleanly. - Mode 2 (
Instant Save): Skips Stage 1 sampling and all detailers in0.00sand saves the RAM-cached preview immediately. - Mode 3 (
Polish & Save): Skips Stage 1 sampling in0.00sand routes the cached preview only through the Zone 4 detailers and/or Zone 5 upscaler you enabled. - Mode 4 (
External Image): Skips Stage 1 sampling and polishes any external image loaded in Zone 2LoadImage.
- Mode 1 (

- Z-Image Native Controls & AuraFlow Detail Daemon
ModelSamplingAuraFlow(defaultshift = 2.0) +ZImageStudioDetailDaemonPatcher: Shapes mid-step Flow-Matching sigmas (0..1space) on Stage 1 only to bring out skin pores, fabric weave, and depth with0.00soverhead and0 MBextra VRAM — without over-sharpening downstream Zone 4/5 passes.CLIPLoader(type: lumina2) +CLIPSetLastLayer (-2): Configured specifically for Z-Image'sqwen_3_4b.safetensorstext encoder for accurate prompt adherence.ZImageStudioResolutionSelector: 13 golden-ratio presets + custom dimensions emitting native 16-channel Z-Image latents.ZImageStudioQualityMaster: Post-refinersoft_blend(re-blends pre-refiner base to keep skin & lines natural), subtlefabric_detail, andsensor_grain.ZImageStudioVRAMCleanup: Lightweight built-in pass-through VRAM cleaner between passes (noComfyUI-Easy-Userequired).- Built-in automatic SageAttention safe fallback (
sage_fallback.py) so systems withoutsageattentionnever crash if the node is enabled.

1. Installation
Option 1 — ComfyUI-Manager / Comfy Registry (1-Click, Recommended)
- ComfyUI-Manager: Search for
Z-Image Pro Studio(or clickInstall Missing Custom Nodesafter dropping either workflow JSON onto ComfyUI). - Comfy CLI:
comfy node install z-image-pro-studio
Option 2 — Manual git clone (Step 1)
cd ComfyUI/custom_nodes
git clone https://github.com/kama0630-cmyk/ComfyUI-Z-Image-Pro-Studio.git
cd ComfyUI-Z-Image-Pro-Studio
pip install -r requirements.txt
Step 2 — Install Required & Optional Community Node Packs
Install via ComfyUI Manager or git clone inside ComfyUI/custom_nodes/:
| Custom Node Pack | Repository | Required? | Purpose in Workflow |
| :--- | :--- | :---: | :--- |
| rgthree-comfy | https://github.com/rgthree/rgthree-comfy | Yes | Power Lora Loader, Fast Groups Bypasser, Image Comparer |
| ComfyUI-Impact-Pack + Impact-Subpack | https://github.com/ltdrdata/ComfyUI-Impact-Pack & https://github.com/ltdrdata/ComfyUI-Impact-Subpack | Optional (Zone 4) | FaceDetailer, SAMLoader, UltralyticsDetectorProvider |
| ComfyUI_UltimateSDUpscale | https://github.com/ssitu/ComfyUI_UltimateSDUpscale | Optional (Zone 5) | UltimateSDUpscale 1.5x full-frame refiner |
| ComfyUI-KJNodes | https://github.com/kijai/ComfyUI-KJNodes | Optional | PathchSageAttentionKJ (bypassed by default) |
| ComfyUI-GGUF | https://github.com/city96/ComfyUI-GGUF | Optional (GGUF edition only) | UnetLoaderGGUF for Z_Image_Pro_Studio_GGUF.json |
Restart ComfyUI completely after installing custom nodes, then drag and drop workflows/Z_Image_Pro_Studio.json (or workflows/Z_Image_Pro_Studio_GGUF.json for GGUF models) onto the ComfyUI canvas.
2. Models & 1-Command Downloader
Required Base Models
- Any Z-Image diffusion model (
.safetensorsinComfyUI/models/diffusion_models/orunet/forZ_Image_Pro_Studio.json, or.ggufinComfyUI/models/unet/forZ_Image_Pro_Studio_GGUF.json) selected in Zone 1. - Z-Image Shared Text Encoder & 16-Channel VAE (
qwen_3_4b.safetensorsintext_encoders/andae.safetensorsinvae/) — can be downloaded in one command using--group encodersbelow. Power Lora Loaderships 100% empty — add your own Z-Image LoRAs if desired.
1-Command Helper Script (Shared Encoders + Optional Detailers & Upscaler)
# Interactive menu
python download_optional_models.py
# Or download by group
python download_optional_models.py --list
python download_optional_models.py --group encoders
python download_optional_models.py --group detailers
python download_optional_models.py --group upscaler
python download_optional_models.py --group all
(Pass --models-dir /path/to/ComfyUI/models if your models folder is in a non-standard location.)
(Note: If installed via Comfy Registry, download download_optional_models.py directly from this GitHub repository — excluded from the Registry archive for strict offline security compliance.)
| Group / Zone | Model | Target Folder (ComfyUI/models/...) | Official Source |
| :---: | :--- | :--- | :--- |
| encoders (Zone 1) | qwen_3_4b.safetensors | text_encoders/ | Comfy-Org / Z-Image Qwen3-4B |
| encoders (Zone 1) | ae.safetensors | vae/ | Comfy-Org / Z-Image 16-ch VAE |
| detailers (Zone 4-0) | sam_vit_b_01ec64.pth | sams/ | Meta Segment Anything |
| detailers (Zone 4-1) | face_yolov8m.pt | ultralytics/bbox/ | Bingsu/adetailer |
| detailers (Zone 4-3) | hand_yolov8s.pt | ultralytics/bbox/ | Bingsu/adetailer |
| Zone 4-2 / 4-4 / 4-5 | Eyeful_v2-Paired.pt, foot-yolov8x-v20.pt, or custom YOLO bbox | ultralytics/bbox/ | Optional community detectors (Impact Pack / Civitai) |
| upscaler (Zone 5) | RealESRGAN_x2.pth | upscale_models/ | ai-forever/Real-ESRGAN |
3. User Manual
A. Basic Generation & How the Two Switches Work (WHICH vs. WHEN)
Pure T2I Without Placeholder Images:
Zone 2-B(LoadImage+VAEEncode+VAEEncodeForInpaint) is bypassed by default, so pure T2I runs with zero missing-file errors even ifComfyUI/input/example.pngdoes not exist. ToggleZone 2-BON in Step A (Selective Zone Switch) when using I2I, Inpaint, or Mode 4.
- Step A (
Selective Zone Switch) = WHICH Tools to Equip (Zone 2-BExternal Image,Zone 4Detailers,Zone 5Upscale). - Step B (
4-Stage Preview & Polish Switch) = WHEN to Run Them (1: Fast Preview→2: Instant Save→3: Polish Equipped→4: External Image).
- Pick a Z-Image Model & Prompt: Select your Z-Image model in Zone 1, set your prompt,
ModelSamplingAuraFlowshift (1.0–1.5soft natural light ↔2.0balanced ↔2.5–3.0crisp contrast), and aspect ratio preset in Zone 2. - Draft Fast (
Mode 1: Fast Preview): Leave the Step B switch on1: [Fast Preview]and click Queue Prompt. Only Stage 1 runs (8 steps,CFG 1.0,euler / simplefor Turbo); the result stays in RAM and appears in the preview monitor without clutteringoutput/. - Instant Save (
Mode 2: Instant Save): When a draft looks great as-is, switch Step B to2: [Instant Save]and click Queue Prompt once. It skips sampling and detailers in0.00sand saves directly asZImage_Pro_Studio_*.png. - Selective Polish (
Mode 3: Polish & Save): If only the face, eyes, or hands need fixing (or you want a 1.5x upscale):- In Step A (Selective Zone Switch), enable only the Zone 4 / Zone 5 groups you want (and Zone 4-0: SAM Masking if you have
sam_vit_b_01ec64.pthfor contour masks). - Zone 4-5 (Optional Custom Detailer): Ships bypassed with a clean default detector (
face_yolov8m.pt) so first runs never fail. Drop any specialized YOLO bbox model intoComfyUI/models/ultralytics/bbox/, select it in Zone 4-5's detector node, and toggleZone 4-5ON in Step A. - Switch Step B to
3: [Polish & Save]and click Queue Prompt. - Compare Left (Stage 1 Draft) vs. Right (Polished Output) in Zone 6 → Live A/B Slider Comparer.
- In Step A (Selective Zone Switch), enable only the Zone 4 / Zone 5 groups you want (and Zone 4-0: SAM Masking if you have
- External Image Polish (
Mode 4: External Image): EnableZone 2-Bin Step A, load any existing image inLoadImage, enable the desired Zone 4 / Zone 5 groups, set Step B to4: [External Image], and queue.
B. Using Zone 2 Modes (T2I / I2I / Inpaint)
1: [T2I]: Generates from an empty 16-channel Z-Image latent (denoise = 1.0). KeepZone 2-Bbypassed.2: [I2I]: EnableZone 2-Bin Step A, load an image inLoadImage, and remix usingi2i_denoise(default0.65).3: [Inpaint]: EnableZone 2-Bin Step A, right-clickLoadImage→ Open in MaskEditor, paint your mask, save, and switch to3: [Inpaint].
C. Turbo vs. Base Z-Image Settings
- Z-Image Turbo (Default): Ships ready at 8 steps, CFG 1.0,
euler/simpleacross Stage 1KSamplerand Zone 4FaceDetailernodes (with5steps in Zone 5UltimateSDUpscale). - Z-Image Base (Non-Turbo): Raise Zone 3
KSamplerto 25–30 steps and CFG 3.5–4.5 (adjust Zone 4/5 steps/CFG to match if enabled).
D. Troubleshooting
- Missing-file error when enabling Zone 4 or Zone 5: Run
python download_optional_models.py --listto see which optional model is missing inComfyUI/models/, or pick an already-installed detector/model in that node's dropdown. - Enabled Zone 4 detailer without SAM: Works fine if
Zone 4-0: SAM Maskingstays bypassed —FaceDetailerautomatically falls back to bounding-box feathering. - SageAttention error: Keep
SageAttention Speed Patchbypassed unless you specifically installedsageattention; even if enabled,sage_fallback.pyautomatically falls back to standard PyTorch attention.
4. Included Custom Nodes
All 7 custom nodes use independent ZImageStudio* class IDs so this pack installs cleanly alongside ComfyUI-Krea2-Studio-Pack, ComfyUI-SDXL-Pro-Studio, and ComfyUI-FLUX-Pro-Studio with zero node name conflicts:
ZImageStudioModeSwitch— Lazy T2I / I2I / Inpaint routerZImageStudioResolutionSelector— 13 presets + custom size (native 16-channel Z-Image latent)ZImageStudioPreviewPolishSwitch— 4-stage Fast Preview / Instant Save / Polish / External Image routerZImageStudioFinalSaveGate— Lazy output gate forSaveImageand A/B ComparerZImageStudioDetailDaemonPatcher— Flow-Matching (0..1) Detail Daemon curve patcherZImageStudioQualityMaster— Soft blend, fabric sharpen, and optical sensor grain finisherZImageStudioVRAMCleanup— Built-in pass-through VRAM cleanup between passes
5. Credits & Attribution
This project is an integrated workflow rig and controller package built upon open-source work from the ComfyUI and Z-Image communities:
- Alibaba Tongyi-MAI — Z-Image diffusion architecture & Qwen3-4B text encoder
- Black Forest Labs — 16-channel
ae.safetensorsVAE - comfyanonymous — ComfyUI core & repackaged Z-Image text encoder/VAE split files
- city96 (ComfyUI-GGUF)
- rgthree (rgthree-comfy), ltdrdata (ComfyUI-Impact-Pack)
- kijai (ComfyUI-KJNodes), ssitu (ComfyUI_UltimateSDUpscale)
- xinntao / ai-forever (Real-ESRGAN), Bingsu (ADetailer YOLO detectors), Meta (Segment Anything)
License
MIT License — see LICENSE.