File size: 2,313 Bytes
cf6ce62
 
 
 
 
 
 
 
 
 
 
 
5f028a9
 
cf6ce62
07c1b8f
 
6b8eef3
 
 
 
 
cf6ce62
 
 
 
 
07c1b8f
 
cf6ce62
 
 
07c1b8f
cf6ce62
 
 
 
 
 
 
8750d7c
cf6ce62
5834ec6
07c1b8f
6b8eef3
 
 
 
cf6ce62
 
 
 
 
07c1b8f
 
cf6ce62
 
 
 
 
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
56
57
58
59
60
61
---
license: mit
tags:
- pytorch
- diffusers
- unconditional-image-generation
---

# English Version 

## Model Card for My First pre-trained model -- test2train_anime_face

This model is a diffusion model for unconditional image generation of anime style 64*64 face pic.  
The training set uses [anime-faces](https://huggingface.co/datasets/huggan/anime-faces). This is a dataset consisting of 21551 anime faces scraped from www.getchu.com, which are then cropped using the anime face detection algorithm in https://github.com/nagadomi/lbpcascade_animeface.

Generating multiple pictures at once is prone to broken face. It has been tested that one picture at a time produces the best results and is not prone to broken faces.


![image/png](https://cdn-uploads.huggingface.co/production/uploads/6462500d2538819c729dc355/bG9GIt_vWY_1wDTCMdgiD.png)

![image/png](https://cdn-uploads.huggingface.co/production/uploads/6462500d2538819c729dc355/G3UBMFSQxcVp27lJJN6Xg.png)

### Usage

```python
from diffusers import DDPMPipeline

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
pipeline = DDPMPipeline.from_pretrained('Chilli-b/test2train_amine_face').to(device)
image = pipeline().images[0]
image
```

---

# 中文版

## 这是我创造的第一个预训练模型—— test2train_anime_face 的模型卡。

该模型是一个无条件扩散模型,用于生成尺寸为 64*64 的动漫风格脸部图片。
训练集使用的是[anime-faces](https://huggingface.co/datasets/huggan/anime-faces),这是一个包含从 www.getchu.com 上爬取的21551个动漫脸,然后使用 https://github.com/nagadomi/lbpcascade_animeface 中的动漫脸检测算法进行裁剪的数据集。

一次生成多张容易出现鬼脸。实测每次出一张图的效果最好,不容易出现鬼脸。

![image/png](https://cdn-uploads.huggingface.co/production/uploads/6462500d2538819c729dc355/bG9GIt_vWY_1wDTCMdgiD.png)

![image/png](https://cdn-uploads.huggingface.co/production/uploads/6462500d2538819c729dc355/G3UBMFSQxcVp27lJJN6Xg.png)

### 模型使用

```python
from diffusers import DDPMPipeline

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
pipeline = DDPMPipeline.from_pretrained('Chilli-b/test2train_amine_face').to(device)
image = pipeline().images[0]
image
```