How to use from the
Use from the
Diffusers library
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline

# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("aina-tech/Anima-Lightning", dtype=torch.bfloat16, device_map="cuda")

prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]

Anima-Lightning โ€” production step 400, BF16

This version contains the selected base Anima TDM-Unify step-400 transformer, converted tensor-for-tensor from FP32 to BF16. Its learned sampling-step conditioning branch is preserved. The shared text encoders, tokenizers and VAE are unchanged.

This update replaces the earlier checkpoint and its shift-1 inference recipe. Use 4 steps, CFG 1, scheduler shift 3, with raw sigmas [1, .75, .5, .25]. The scheduler applies the shift once, producing [1, .9, .75, .5, 0]. The included custom transformer defaults to K=4 conditioning. A plain CosmosTransformer3DModel cannot load the full checkpoint correctly: it would drop the learned K branch. Use the supplied module as shown below.

Local loading and generation

Requires PyTorch with CUDA/BF16, Diffusers with Anima modular support, Transformers, Accelerate and Safetensors. Validated environment: Diffusers 0.39.0, Transformers 5.7.0 and PyTorch 2.12.1+cu130.

Download the complete repository with hf download aina-tech/Anima-Lightning --local-dir Anima-Lightning. Review the included Python module before importing it.

from pathlib import Path
import sys
import torch
from diffusers import AnimaModularPipeline

local = str(Path("Anima-Lightning").resolve())
sys.path.insert(0, local)
import anima_lightning_transformer

pipe = AnimaModularPipeline.from_pretrained(local, local_files_only=True)
pipe.load_components(
    ["text_encoder", "tokenizer", "t5_tokenizer", "text_conditioner",
     "transformer", "scheduler", "vae"],
    pretrained_model_name_or_path=local,
    local_files_only=True, torch_dtype=torch.bfloat16,
)
pipe.guider.guidance_scale = 1.0
pipe.to("cuda")
image = pipe(
    prompt="anime illustration, a lighthouse above a calm sea, sunset",
    negative_prompt=None, width=1024, height=1024,
    num_inference_steps=4, sigmas=[1.0, 0.75, 0.5, 0.25],
    max_sequence_length=512,
    generator=torch.Generator(device="cpu").manual_seed(42),
    output="images",
)[0]
image.save("anima_lightning.png")

Do not use the former shift-1 recipe or standard full-step CFG5 inference. The saved transformer tensors are BF16; results can differ from the FP32 checkpoint and from other sampling implementations. step400_export.json records source hashes, the complete tensor inventory, and the BF16 export validation.

Model and license

Derived from CircleStone Labs Anima and NVIDIA Cosmos Predict2. This is an independent distilled release, intended for anime and illustration. Anatomy, complex compositions, and text rendering can be imperfect. See the unchanged LICENSE.md and NOTICE.md. The CircleStone Labs non-commercial license and applicable upstream terms remain in effect.

Downloads last month
2
Safetensors
Model size
2B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for aina-tech/Anima-Lightning

Finetuned
(106)
this model
Quantizations
2 models