D2 Controlnet Loader
ControlNet for the D2 KSampler — strength and schedule in one node
- image
- mask
- vae
- cnet_stack
- cnet_stack
ControlNet is one of the most powerful things ComfyUI does, and also one of the most verbose to wire - ControlNet loader, then apply node, then conditioning surgery, every single time. D2 Controlnet Loader exists because the D2 KSampler already has a cnet_stack input, and this node is the loader that speaks that language. Load a ControlNet, point it at an image, set the strength, and connect one wire. That's the entire ceremony.
How it works
Under the hood it's doing what a manual ControlNet rig does - loading the model, applying it with your image and a strength/schedule - but it bundles the result into a cnet_stack. A stack is just a list of ControlNet applications, which is the other nice bit: you can chain multiple D2 Controlnet Loaders into one cnet_stack and the sampler applies them all. Pose from one image, depth from another, in a single run. The D2 KSampler reads the stack and injects the conditioning without any extra nodes on your part.
The controls are exactly the ones that matter:
controlnet_type-StableDiffusionorAnima. The latter is for Anima-LLLite, and it needs ComfyUI-Anima-LLLite installed first. If you don't know what Anima is, leave it on StableDiffusion.controlnet_name- the model file, pulled from yourmodels/controlnetfolder like any loader.image- the conditioning image (pose, depth, canny edge, etc.).strength- how hard the ControlNet pulls. Default 1.0; 0.5 is a common "gentle guidance" value, and going past ~1.5 usually fights the image.start_percent/end_percent- the fraction of the sampling schedule the ControlNet is active (0 to 1). Defaults are full-range (0 → 1). Cappingend_percentaround 0.7–0.8 is the classic trick for letting composition be guided early while detail comes from the model late.
There's also an optional mask (limit the ControlNet's influence to a region) and vae (needed for latent-based ControlNets that operate in VAE space). The single output is cnet_stack, which feeds the D2 KSampler's cnet_stack input.
How to actually use it
The minimal rig: checkpoint → D2 KSampler, plus this node wired into cnet_stack, plus your conditioning image (from D2 Load Image or any image source). Set strength around 0.7–1.0 to start. If the result ignores the pose entirely, raise strength; if it's over-copying (background locked to the source, or artifacts), lower it or end the influence early. That end_percent knob is genuinely the one most people under-use - "ControlNet looks too strong" is often solved with end_percent: 0.7 rather than dropping strength and losing the pose entirely.
Installing and troubleshooting
Part of D2 Nodes ComfyUI:
cd ComfyUI/custom_nodes
git clone https://github.com/da2el-ai/D2-nodes-ComfyUI
or search "D2 Nodes ComfyUI" in ComfyUI Manager. The pack itself needs no extra installs for StableDiffusion-type ControlNets - you just need the ControlNet model files in models/controlnet. The Anima type is the only one that pulls in an external custom node.
The failure modes: controlnet_name empty means no models in your models/controlnet folder, and a ControlNet file mismatch (e.g. an SD1.5 ControlNet on an SDXL checkpoint) will either error or produce garbage - same as any ControlNet setup. And remember this node is D2-specific: it only feeds the D2 KSampler's cnet_stack, so it's not a drop-in for stock ControlNet rigs. If you're already deep in the D2 ecosystem, it's the cleanest ControlNet plumbing in the pack.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| controlnet_type | COMBO | 2 options: StableDiffusion, Anima | |
| controlnet_name | COMBO | 0 options: | |
| image | IMAGE | — | |
| strength | FLOAT | 1.0000–10 | — |
| start_percent | FLOAT | 0.0000–1 | — |
| end_percent | FLOAT | 1.0000–1 | — |
| maskopt | MASK | — | |
| vaeopt | VAE | — | |
| cnet_stackopt | D2_CNET_STACK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| cnet_stack | D2_CNET_STACK | — |