File size: 1,375 Bytes
7b1dd6d d9dce84 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
---
datasets:
- huggan/anime-faces
language:
- en
library_name: diffusers
tags:
- anime
- generative
---
# anime-faces-ddpm
A Denoising Diffusion Probabilistic Model (DDPM) trained to generate anime faces using [this example as a basis.](https://github.com/huggingface/diffusers/tree/main/examples/unconditional_image_generation)
![image/png](https://cdn-uploads.huggingface.co/production/uploads/65e6420da97628ed6ada1cb8/wM8CUMRQRoOV0FucyRpIi.png)
## Model Description
This diffusion model is trained with the [🤗 Diffusers](https://github.com/huggingface/diffusers) library
on the `huggan/anime-faces` dataset.
## How To Use
```python
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.
|