CivArchive
    ComfyUI 5-Phase SDXL + Refiner Workflow - 5PhaseSDXLRefiner_v1.0
    NSFW
    Preview 112562831

    ComfyUI 5-Phase SDXL + Refiner Workflow

    Ultimate Multi-Stage Image Generation with SDXL Refiner Integration

    Author: DarthRidonkulous
    Version: 1.0
    Release Date: December 2025
    Status: Production Ready


    🌟 Overview

    The 5-Phase SDXL + Refiner workflow is a layered image construction system that builds images through five sequential transformation phases, each serving a specific function in the creative pipeline. Rather than simple refinement passes, each phase contributes distinct elements - form, correction, style evolution, and final polish - allowing you to combine model strengths and LoRA effects in ways impossible with single-pass generation.

    You don't have to use all 5 phases. The workflow includes complete bypass control - disable any phase to match your needs. Some images only need 2 phases to achieve the desired style and quality; others benefit from the full pipeline. Start with fewer phases and add more only if needed.

    What Makes This Workflow Special

    • Five Functional Phases - Each phase serves a specific purpose: foundation, correction, style evolution, final layering, and refiner polish

    • Use Only What You Need - Bypass any phase; some images need 2 phases, others need all 5

    • Sequential Model Layering - Use different checkpoints per phase as "macro LoRAs" for broad stylistic control

    • Controlled LoRA Distribution - Instead of fighting 12+ LoRAs in one pass, distribute 2-3 LoRAs across phases for precise control

    • Per-Phase LoRA Control - Manage trigger words and LoRA effects independently across all phases

    • Strategic Detailers - Each phase's detailer targets different elements based on what needs fixing at that stage

    • True Refiner Support - Phase 5 uses actual SDXL Refiner models for final coherence

    • Complete Bypass Control - Disable any phase or feature group for testing or production


    🔑 Key Features

    Phase 5 SDXL Refiner Integration

    Unlike standard multi-phase workflows that just re-run base models, Phase 5 is specifically designed for SDXL Refiner models:

    • Uses KSampler (Advanced) with proper refiner step configuration

    • Accepts Phase 4 output and applies final refinement pass

    • Separate checkpoint loader for dedicated refiner model (e.g., sd_xl_refiner_1.0.safetensors)

    • Configurable "start at step" control for refiner transition point

    • Produces the final polished output

    Multi-Phase Architecture

    Phase 1: Foundation (The Sketch)

    • Establishes shape, form, poses, basic lighting

    • Use minimal LoRAs - just enough to get your base structure

    • Choose a model strong in composition (anime models excel at dynamic poses)

    • Default denoise = 0.8

    Phase 2: Correction & Detail

    • May fix Phase 1 issues: hands, disconnected elements, anatomical problems

    • Adds detail and enhances lighting

    • Higher denoise (0.4 to 0.6) gives this phase authority to make corrections

    • Select LoRAs based on what Phase 1 needs

    • Independent LoRA triggers

    Phase 3: Style Evolution

    • Shifts aesthetic direction while preserving established structure

    • Can introduce different model aesthetics

    • Lower denoise (0.25) preserves the corrected foundation

    • Independent LoRA triggers

    Phase 4: Final Base Layer

    • Last opportunity for style and detail influence before refiner

    • Subtle adjustments building on all previous phases

    • Default denoise = 0.25

    • Independent LoRA triggers

    Phase 5: SDXL Refiner

    • Final coherence and polish

    • Face and hair often need attention here (common casualties of multi-phase transformation)

    • Dedicated refiner model for cleanup

    • Separate upscale and save options

    LoRA Management System

    The core philosophy: Generating a good image with 12+ LoRAs active simultaneously is difficult. Generating a great image with 2-3 carefully chosen LoRAs is much easier. This workflow lets you distribute your LoRAs across phases for precise control.

    Each phase has its own complete LoRA control:

    • LoRA Loader (LoraManager) - Visual LoRA selection per phase

    • TriggerWord Toggle - Enable/disable individual trigger words

    • Carryover TriggerWord Toggle - Control trigger inheritance

    • Join String Multi - Combine selected triggers

    • Wildcard Prompt from String - Inject triggers into prompts

    This means you can:

    • Use minimal LoRAs in Phase 1 to establish clean form

    • Add corrective/detail LoRAs in Phase 2 based on what Phase 1 produced

    • Layer style LoRAs in Phases 3-4 for progressive aesthetic shifts

    • Prevent trigger cross-contamination between phases

    Comprehensive Save System

    Every processing stage can save independently:

    • Phase 1-4: Image Save, Upscale Save, Detailer Save

    • Phase 5 Refiner: Refiner Save with Metadata, Refiner Upscale Save

    • All saves include full metadata embedding (A1111 format for CivitAI)

    Memory Management

    Strategic VRAM optimization for stable operation:

    • Model Unload between major phases

    • Cache clearing nodes

    • FaceDetailer bypass capability per phase

    • Upscale bypass for VRAM-constrained systems


    📦 Installation

    Required Custom Nodes

    Install these via ComfyUI Manager or manually:

    ComfyUI-Impact-Pack

    ComfyUI-LoRA-Manager

    ComfyUI-Easy-Use

    rgthree's ComfyUI Nodes

    pysssss Custom Scripts

    WAS Node Suite

    ComfyUI-KJNodes

    Custom Nodes (Included with Workflow)

    This workflow requires 4 custom Python nodes. Save these files to your ComfyUI/custom_nodes/ folder:

    1. SDXL Image Settings Controller (4 Phase)

    File: sdxl_image_settings_controller_4phase.py

    Centralized control for all workflow settings:

    • Resolution presets (organized by aspect ratio)

    • Seed control (fixed/increment/decrement/randomize)

    • Per-phase KSampler settings (steps, CFG, sampler, scheduler, denoise)

    • Batch size control

    • Empty latent generation

    2. Multi-Phase Prompt Manager (4 Phase) V2

    File: multi_phase_prompt_manager_4phase_v2.py

    Advanced prompt management with:

    • Phase 1 as base prompt for inheritance

    • Per-phase mode control: Use Base, Use Previous, Unique, Append to Base, Append to Previous

    • Positive AND negative prompt management per phase

    • LoRA trigger injection (at beginning of prompt)

    • Automatic duplicate trigger removal

    • Metadata output for debugging

    3. Integer Input Switch

    File: integer_input_switch.py

    Simple utility for routing integer values:

    • 4-input selector

    • Used for step routing to refiner

    4. VAE Selector

    File: vae_selector.py

    This node gives you the ability to switch from the baked VAE in the Checkpoint model to an external VAE easily. You can change this for every model in phases 1 - 4.

    Installation Steps

    1. Download the workflow JSON file

    2. Install custom node packs via ComfyUI Manager:

      • Open ComfyUI Manager

      • Install Missing Custom Nodes

      • Restart ComfyUI

    3. Install included Python nodes:

       Copy all .py files to: ComfyUI/custom_nodes/
    1. Restart ComfyUI completely (not just browser refresh)

    2. Load the workflow:

      • Drag JSON onto ComfyUI canvas, or

      • Use Load button and select the JSON file

    3. Verify all nodes loaded (no red "missing node" errors)


    🚀 Quick Start Guide

    Step 1: Configure Global Settings

    Find the SDXL Image Settings Controller (4 Phase) node in the CENTER of the workflow. The workflow is arranged so that the most adjusted settings and the output is in the center of the workflow for easy/quick adjustments as you are tweaking settings to get the desired output. All of the nodes are grouped so that you are able to move groups around without affecting functionality if you don't like the way I have everything arranged.

    Settings:

    subdirectory Your project folder name. This will change the subdirectory of all the save nodes in the workflow to ComfrUI/<Subdirectory>

    resolution_preset

    seed You can input your starting seed. This changes the seed in all of the KSamplers in phases 1 - 4.

    seed_control fixed, randomize, decrement, increment

    control_after_generate Seed control: fixed, randomize, decrement, increment

    batch_size Uses the same prompt and changes seed according to your control after generate settings and does not unload or reload models for the duration of the batch.

    Step 2: Choose Your Phases and Configure Settings

    First, decide how many phases you need:

    You don't have to use all 5 phases. Some images achieve the desired style and quality with just 1-2 phases; others benefit from the full pipeline. Start with fewer phases and add more only if you're not getting the results you want.

    1. Use the Fast Bypass node to enable/disable Phase 2, Phase 3, Phase 4, and Phase 5 Refiner

    2. Disable Model Loader Groups for Phases you are bypassing. If you don't, they will load into VRAM when you start the generation.

    3. Set the Phase Steps to Refiner selector to match the last enabled phase (this routes the correct step count to the refiner if using Phase 5)

    Phase Settings in the SDXL Image Settings Controller:

    Start with the default settings, then adjust to get desired results. Samplers and schedulers can behave unexpectedly in Phase 3 and Phase 4 - you may need to try different combinations that aren't the "recommended" ones for your model.

    LCM sampler with karras scheduler works reliably (~90%) in any phase with any model and is a good fallback if you're getting strange results.

    Step 3: Load Your Models

    Configure checkpoint loaders based on their function in the pipeline:

    Key concept: Each model acts like a broad-effect "macro LoRA" - you're layering model strengths sequentially to achieve effects impossible in single-pass generation. An anime model in Phase 1 for pose → semi-realistic in Phase 2→ realistic model in Phase 3-4 for detail.

    Step 4: Configure Phase 5 Refiner

    Find the Phase 5 SDXL Refiner group:

    Choose you refiner model for final detail and refinement. You can use SDXL refiner models that are made for that specific purpose or you can use any other checkpoint model for the final touches. Often, using the same checkpoint as you used in Phase 4 will give you the desired results, but sometimes using a semi-real model for refinement after using realistic model in Phase 4 can sharpen up the image in a more desired way.

    The Steps field is automatically populated from the Phase Steps to Refiner node, which pulls the step count from whichever phase you selected in the phase selector.

    Refiner Start at Step: This should be set to the Steps value minus 5 to 10. For example, if your selected phase has 25 steps, set Start at Step to 15-20. Lower values = more refiner influence, higher values = less refiner influence.

    Step 5: Set Your Prompts

    Find the Multi-Phase Prompt Manager (4 Phase) V2 node:

    1. Enter your main prompt in phase_1_positive_prompt

    2. Enter negative prompt in phase_1_negative_prompt

    3. Configure Phase 2-4 modes (default: "Append to Base" works well)

    4. Add phase-specific custom text or embeddings in the appropriate prompt nodes for each phase.

    Step 6: Configure LoRAs

    For each phase you want LoRAs:

    1. Open the LoRA Loader (LoraManager) for that phase

    2. Select your LoRAs

    3. Use TriggerWord Toggle to enable/disable specific triggers

    4. Check ShowText nodes to verify trigger combinations

    Step 7: Enable/Disable Features

    Find the Fast Bypass node (rgthree Fast Groups Bypasser) to enable or disable:

    • Phases and Model Loaders

    • Detailers (per phase)

    • Image Save, Detailer Save and Upscale Saves (per Phase)

    Remember: You don't need all phases for every image. Disable phases you don't need - this speeds up generation and sometimes fewer phases produce better results for your specific style/model combination.

    Step 8: Run the Workflow

    1. Click Queue Prompt

    2. Watch progress through each phase

    3. Check ShowText nodes for debugging

    4. Final outputs appear in your configured subdirectory


    💡 Tips for Best Results

    Model Selection Strategy

    Start simple: Enable Phase 1 first, get the basic result you want, then enable Phase 2 and mess with settings and LoRAs to get the results you want, then Phase 3, then Phase 4, Then refine. You can save only the Detailer Image or Upscale image or no images and just rely on the image previews in the center-left of the workflow.

    Functional Approach (when using multiple phases):

    • Phase 1: Model with strong composition/poses and loras that define basic shape and lighting.

    • Phase 2: Model with good corrective ability and detail. Start working on lighting here.

    • Phases 3-4: Models that move toward your target aesthetic

    • Phase 5: SDXL Refiner for final coherence

    Example - Anime Pose to Realistic Result:

    • Phase 1: Anime model (great action poses)

    • Phase 2-3: Transition models

    • Phase 4: Realistic model

    • Phase 5: Refiner for cleanup

    • Result: Dynamic pose you couldn't get from realistic model alone, with realistic final style

    Same Model Throughout:

    • Use when you want the model's native aesthetic

    • Still benefits from the multi-phase LoRA distribution

    • Each phase still serves its function (foundation → correction → detail → polish)

    • Remember that the workflows in ComfyUI are embedded in the images and videos. If you want to see how I have created one of my images, you can download the image and drag it onto the canvas of ComfyUI and it will populate the workflow with my settings and prompts.

    Denoise Considerations

    The workflow defaults use decreasing denoise values across phases (0.8 → 0.4 → 0.25 → 0.25):

    • Phase 1 (0.8): High denoise for initial generation from the latent

    • Phase 2 (0.4): Higher denoise gives this phase authority to fix issues from Phase 1

    • Phases 3-4 (0.25): Lower denoise preserves the corrected foundation while allowing style evolution

    Phase 2's higher denoise is intentional - it needs room to fix hands, reconnect elements, and make corrections when using the same checkpoint models for Phase 1 and 2. It also will enable a large change in styles if you are using different models. Sometimes you may want .45 to .55 for this.

    LoRA Distribution Strategy

    The key insight: Don't load all LoRAs in Phase 1. Distribute them based on phase function:

    1. Phase 1: Minimal LoRAs - just what you need for basic form/pose

    2. Phase 2: Add LoRAs for correction and detail, chosen based on what Phase 1 produced

    3. Phases 3-4: Layer in style LoRAs for aesthetic direction

    4. Keep each phase to 2-3 active LoRAs for controllable results

    This gives you the effect of 12+ LoRAs in the final image, but with the control of only managing a few at a time.

    Phase 5 Refiner Settings

    The refiner steps are automatically pulled from your selected phase via the Phase Steps to Refiner node. Set Start at Step to your step count minus 5-10 (e.g., if 25 steps, use 15-20 for start). The refiner model is loaded via the Phase 5 Checkpoint Loader - use an SDXL Refiner model (e.g., sd_xl_refiner_1.0.safetensors) or a compatible checkpoint.


    🔧 Troubleshooting

    Missing Nodes Error

    Symptom: Red nodes after loading workflow

    Solution:

    1. Install missing node packs via ComfyUI Manager

    2. Verify all 4 custom Python files are in custom_nodes/ folder

    3. Restart ComfyUI completely (not just browser refresh)

    4. Check console for Python import errors

    Out of VRAM

    Symptom: Workflow crashes mid-generation

    Solution:

    1. Reduce batch_size to 1

    2. Disable FaceDetailer phases (bypass the groups)

    3. Disable upscale saves

    4. Use smaller resolution preset

    5. Enable only 2-3 phases instead of all 5

    6. Ensure Model Unload nodes are active (not bypassed)

    Phase 5 Refiner Not Working

    Symptom: Refiner phase produces unexpected results

    Solution:

    1. Verify Phase 5 Checkpoint is an actual SDXL Refiner model

    2. Check "Refiner Start at Step" value

    3. Verify image routing from Phase 4 to Phase 5

    4. Ensure KSampler (Advanced) is configured correctly

    Images Not Saving

    Symptom: Workflow completes but no outputs

    Solution:

    1. Check subdirectory setting in Settings Controller

    2. Verify Save Image nodes aren't bypassed

    3. Check folder permissions in ComfyUI output directory

    4. Review console for file write errors

    Prompt Issues

    Symptom: Output doesn't match prompt expectations

    Solution:

    1. Check ShowText nodes to see actual prompts per phase

    2. Verify Phase 2-4 modes are set correctly

    3. Review TriggerWord Toggle settings

    4. Check for duplicate or conflicting triggers


    📋 System Requirements

    Minimum Requirements

    • GPU: NVIDIA with 10GB+ VRAM (RTX 3080 or equivalent)

    • RAM: 16GB+ system memory

    • Storage: SSD recommended

    • ComfyUI: Latest version

    • GPU: NVIDIA with 12GB+ VRAM (RTX 4080/4090)

    • RAM: 32GB+ system memory

    • Storage: NVMe SSD

    • ComfyUI Manager: For easy custom node installation

    Optimal Requirements

    • GPU: 24GB VRAM (RTX 4090)

    • RAM: 64GB+ system memory

    • Features: Can run all phases with FaceDetailer and upscaling enabled


    🔄 Version Information

    Current Version: 1.0
    Release Date: December 2025
    Compatibility: ComfyUI 2025+ builds

    Features in V1.0

    • 5-phase architecture with dedicated SDXL Refiner integration

    • Per-phase model loading (5 separate checkpoints)

    • Complete LoRA management per phase

    • FaceDetailer integration for all phases

    • Comprehensive save system with metadata

    • Strategic memory management

    • Full bypass control


    📄 License & Credits

    Workflow Design: DarthRidonkulous
    Custom Nodes: Developed in collaboration with Claude (Anthropic)
    Testing: Production testing with SDXL/Pony/Illustrious/NoobAI model families

    Usage Terms

    • Free to use and modify for personal and commercial projects

    • Credit appreciated but not required

    • Share your results on CivitAI!

    • Custom nodes may be used in other workflows

    Support the Creator

    If you find this workflow valuable:

    • ⭐ Leave a review on CivitAI

    • 🖼️ Share your generated images

    • 💬 Help other users in comments

    • ☕ Consider supporting future development


    📞 Support & Community

    Questions? Check troubleshooting section first, then:

    1. Review ShowText nodes for debugging info

    2. Search comments for similar issues

    3. Post detailed question with workflow screenshots

    Found a bug? Report with:

    • Workflow version number

    • ComfyUI version

    • Error messages from console

    • Steps to reproduce


    🎉 Thank you for using the 5-Phase SDXL + Refiner workflow!

    This workflow enables layered image construction - combining model strengths and distributing LoRA effects across phases to achieve results impossible with single-pass generation.

    Happy generating! 🚀


    Workflow Version: 1.0 | Documentation Version: 1.0 | Last Updated: December 2025

    Description

    FAQ

    Workflows
    SDXL 1.0

    Details

    Downloads
    119
    Platform
    CivitAI
    Platform Status
    Available
    Created
    12/4/2025
    Updated
    4/27/2026
    Deleted
    -

    Files

    comfyui5PhaseSDXL_5phasesdxlrefinerV10.zip