AnimaSafePAG
Anima Safe PAG is a ComfyUI node for applying a softer form of Perturbed Attention Guidance (PAG) to Anima/Cosmos/Predict2-style DiT models. It creates a weak prediction by perturbing selected self-attention blocks, then guides the final CFG result away from that weak prediction. Compared with hard PAG, the attention perturbation is blended by perturbationstrength, so the effect can be tuned more gently. Cond, uncond, and PAG predictions are calculated in the same calccondbatch pass. The extra PAG row is also kept padded outside the active startpercent / endpercent range, which keeps the batch shape stable for workflows that use cache, replay, or sampler-side optimization nodes. ComfyUI Manager: text Manager -> Install Custom Nodes -> search "Anima Safe PAG" -> Install Manual installation: bash cd ComfyUI/customnodes git clone https://github.com/iljung1106/comfyui-anima-safe-pag.git Restart ComfyUI after installation. text scale: 4.0 blockindices: 18 perturbationstrength: 0.75 headindices: startpercent: 0.0 endpercent: 0.7 rescale: 0.20 rescalemode: full For 28-block Anima checkpoints, start with block indices greater than 14. Later blocks usually affect local structure, line confidence, and small details more cleanly than early blocks. 18 is a balanced starting point. Good nearby tests are 16, 18, 20, and 18-20. scale Strength of the PAG correction. Higher values push the result farther away from the perturbed prediction. Reduce it if edges become harsh or details start to break. blockindices Transformer blocks where self-attention is perturbed. Use a single index, a comm…