Extensions/SDXL Pro Studio (Fast Preview, Polish & Fooocus Controls)
ComfyUI Extension

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.

By kama0630-cmyk·Created a day ago·Updated about 8 hours ago· 0
kama0630-cmyk/ComfyUI-SDXL-Pro-Studio
Nodes—
On cloudLocal install
Stars0
Updatedabout 8 hours ago
Readme

ComfyUI-SDXL-Pro-Studio

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)

Visual Quick-Start Cheat Sheet


Key Features

  1. 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.
  2. 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 in 0.00s and saves the RAM-cached preview immediately.
    • Mode 3 (Polish & Save): Skips Stage 1 sampling in 0.00s and 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 2 LoadImage.

Stage 1 Draft vs Stage 3 Polish Proof

  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-refiner soft_blend (re-blends pre-refiner base to tame harsh lines), subtle fabric_detail, and sensor_grain.
    • Built-in automatic SageAttention safe fallback (sage_fallback.py) so systems without sageattention never crash if the node is enabled.
  2. 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 SDXLStudioModelSwitch and SDXLStudioConditioningSwitch nodes — disabled branches incur 0% runtime execution overhead.

Optional Fooocus 4-in-1 Controls Proof


1. Installation

Option 1 — ComfyUI-Manager / Comfy Registry (1-Click, Recommended)

  • ComfyUI-Manager: Search for SDXL Pro Studio (or click Install Missing Custom Nodes after dropping workflows/SDXL_Pro_Studio_EN.json onto 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 Loader is 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 if ComfyUI/input/example.png does not exist. Toggle Zone 2-B ON in Step A (Selective Zone Switch) when using I2I, Inpaint, or Mode 4.

  • Step A (Selective Zone Switch) = WHICH Tools to Equip (Zone 2-B External Image, Zone 4 Detailers, Zone 5 Upscale, Zone 7 Fooocus Controls).
  • Step B (4-Stage Preview & Polish Switch) = WHEN to Run Them (1: Fast Preview → 2: Instant Save → 3: Polish Equipped → 4: External Image).
  1. Pick a Checkpoint & Prompt: Select your SDXL checkpoint in Zone 1, set your positive/negative prompts and aspect ratio preset in Zone 2.
  2. Draft Fast (Mode 1: Fast Preview): Leave the Step B switch on 1: [Fast Preview] and click Queue Prompt. Only Stage 1 runs; the result stays in RAM and appears in the preview monitor without cluttering your output/ folder.
  3. Instant Save (Mode 2: Instant Save): When a draft looks great as-is, switch Step B to 2: [Instant Save] and click Queue Prompt once. It skips sampling and detailers in 0.00s and saves directly as SDXL_Pro_Studio_*.png.
  4. 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.pth for 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.
  5. External Image Polish (Mode 4: External Image): Enable Zone 2-B in Step A, load any existing image in LoadImage, enable the desired Zone 4 / Zone 5 groups, set Step B to 4: [External Image], and queue.

B. Using Zone 2 Modes (T2I / I2I / Inpaint)

  • 1: [T2I]: Generates from an empty 4-channel latent (denoise = 1.0). Keep Zone 2-B bypassed.
  • 2: [I2I]: Enable Zone 2-B in Step A, load an image in LoadImage, and remix using i2i_denoise (default 0.65).
  • 3: [Inpaint]: Enable Zone 2-B in Step A, right-click LoadImage → Open in MaskEditor, paint your mask, save, and switch to 3: [Inpaint].

C. Using Zone 7 Optional Fooocus 4-in-1 Controls

  1. Download the fooocus model group (python download_optional_models.py --group fooocus) and ensure ComfyUI_IPAdapter_plus + comfyui_controlnet_aux are installed.
  2. In Zone 3 → Selective Zone Switch, turn ON Zone 7: Fooocus 4-in-1 Controls.
  3. Inside Zone 7, load your reference image(s) and set only the individual switch(es) you need (ImagePrompt, FaceSwap, CPDS, PyraCanny) to ON (Apply). Any switch left OFF (Bypass) costs zero extra compute.

D. Troubleshooting

  • Missing-file error when enabling Zone 4 / 5 / 7: Run python download_optional_models.py --list to see which optional model is missing in ComfyUI/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 Masking stays bypassed — FaceDetailer automatically falls back to bounding-box feathering.
  • SageAttention error: Keep SageAttention Speed Patch bypassed unless you specifically installed sageattention; even if enabled, sage_fallback.py automatically 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 router
  • SDXLStudioResolutionSelector — 13 presets + custom size (native 4-channel SDXL latent)
  • SDXLStudioPreviewPolishSwitch — 4-stage Fast Preview / Instant Save / Polish / External Image router
  • SDXLStudioFinalSaveGate — Lazy output gate for SaveImage and A/B Comparer
  • SDXLStudioDetailDaemonPatcher — SDXL log-sigma Detail Daemon curve patcher
  • SDXLStudioQualityMaster — Soft blend, fabric sharpen, and optical sensor grain finisher
  • SDXLFooocusCPDSPreprocessor — Fooocus CPDS structure preprocessor
  • SDXLStudioModelSwitch — Lazy ON/OFF MODEL switch
  • SDXLStudioConditioningSwitch — 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:

License

MIT License — see LICENSE.