.webp)
SDXL remains useful in ComfyUI when you need a familiar base model and a broad selection of compatible ControlNet, LoRA and inpainting workflows. This article describes how to build and verify a basic base and refiner graph. It does not claim years of production use, client tests or unpublished benchmark figures.
Visual guide: Keep the SDXL base and refiner handoff clear
How to use this map
- Verify a base-only output first. A refiner adds a second model and another handoff, so it should not be your starting point for diagnosing a broken installation.
- Inspect the model and conditioning connections into each sampler. A visually connected graph can still use inputs from the wrong model branch.
- For a split denoising workflow, keep the intended sampling boundary and latent handoff consistent with the matching example. Do not restart the process with fresh noise by accident.
- Compare base-only and refined outputs against a specific requirement. Save both versions; extra processing is useful only if it improves the required result.
Stop and check: Add ControlNet or LoRA after the base graph works, one component at a time. Save model versions and the denoising split with the workflow.
Next practical guides: SDXL ControlNet in ComfyUI: Canny Setup and Error Fixes · FLUX vs SDXL in ComfyUI: Test Plan and Comparison Scorecard
Implementation reference: Official SDXL workflow examples. Use the matching version-specific example alongside this editorial map.
Choose the files
Download SDXL base and, if you plan to use it, the matching refiner from the model publisher. Check each license and file source. Keep the filenames and version information with your workflow JSON so another person can reproduce your setup. The ComfyUI SDXL example is a useful reference for current node connections.
Build a base workflow first
- Use Load Checkpoint to select SDXL base. Connect its model output to KSampler, CLIP output to the text-encoding nodes and VAE output to the decoder.
- Write a positive prompt describing the subject and composition. Add a negative prompt only if you need it and test whether it changes the result. Create an empty latent image at an SDXL-friendly resolution such as 1024 × 1024.
- Connect both conditioning outputs and the latent to the sampler. Start with the sampler and step settings shown in an official example, then decode and save the image.
- Run one image with a fixed seed. Save the output before adding more nodes. A simple graph makes errors easier to identify.
Check the base graph connection by connection
| Output | Connect to | Purpose |
|---|---|---|
| Load Checkpoint: MODEL | KSampler: model | The diffusion model performs denoising |
| Load Checkpoint: CLIP | Positive and negative text encoders | The prompts become conditioning |
| Positive / negative conditioning | Corresponding KSampler sockets | The sampler receives both branches |
| Empty Latent Image | KSampler: latent_image | Defines the generated canvas |
| KSampler: samples | VAE Decode: samples | Decodes the sampled latent |
| Load Checkpoint: VAE | VAE Decode: vae | Uses the compatible autoencoder |
| VAE Decode: IMAGE | Save Image | Creates a visible saved result |
Use the SDXL base model card to identify the original model. Put a ComfyUI-compatible checkpoint in models/checkpoints/. A Diffusers repository directory and a single checkpoint file are different packaging formats; use the format the selected loader supports.
A first image with a clear acceptance criterion
Try a small diagnostic brief such as “A blue ceramic bowl on a wooden table, soft light from the left, plain background.” The proposed test is successful when the graph saves a viewable image with the intended subject and no execution errors. It does not establish universal image quality.
Use batch size one and keep the official example’s sampling settings. A 1024 × 1024 canvas is a normal starting point for SDXL; if memory fails, reduce it while diagnosing. The cover on this page is an illustration and does not show the result of this proposed test.
Keep a working baseline before adding the refiner
Save a base-only workflow and its image first. Give it a descriptive filename and record the checkpoint, seed, prompt and dimensions. Duplicate that graph for the refiner branch. If the more complex version fails, the base graph provides a known comparison point instead of forcing you to debug every component at once.
Understand the latent handoff
In the standard two-stage approach, the base and refiner share a denoising schedule. The first sampler stops partway and passes an unfinished latent to the second. Decode after the final stage. Follow the official example’s noise and leftover-noise options rather than inventing a handoff from an unrelated img2img graph.
The second stage needs the refiner’s own model and appropriate text conditioning. Connecting its model while retaining incompatible base encoding can produce a mismatch. Inspect both checkpoint loaders and each stage’s conditioning separately.
Compare the same goal, not only the same seed
Review matching crops for unwanted texture, face changes, small objects and edges. Note the additional loading and generation time. If the refiner makes an image less faithful to the brief, keep the base-only result. A more complex graph has no automatic quality advantage.
Choose one optional component at a time
Add ControlNet when you need structural guidance from a reference. Add a compatible LoRA when you want a learned subject or style. Add a refiner only when its second stage helps your actual images. Avoid enabling all three during the first run: they make it harder to identify which change introduced an error or changed the output.
For a LoRA comparison, retain the same checkpoint, prompt and seed, then test the unmodified graph and one chosen weight. Record the LoRA file and license. If it requires a trigger phrase, include the phrase documented by its publisher. A file downloaded for SD 1.5 or FLUX is not automatically compatible with SDXL.
A practical recovery order
- If validation fails before generation, resolve missing inputs and filenames first.
- If a checkpoint fails to load, verify the download and selected loader before changing prompts.
- If memory fails, note whether the failure occurs while loading, sampling or decoding.
- If the graph runs but the image is unexpected, compare the positive/negative connections, latent dimensions and VAE with the baseline.
- If only the refiner graph fails, check its model, conditioning and schedule while retaining the working base workflow.
Keep the complete error message. Repeatedly reinstalling packages before identifying the failing node can replace one unknown problem with several new ones.
Save a workflow another person can inspect
Keep the workflow JSON alongside the image, prompt, seed, dimensions, checkpoint filenames, sampler, steps, ComfyUI version and GPU information. PNG workflow metadata can be useful, but an editor or export may strip it. Retain the JSON explicitly so you do not depend on metadata surviving a later upload.
This guide explains a workflow and review method. It does not supply a measured base/refiner benchmark or a guarantee that your hardware will run both models at a chosen resolution.
Add the refiner when it helps
Load the SDXL refiner checkpoint in a separate loader. Route the base latent to a second sampling stage following a documented SDXL refiner workflow, then decode after that stage. The refiner is optional: judge whether it improves your actual images before accepting extra loading time and memory use. Keep the same seed and prompt when comparing base only with base plus refiner. The denoise value, handoff point and total steps all affect the comparison.
When to use ControlNet or LoRA
If you need a reference pose, depth map or edge structure, add an SDXL-compatible ControlNet. An SD 1.5 model is not interchangeable. See the SDXL ControlNet workflow guide for a minimal graph. For a LoRA, verify that it was trained for SDXL and note its weight and source. Change one component at a time.
Troubleshooting
Missing checkpoint
Check the file path expected by the loader and refresh the model list. Do not rename an unrelated file to make it appear compatible.
Out of memory
Use batch size one and reduce resolution. Peak memory can occur at model load, sampling or decoding; note the failing node. Loading base and refiner together can increase memory pressure.
Unexpected image
Restore the basic graph and fixed seed. Check conditioning connections, selected checkpoint and VAE. Then add ControlNet, LoRA or refiner stages individually.
Compare SDXL and FLUX fairly
A useful comparison needs the same subject brief, aspect ratio, output goal and review criteria. Record model files, GPU, workflow versions, sampler settings and time per image. Neither model is universally better. For FLUX setup, use the FLUX.1 Dev guide; for an editorial comparison, see FLUX vs SDXL.