D2 KSampler
The all-in-one sampler that decodes its own image
- latent_image
- model
- clip
- vae
- cnet_stack
- d2_pipe
- IMAGE
- LATENT
- MODEL
- CLIP
- positive
- formatted_positive
- negative
- positive_cond
- negative_cond
- d2_pipe
Stock ComfyUI makes you assemble a sampler from five nodes: KSampler, CLIP Text Encode (twice), a VAE Decode, and a PreViewImage, with a ControlNet apply thrown in if you're feeling spicy. D2 KSampler collapses that whole column into one node that takes your prompts as plain STRING fields, runs the sample, decodes the latent with its own VAE, and hands you a finished IMAGE on the other side. It is the D2 pack's centerpiece, and it's the node almost everything else in the pack plugs into.
It's not just fewer nodes - it's a different way of wiring. The d2_pipe in particular: connect one wire from a D2 Checkpoint Loader or D2 Load Diffusion Model Set and the sampler gets model, clip, and VAE all at once. Connect it to a D2 XY Plot node and it'll sweep seeds, CFG, or prompts across a grid automatically. This is the node that makes the pack's XY Plot and batch features make sense.
The inputs that matter
positive/negative- prompts as multiline STRING fields, no CLIP encode node required.seed/steps/cfg/sampler_name/scheduler/denoise/latent_image- the standard KSampler controls, all present.preview_method- how the preview renders mid-generation (auto,latent2rgb,taesd,vae_decoded_only,none).model,clip,vae- all optional now; a connectedd2_pipesupplies them.cnet_stack- plug in a D2 Controlnet Loader chain here for simple ControlNet.d2_pipe- the consolidated parameter bundle.
The one rule that trips everyone: when a d2_pipe is connected, the pipe's values win over the widget values - so if XY Plot says steps 15 and the node shows steps 20, the grid uses 15. The exceptions are model/clip/vae and the conditioning inputs, where a direct wire beats the pipe.
Outputs
IMAGE (the decoded result - that's why you don't need a VAE Decode node), LATENT, MODEL and CLIP (with any LoRA applied), the positive/negative strings, formatted_positive (prompt with A1111-style <lora:...> tags stripped out - the node loads those LoRAs itself), positive_cond/negative_cond conditioning, and the d2_pipe.
Installing it
ComfyUI Manager → search "D2-nodes-ComfyUI" → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/da2el-ai/D2-nodes-ComfyUI
Restart. No model downloads, deps are piexif and charset-normalizer. Since v32.0.0 the pack requires ComfyUI's V3 schema; older builds should use a pre-32.0.0 version.
Where people get burned
The pipe-priority rule above is the #1 confusion. Second is the A1111-style LoRA loading: it only fires if you write <lora:name:1> inside the positive prompt - if you're using a separate D2 Load Lora node, that's fine, but double-loading the same LoRA both ways will stack strengths and give you overcooked results. Also note the denoise field: at 1.0 with a full-size latent you get a text-to-image run; drop it below 1 with an input latent and you're doing img2img. The node won't warn you which one you've built, but the output will.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | 00–18446744073709550000 | — |
| steps | INT | 201–10000 | — |
| cfg | FLOAT | 7.000–100 | — |
| sampler_name | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| scheduler | COMBO | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 | |
| latent_image | LATENT | — | |
| denoise | FLOAT | 1.000–1 | — |
| preview_method | COMBO | 5 options: auto, latent2rgb, taesd, vae_decoded_only, none | |
| positive | STRING | — | |
| negative | STRING | — | |
| modelopt | MODEL | — | |
| clipopt | CLIP | — | |
| vaeopt | VAE | — | |
| cnet_stackopt | D2_CNET_STACK | — | |
| d2_pipeopt | D2_TD2Pipe | — |
Outputs (10)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| LATENT | LATENT | — |
| MODEL | MODEL | — |
| CLIP | CLIP | — |
| positive | STRING | — |
| formatted_positive | STRING | — |
| negative | STRING | — |
| positive_cond | CONDITIONING | — |
| negative_cond | CONDITIONING | — |
| d2_pipe | D2_TD2Pipe | — |