(deforum) Apply ControlNet [safe]
The \"safe\" ControlNet apply that makes your animation stick together
- conditioning
- control_net
- image
- CONDITIONING
Deforum animations fall apart the same way every time: frame 1 is gorgeous, frame 40 has turned into a different movie. The classic fix is ControlNet - feed each new frame the structure of the last one (its edges, its depth, its pose) so the sampler has something to hold onto. (deforum) Apply ControlNet [safe] is that glue, wrapped to be safe for the animation loop.
Why "safe"?
The word is doing real work. This node never runs a preprocessor - you bring your own conditioned image (canny edges, depth map, whatever) and it only does the wiring: it takes your CONDITIONING and injects the CONTROL_NET hint into it. And it's defensive in exactly the way you want in a 100-frame loop:
- If
strengthis 0, it passes the conditioning through untouched. - If no
imageis provided, it passes the conditioning through untouched. - It applies the control to the unconditional path too (
control_apply_to_uncond), which keeps the negative from drifting off-model - a subtle thing that genuinely matters over many frames. - If the conditioning already carries a previous ControlNet, it chains the new one on rather than clobbering it.
No preprocessor, no model loading, no failure modes. That's the "safe."
How it works
Mechanically it's the same recipe as ComfyUI's built-in ControlNet apply: the node copies each conditioning entry, attaches the ControlNet with your image as the hint and strength as the weight, and returns the modified conditioning list. The strength dial (0–10, default 1.0) is the lever you'll actually tune - per the ControlNet community lore, 0.3–0.7 is loose guidance, 0.8–1.2 is strict adherence, and for animation most people stay under 1.0 so the frames can still breathe.
The inputs and outputs that matter
- conditioning - the positive (or negative) conditioning you want to constrain.
- control_net - a
CONTROL_NETfrom aLoad ControlNet Modelnode. The controlnet's own strength also applies, so remember both dials exist. - strength (FLOAT, 0–10, default 1.0) - how hard the structure pulls.
- image (optional) - your hint: canny edges, depth, lineart, whatever the ControlNet model expects.
Output:
- CONDITIONING - feed it into the sampler's positive or negative input. In the Deforum loop, this is typically the positive path, using the warped/current frame as the hint so the next frame re-draws the same scene.
Installing this pack
Ships in Deforum Nodes by XmYx. ComfyUI Manager: search Deforum Nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/XmYx/deforum-comfy-nodes
Restart, then let install.py do its thing - it pulls the deforum-studio backend from GitHub plus a pile of scientific Python (numpy pinned < 2.0), and the README insists on Python 3.10. You'll also want the ControlNet models themselves, which this pack does not download; grab them from HuggingFace or Civitai and drop them in models/controlnet.
Common issues
- Nothing changes when I connect it. Check
strengthfirst (0 = passthrough), then check the image is actually connected - both silently disable the node. This is by design, but it reads like a bug the first time. - Animation still drifts. Drop
strengthtoward 0.5–0.8 and make sure your hint is derived from the current frame, not frame 0. A stale hint is worse than none. - Stutter between cuts. If the hint image doesn't match the latent's resolution/state, the control fights the sampler. Keep the hint at generation resolution.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning | CONDITIONING | — | |
| control_net | CONTROL_NET | — | |
| strength | FLOAT | 1.000–10 | — |
| imageopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |