File size: 7,329 Bytes
70d0284
 
 
 
e697b0c
 
 
 
 
 
 
 
08f7e10
 
 
 
 
 
 
 
 
 
 
70d0284
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203cba3
70d0284
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f33b891
 
70d0284
 
 
 
 
 
 
 
 
f33b891
 
70d0284
 
 
 
 
 
 
 
 
 
203cba3
f33b891
203cba3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e697b0c
 
203cba3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
---
license: other
license_name: faipl
license_link: https://freedevproject.org/faipl-1.0-sd
language:
- en
tags:
  - text-to-image
  - stable-diffusion
  - safetensors
  - stable-diffusion-xl
base_model: cagliostrolab/animagine-xl-3.1
widget:
  - text: >-
      1girl, green hair, sweater, looking at viewer, upper body, beanie,
      outdoors, night, turtleneck, masterpiece, best quality
    parameter:
      negative_prompt: >-
        nsfw, lowres, bad anatomy, bad hands, text, error, missing fingers,
        extra digit, fewer digits, cropped, worst quality, low quality, normal
        quality, jpeg artifacts, signature, watermark, username, blurry, artist
        name
    example_title: 1girl
---
<style>
  .title-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh; /* Adjust this value to position the title vertically */
  }
  
  .title {
    font-size: 2.5em;
    text-align: center;
    color: #333;
    font-family: 'Helvetica Neue', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5em 0;
    background: transparent;
  }
  
  .title span {
    background: -webkit-linear-gradient(45deg, #bdabe3, #794bf2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  
  .custom-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
    margin-top: 2em;
  }
  
  .custom-table td {
    width: 50%;
    vertical-align: top;
    padding: 10px;
    box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.15);
  }
  .custom-image-container {
    position: relative;
    width: 100%;
    margin-bottom: 0em;
    overflow: hidden;
    border-radius: 10px;
    transition: transform .7s;
    /* Smooth transition for the container */
  }
  .custom-image-container:hover {
    transform: scale(1.05);
    filter: none;
    /* Scale the container on hover */
  }
  .custom-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    transition: transform .7s;
    margin-bottom: 0em;
  }
  .nsfw-filter {
    filter: blur(8px); /* Apply a blur effect */
    transition: filter 0.3s ease; /* Smooth transition for the blur effect */
  }
  
  .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: white;
    width: 100%;
    height: 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 1vw;
    font-style: bold;
    text-align: center;
    opacity: 0;
    /* Keep the text fully opaque */
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 60%, rgba(0, 0, 0, 0) 100%);
    transition: opacity .5s;
  }
  .custom-image-container:hover .overlay {
    opacity: 1;
  }
  .overlay-text {
    background: linear-gradient(45deg, #7ed56f, #28b485);
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    
  .overlay-subtext {
    font-size: 0.75em;
    margin-top: 0.5em;
    font-style: italic;
  }
    
  .overlay,
  .overlay-subtext {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  }
    
</style>
<h1 class="title">
  <span>UrangDiffusion 1.0</span>
</h1>
<table class="custom-table">
  <tr>
    <td>
      <div class="custom-image-container">
        <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/64333a074521083b9d2aab3b/Ab1yHeuOSMYwIChqFGbZj.png" alt="sample1">
      </div>
      <div class="custom-image-container">
        <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/64333a074521083b9d2aab3b/tHdln16eAcps9o4kTa42L.png" alt="sample4">
      </div>
    </td>
    <td>
      <div class="custom-image-container">
        <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/64333a074521083b9d2aab3b/J3DBFCvXWnDxImMXt_GF6.png" alt="sample2">
      </div>
      <div class="custom-image-container">
        <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/64333a074521083b9d2aab3b/h998WyNLo4rZH74kOWtFv.png" alt="sample3">
    </td>
    <td>
      <div class="custom-image-container">
        <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/64333a074521083b9d2aab3b/a0lTBd4h0-2nJm_uLkVxs.png" alt="sample1">
      </div>
      <div class="custom-image-container">
        <img class="custom-image" src="https://cdn-uploads.huggingface.co/production/uploads/64333a074521083b9d2aab3b/obcePlHlrj6cWbNyQWhd2.png" alt="sample4">
      </div>
    </td>
  </tr>
</table>

**UrangDiffusion** (oo-raw-ng Diffusion) is a sequel to AingDiffusion. This checkpoint is fully trained, unlike its predecessor.

The name "Urang" comes from Sundanese, meaning "We/Our/I." The history behind the name is to make the model not only suitable for me but also for many people. Another reason is that I use many resources (training scripts, dataset collecting scripts, etc.) from other people. It’s unfair to claim this model as "my sole work".

The model went through two steps of training: pretraining and finetuning. Pretraining is to make the model learn new things, while finetuning ensures the images produced by the model are decent (A.K.A. having a standard style) without mentioning style in the prompt.

## Standard Prompting Guidelines
The model is finetuned from Animagine XL 3.1. However, I didn’t finetune the aesthetic tags trained with 3.1 due to some considerations. Therefore, the default prompt uses 3.0’s default prompting format:

**Default prompt**: 
```
1girl/1boy, character name, from what series, everything else in any order, masterpiece, best quality
```

**Default negative prompt**: 
```
lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, artist name
```

**Default configuration:** 

Euler a with around 25-30 steps, CFG 5-7, and ENSD set to 31337.

## Training Configurations

- Finetuned from: [Animagine XL 3.1](https://huggingface.co/cagliostrolab/animagine-xl-3.1)

**Pretraining:**

- Dataset size: ~17,200 images

- GPU: 1xA100

- Optimizer: AdaFactor

- Unet Learning Rate: 2.5e-6

- Text Encoder Learning Rate: 1.25e-6

- Batch Size: 48

- Gradient Accumulation: 1

- Epoch: 10 (epoch 8 is used)

**Finetuning:**

- Dataset size: ~1,300 images

- GPU: 1xA100

- Optimizer: AdaFactor

- Unet Learning Rate: 2e-6

- Text Encoder Learning Rate: - (Train TE set to False)

- Batch Size: 48

- Gradient Accumulation: 1

- Epoch: 10 (epoch 8 is used)

## Added Series

**Wuthering Waves** and **hololiveEN -Justice-** have been added to the model. 

**Warning**, the dataset is very small, and it still struggles to generate the characters added accurately. You can generate them with alternate costumes, but if you’re trying to generate them following the official art, you will struggle a lot.

## Special Thanks
- **My co-workers(?) at CagliostroLab** for the insights and feedback.

- **Nur Hikari** and **Vanilla Latte** for quality control.

- **Linaqruf**, my tutor and role model in AI-generated images.

## License
**UrangDiffusion** falls under the **[Fair AI Public License 1.0-SD](https://freedevproject.org/faipl-1.0-sd/)** license.