Skip to content
This repository was archived by the owner on May 30, 2026. It is now read-only.

Repository files navigation

diffusers-anima

Important

You don't need this repository anymore — Diffusers now supports Anima natively! This was an unofficial, stopgap implementation from before Anima had native support.

Anima is now properly supported in 🤗 Diffusers via huggingface/diffusers#13732 — a separate, independent implementation unrelated to this repo. Just use the official diffusers package instead. This repository is archived (read-only).

diffusers-anima provides an Anima pipeline implementation designed to align with Diffusers patterns.

Install

pip install git+https://github.com/hdae/diffusers-anima.git

Or with uv:

uv add git+https://github.com/hdae/diffusers-anima.git

Quick Start

Text-to-image

importtorchfromdiffusers_animaimportAnimaPipelinepipe=AnimaPipeline.from_pretrained(
"hdae/diffusers-anima-preview",
torch_dtype=torch.bfloat16,
)
pipe.to("cuda")
result=pipe(
"masterpiece, best quality, score 9, score 8, newest, absurdres, very aesthetic, highres, 1girl, solo, long hair, blue eyes, white blouse, pleated skirt, looking at viewer, gentle smile, smiling",
negative_prompt="worst quality, low quality, score_1, score_2, score_3, monochrome, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, normal quality, jpeg artifacts, nsfw, nude, nipples, areola, cleavage, breasts, large breasts, suggestive, erotic, explicit",
width=1024,
height=1024,
num_inference_steps=32,
guidance_scale=4.0,
generator=torch.Generator(device="cpu").manual_seed(42),
)
result.images[0].save("output.png")

From a single-file checkpoint

pipe=AnimaPipeline.from_single_file("/path/to/anima.safetensors")

Img2Img / Inpaint

fromPILimportImageinit_image=Image.open("input.png").convert("RGB")
mask_image=Image.open("mask.png").convert("L") # white = repaint area# Img2Img:result=pipe(
"masterpiece, best quality, score 9, score 8, newest, absurdres, very aesthetic, highres, 1girl, solo, long hair, blue eyes, white blouse, pleated skirt, looking at viewer, gentle smile, smiling",
negative_prompt="worst quality, low quality, score_1, score_2, score_3, monochrome, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, normal quality, jpeg artifacts, nsfw, nude, nipples, areola, cleavage, breasts, large breasts, suggestive, erotic, explicit",
image=init_image,
strength=0.65,
width=1024,
height=1024,
num_inference_steps=32,
guidance_scale=4.0,
)
# Inpaint:result=pipe(
"masterpiece, best quality, score 9, score 8, newest, absurdres, very aesthetic, highres, 1girl, solo, long hair, blue eyes, white blouse, pleated skirt, looking at viewer, gentle smile, smiling",
negative_prompt="worst quality, low quality, score_1, score_2, score_3, monochrome, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, normal quality, jpeg artifacts, nsfw, nude, nipples, areola, cleavage, breasts, large breasts, suggestive, erotic, explicit",
image=init_image,
mask_image=mask_image,
strength=0.75,
width=1024,
height=1024,
num_inference_steps=32,
guidance_scale=4.0,
)

LoRA

pipe.load_lora_weights("/path/to/lora.safetensors", adapter_name="style")
pipe.set_adapters("style", adapter_weights=[0.8])
result=pipe(
"masterpiece, best quality, score 9, score 8, newest, absurdres, very aesthetic, highres, 1girl, solo, long hair, blue eyes, white blouse, pleated skirt, looking at viewer, gentle smile, smiling",
negative_prompt="worst quality, low quality, score_1, score_2, score_3, monochrome, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, normal quality, jpeg artifacts, nsfw, nude, nipples, areola, cleavage, breasts, large breasts, suggestive, erotic, explicit",
width=1024, height=1024,
)

Model

Model weights are hosted on HuggingFace: hdae/diffusers-anima-preview

The Anima model was developed by CircleStone Labs and Comfy Org. The weights are based on circlestone-labs/Anima and are subject to the CircleStone Labs Non-Commercial License. The model weights may not be used for commercial purposes. Generated outputs may be used for any purpose.

This code library (diffusers-anima) is separately licensed under Apache 2.0.

Documentation

DocumentDescription
docs/api.mdFull API reference (loading, generation, sampling config)
docs/development.mdDevelopment setup, test commands, project structure
docs/custom_implementations.mdIntentional deviations from Diffusers upstream

About

No description, website, or topics provided.

Resources

Stars

9 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages