2026-05-27 14:28:18 -06:00
2026-05-27 14:28:18 -06:00
2026-05-27 14:28:18 -06:00

ComfyUI AnimaFastTrain

Experimental custom nodes for training Anima reference context in ComfyUI with in-memory reference context tokens.

Installation

Clone this repository into your ComfyUI custom_nodes directory:

cd ComfyUI/custom_nodes
git clone https://github.com/quinteroac/ComfyUI-AnimaFastTrain.git

Then restart ComfyUI. The nodes will appear under:

Anima/AnimaFastTrain

To update an existing installation:

cd ComfyUI/custom_nodes/ComfyUI-AnimaFastTrain
git pull

Restart ComfyUI after updating.

Nodes

  • AnimaFastTrain - Train Context Tokens

    • Inputs: MODEL, CLIP, VAE, and a reference IMAGE.
    • 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=80
      • learning_rate=0.02
      • internal Anima shape: num_blocks=28, text_dim=1024
  • AnimaFastTrain - Patch Model

    • Inputs: MODEL and 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

Important graph order

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.

Suggested workflow

  1. Load the Anima model, CLIP, and VAE.
  2. Load or create a reference image. A face-dominant crop often improves facial identity consistency.
  3. Run Train Context Tokens.
  4. Run Patch Model with the returned context.
  5. Use the patched model with normal conditioning, latent, sampler, and VAE decode nodes.

Everything is intentionally memory-only for experimentation.

S
Description
No description provided
Readme
45 KiB
Languages
Python 100%