Experimental custom nodes for training Anima reference context in ComfyUI with in-memory reference context tokens.
Clone this repository into your ComfyUI custom_nodes directory:
cd ComfyUI/custom_nodes
git clone https://github.com/quinteroac/ComfyUI-AnimaFastTrain.gitThen restart ComfyUI. The nodes will appear under:
Anima/AnimaFastTrain
To update an existing installation:
cd ComfyUI/custom_nodes/ComfyUI-AnimaFastTrain
git pullRestart ComfyUI after updating.
-
AnimaFastTrain - Train Context Tokens
- Inputs:
MODEL,CLIP,VAE, and a referenceIMAGE. - Trains per-block context tokens in memory.
- Does not save safetensors or any weight cache to disk.
- Training uses scale
1.0, matching the experimental Python pipeline. Runtime strength is controlled by the patch node. - Default parameters:
training_steps=80learning_rate=0.02- internal Anima shape:
num_blocks=28,text_dim=1024
- Inputs:
-
AnimaFastTrain - Patch Model
- Inputs:
MODELand the in-memory context object. - Outputs a patched
MODEL. - Connect the patched model to a normal ComfyUI sampler.
- The patch is applied during the model call and restored immediately after each call.
- Default runtime strength:
reference_context_scale=0.45
- Inputs:
Connect the final model into Patch Model after any LoRA/model patch nodes. For example:
Checkpoint Loader -> LoRA Loader -> Patch Model -> KSampler
If another model patch node runs after Patch Model, it may clone the model and drop this experimental wrapper.
- Load the Anima model, CLIP, and VAE.
- Load or create a reference image. A face-dominant crop often improves facial identity consistency.
- Run Train Context Tokens.
- Run Patch Model with the returned context.
- Use the patched model with normal conditioning, latent, sampler, and VAE decode nodes.
Everything is intentionally memory-only for experimentation.