Skip to content

SDXL Workflow Tutorial

Learn to use SDXL model for high-quality images.

SDXL Introduction

SDXL (Stable Diffusion XL) is the latest model series with excellent image quality and prompt following.

Features

FeatureDescription
High ResolutionNative 1024x1024
Better CompositionImproved composition
Diverse StylesVarious art styles
Text RenderingBetter text generation

Versions

ModelDescription
SDXL BaseBase model
SDXL RefinerRefinement model
SDXL TurboFast generation

Installation

Download Models

ComfyUI/models/checkpoints/
stable-diffusion-xl-base-1.0.safetensors

# Optional: Refinement model
stable-diffusion-xl-refiner-1.0.safetensors

Download VAE

SDXL uses dedicated VAE:

ComfyUI/models/vae/
sdxl-vae-fp16-fix.safetensors

Basic Workflow

Classic Workflow

┌─────────────┐    ┌─────────────┐    ┌─────────────┐
│ CheckpointL │ →  │ CLIPTextEn  │ →  │ KSampler    │
│ oaderSDXL   │    │ (positive)  │    │            │
└─────────────┘    └─────────────┘    └─────────────┘

┌─────────────┐    ┌─────────────┐    ┌─────────────┐
│ CLIPTextEn  │    │ VAEDecode   │ ←  │ EmptyLatent│
│ (negative) │    │             │    │ Image      │
└─────────────┘    └─────────────┘    └─────────────┘

Prompt Tips

Basic Format

SDXL supports longer prompts:

bash
masterpiece, best quality, a young woman with long flowing hair, wearing elegant white dress, flower garden background, butterflies, magical atmosphere, ultra detailed, 8k, professional photography

Quality Tags

TagEffect
masterpiece, best qualityOverall improvement
extremely detailed, intricateMore details
8k, high resolutionHigh resolution
professional, studio lightingProfessional look

Sampling Parameters

ParameterValueDescription
Steps30-50Quality-speed balance
CFG7-12Prompt following
SamplerDPM++ 2M KarrasRecommended
Size1024x1024Native resolution

Quality Levels

LevelStepsCFGUse
Fast Preview207-8Quick test
Standard308-10Daily use
High Quality5010-12Important work

Using Refiner

Two-stage Generation

SDXL can use Refiner for better quality:

Base Model → Generate base (1024x1024)
Refiner Model → Refine details

Image Sizes

Native Resolution

SizeRatioUse
1024x10241:1Portrait, square
1152x8969:7Landscape
1216x8323:2Photo

Troubleshooting

Q: Out of VRAM

A:

  • Use SDXL Lite version
  • Reduce image size
  • Use fp16 models

Q: How to improve quality

A:

  • Use Refiner
  • Increase steps
  • Add quality tags

Next Steps