Anima DAVE (after compile)
Same Prompt, Same Layout, Every Time? Anima DAVE Unsticks It
- model
- MODEL
The problem this exists for
Run Anima for more than an afternoon and you'll hit it: the same prompt, ten seeds, and nine of them give you the same composition with a slightly different face. Anima is genuinely good at seed-to-seed variation - one of the reasons people moved off Illustrious - but for any given prompt there's still one dominant layout the model keeps falling back to.
Anima DAVE (it shows up in the menu as "Anima DAVE (after compile)") is a training-free patch from the ICML 2026 paper Breaking the Lock-in: Diversifying Text-to-Image Generation via Representation Modulation, built to break that lock. It slots between your model loader and sampler, touches nothing else, and costs you almost nothing to try.
How it works
DAVE stands for DC Attenuation for diVersity Enhancement. Inside a DiT like Anima's Cosmos-predict2 backbone, a block's output splits into a DC component - the per-channel spatial average, which carries the global layout and conditioning and is near-identical across seeds - and an AC residual (output minus average) that holds the seed-specific structure. DAVE attenuates the DC of the early-mid blocks over only the first tau fraction of denoising steps, so the AC gets room to breathe without being rewritten:
ĥ = h − (1 − α)·μ
It's a MODEL patch, not a sampler or latent node, and the distinction matters: the edit happens on per-block intermediate features gated by per-step sigma, and neither is reachable from a sampler. The node clones your model, installs an APPLY_MODEL wrapper, and registers a post-forward hook on each pooled block that subtracts (1−α)·μ, tearing the hooks down after every apply_model call so nothing leaks across runs. It's a faithful port of the DAVE reference implementation - bit-for-bit identical math on ComfyUI's native 5D block output.
The knobs that matter
Three inputs, one output, and you'll set the two floats then forget the rest.
model- your loaded Anima MODEL, straight from the loader. Output is also a MODEL, wired into your KSampler.mask- the per-block pool maskw(ℓ). The shippeddave_alpha.npzis flat over blocks 8–18, the early-mid structural band. Leave it alone unless you know why you're changing it.strength- the DC-removal dose, default0.30, range 0–1. This is not a "more = stronger" knob. The pooled blocks set overall structure, so even a small dose reshuffles layout, and the diversity effect actually peaks low, around0.05–0.20.0.30is the safe all-round default;~0.80knocks out the most DC attau=0.10;0disables the node.tau- the fraction of early, high-σ steps DAVE is active, default0.10.
Here's the one rule the author hammers: window width hurts more than dose. Text and hands stay legible at tau=0.10 even at strength=0.80, but at tau=0.15 even 0.50 starts garbling them. Tighten tau first, then spend any remaining headroom on strength. For fresh layouts, sweep strength low (0.05 → 0.2) at tau=0.10; for maximum DC removed, 0.80 at tau=0.10. Avoid tau ≥ 0.15 entirely.
Install
ComfyUI Manager: search "Anima DAVE" (pack title "Anima DAVE (Diversity)") and install. Or the old-fashioned way:
cd ComfyUI/custom_nodes
git clone https://github.com/sorryhyun/ComfyUI-Anima-DAVE comfyui-anima-dave
Then restart ComfyUI. No extra dependencies - torch and numpy ship with ComfyUI, and the block mask is bundled in the repo, so there are no model files to hunt down. This is about as clean an install as a custom node gets.
Wiring, and the "(after compile)" in the name
The display name is telling you where it lives. Basic wiring:
UNETLoader → Anima DAVE → KSampler
If you also use Anima Block Compile from the same author, DAVE must come after it:
UNETLoader → Anima Block Compile → Anima DAVE → KSampler
Why: patcher wrappers nest in wiring order, and DAVE's hooks need to land on the live compiled blocks. Wire it before Block Compile and it silently no-ops - fails safe, no corruption, but also no diversity. If your outputs look unchanged, check the order first.
What you'll actually hit
- Nothing changed at all - strength is at 0, or you wired DAVE before Block Compile. Check the order first.
- Text or hands garbled - you pushed
taupast 0.15. Drop it back to 0.10. - Exotic custom sampler - DAVE reads the live sigma schedule from
transformer_optionsto decide thetaugate. A sampler that doesn't publish the schedule falls back to running every step, same astau=0- the likely culprit if text degrades on a niche sampler. - CFG - the edit applies uniformly to the cond and uncond forwards, so no special CFG handling needed.
Is it essential? No - if you've never noticed your Anima layouts collapsing across seeds, you probably don't need it. But if you generate grids to pick from, it's the difference between nine near-duplicates and a real spread, at the cost of one node and zero training.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| mask | COMBO | Per-block pool mask (w(ℓ)). Shipped: flat blocks 8–18. | |
| strength | FLOAT | 0.300–1 | DC removal dose s = (1−α). 0.30 is the conservative default; up to ~0.80 at tau=0.10 for max diversity. 0 disables. |
| tau | FLOAT | 0.100–1 | Fraction of the early (high-σ) steps DAVE is active. KEEP ≤ 0.10 — wider windows garble text/hands far more than extra dose does. Recommended 0.10. Set 0 to run on every step. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |