Instructions to use aina-tech/Anima-Lightning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use aina-tech/Anima-Lightning with Diffusers:
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] - Cosmos
How to use aina-tech/Anima-Lightning with Cosmos:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
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
Anima-Lightning is a 4-step distilled text-to-image model derived from circlestone-labs/Anima. It is structurally identical to upstream Anima and keeps the same Anima/Cosmos Diffusers components, but uses distilled model weights.
The model is intended for anime, illustration, and other non-photorealistic art generation. It is not a realism-focused model.
This repository is not an official CircleStone Labs or NVIDIA release.
Architecture
The model is packaged in Diffusers modular format:
- Pipeline:
AnimaModularPipeline - Transformer:
CosmosTransformer3DModel - Text encoder:
Qwen3Model - Tokenizer:
Qwen2Tokenizer - Text conditioner:
AnimaTextConditioner - VAE:
AutoencoderKLQwenImage - Scheduler:
FlowMatchEulerDiscreteScheduler
Installing and running
This model requires a Diffusers build that includes the Anima modular pipeline and Cosmos text-to-image components.
This is not the original 30-50 step Anima runtime. Use the distilled 4-step TDM
runtime described in distilled_generation_config.json.
import torch
from diffusers import AnimaModularPipeline
repo_id = "YOUR_USERNAME/Anima-Lightning"
pipe = AnimaModularPipeline.from_pretrained(
repo_id,
torch_dtype=torch.bfloat16,
)
pipe.load_components(
["text_encoder", "tokenizer", "t5_tokenizer", "text_conditioner", "transformer", "scheduler", "vae"],
torch_dtype=torch.bfloat16,
)
pipe.to("cuda")
# Use the distilled runtime contract below. A normal pipeline call with
# num_inference_steps=40 and guidance_scale=5.0 is for upstream Anima, not this
# distilled checkpoint.
prompt = (
"masterpiece, best quality, score_8, safe, anime illustration, "
"solo shrine maiden standing in a rainlit courtyard, wide shot"
)
Generation settings
Use these defaults for the distilled model:
- Image size:
1024x1024 - Precision:
bfloat16 - Max sequence length:
512 - Runtime CFG:
1.0 - Student steps:
4 - Total flow timesteps:
1000 - Timestep schedule:
(999 -> 749),(749 -> 499),(499 -> 249),(249 -> 0) - Scheduler family:
FlowMatchEulerDiscreteScheduler
Important runtime notes:
- The distilled model uses one conditional student pass per step.
- Negative-prompt CFG from the upstream sampler is not used at inference.
- Upstream Anima's reference settings are
40steps and CFG5.0; those are useful for comparison, but not for running this distilled checkpoint.
Prompting
The model responds well to a mix of Danbooru-style tags and natural language. A practical prompt order is:
[quality/meta/safety tags], [subject], [character], [series], [artist], [scene and details]
Tips:
- Use lowercase tags and spaces instead of underscores, except for score tags
such as
score_7. - Put safety and quality tags near the beginning of the prompt.
- Prefix artist tags with
@. - For natural language prompts, describe the character appearance and scene in complete sentences.
- For multiple characters, describe each character explicitly instead of only listing names.
Limitations
- This model is intended for anime, illustration, and stylized art. It is not a realism-focused model.
- It needs the distilled TDM runtime above. Running it as a normal full-step Anima checkpoint can produce incorrect output.
- Text rendering may be unreliable, especially for long phrases.
- Short or underspecified prompts can produce unwanted content or weak subject control.
- Behavior will differ from upstream Anima because this checkpoint uses distilled weights.
License
This model is licensed under the CircleStone Labs Non-Commercial License because
it is derived from circlestone-labs/Anima. Anima is itself a derivative of
nvidia/Cosmos-Predict2-2B-Text2Image, so NVIDIA's Open Model License Agreement
may also apply to this derivative model.
See LICENSE.md and NOTICE.md before using, redistributing, or publishing this model. This summary is not legal advice.
See PUBLISH.md for the current Hugging Face CLI upload commands.
Built on Anima and NVIDIA Cosmos.
- Downloads last month
- -
Model tree for aina-tech/Anima-Lightning
Base model
nvidia/Cosmos-Predict2-2B-Text2Image