--- license: apache-2.0 base_model: circlestone-labs/Anima pipeline_tag: image-to-image tags: - anime - anima - character-consistency - reference-based-generation - identity-transfer - lora - lokr - comfyui --- # AnimaRefLora Reference-based **character identity transfer** for [Anima](https://huggingface.co/circlestone-labs/Anima) (the 2B anime DiT by CircleStone Labs / Comfy Org): give it **one reference image** of a character, and it generates new images of that character following your prompt — new poses, outfits, and scenes — without per-character LoRA training. - **Code, training scripts, and ComfyUI plugin:** [github.com/crazysheep924/AnimaRefLora](https://github.com/crazysheep924/AnimaRefLora) - **Technical write-up:** see the `blog/` directory in the GitHub repo. All example characters used in the project are AI-generated original designs. ## Files ```text anima-reflora/idinject_500k.animaref.safetensors ← the release checkpoint (single-file bundle) ``` The `.animaref.safetensors` bundle is **adapter-only** (it is not a merged model). One file packs everything inference needs: | Component | Contents | | --- | --- | | `lora.*` | LoKr adapter for the Anima DiT (dim 512 / alpha 512) | | `ref_conditioner.*` | reference/identity conditioning modules | | `crepa_projector.*` | CREPA feature projector | | metadata | feature config + RoPE reference-position layout (read automatically by the loader) | ## Requirements You also need the base models, from [circlestone-labs/Anima](https://huggingface.co/circlestone-labs/Anima): - `anima-base-v1.0.safetensors` (DiT) - the Qwen3-0.6B text encoder (file must be named `model.safetensors` — see plugin README) - `qwen_image_vae.safetensors` (VAE) > Verified on **Anima Base v1.0** only. Support for the community layer-expanded > Anima variants (2.9B/3B-class) has not been confirmed. ## Usage (ComfyUI) Install the plugin from the GitHub repo ([`comfyui/ComfyUI-AnimaRefLora`](https://github.com/crazysheep924/AnimaRefLora/tree/main/comfyui/ComfyUI-AnimaRefLora)), then place the models as: ```text ComfyUI/models/diffusion_models/anima-base-v1.0.safetensors ComfyUI/models/text_encoders/model.safetensors ComfyUI/models/vae/qwen_image_vae.safetensors ComfyUI/models/anima_reflora/idinject_500k.animaref.safetensors ``` Node graph: `Anima RefLora Loader → Anima Ref Encode (reference image) → Anima RefLora Sampler`. An optional `Anima Extra LoRA` node accepts regular Anima style LoRAs (sd-scripts native and diffusers/PEFT keys, DoRA included). ## Usage (CLI) The GitHub repo's `anima_reflora.local_ref_ab_infer` module provides the same inference path used for the project's REF evaluations; see the repo README for setup and commands. ## Training summary - Trained on image pairs derived from Danbooru, with a T=3 frame contract (head-crop reference / full reference / noised target) and a disjoint RoPE layout separating reference and target positions. - The release checkpoint corresponds to ~500K training steps, including anti-copy objectives (diff-weighted loss, tag-level caption dropout) and identity-accessory injection; full recipes and provenance are documented in the GitHub repo's README. ## License The adapter weights in this repository are released under **Apache-2.0**. Note that the Anima base model itself is distributed under the CircleStone Labs Non-Commercial License (and the NVIDIA Open Model License as a Cosmos-Predict2 derivative) — using these adapters together with the base model is subject to those base-model terms.