File size: 4,378 Bytes
63e23c7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7c32e6a
63e23c7
7c32e6a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
---
license: bigscience-bloom-rail-1.0
language:
- en
tags:
- stable-diffusion
- stable-diffusion-diffusers
- text-to-image

---

以下の5人の[東北ずん子プロジェクト](https://zunko.jp/)のキャラクターイラストを用いてDreamBoothで学習したモデルです.

- ``itako``: 東北イタコ
- ``zunko``: 東北ずん子
- ``kiritan``: 東北きりたん
- ``zundamon``: ずんだもん (人間形態)
- ``metan``: 四国めたん

学習画像はなるべく衣装にバリエーションをもたせているので,「公式衣装」は出にくいです.

## ライセンス

[CreativeML Open RAIL-M license 1.0](https://hf.space/static/bigscience/license/index.html)

また,各種法令・各種ガイドラインにご留意ください.
例えば,生成された画像が東北ずん子プロジェクトのキャラクターを含む場合,
[「東北ずん子プロジェクト キャラクター利用の手引き」](https://zunko.jp/guideline.html)に基づいて利用してください.

## 学習設定

- 元モデル: [Nilaier/Waifu-Diffusers](https://huggingface.co/Nilaier/Waifu-Diffusers) (fbd1958)
    - Base model: [hakurei/waifu-diffusion-v1-3](https://huggingface.co/hakurei/waifu-diffusion-v1-3)
    - VAE: [hakurei/waifu-diffusion-v1-4](https://huggingface.co/hakurei/waifu-diffusion-v1-4)
- 学習画像
    - 5キャラクター計69枚
    - アルファチャンネルは削除 + 白背景 + センタリング + 512x512にリサイズ
    - クラス画像は各50枚
- 学習元コード: [ShivamShrirao/diffusers](https://github.com/ShivamShrirao/diffusers) (``7232c2a``)
    - ``examples/dreambooth/train_dreambooth.py``
- 学習設定
    - Instance ID: ``itako``, ``kiritan``, ``zinko``, ``metan``, ``zundamon`` (5種)
    - Instance prompt: ``<ID> 1girl``
    - Class prompt: ``1girl``
    - Tesla T4で約110分
    - その他設定:

    ```txt
    --prior_loss_weight=0.5 \
    --seed=3434554 \
    --resolution=512 \
    --center_crop \
    --train_batch_size=1 \
    --train_text_encoder \
    --mixed_precision="fp16" \
    --use_8bit_adam \
    --gradient_checkpointing \
    --gradient_accumulation_steps=2 \
    --learning_rate=1e-6 \
    --lr_scheduler="constant" \
    --lr_warmup_steps=0 \
    --num_class_images=50 \
    --sample_batch_size=3 \
    --max_train_steps=8000
    ```

## 学習に使った画像

<img src="https://pbs.twimg.com/media/Ff6FF1NaMAAL8N5?format=jpg&name=small" width="500" alt="学習に使った画像">

## 生成例

<img src="https://pbs.twimg.com/media/Ff6AgzyaMAExeb3?format=png&name=900x900" width="500" alt="東北きりたんの生成例">

```txt
kiritan, 1girl, volleyball, kawaii, in gymnasium, head
Negative prompt: chibi, out of frame, armature drawing, mutated hands and fingers, poor drawing, amateur, bad painting, bad painting of arms, bad anatomy, mutation, extra limbs, ugly, fat
Steps: 40, Sampler: Euler a, CFG scale: 7.5, Seed: 575469807, Size: 704x512
```

<img src="https://pbs.twimg.com/media/Ff6Ank1aYAY7bxk?format=png&name=900x900" width="500" alt="ずんだもんの生成例">

```txt
zundamon , maid dress, in cafe, Kyoto Animation
Negative prompt: chibi, out of frame, armature drawing, mutated hands and fingers, poor drawing, amateur, bad painting, bad painting of arms, bad anatomy, mutation, extra limbs, ugly, fat
Steps: 40, Sampler: Euler a, CFG scale: 7.5, Seed: 429473516, Size: 512x704
```

<img src="https://pbs.twimg.com/media/Ff6AuXoakAAPtYa?format=png&name=900x900" width="500" alt="東北イタコの生成例">

```txt
itako, dating in park, cute winter fashion
Negative prompt: out of frame, amateur drawing, mutated hands and fingers, poor drawing, amateur, bad painting, bad painting of arms, bad anatomy, mutation, extra limbs, ugly, fat
Steps: 60, Sampler: Euler a, CFG scale: 7.5, Seed: 2722676181, Size: 704x512
```

<img src="https://pbs.twimg.com/media/Ff6A2lQakAAj1Bb?format=png&name=small" width="500" alt="東北ずん子と四国めたんの生成例">

```txt
zunko and metan sit on bench, in school uniform, drink tea, 2girls, in 2020s anime style
Negative prompt: chibi, armature drawing, mutated hands and fingers, poor drawing, amateur, bad painting, bad painting of arms, bad anatomy, mutation, extra limbs, ugly
Steps: 40, Sampler: Euler a, CFG scale: 7.5, Seed: 2262270937, Size: 640x512
```