LC Anima LoRA Editor
28 dials where a LoRA loader used to be
- model
- model
- edited_lora
What it is
A LoRA loader that lets you edit the LoRA on the way in. It sits exactly where your normal LoRA loader sits - model in, model out, into the sampler - but instead of one strength slider you get 28 block multipliers, separate attention and MLP scaling, and two flavours of spike-softening. Then it hands you the edited LoRA on a second output so you can bake it to disk.
The pitch is: stop retraining, start editing. Fix a LoRA that locks the face, or one that repaints the entire image when you only wanted the character.
How it works
Loading goes through ComfyUI's own comfy.lora.load_lora, so anything core can read, this can read. Plain low-rank layers - the usual lora_A / lora_B files - are edited directly. Other formats (LoKr, LoHa, full diffs) get scaled per layer and converted to low rank only when you save.
Anima's blocks have four parts: self-attention (sa), cross-attention to the text (ca), an MLP, and the timestep modulation (adaln). The heatmap on the node shows 8 row groups across 28 blocks, before and after on the same scale, so you can see what your edits actually did rather than assuming. The attention slider scales sa and ca together, mlp scales the MLP, and outside_blocks covers the LLM adapter and the final layer - the two things that live outside the 28 blocks entirely.
spike_soften is the clever bit and the least obvious. layers finds a layer that's far stronger than the same layer in other blocks and pulls it down to spike_limit times their median. directions works inside a single layer and flattens whichever direction dominates it, thresholding against the second-strongest - well-behaved LoRAs sit around 2 there. both does both. Note it only applies to plain lora_A / lora_B files.
The inputs you'll actually touch
model (your Anima model), lora_name, strength (baked in when you save). Then either preset or the bars:
Fullis the LoRA as-is.Early blocks (0-6),Mid blocks: look (7-13),Mid blocks: look and character (14-20),Late blocks: finish (21-27)each turn those blocks down to 0.3. On the Animosity Anima LoRA the author tested, turning off 7-13 or 14-20 changed the picture most; 0-6 and 21-27 far less.blocksis the raw string, 28 multipliers from 0 to 2 where 1 is unchanged. Drag the bars; dragging switchespresettoCustomautomatically.blocks_in(optional, wire-only) takes a 28-value curve - the Block Scan'sblocksoutput drops straight in and replaces the preset and the bars. Drag a bar after that and it unplugs the input, keeping its curve as your starting point.
Outputs are model (the patched model, to the sampler) and edited_lora, an LC_LORA for LC LoRA Save in the same pack. Save it and the edits and strength are baked in, so it loads at 1.0 in any loader.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/lonecatone23/ComfyUI_LC_ModelBuilder_nodes
Restart, then hard-refresh the browser - the bars and heatmap are JavaScript. No extra Python dependencies; this node runs on ComfyUI core alone.
Where people get burned
The author flags these as beta, and means it. Presets and defaults can shift between versions, so a saved workflow may need its bars set again after an update. Test every edit on a fixed seed before you save anything, and keep your original LoRA files - the editor never modifies them, but your saves can pile up and you'll want the untouched original to compare against.
And the honest ceiling: if a LoRA bakes one face into every layer, no single group of blocks frees it. Turn several down a little, or take the face out with LoRA Merge at a negative strength instead of hunting for a magic block.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | Anima model. The edited LoRA is applied to it, like a LoRA loader. | |
| lora_name | COMBO | LoRA to edit, from models/loras. | |
| strength | FLOAT | 1.00-4–4 | Overall LoRA strength, same as a LoRA loader. Baked into the saved LoRA. |
| preset | COMBO | Full | Full = the LoRA as it is. Each block group preset turns those blocks down to 0.3. Try each on a fixed seed batch and keep the one that frees the face. Dragging the graph switches to Custom. |
| blocks | STRING | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 | 28 block multipliers, 0 to 2 (1 = unchanged). Drag the bars on the node. |
| attention | FLOAT | 1.000–2 | Multiplier for the attention layers (self and cross attention) in every block. |
| mlp | FLOAT | 1.000–2 | Multiplier for the MLP layers in every block. |
| outside_blocks | FLOAT | 1.000–2 | Multiplier for layers outside the 28 blocks (LLM adapter, final layer), if the LoRA has any. The heatmap note says how many. |
| spike_soften | COMBO | off | layers = pull any layer that is far stronger than the same layer in other blocks down to the limit. directions = inside each layer, flatten the one or two directions that dominate it (plain lora_A / lora_B files only). both = both. |
| spike_limit | FLOAT | 2.01–10 | How strong a spike may be before it is softened. layers: times the median of that layer across the 28 blocks. directions: times the layer's second strongest direction (well-behaved LoRAs sit around 2). Lower = more softening. |
| blocks_inopt | STRING | A 28-block curve from another node, such as LC Anima LoRA Block Scan's blocks output. When wired it replaces the preset and the bars. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| model | MODEL | The model with the edited LoRA applied. |
| edited_lora | LC_LORA | The edited LoRA, for LC LoRA Save. |