Nodes/ComfyUI-LoRA-Block-Filter/Anima LoRA Filter (Blocks)
ComfyUI Node

Anima LoRA Filter (Blocks)

Per-block LoRA control for Anima

By DanrisiUA·Created 4 months ago·Updated 3 months ago· 36
Anima LoRA Filter (Blocks)
  • model
  • clip
  • block_weights
  • model
  • clip
  • info
lora_name
strength_model1.00
strength_clip1.00
enabledtrue
folder_path
lora_name_override

You loaded a character LoRA for Anima and the result has the right face and completely the wrong vibe, because the LoRA dragged its artist's style in with it. Or the style LoRA works but it's actively ruining the likeness. That's the exact problem this node exists for: instead of one strength slider applied to the whole LoRA, it lets you kill or scale individual blocks and layer types. The one you're looking at, Anima LoRA Filter (Blocks), is the half that actually loads and applies the LoRA.

It comes from Danrisi, the same person behind the Anima "UltraReal" realism fine-tunes, and it ships in the ComfyUI-LoRA-Block-Filter pack alongside its control-panel sibling, Anima LoRA Block Weight. It's aimed squarely at Anima, the Circlestone Labs 2B DiT on Cosmos-Predict2 - not SDXL, not AnimateDiff, so don't wire it into an Illustrious graph expecting it to do anything.

How it works

Anima is a transformer with 28 blocks, each containing self-attention, cross-attention, and MLP layers (plus adaln-modulated versions of each). A LoRA trained for the model touches those same blocks. This node reads the LoRA file, matches each weight key against blocks[N].<layer_type>, works out a multiplier for it - the per-block value from the Block Weight node times the per-layer-type value - and then:

  • keys with a multiplier of 0 are dropped entirely (never patched, which also saves a bit of compute),
  • everything else is patched at strength × multiplier.

The rule of thumb baked into the presets: cross-attention is where style lives, self-attention is where character identity lives. Zero cross-attn and a style-heavy LoRA stops leaking; zero self-attn and you lose the subject. Keys that don't match Anima's naming pattern pass through at full strength, which is what you want for anything weird the LoRA author stuffed in there.

One more thing the pack does under the hood: it ships a small compatibility patch for ComfyUI's Anima attention implementation that keeps key/value tensors in the right dtype. It only activates on ComfyUI builds that have the Anima model module, so on a current install it's quietly doing its job and on an old one it's a no-op. Keep ComfyUI updated.

The inputs that matter

  • model and clip - from your checkpoint loader (or a previous filter node if you're chaining LoRAs).
  • lora_name - dropdown of everything in your models/loras folder.
  • strength_model / strength_clip - the usual overall weights; can go to 10 or negative.
  • block_weights - the ANIMA_BLOCK_WEIGHTS output from an Anima LoRA Block Weight node. This is the whole point of the node; leave it disconnected and the filter does nothing meaningful.
  • enabled - a bypass toggle. Off, and you get your model and clip back untouched plus an info of "Disabled".

The two optional inputs (folder_path, lora_name_override) exist for loading LoRAs from outside your loras folder; you can ignore them until you need them.

Outputs

model and clip wire straight into your sampler. info is a STRING with a running count of how many keys were applied and how many got filtered out - genuinely handy for checking whether a preset is actually touching anything, and easy to display with a text node.

Install

ComfyUI Manager can find it by searching the pack title, or clone it:

cd ComfyUI/custom_nodes
git clone https://github.com/DanrisiUA/ComfyUI-LoRA-Block-Filter

Restart ComfyUI and you'll find the nodes under Smart LoRA. The pack has no requirements.txt and no model downloads - it only uses ComfyUI's own comfy.lora machinery, so there's no dependency hell to fight. One README quirk: it tells you to copy the folder in as smart_lora_loaders, but the folder name genuinely doesn't matter as long as it sits directly inside custom_nodes/.

Where people get burned

The info output telling you "LoRA not found" means your lora_name isn't resolving - usually a filename typo or the file living somewhere other than models/loras. The bigger trap is Anima version churn: LoRAs trained for Preview 2 or Preview 3 don't survive cleanly onto base v1.0, and no amount of block weighting fixes a LoRA whose keys don't match the model it was trained on. Retrain for the version you're running.

CategorySmart LoRA

Inputs (9)

NameTypeDefaultDescription
modelMODEL
clipCLIP
lora_nameCOMBO0 options:
strength_modelFLOAT1.00-10–10
strength_clipFLOAT1.00-10–10
block_weightsANIMA_BLOCK_WEIGHTS
enabledBOOLEANtrue
folder_pathoptSTRING
lora_name_overrideoptSTRING

Outputs (3)

NameTypeDescription
modelMODEL
clipCLIP
infoSTRING