DiffSynth-ComfyUI
A ComfyUI custom node plugin for DiffSynth-Studio, enabling low-VRAM inference through configurable VRAM management, NF4 quantization, and model offloading. Supports image, video, and audio generation and editing across 20+ diffusion models.
Nodes (56)
ACE-Step Inference — a song in eight steps, lyrics included
ACE-Step Loader — three weight files, one tokenizer directory, one music pipe
Anima Inference — tags, prose, and both at once
Anima Loader — the 2B anime model, loaded properly
Boogu Image Inference — four steps, storyboards, and text that survives
Boogu Image Loader — Base, Turbo or Edit, declared file by file
ERNIE Image Inference — layout and text, if you can live with the grid
ERNIE Image Loader — a Turbo transformer that borrows everything else
FLUX.2 Inference — Klein in four steps, and a mask socket for inpainting
FLUX.2 Loader — 56B of dev, or Klein if you'd like it to fit
FLUX Inference — the node with thirty-odd sockets, explained
FLUX Loader — one node for a dozen FLUX.1-era checkpoints
HiDream O1 Inference — 2048px, pixel-space, and an edit socket
HiDream O1 Loader — two ModelConfigs, because there's no VAE to load
Ideogram 4 Inference — write the prompt as JSON, not prose
Ideogram 4 Loader — four model files, one of them the unconditional branch
JoyAI Image Inference — an edit node you prompt, not a text-to-image sampler
JoyAI Image Loader — the quiet one, and how to wire it
Krea 2 Inference — 8 steps turbo or 52 steps raw, pick your CFG
Krea 2 Loader — Raw, Turbo, and a Qwen3-VL text encoder
LingBot Video Inference — physics first, and it shows in the settings
LingBot Video Loader — it wants a prompt rewriter, and the pack knows it
LoRA Clear — the one-input node that saves you a reload
LoRA Load — with alpha instead of strength, and no ComfyUI lora folder
LTX-2 Audio Video Inference — the whole node, including retake
LTX-2 Audio Video Loader — the two-stage knob lives here
The boring node every DiffSynth graph runs through
MiniMax H3 Inference — keyframes, references, retake and the flow-shift dials
MiniMax H3 Loader — 42.5GB of weights, and one flag that stops you downloading them twice
MiniMax Music 3 Inference — prompt the arrangement, tag the lyrics
MiniMax Music 3 Loader — six files between you and a song
Mixed Quantize Config — different bit-widths for different layers
ModelConfig — the node that decides what actually gets downloaded
MOVA Audio Video Inference — first frame in, picture and sound out
MOVA Audio Video Loader — the open AV model that had no ComfyUI path
Quantization Config — what it takes to fit a 20B at home
Qwen Image 2.1 Inference — generation and editing from the same node
Qwen Image 2.1 Loader — the unified generation-and-editing Qwen, with weights
Qwen Image Inference — one node that does T2I, editing, inpainting and layer decomposition
Qwen Image Loader — three files, two configs, one pipe
Repaint a whole clip with one sentence per chunk
The five ModelConfig files this thing really needs
4K generation and editing on an 8B model that thinks first
Two ModelConfigs, one of them sneaky
Yes, it still works, and here's why you'd bother
Four files, one pipe, no surprises
1024 native, dual CLIP, and one widget that mostly does nothing
Five ModelConfigs and two tokenizers before you see a picture
The four-stage dial that decides whether anything fits
How much of your card the pipeline is allowed to eat
One node, every Wan variant, and about forty sockets you can ignore
One loader, every Wan task, and a redirect you should leave alone
Lyrics in, a whole song out, and a score you can actually edit
Two model files plus two text-side files that are easy to forget
8 steps, CFG 1, and a negative prompt that does nothing
Turbo or Base, one ModelConfig list away
DiffSynth-ComfyUI
A ComfyUI custom node plugin for the open-source framework DiffSynth-Studio. It integrates DiffSynth-Studio's model configuration, quantization, LoRA, and inference pipeline capabilities into ComfyUI, enabling node-based image, video, and audio generation and editing.
<p align="center"> <img src="https://github.com/user-attachments/assets/be990357-5b44-4f3b-b646-a80f2f7567d5" alt="DiffSynth-ComfyUI" width="100%"> </p>Installation
Option 1: ComfyUI Registry
ComfyUI Desktop / ComfyUI-Manager:
- Open the sidebar Manage Extensions or Manager
- Search for DiffSynth-ComfyUI
- Click Install, then restart ComfyUI
Option 2: Manual git clone
- Install ComfyUI
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
pip install -r requirements.txt
- Install DiffSynth-Studio
pip install git+https://github.com/modelscope/DiffSynth-Studio.git
- Install this plugin
cd ComfyUI/custom_nodes
git clone https://github.com/modelscope/DiffSynth-ComfyUI.git
cd ..
python main.py
If you need quantization features, install the quantization extras:
pip install "diffsynth[quant] @ git+https://github.com/modelscope/DiffSynth-Studio.git"
Once started, open the ComfyUI address shown in the terminal (typically http://127.0.0.1:8188) in your browser.
Quick Start
Using Preset Workflows
- Open the ComfyUI interface
- Click the Template tab in the left sidebar and select any DiffSynth template
- Modify parameters such as
promptandseedin the Inference node - Click Run
Building a Workflow from Scratch
Right-click on a blank canvas to add nodes, then connect them in the following order:
VRAMConfig → ModelConfig → MergeModelConfigs ───┐
├──→ Loader → Inference → SaveImage
VRAMLimit ────────┘
Example: Qwen-Image Text-to-Image
- Add a VRAM Config node to configure VRAM strategy for each stage (optional)
- Add 3 ModelConfig nodes with the following settings:
model_id:Qwen/Qwen-Image,origin_file_pattern:transformer/diffusion_pytorch_model*.safetensorsmodel_id:Qwen/Qwen-Image,origin_file_pattern:text_encoder/model*.safetensorsmodel_id:Qwen/Qwen-Image,origin_file_pattern:vae/diffusion_pytorch_model.safetensors
- Connect the VRAM Config output to the
vram_configinput of all 3 ModelConfig nodes - Add a Merge ModelConfigs node and connect the outputs of the 3 ModelConfig nodes
- Add a VRAM Limit node (optional)
- Add a Qwen Image Loader node and connect
model_configsandvram_limit - Add a Qwen Image Inference node and connect the
pipeoutput from the Loader - Add a built-in SaveImage node and connect the
imageoutput from the Inference node - Fill in the
promptin the Inference node and click Run
Node Reference
All nodes are located under the DiffSynth category in the ComfyUI node menu, organized into 4 subcategories:
DiffSynth/config — Model & VRAM Configuration
| Node | Function |
|------|----------|
| VRAM Config | Configures DiffSynth-Studio's four-level VRAM management strategy (offload / onload / preparing / computation), specifying device and data dtype for each stage. Connect the output to the vram_config input of ModelConfig nodes. |
| VRAM Limit | Limits the available VRAM during inference, reserving buffer_size GB for the system. Connect the output to the vram_limit input of the Loader. |
| ModelConfig | Declares a model file's download source (model_id) and file path (origin_file_pattern). |
| Merge ModelConfigs | Merges multiple ModelConfig nodes into a single list for the Loader's model_configs input. |
| Quantization Config | Configures the model quantization scheme. method selects the quantization method (supports bitsandbytes NF4/FP4, etc.), mode selects the quantization mode. Optionally use target_modules and exclude_modules to control the quantization scope. Connect the output to the quant_config input of ModelConfig. |
| Mixed Quantize Config | Combines multiple Quantization Configs to apply different quantization strategies to different modules. Outputs a merged quant_config after connecting multiple Quantization Config inputs. |
DiffSynth/loader — Pipeline Loaders
Each pipeline has a corresponding Loader node that loads model weights, applies VRAM management strategy, and returns a pipe object.
Inputs:
model_configs(required): Merged configuration from Merge ModelConfigstorch_dtype: Model precisiondevice: Inference devicevram_limit(optional): From a VRAM Limit node- Other optional parameters: Vary by pipeline
DiffSynth/inference — Pipeline Inference
Each pipeline has a corresponding Inference node that receives a pipe object and performs inference.
Parameters fall into two categories:
- Widgets: Parameters such as prompt, seed, num_inference_steps, height, and width that can be edited directly on the node
- Connection inputs: Parameters such as input_image and edit_image that are passed in via connections
DiffSynth/LoRA — LoRA Management
| Node | Function |
|------|----------|
| LoRA Clear | Clears all loaded LoRA weights on the pipeline. Usage: connect the pipe output from the Loader, then chain to LoRA Load after clearing old weights |
| LoRA Load | Loads a LoRA weight to a specified module. lora_config connects to a ModelConfig (declaring the LoRA file source), module specifies the target module, and alpha controls the strength. Multiple LoRA Load nodes can be chained to stack multiple LoRAs: Loader → LoRA Clear → LoRA Load → LoRA Load → Inference |