Nodes/DiffSynth-ComfyUI/DiffSynth: Qwen Image Loader
ComfyUI Node

DiffSynth: Qwen Image Loader

Qwen Image Loader — three files, two configs, one pipe

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

Qwen-Image is the reason a lot of people install this pack. Alibaba's 20B image family is Apache 2.0 across every released weight, its text rendering is the best in open weights, and its Edit line became the default open instruction editor - which is a roundabout way of saying it renders signage, Chinese glyphs and UI text that other models turn into soup. Its one real cost is being 20B.

This node does the loading end of that: you hand it the list of model files, it builds a working Qwen-Image pipeline and gives you a pipe for the inference node.

Required inputs

  • model_configs - the list from Merge ModelConfigs. Your graph already has three to five of them: the transformer, the text encoder, the VAE, and usually a processor/ folder. The README's own Qwen-Image example uses Qwen/Qwen-Image with transformer/diffusion_pytorch_model*.safetensors, text_encoder/model*.safetensors, and vae/diffusion_pytorch_model.safetensors.
  • torch_dtype - bfloat16 (default), float16, or float32. On a modern GPU, leave it.
  • device - cuda or cpu. The cpu option exists and is not a practical way to run a 20B model; it's there for debugging.

The optional inputs, including the two that confuse people

tokenizer_config and processor_config are both DIFFSYNTH_MODEL_CONFIG sockets, and both usually want a ModelConfig pointing at the repo's processor/ folder with a blank origin_file_pattern so the whole directory is pulled. The confusion is which one goes where: tokenizer is the text side, processor is the multimodal preprocessing side. If your graph was copied from a template, just copy the wiring too - the Edit workflows point processor/ at Qwen/Qwen-Image-Edit while the transformer comes from Qwen-Image-Edit-2511, and that mixing is deliberate.

vram_limit takes the output of a VRAM Limit node, which is a computed number: total VRAM on the device minus the buffer_size you reserve, defaulting to 0.5 GB. That's the pack's answer to "I have 24GB but the desktop and the browser want some."

Which models this loader covers

One loader serves the whole family, which is genuinely nice. Point the ModelConfigs at different repos and you get different pipelines: Qwen/Qwen-Image for text-to-image, Qwen/Qwen-Image-Edit-2511 for instruction editing, Qwen-Image-2512 for the newer base, or a community quant like the Lightning 4-step builds. The inference node has inputs for both modes (input_image, edit_image, inpaint_mask, plus the newer layered-image inputs) and simply ignores what you don't wire.

Install

ComfyUI Manager, search DiffSynth-ComfyUI, install, restart. Manual path:

pip install git+https://github.com/modelscope/DiffSynth-Studio.git
cd ComfyUI/custom_nodes
git clone https://github.com/modelscope/DiffSynth-ComfyUI.git

Weights come down on first execution - the text encoder alone is a meaningful download, and the transformer is multi-GB.

Where people get burned

Forgetting the VAE. Text-to-image needs three components. Two ModelConfigs and a merge will fail looking for the decoder.

Expecting ComfyUI/models/ to matter. These files live in DiffSynth's own cache; nothing you drop in ComfyUI's folders is visible to this loader.

Running the base model at 4 steps. This is not a distilled model. The defaults - 30 steps on the inference node, CFG 4 - are for the plain base. If you swap in a Lightning LoRA you change the step count and can often drop CFG toward 1, and the pack's templates show exactly that pairing.

Assuming the loader re-runs cheaply. It's a ComfyUI node like any other and its output is cached, so repeated runs don't reload. But changing anything upstream - a ModelConfig, a VRAM config, the dtype - does reload, and the reload takes as long as the load did.

CategoryDiffSynth/loader

Inputs (6)

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

Outputs (1)

NameTypeDescription
pipeDIFFSYNTH_PIPE—