Nodes/ComfyUI Anima Remap/Anima Model Merge (Auto Remap)
ComfyUI Node

Anima Model Merge (Auto Remap)

Merge 28-block Anima into 2.9B without the static

By shin131002·Created 22 days ago·Updated 3 days ago· 6
Anima Model Merge (Auto Remap)
  • model_1
  • model_2
  • model
merge_ratio0.50
extend_ratio0.00
manifest

Merging an old-Anima (28-block) model into Anima-2.9B with a normal merge node is a recipe for noisy, broken output - not because merging is wrong, but because the block indices don't line up. Anima-2.9B inserted 12 extra blocks into the original 28-block layout (40 total, LLaMA-Pro-style), so a direct blend shoves 28-block weights into the wrong 40-block slots and you get static where a merge should give you a hybrid.

AnimaModelMerge is the merge node that knows about this. Give it two models and a ratio, and it detects each one's block count, remaps the 28-block side onto the 40-block layout, and blends. Same remap machinery as the pack's LoRA loader, applied at the checkpoint level.

Inputs and outputs

Two MODELs in, one MODEL out. The settings that matter:

  • model_1 / model_2 - the two models to merge. Order matters, see merge_ratio.
  • merge_ratio (0.0–1.0, default 0.5) - the blend weight for model_1. 1.0 is 100% model_1, 0.0 is 100% model_2, 0.5 is a 50/50 mix.
  • extend_ratio (0.0–1.0, default 0.0) - experimental. How much of the 28-block model's corresponding layer to blend into the 12 newly-inserted blocks. Leave at 0.0 and those blocks keep the 2.9B model's own values; raise it to actually inject the old model there.
  • manifest - the block-mapping file (only expand_manifest_preview_v1.json ships; add others to mapping/ if a future revision changes the layout).

What it actually does with the block counts

  • Both models 28 blocks → direct merge, no remap.
  • Both models 40 blocks → direct merge, no remap.
  • One 40, one 28 → output is always 40 blocks. The 28-block model's weights are remapped and blended in at the shared positions per merge_ratio. By default the 12 new blocks keep the 40-block model's own values regardless of which slot it's plugged into; extend_ratio changes that, blending in the old model's (remapped) source layers - at 1.0 the new layers are fully the 28-block model's approximation.

Under the hood it uses ModelPatcher's get_key_patches / add_patches - the same mechanism ComfyUI's own built-in merge nodes use, so this isn't exotic under the hood, just correctly aligned.

Saving the result

There's no save button here, and that's deliberate. Wire the model output into ComfyUI's built-in ModelSave node (under advanced/model_merging):

[Anima Model Merge] --MODEL--> [ModelSave]

Two caveats: ModelSave only writes the UNet (diffusion model) portion - no CLIP, no VAE - and it defaults to ComfyUI/output, so move the file to models/diffusion_models if you want to load it later. Because saving is always explicit, you can't accidentally re-use a merge baked with stale settings the way the LoRA node's cache can bite you.

One behavior to know: in Bypass mode the node passes model_1 straight through, which is just standard ComfyUI behavior for a two-MODEL-in/one-MODEL-out node - nothing special implemented.

Install

ComfyUI Manager (search "Anima-2.9B Remap") or:

cd ComfyUI/custom_nodes
git clone https://github.com/shin131002/ComfyUI-Anima29B-Remap.git

Restart after cloning. No extra Python dependencies or model downloads. This repo is frozen - development moved to ComfyUI-Anima-Remap (adds 3.8B support), and you must not run both, since they register the same node IDs.

One more thing before you go publishing merged checkpoints: a merged model built here is a "Derivative" of Anima under the CircleStone Labs Non-Commercial License, so it inherits the non-commercial restriction. The images you generate with it are a different story - outputs are explicitly yours to use commercially.

Categoryloaders/anima

Inputs (5)

NameTypeDefaultDescription
model_1MODEL
model_2MODEL
merge_ratioFLOAT0.500–1
extend_ratioFLOAT0.000–1
manifestCOMBO4 options: Auto (Recommended), expand_manifest_28_40.json, expand_manifest_28_52_composed.json, expand_manifest_40_52.json

Outputs (1)

NameTypeDescription
modelMODEL