SDXL Pro Studio (Fast Preview, Polish & Fooocus Controls)
All-in-one ComfyUI custom nodes and workflow for SDXL: 4-Stage Fast Preview & Polish Switch, 5-part selective SAM detailers, 1.5x refiner & quality finisher, and optional zero-overhead Fooocus 4-in-1 controls.
ComfyUI-SDXL-Pro-Studio

An integrated, model-agnostic ComfyUI studio rig and custom node pack for Stable Diffusion XL (SDXL).
It combines community-standard ComfyUI nodes and Fooocus-inspired controls into one streamlined workflow (workflows/SDXL_Pro_Studio_EN.json) featuring 4-Stage Fast Preview & Selective Polish, 5-part selective FaceDetailer refinement, a 1.5x diffusion refiner + quality finisher, and zero-overhead Fooocus 4-in-1 controls — all structured so a first-time run works with just a single SDXL checkpoint and zero validation errors.
Hardware Compatibility: Runs on any SDXL-capable GPU (8GB+ VRAM recommended). All optional detailers, upscalers, and Fooocus control loaders 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 checkpoints or LoRAs — select any standard SDXL checkpoint you like in Zone 1, and drop your own LoRAs into the empty 5-slot
Power Lora Loader. - Every optional loader (
SAMLoader, 5 YOLO detectors,RealESRGAN_x2,SageAttention, and Zone 7 Fooocus ControlNet/IP-Adapter loaders) is bypassed by default, preventing missing-file validation errors if you haven't downloaded optional extras yet.
- Ships with no bundled or promoted checkpoints or LoRAs — select any standard SDXL checkpoint you like in Zone 1, and drop your own LoRAs into the empty 5-slot
-
4-Stage Fast Preview & Selective Polish (
SDXLStudioPreviewPolishSwitch)- Mode 1 (
Fast Preview): Runs Stage 1 sampling only, caches the preview in RAM, and blocks downstream detailers and disk saves so you can iterate drafts rapidly. - 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 turned ON. - Mode 4 (
External Image): Skips Stage 1 sampling and polishes any external image loaded in Zone 2LoadImage.
- Mode 1 (

-
SDXL-Aware Detail & Quality Pipeline
PerturbedAttentionGuidance (PAG)+RescaleCFG+SDXLStudioDetailDaemonPatcher(log-sigma cosine curve applied to Stage 1 only, avoiding over-sharpening in downstream detailers).SDXLStudioResolutionSelector: 13 SDXL golden-ratio presets + custom dimensions emitting native 4-channel SDXL latents.SDXLStudioQualityMaster: post-refinersoft_blend(re-blends pre-refiner base to tame harsh lines), subtlefabric_detail, andsensor_grain.- Built-in automatic SageAttention safe fallback (
sage_fallback.py) so systems withoutsageattentionnever crash if the node is enabled.
-
Optional Fooocus 4-in-1 Controls (Zone 7, Zero Overhead When OFF)
- ImagePrompt (IP-Adapter Plus SDXL): style, palette, and lighting transfer.
- FaceSwap (IP-Adapter Plus Face SDXL): facial structure transfer.
- CPDS (
SDXLFooocusCPDSPreprocessor+ Fooocus XL CPDS ControlNet): contrast-preserving grayscale structure and depth locking. - PyraCanny (
PyraCannyPreprocessor+ Stability AI Canny Control-LoRA): crisp multi-scale edge locking. - Backed by lazy
SDXLStudioModelSwitchandSDXLStudioConditioningSwitchnodes — disabled branches incur 0% runtime execution overhead.

1. Installation
Option 1 — ComfyUI-Manager / Comfy Registry (1-Click, Recommended)
- ComfyUI-Manager: Search for
SDXL Pro Studio(or clickInstall Missing Custom Nodesafter droppingworkflows/SDXL_Pro_Studio_EN.jsononto ComfyUI). - Comfy CLI:
comfy node install sdxl-pro-studio
Option 2 — Manual git clone (Step 1)
cd ComfyUI/custom_nodes
git clone https://github.com/kama0630-cmyk/ComfyUI-SDXL-Pro-Studio.git
cd ComfyUI-SDXL-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 | Yes (for Zone 4) | FaceDetailer, SAMLoader, UltralyticsDetectorProvider |
| ComfyUI_UltimateSDUpscale | https://github.com/ssitu/ComfyUI_UltimateSDUpscale | Yes (for Zone 5) | UltimateSDUpscale 1.5x full-frame refiner |
| ComfyUI-KJNodes | https://github.com/kijai/ComfyUI-KJNodes | Yes | PathchSageAttentionKJ (bypassed by default) |
| ComfyUI-Easy-Use | https://github.com/yolain/ComfyUI-Easy-Use | Yes | easy cleanGpuUsed VRAM cleanup between passes |
| ComfyUI_IPAdapter_plus | https://github.com/cubiq/ComfyUI_IPAdapter_plus | Optional (Zone 7) | IPAdapterAdvanced, IPAdapterModelLoader |
| comfyui_controlnet_aux | https://github.com/Fannovel16/comfyui_controlnet_aux | Optional (Zone 7) | PyraCannyPreprocessor |
Restart ComfyUI completely after installing custom nodes, then drag and drop workflows/SDXL_Pro_Studio_EN.json onto the ComfyUI canvas.
2. Models & Optional Downloads
Required Model
- Any standard SDXL checkpoint placed in
ComfyUI/models/checkpoints/and selected in Zone 1 → SDXL Checkpoint. Power Lora Loaderis empty by default — add your own SDXL LoRAs if desired.
Optional Models (Only Needed If You Enable Zone 4, Zone 5, or Zone 7)
You can download these directly from their official Hugging Face / GitHub / Meta sources below, or use the included helper script:
# Interactive menu
python download_optional_models.py
# Or download by group
python download_optional_models.py --list
python download_optional_models.py --group fooocus
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.)
| Zone | Model | Target Folder (ComfyUI/models/...) | Official Source |
| :---: | :--- | :--- | :--- |
| Zone 4-0 | sam_vit_b_01ec64.pth | sams/ | Meta Segment Anything |
| Zone 4-1 | face_yolov8m.pt | ultralytics/bbox/ | Bingsu/adetailer |
| 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, vagina-v4.2.pt | ultralytics/bbox/ | Optional community detectors (Impact Pack / Civitai) |
| Zone 5 | RealESRGAN_x2.pth | upscale_models/ | ai-forever/Real-ESRGAN |
| Zone 7 (Shared) | clip_vision_h.safetensors | clip_vision/ | h94/IP-Adapter (image_encoder/model.safetensors) |
| Zone 7-1 | ip-adapter-plus_sdxl_vit-h.safetensors | ipadapter/ | h94/IP-Adapter |
| Zone 7-2 | ip-adapter-plus-face_sdxl_vit-h.safetensors | ipadapter/ | h94/IP-Adapter |
| Zone 7-3 | fooocus_xl_cpds_128.safetensors | controlnet/ | lllyasviel/misc |
| Zone 7-4 | control-lora-canny-rank128.safetensors | controlnet/ | stabilityai/control-lora |
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,Zone 7Fooocus Controls). - 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 Checkpoint & Prompt: Select your SDXL checkpoint in Zone 1, set your positive/negative prompts 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; the result stays in RAM and appears in the preview monitor without cluttering youroutput/folder. - 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 asSDXL_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). - 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 4-channel 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. Using Zone 7 Optional Fooocus 4-in-1 Controls
- Download the
fooocusmodel group (python download_optional_models.py --group fooocus) and ensureComfyUI_IPAdapter_plus+comfyui_controlnet_auxare installed. - In Zone 3 → Selective Zone Switch, turn ON
Zone 7: Fooocus 4-in-1 Controls. - Inside Zone 7, load your reference image(s) and set only the individual switch(es) you need (
ImagePrompt,FaceSwap,CPDS,PyraCanny) toON (Apply). Any switch leftOFF (Bypass)costs zero extra compute.
D. Troubleshooting
- Missing-file error when enabling Zone 4 / 5 / 7: 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 nodes use independent SDXLStudio* / SDXLFooocus* class IDs so this pack installs cleanly alongside ComfyUI-Krea2-Studio-Pack with zero node name conflicts:
SDXLStudioModeSwitch— Lazy T2I / I2I / Inpaint routerSDXLStudioResolutionSelector— 13 presets + custom size (native 4-channel SDXL latent)SDXLStudioPreviewPolishSwitch— 4-stage Fast Preview / Instant Save / Polish / External Image routerSDXLStudioFinalSaveGate— Lazy output gate forSaveImageand A/B ComparerSDXLStudioDetailDaemonPatcher— SDXL log-sigma Detail Daemon curve patcherSDXLStudioQualityMaster— Soft blend, fabric sharpen, and optical sensor grain finisherSDXLFooocusCPDSPreprocessor— Fooocus CPDS structure preprocessorSDXLStudioModelSwitch— Lazy ON/OFF MODEL switchSDXLStudioConditioningSwitch— Lazy ON/OFF CONDITIONING switch
5. Credits & Attribution
This project is an integrated workflow rig and controller package built upon open-source work from the ComfyUI and Fooocus communities:
- lllyasviel / Fooocus — CPDS (Contrast-Preserving Decoupled Structure) algorithm &
fooocus_xl_cpds_128 - h94 — SDXL IP-Adapter Plus & Face models + CLIP Vision ViT-H
- Stability AI — Canny Control-LoRA rank128
- cubiq (ComfyUI_IPAdapter_plus), Fannovel16 (comfyui_controlnet_aux)
- rgthree (rgthree-comfy), ltdrdata (ComfyUI-Impact-Pack)
- kijai (ComfyUI-KJNodes), ssitu (ComfyUI_UltimateSDUpscale), yolain (ComfyUI-Easy-Use)
- xinntao / ai-forever (Real-ESRGAN), Bingsu (ADetailer YOLO detectors), Meta (Segment Anything)
License
MIT License — see LICENSE.