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("sweetfelinity/anime-faces-ddpm", dtype=torch.bfloat16, device_map="cuda")

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

anime-faces-ddpm

A Denoising Diffusion Probabilistic Model (DDPM) trained to generate anime faces using this example as a basis.

image/png

Model Description

This diffusion model is trained with the ๐Ÿค— Diffusers library on the huggan/anime-faces dataset.

How To Use

from diffusers import DDPMPipeline

checkpoint = "sweetfelinity/anime-faces-ddpm"
pipeline = DDPMPipeline.from_pretrained(checkpoint)
pipeline = pipeline.to("cuda") # or "cpu"

for i in range(10):
    image = pipeline().images[0]
    image.save(str(i + 1) + ".png")

Training Hyperparameters

The following hyperparameters were used during training:

  • resolution=64
  • train_batch_size=16
  • num_epochs=30
  • gradient_accumulation_steps=1
  • learning_rate=1e-4
  • lr_warmup_steps=500
  • mixed_precision=fp16
  • checkpointing_steps=2000
  • save_images_epochs=4
  • use_ema
  • adam_weight_decay=1e-6
  • lr_scheduler=linear
  • eval_batch_size=32

Training Results

See model folder /generated-images for 100 images created by the DDPM.

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

Dataset used to train sweetfelinity/anime-faces-ddpm