DiffSynth: Stable Diffusion XL Inference
1024 native, dual CLIP, and one widget that mostly does nothing
- pipe
- image
SDXL is the base the realism community actually built an industry on - Juggernaut, epiCRealism, the whole 2023–2025 checkpoint wave - and this node will run the raw stabilityai/stable-diffusion-xl-base-1.0 architecture inside a DiffSynth graph. Same caveat as the SD 1.5 node: ComfyUI's native loaders are better at this job. Same answer as to why you'd be here anyway: one memory strategy, one quantization setup, one graph, across every architecture the pack supports.
What it does
It drives DiffSynth-Studio's StableDiffusionXLPipeline: SDXL's two CLIP encoders (OpenCLIP bigG plus the original ViT-L), the 2.6B UNet, and the VAE, with standard CFG sampling. 1024×1024 is the native resolution, and unlike SD 1.5 that's a floor rather than a stretch - SDXL was trained to treat it as base, which is exactly why the checkpoint ecosystem on top of it is all 1024-native realism models.
The inputs that matter
pipe- required, from DiffSynth: Stable Diffusion XL Loader.prompt- required, multi-line. Two encoders means better prompt following than 1.5, still nowhere near an LLM-text-encoder model like Qwen-Image or Z-Image.height,width- 1024 each by default. Keep them at or above 1024; going below it is the reliable way to get SDXL to produce a mildly insulting image.num_inference_steps(50),seed.negative_prompt.cfg_scale(5) - lower than the classic 7.5 because SDXL punishes high guidance with contrast blowout.guidance_rescale- off at 0. This is the SDXL paper's own trick: it rescales the guided prediction to counter the over-saturation CFG introduces, and this is the architecture it was invented for. If 7+ CFG burns the highlights, 0.7 is the fix.clip_skip- this is the one to understand rather than twiddle. SDXL's text encoders already condition on the penultimate layer, so the default 2 usually changes nothing at all; 1 means "use the very last layer" and mostly buys you slight differences on models that expect it. The setting exists because SDXL inherited Pony and Illustrious checkpoints from a lineage where it matters enormously - on those, getting it wrong turns output into noise. Here, on the plain base model, leave it at 2.
Output: one image socket.
Install
Manager → search DiffSynth-ComfyUI → install → restart, or:
pip install git+https://github.com/modelscope/DiffSynth-Studio.git
cd ComfyUI/custom_nodes && git clone https://github.com/modelscope/DiffSynth-ComfyUI.git
The example workflow pulls stabilityai/stable-diffusion-xl-base-1.0 as separate text encoder, text encoder 2, UNet, VAE and two tokenizer configs. Roughly 7GB of download for a model you might already have sitting in ComfyUI/models/checkpoints - and no, this node can't read that file. It wants the DiffSynth file layout, not a single fused .safetensors.
That's the practical friction of the whole pack, so it's worth saying plainly: you cannot point these loaders at your existing checkpoint folder. They download the component files the framework expects. Budget disk accordingly.
Where it bites
- Generator and refiner confusion. SDXL shipped with a refiner; the community largely ignored it, and this pipeline is the base model. If you want the second pass, build it as an img2img pass, not a widget.
- Community checkpoints. The realism ecosystem's output - Juggernaut, epiCRealism, the SDXL finetune wave - is distributed as fused checkpoints. DiffSynth's SDXL pipeline takes model components, so most of that ecosystem is out of reach here. Fine for architecture comparisons; not a CivitAI front end.
- High CFG. 7.5 is an SD 1.5 habit. Come back to 5.
- Burned, blown-out highlights.
guidance_rescale, above. - Framework upgrades. Inputs are introspected from your installed
diffsynthat startup - restart ComfyUI afterpip install -U.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| pipe | DIFFSYNTH_PIPE | — | |
| prompt | STRING | — | |
| seed | INT | 00–4294967295 | — |
| num_inference_steps | INT | 501–200 | — |
| height | INT | 102464–4096 | — |
| width | INT | 102464–4096 | — |
| negative_promptopt | STRING | — | |
| clip_skipopt | INT | 20–4294967295 | — |
| cfg_scaleopt | FLOAT | 5.00–10000 | — |
| guidance_rescaleopt | FLOAT | 0.00–10000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |