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|
| 2 |
+
license: other
|
| 3 |
+
license_name: faipl
|
| 4 |
+
license_link: https://freedevproject.org/faipl-1.0-sd
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
tags:
|
| 8 |
+
- text-to-image
|
| 9 |
+
- stable-diffusion
|
| 10 |
+
- safetensors
|
| 11 |
+
- stable-diffusion-xl
|
| 12 |
+
base_model: cagliostrolab/animagine-xl-3.1
|
| 13 |
+
widget:
|
| 14 |
+
- text: >-
|
| 15 |
+
1girl, green hair, sweater, looking at viewer, upper body, beanie,
|
| 16 |
+
outdoors, night, turtleneck, masterpiece, best quality
|
| 17 |
+
parameter:
|
| 18 |
+
negative_prompt: >-
|
| 19 |
+
nsfw, lowres, bad anatomy, bad hands, text, error, missing fingers,
|
| 20 |
+
extra digit, fewer digits, cropped, worst quality, low quality, normal
|
| 21 |
+
quality, jpeg artifacts, signature, watermark, username, blurry, artist
|
| 22 |
+
name
|
| 23 |
+
example_title: 1girl
|
| 24 |
+
---
|
| 25 |
+
<style>
|
| 26 |
+
.title-container {
|
| 27 |
+
display: flex;
|
| 28 |
+
justify-content: center;
|
| 29 |
+
align-items: center;
|
| 30 |
+
height: 100vh; /* Adjust this value to position the title vertically */
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
.title {
|
| 34 |
+
font-size: 2.5em;
|
| 35 |
+
text-align: center;
|
| 36 |
+
color: #333;
|
| 37 |
+
font-family: 'Helvetica Neue', sans-serif;
|
| 38 |
+
text-transform: uppercase;
|
| 39 |
+
letter-spacing: 0.1em;
|
| 40 |
+
padding: 0.5em 0;
|
| 41 |
+
background: transparent;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
.title span {
|
| 45 |
+
background: -webkit-linear-gradient(45deg, #bdabe3, #b39a3e);
|
| 46 |
+
-webkit-background-clip: text;
|
| 47 |
+
-webkit-text-fill-color: transparent;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
.custom-table {
|
| 51 |
+
table-layout: fixed;
|
| 52 |
+
width: 100%;
|
| 53 |
+
border-collapse: collapse;
|
| 54 |
+
margin-top: 2em;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
.custom-table td {
|
| 58 |
+
width: 50%;
|
| 59 |
+
vertical-align: top;
|
| 60 |
+
padding: 10px;
|
| 61 |
+
box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.15);
|
| 62 |
+
}
|
| 63 |
+
.custom-image-container {
|
| 64 |
+
position: relative;
|
| 65 |
+
width: 100%;
|
| 66 |
+
margin-bottom: 0em;
|
| 67 |
+
overflow: hidden;
|
| 68 |
+
border-radius: 10px;
|
| 69 |
+
transition: transform .7s;
|
| 70 |
+
/* Smooth transition for the container */
|
| 71 |
+
}
|
| 72 |
+
.custom-image-container:hover {
|
| 73 |
+
transform: scale(1.05);
|
| 74 |
+
filter: none;
|
| 75 |
+
/* Scale the container on hover */
|
| 76 |
+
}
|
| 77 |
+
.custom-image {
|
| 78 |
+
width: 100%;
|
| 79 |
+
height: auto;
|
| 80 |
+
object-fit: cover;
|
| 81 |
+
border-radius: 10px;
|
| 82 |
+
transition: transform .7s;
|
| 83 |
+
margin-bottom: 0em;
|
| 84 |
+
}
|
| 85 |
+
.nsfw-filter {
|
| 86 |
+
filter: blur(8px); /* Apply a blur effect */
|
| 87 |
+
transition: filter 0.3s ease; /* Smooth transition for the blur effect */
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
.overlay {
|
| 91 |
+
position: absolute;
|
| 92 |
+
bottom: 0;
|
| 93 |
+
left: 0;
|
| 94 |
+
right: 0;
|
| 95 |
+
color: white;
|
| 96 |
+
width: 100%;
|
| 97 |
+
height: 40%;
|
| 98 |
+
display: flex;
|
| 99 |
+
flex-direction: column;
|
| 100 |
+
justify-content: center;
|
| 101 |
+
align-items: center;
|
| 102 |
+
font-size: 1vw;
|
| 103 |
+
font-style: bold;
|
| 104 |
+
text-align: center;
|
| 105 |
+
opacity: 0;
|
| 106 |
+
/* Keep the text fully opaque */
|
| 107 |
+
background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 60%, rgba(0, 0, 0, 0) 100%);
|
| 108 |
+
transition: opacity .5s;
|
| 109 |
+
}
|
| 110 |
+
.custom-image-container:hover .overlay {
|
| 111 |
+
opacity: 1;
|
| 112 |
+
}
|
| 113 |
+
.overlay-text {
|
| 114 |
+
background: linear-gradient(45deg, #7ed56f, #28b485);
|
| 115 |
+
-webkit-background-clip: text;
|
| 116 |
+
color: transparent;
|
| 117 |
+
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
|
| 118 |
+
|
| 119 |
+
.overlay-subtext {
|
| 120 |
+
font-size: 0.75em;
|
| 121 |
+
margin-top: 0.5em;
|
| 122 |
+
font-style: italic;
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
.overlay,
|
| 126 |
+
.overlay-subtext {
|
| 127 |
+
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
</style>
|
| 131 |
+
<h1 class="title">
|
| 132 |
+
<span>UrangDiffusion 2.0</span>
|
| 133 |
+
</h1>
|
| 134 |
+
<table class="custom-table">
|
| 135 |
+
<tr>
|
| 136 |
+
<td>
|
| 137 |
+
<div class="custom-image-container">
|
| 138 |
+
<img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/64333a074521083b9d2aab3b/V85-gYFN8_9Jjyi8XWN5M.png" alt="sample1">
|
| 139 |
+
</div>
|
| 140 |
+
</td>
|
| 141 |
+
<td>
|
| 142 |
+
<div class="custom-image-container">
|
| 143 |
+
<img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/64333a074521083b9d2aab3b/MmgRQeZPMIdz9-vEjlNUZ.png" alt="sample2">
|
| 144 |
+
</div>
|
| 145 |
+
</td>
|
| 146 |
+
</tr>
|
| 147 |
+
</table>
|
| 148 |
+
|
| 149 |
+
**UrangDiffusion 2.0** (oo-raw-ng Diffusion) brings a whole-new training method compared to the v1.4. The model provide more flexibility and brings some updated dataset.
|
| 150 |
+
|
| 151 |
+
## Standard Prompting Guidelines
|
| 152 |
+
The model is finetuned from Animagine XL 3.1. However, there is a little bit changes on dataset captioning, therefore there is some different default prompt used:
|
| 153 |
+
|
| 154 |
+
**Default prompt**:
|
| 155 |
+
```
|
| 156 |
+
1girl/1boy, character name, from what series, everything else in any order, best quality, amazing quality, very aesthetic.
|
| 157 |
+
```
|
| 158 |
+
|
| 159 |
+
Note: The quality tag `masterpiece` has been replaced with `best quality` due to reports that it often caused unwanted side effects. Tests also proven that the anatomy of some generations are broken because of the tag.
|
| 160 |
+
|
| 161 |
+
**Default negative prompt**:
|
| 162 |
+
```
|
| 163 |
+
lowres, (bad), text, error, fewer, extra, missing, worst quality, jpeg artifacts, low quality, watermark, unfinished, displeasing, oldest, early, chromatic aberration, signature, extra digits, artistic error, username, scan, [abstract],
|
| 164 |
+
```
|
| 165 |
+
|
| 166 |
+
**Default configuration:**
|
| 167 |
+
|
| 168 |
+
Default configuration: Euler a with around 25-30 steps, CFG 5-7, and ENSD set to 31337. Sweet spot is around **28 steps** and **CFG 7**.
|
| 169 |
+
|
| 170 |
+
## Training Configurations
|
| 171 |
+
|
| 172 |
+
- Finetuned from: [Animagine XL 3.1](https://huggingface.co/cagliostrolab/animagine-xl-3.1)
|
| 173 |
+
|
| 174 |
+
**Pretraining:**
|
| 175 |
+
|
| 176 |
+
- Dataset size: 44,393 images
|
| 177 |
+
|
| 178 |
+
- GPU: 1xA100
|
| 179 |
+
|
| 180 |
+
- Optimizer: AdaFactor
|
| 181 |
+
|
| 182 |
+
- Unet Learning Rate: 3.75e-6
|
| 183 |
+
|
| 184 |
+
- Text Encoder Learning Rate: 1.875e-6
|
| 185 |
+
|
| 186 |
+
- Batch Size: 16
|
| 187 |
+
|
| 188 |
+
- Gradient Accumulation: 3
|
| 189 |
+
|
| 190 |
+
- Warmup steps: 100 steps
|
| 191 |
+
|
| 192 |
+
- Min SNR Gamma: 5
|
| 193 |
+
|
| 194 |
+
- Epoch: 10
|
| 195 |
+
|
| 196 |
+
- Random Cropping: True
|
| 197 |
+
|
| 198 |
+
- Loss: Huber
|
| 199 |
+
|
| 200 |
+
- Huber Schedule: SNR
|
| 201 |
+
|
| 202 |
+
- Huber C: 0.1
|
| 203 |
+
|
| 204 |
+
**Finetuning:**
|
| 205 |
+
|
| 206 |
+
- Dataset size: 3,140 images
|
| 207 |
+
|
| 208 |
+
- GPU: 1xA100
|
| 209 |
+
|
| 210 |
+
- Optimizer: AdaFactor
|
| 211 |
+
|
| 212 |
+
- Unet Learning Rate: 3e-6
|
| 213 |
+
|
| 214 |
+
- Text Encoder Learning Rate: - (Train TE set to False)
|
| 215 |
+
|
| 216 |
+
- Batch Size: 16
|
| 217 |
+
|
| 218 |
+
- Gradient Accumulation: 3
|
| 219 |
+
|
| 220 |
+
- Warmup steps: 5%
|
| 221 |
+
|
| 222 |
+
- Min SNR Gamma: 5
|
| 223 |
+
|
| 224 |
+
- Epoch: 10 (epoch 9 is used)
|
| 225 |
+
|
| 226 |
+
- Noise Offset: 0.0357
|
| 227 |
+
|
| 228 |
+
- Random Cropping: True
|
| 229 |
+
|
| 230 |
+
- Loss: Huber
|
| 231 |
+
|
| 232 |
+
- Huber Schedule: SNR
|
| 233 |
+
|
| 234 |
+
- Huber C: 0.1
|
| 235 |
+
|
| 236 |
+
## Added/Updated Series and Characters
|
| 237 |
+
|
| 238 |
+
Series:
|
| 239 |
+
|
| 240 |
+
1. zenless zone zero
|
| 241 |
+
|
| 242 |
+
2. wuthering waves
|
| 243 |
+
|
| 244 |
+
3. sewayaki kitsune no senko-san
|
| 245 |
+
|
| 246 |
+
Honkai: Star Rail:
|
| 247 |
+
|
| 248 |
+
1. firefly
|
| 249 |
+
|
| 250 |
+
2. acheron
|
| 251 |
+
|
| 252 |
+
3. sparkle
|
| 253 |
+
|
| 254 |
+
4. robin
|
| 255 |
+
|
| 256 |
+
5. aventurine
|
| 257 |
+
|
| 258 |
+
6. black swan
|
| 259 |
+
|
| 260 |
+
7. feixiao
|
| 261 |
+
|
| 262 |
+
8. yunli
|
| 263 |
+
|
| 264 |
+
9. lingsha
|
| 265 |
+
|
| 266 |
+
10. march 7th (hunt)
|
| 267 |
+
|
| 268 |
+
11. jade
|
| 269 |
+
|
| 270 |
+
12. jiaoqiu
|
| 271 |
+
|
| 272 |
+
13. gallagher
|
| 273 |
+
|
| 274 |
+
14. rappa
|
| 275 |
+
|
| 276 |
+
15. misha
|
| 277 |
+
|
| 278 |
+
Hololive Talents:
|
| 279 |
+
|
| 280 |
+
1. hololive indonesia
|
| 281 |
+
|
| 282 |
+
2. raora panthera
|
| 283 |
+
|
| 284 |
+
3. elizabeth rose bloodflame
|
| 285 |
+
|
| 286 |
+
4. gigi murin
|
| 287 |
+
|
| 288 |
+
5. cecilia immergreen
|
| 289 |
+
|
| 290 |
+
Genshin Impact:
|
| 291 |
+
|
| 292 |
+
1. arlecchino
|
| 293 |
+
|
| 294 |
+
2. clorinde
|
| 295 |
+
|
| 296 |
+
3. chiori
|
| 297 |
+
|
| 298 |
+
4. mualani
|
| 299 |
+
|
| 300 |
+
5. xianyun
|
| 301 |
+
|
| 302 |
+
6. sigewinne
|
| 303 |
+
|
| 304 |
+
7. kinich
|
| 305 |
+
|
| 306 |
+
8. xilonen
|
| 307 |
+
|
| 308 |
+
9. emilie
|
| 309 |
+
|
| 310 |
+
10. gaming
|
| 311 |
+
|
| 312 |
+
11. kachina
|
| 313 |
+
|
| 314 |
+
12. sethos
|
| 315 |
+
|
| 316 |
+
Others:
|
| 317 |
+
|
| 318 |
+
1. landscape
|
| 319 |
+
|
| 320 |
+
2. several concepts to fix anatomy issue
|
| 321 |
+
|
| 322 |
+
## Special Thanks
|
| 323 |
+
- **CagliostroLab** for sponsoring the model finetuning by letting me borrowed the organization’s RunPod account.
|
| 324 |
+
|
| 325 |
+
- **My co-workers(?) at CagliostroLab** for the insights and feedback.
|
| 326 |
+
|
| 327 |
+
- **Nur Hikari** and **Vanilla Latte** for quality control.
|
| 328 |
+
|
| 329 |
+
- **Linaqruf**, my tutor and role model in AI-generated images, and also the person behind tag ordering.
|
| 330 |
+
|
| 331 |
+
## License
|
| 332 |
+
**UrangDiffusion 2.0** falls under the **[Fair AI Public License 1.0-SD](https://freedevproject.org/faipl-1.0-sd/)** license.
|