Nodes/ComfyUI_LC_ModelBuilder_nodes/LC Anima LoRA Block Scan
ComfyUI Node

LC Anima LoRA Block Scan

Find out which blocks of an Anima LoRA are locking the face (without guessing)

By lonecatone23·Created about a month ago·Updated about 17 hours ago· 8
LC Anima LoRA Block Scan
  • model
  • vae
  • positive
  • negative
  • grid
  • report
  • blocks
◄lora_name▾►
◄strength1.00►
◄groups0-6, 7-13, 14-20, 21-27, outside►
◄off_value0.00►
◄seed42►
◄images8►
◄width896►
◄height1152►
◄steps30►
◄cfg4.5►
◄sampler_nameer_sde►
◄schedulersimple►

The problem it solves

You have an Anima LoRA that works - except every image comes out with the same face. You could retrain it. You won't. The old trick, back in the SD 1.5 days of sd-webui-lora-block-weight, was to dial a LoRA down in specific blocks: early blocks carry composition, late blocks carry colour and finish, and somewhere in the middle your character is welded in. Finding the right block by hand means dozens of manual A/B renders.

This node does that sweep for you and scores it.

What it actually does

It renders the same seed batch several times over: once with no LoRA, once with the full LoRA, then once per block group with that group turned down. Each run becomes a row of the grid, so the prompt and the seeds never change and the only variable is which slice of the LoRA you muted.

Inside, it applies each curve with the LoRA Editor's own machinery, samples with the settings below, decodes through your vae, then scores every row. The score is CCIP, an anime character-recognition model - a photo face model like ArcFace misses on illustration entirely, so the pack uses one trained for the job. What CCIP returns is the share of seed pairs it calls the same character: an anime base model sits around 0.1-0.2, a fully locked face near 1.0. At 8 seeds the noise floor is around 0.15, so a group has to move the score meaningfully before it means anything. The report tells you which ones did.

Inputs and outputs

model is your Anima model without the LoRA - the node loads the LoRA itself. Then vae, positive (a prompt showing one clear character plus a scene), lora_name from models/loras, and strength. groups defaults to 0-6, 7-13, 14-20, 21-27, outside, where outside means the LLM adapter and final layer; each group is another row of renders. off_value is what "off" means for the group under test, 0 by default.

Everything below is ordinary render setup, pre-filled with Anima's own defaults: seed 42, images 8, width 896, height 1152, steps 30, cfg 4.5, sampler_name er_sde, scheduler simple. There's an optional negative - wire a real one, because Anima at CFG above 1 wants it, and the fallback is a zeroed-out positive, which is not the same thing.

Three outputs. grid is the labeled sheet, one row per set. report is the scores and what they suggest. blocks is a suggested 28-block curve - wire it into LC Anima LoRA Editor's blocks_in and you've gone from "this LoRA ruins faces" to a working curve without touching a slider.

Install and the one dependency

cd ComfyUI/custom_nodes
git clone https://github.com/lonecatone23/ComfyUI_LC_ModelBuilder_nodes

Restart. If you installed by hand rather than through Manager, run the pack's installer once with ComfyUI's own Python so that onnxruntime exists:

python install.py

It installs the plain CPU build if you have none, changes nothing if you already have a working one, and never upgrades or removes anything. The CCIP files (about 150 MB, plus a 45 MB anime face detector) download once into models/ccip/, checksum-verified, from deepghs' ONNX releases. No insightface, no opencv, no C++ compiler.

Where people get burned

Six groups at 8 images is 64 renders. Fine at 896×1152, painful at 2K - scan at the size you'll actually shoot at and resist bumping everything.

Second, the scan scores change as well as face lock. A group that frees the face but also flattens the style you liked is not a win, and the report gives you movement against both the base model and the full LoRA so you can see it.

Third, an honest limit the author states plainly: if a LoRA bakes a character into every layer, no single group frees it. You turn several down a little instead, or subtract the offender with LoRA Merge at a negative strength. The node tells you that's the situation rather than pretending otherwise.

CategoryLC ModelBuilder/Anima

Inputs (16)

NameTypeDefaultDescription
modelMODELAnima model, without the LoRA.
vaeVAE—
positiveCONDITIONINGA prompt that shows one character (for face lock) and a scene.
lora_nameCOMBOLoRA to scan, from models/loras.
strengthFLOAT1.00-4–4—
groupsSTRING0-6, 7-13, 14-20, 21-27, outsideBlock groups to turn off one at a time, comma separated. outside = the LLM adapter and final layer. Each group is one more row of renders.
off_valueFLOAT0.000–1What 'off' means for the group being tested. 0 = fully off.
seedINT420–18446744073709550000—
imagesINT82–16Seeds per row (one batch). 8 gives a steady same-face score; fewer is faster but noisier.
widthINT896256–2048—
heightINT1152256–2048—
stepsINT301–100—
cfgFLOAT4.50–30—
sampler_nameCOMBOer_sde44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBOsimple9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
negativeoptCONDITIONINGOptional, but Anima at cfg above 1 wants a real negative.

Outputs (3)

NameTypeDescription
gridIMAGEOne row per render set: no LoRA, full LoRA, then each group off.
reportSTRINGScores per row and what they suggest.
blocksSTRINGSuggested 28-block curve. Wire into LC Anima LoRA Editor's blocks_in.