Nodes/DiffSynth-ComfyUI/DiffSynth: Stable Diffusion Loader
ComfyUI Node

DiffSynth: Stable Diffusion Loader

Four files, one pipe, no surprises

By modelscope·Created about a month ago·Updated a day ago· 8
DiffSynth: Stable Diffusion Loader
  • model_configs
  • tokenizer_config
  • vram_limit
  • pipe
◄torch_dtypebfloat16►
◄devicecuda►

This is the smallest Loader in the pack and the easiest place to learn the rhythm the rest of them follow: ModelConfigs in, one pipe out. It assembles a DiffSynth-Studio SD 1.5 pipeline - text encoder, UNet, VAE - from files you point it at, applies whatever VRAM plan those ModelConfigs carry, and hands the result to the inference node.

Inputs

Required:

  • torch_dtype - bfloat16 (default), float16, float32. Worth knowing: for both the SD and SDXL pipelines, whatever you pick here gets forced onto the models' onload and computation dtypes, overriding what the VRAM Config said. This widget wins.
  • device - cuda or cpu.
  • model_configs - the merged list from Merge ModelConfigs. Required.

Optional:

  • tokenizer_config - a single ModelConfig for the CLIP tokenizer. Without it the pipeline has no way to turn text into tokens; wire it.
  • vram_limit - a GB ceiling from a VRAM Limit node.

Output: pipe, into DiffSynth: Stable Diffusion Inference.

The file list

The example workflow splits AI-ModelScope/stable-diffusion-v1-5 into three ModelConfigs, then adds a fourth for the tokenizer:

| Into | model_id | origin_file_pattern | |---|---|---| | model_configs | AI-ModelScope/stable-diffusion-v1-5 | text_encoder/model.safetensors | | model_configs | AI-ModelScope/stable-diffusion-v1-5 | unet/diffusion_pytorch_model.safetensors | | model_configs | AI-ModelScope/stable-diffusion-v1-5 | vae/diffusion_pytorch_model.safetensors | | tokenizer_config | AI-ModelScope/stable-diffusion-v1-5 | tokenizer/ |

Three near-identical ModelConfig nodes feels redundant, and it is a bit - but the pattern is the pack's whole philosophy. Each ModelConfig declares its own memory plan and its own quantization, so splitting files apart is how you say "keep the text encoder in bfloat16 in RAM and quantize the UNet" without inventing a new node. On a 2026 GPU with an SD 1.5 model it's all ceremony; on a 12GB card running Wan it isn't.

Downloads fire when the ModelConfig nodes execute. Files land in models/<model_id>/ relative to ComfyUI's working directory unless you exported DIFFSYNTH_MODEL_BASE_PATH, and DIFFSYNTH_DOWNLOAD_SOURCE=huggingface flips the default origin away from ModelScope.

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

Single dependency: diffsynth>=2.1.9. The quantization extras (diffsynth[quant]) are only worth installing if you actually plan to use a Quantization Config on one of the ModelConfigs.

Should you use it?

Blunt answer: if all you want is SD 1.5, use ComfyUI's native checkpoint loader - it's faster to set up, its LoRA and embedding handling is better, and it accepts every .safetensors on CivitAI directly. You're here because you want SD 1.5 inside a DiffSynth graph: shared VRAM strategy, shared quantization, shared LoRA plumbing, or a pipeline comparison against the newer architectures using identical settings. That's a real reason, just not the obvious one.

Common issues

  • It loads, then the prompt comes out as noise. Tokenizer config missing or pointing at a different model's tokenizer directory.
  • device on cpu. It runs. You will not enjoy it.
  • Both a VRAM Config and a dtype widget giving conflicting instructions. The dtype widget here wins on the SD pipelines - set it to match what you actually want.
  • Model files present but the node re-downloads. Your pattern doesn't match what's on disk. Check the exact glob against the folder listing.
CategoryDiffSynth/loader

Inputs (5)

NameTypeDefaultDescription
torch_dtypeCOMBObfloat163 options: bfloat16, float16, float32
deviceCOMBOcuda2 options: cuda, cpu
model_configsDIFFSYNTH_MODEL_CONFIG_LIST—
tokenizer_configoptDIFFSYNTH_MODEL_CONFIG—
vram_limitoptDIFFSYNTH_VRAM_LIMIT—

Outputs (1)

NameTypeDescription
pipeDIFFSYNTH_PIPE—