Downloads · 30 days
24
19% of all-time downloads
dixisouls/anime-diffusion
anime-diffusion is a text-to-image model from dixisouls. Use it when you need an image from a text prompt. It is set up for diffusers. The card lists the license as mit.
A UNet2DConditionModel fine-tuned for anime-style image generation, based on Stable Diffusion v1.4.
Downloads · 30 days
24
19% of all-time downloads
All-time downloads
127
Public
Parameters
860M
3.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors3.4 GB · 100%
From the Hugging Face model README
A UNet2DConditionModel fine-tuned for anime-style image generation, based on Stable Diffusion v1.4.
| Component | Model ID |
|---|---|
| VAE | stabilityai/sd-vae-ft-mse |
| Text Encoder | openai/clip-vit-large-patch14 |
| Tokenizer | openai/clip-vit-large-patch14 |
import torch
from diffusers import AutoencoderKL, DDIMScheduler, UNet2DConditionModel
from huggingface_hub import hf_hub_download
from safetensors.torch import load_file
from transformers import CLIPTextModel, CLIPTokenizer
# Load models
tokenizer = CLIPTokenizer.from_pretrained("openai/clip-vit-large-patch14")
text_encoder = CLIPTextModel.from_pretrained("openai/clip-vit-large-patch14")
vae = AutoencoderKL.from_pretrained("stabilityai/sd-vae-ft-mse")
unet = UNet2DConditionModel.from_pretrained("CompVis/stable-diffusion-v1-4", subfolder="unet")
# Load fine-tuned EMA weights
weights_path = hf_hub_download(repo_id="dixisouls/anime-diffusion", filename="model.safetensors")
unet.load_state_dict(load_file(weights_path))
# Use DDIMScheduler for inference
scheduler = DDIMScheduler(
num_train_timesteps=1000,
beta_schedule="linear",
clip_sample=False,
prediction_type="epsilon",
)
See the companion HuggingFace Space for a full interactive demo.