Instructions to use mingyi456/Anima-Base-v1.0-DF11-Diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use mingyi456/Anima-Base-v1.0-DF11-Diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("mingyi456/Anima-Base-v1.0-DF11-Diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
For more information (including how to compress models yourself), check out https://huggingface.co/DFloat11 and https://github.com/LeanModels/DFloat11
Feel free to request for other models for compression as well (for either the diffusers library, ComfyUI, or any other model), although models that use architectures which are unfamiliar to me might be more difficult.
How to Use
diffusers
import torch
from diffusers import ModularPipeline, CosmosTransformer3DModel
from dfloat11 import DFloat11Model
from transformers.initialization import no_init_weights
with no_init_weights():
transformer = CosmosTransformer3DModel.from_config(
CosmosTransformer3DModel.load_config(
r"circlestone-labs/Anima-Base-v1.0-Diffusers",
subfolder="transformer"
),
torch_dtype=torch.bfloat16
).to(torch.bfloat16)
DFloat11Model.from_pretrained(r"mingyi456/Anima-Base-v1.0-DF11-Diffusers", device="cpu", bfloat16_model=transformer)
text_encoder = DFloat11Model.from_pretrained(r"mingyi456/Qwen3-0.6B-Base-DF11", device = "cpu")
pipe = ModularPipeline.from_pretrained(r"circlestone-labs/Anima-Base-v1.0-Diffusers")
pipe.update_components(text_encoder=text_encoder.model)
pipe.update_components(transformer=transformer)
pipe.load_components(dtype=torch.bfloat16)
pipe.to("cuda")
image = pipe(
prompt="masterpiece, best quality, 1girl, solo, city lights",
generator=torch.Generator("cpu").manual_seed(114514),
).images[0]
ComfyUI
Refer to this model instead.
Compression details
This is the pattern_dict for compression:
pattern_dict = {
r"transformer_blocks\.\d+": (
"norm1.linear_1",
"norm1.linear_2",
"attn1.to_q",
"attn1.to_k",
"attn1.to_v",
"attn1.to_out.0",
"norm2.linear_1",
"norm2.linear_2",
"attn2.to_q",
"attn2.to_k",
"attn2.to_v",
"attn2.to_out.0",
"norm3.linear_1",
"norm3.linear_2",
"ff.net.0.proj",
"ff.net.2"
),
r"time_embed\.t_embedder": (
"linear_1",
"linear_2",
)
}
- Downloads last month
- -
Model tree for mingyi456/Anima-Base-v1.0-DF11-Diffusers
Base model
nvidia/Cosmos-Predict2-2B-Text2Image Finetuned
circlestone-labs/Anima