File size: 15,992 Bytes
de9ef77
 
69ac33e
 
 
 
 
7a11b50
69ac33e
 
 
 
0f45315
49b2baf
0f45315
49b2baf
0f45315
49b2baf
0f45315
 
9ab53fb
0f45315
9ab53fb
de9ef77
69ac33e
 
 
 
 
 
 
 
79c09f7
69ac33e
8dd1433
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69ac33e
49b2baf
 
 
 
69ac33e
 
 
 
 
 
0f45315
69ac33e
 
 
 
 
 
79c09f7
 
69ac33e
 
 
 
79c09f7
49b2baf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79c09f7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4ac903c
 
 
 
 
 
 
 
 
 
 
 
49b2baf
 
69ac33e
4ac903c
 
 
 
 
 
 
 
 
 
 
 
 
 
8dd1433
69ac33e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
faaa32d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69ac33e
 
 
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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
---
license: other
datasets:
- p1atdev/pvc
language:
- en
library_name: diffusers
thumbnail: "https://s3.amazonaws.com/moonup/production/uploads/1677743056321-6305db1fcfbde33ef7d480ff.png"
tags:
- text-to-image
- stable-diffusion
- safetensors
widget:
- text: pvc, anime, masterpiece, best quality, exceptional, 1girl, bangs, bare shoulders, beret, black hair, black shorts, blue hair, bracelet, breasts, buttons, colored inner hair, double-breasted, eyewear removed, green headwear, green jacket, grey eyes, grey sky, hat, jacket, jewelry, long hair, looking at viewer, multicolored hair, neck ring, o-ring, off shoulder, rain, round eyewear, shorts, sidelocks, small breasts, solo, sunglasses, wavy hair, wet, zipper
  example_title: The WD1.5 girl
- text: pvc, anime, masterpiece, best quality, exceptional, 1girl, blonde hair, hat, baseball cap, aqua eyes, earrings, hoop earrings, yellow shirt, looking at viewer, upper body, simple background
  example_title: The blonde hair girl
- text: pvc, masterpiece, best quality, exceptional, 1girl, cat ears, red hair, long hair, hairpin, swept bangs, yellow eyes, black jacket, white shirt, blue tie, white gloves, hand up, upper body, looking at viewer, buildings
  example_title: A red hair girl
- text: nendoroid, masterpiece, best quality, exceptional, 1girl, cat ears, red hair, long hair, hairpin, swept bangs, yellow eyes, black jacket, white shirt, blue tie, white gloves, hand up, upper body, looking at viewer, 
  example_title: nendoroid style
- text: figma, masterpiece, best quality, exceptional, 1girl, cat ears, red hair, long hair, hairpin, swept bangs, yellow eyes, black jacket, white shirt, blue tie, white gloves, hand up, upper body, looking at viewer, buildings
  example_title: figma style
---

# PVC v3

This model is a latent diffusion model finetuned on Waifu Diffusion v1.5 beta 2 with PVC figure images. 
You can use Danbooru tags to generate images.

## Downloads

<div class="flex flex-col dark:bg-gray-900 rounded-md divide-y dark:divide-gray-800">

<div class="flex justify-between px-4 py-2">
  <a class="underline" href="https://huggingface.co/p1atdev/pvc-v3/resolve/checkpoints/pvc-v3-fp16.safetensors">pvc-v3-fp16.safetensors</a>
  <div>2.58 GB</div>
</div>

<div class="flex justify-between px-4 py-2">
  <a class="underline" href="https://huggingface.co/p1atdev/pvc-v3/resolve/checkpoints/pvc-v3-fp16.ckpt">pvc-v3-fp16.ckpt</a>
  <div>2.58 GB</div>
</div>

<div class="flex justify-between px-4 py-2">
  <a class="underline" href="https://huggingface.co/p1atdev/pvc-v3/resolve/checkpoints/pvc-v3-fp32.safetensors">pvc-v3-fp32.safetensors</a>
  <div>5.16 GB</div>
</div>

<div class="flex justify-between px-4 py-2">
  <a class="underline" href="https://huggingface.co/p1atdev/pvc-v3/resolve/checkpoints/pvc-v3-fp32.ckpt">pvc-v3-fp32.ckpt</a>
  <div>5.16 GB</div>
</div>

<div class="flex justify-between px-4 py-1">
  <a class="underline opacity-75" href="https://huggingface.co/p1atdev/pvc-v3/tree/checkpoints">Show all</a>
</div>

</div>

Please use [WD's vae](https://huggingface.co/hakurei/waifu-diffusion-v1-4/blob/main/vae/kl-f8-anime2.ckpt) to get good results!

Also, you can use [badquality embedding](https://huggingface.co/p1atdev/badquality) in negative prompt!

## Prompt guide

### Trigger words

- `pvc` means the pvc material style but not needed always.

- `figma` is the figure style that has joints, and more tend to be product thumbnail images. Use with `doll joints` to get better joints.

- `nendoroid` means the style of chibi figures. Use with `chibi` to get better results.

### Tips

The PVC figure style is closer to the anime style than to the realistic style. 
So, it is recommended to put `anime` to **positive** prompt or `realistic` to **negative** prompt to get better results sometimes.
If you want to avoid too realistic faces, try this! 

## Examples


<div class="not-prose grid grid-cols-1 lg:grid-cols-2 gap-4">

<div class="border dakr:border-gray-750 dark:bg-gray-850 rounded-md overflow-hidden">
  <img class="w-full" src="https://s3.amazonaws.com/moonup/production/uploads/1677723651374-6305db1fcfbde33ef7d480ff.jpeg"/>
  <div class="px-4 py-2">
  <details>
  <p class="whitespace-pre-line">
  masterpiece, best quality, pvc, 1girl, cat ears, blue hair, gradient hair, colored inner hair, long hair, floating hair, blue eyes, school uniform, blue shirt, ribbon, short skirt, thighhighs, zettai ryouiki, school bag, from above, cowboy shot, looking at viewer, wind, street, day,
  Negative prompt: badquality, oldest, chibi,
  Steps: 28, Sampler: DPM++ SDE Karras, CFG scale: 10, Seed: 744670484, Size: 576x768, Model hash: 0866b17d46, Model: pvc-v3-fp16, Denoising strength: 0.6, Clip skip: 2, Hires upscale: 1.5, Hires upscaler: Latent
  </p>
  </details>
  </div>
</div>


<div class="border dakr:border-gray-750 dark:bg-gray-850 rounded-md overflow-hidden">
  <img class="w-full" src="https://s3.amazonaws.com/moonup/production/uploads/1677725923219-6305db1fcfbde33ef7d480ff.jpeg"/>
  <div class="px-4 py-2">
  <details>
  <p class="whitespace-pre-line">
  masterpiece, best quality, exceptional, pvc, 1girl, bangs, bare shoulders, beret, black hair, black shorts, blue hair, bracelet, breasts, buttons, colored inner hair, double-breasted, eyewear removed, green headwear, green jacket, grey eyes, grey sky, hat, jacket, jewelry, long hair, looking at viewer, multicolored hair, neck ring, o-ring, off shoulder, rain, round eyewear, shorts, sidelocks, small breasts, solo, sunglasses, wavy hair, wet, zipper,
  Negative prompt: badquality, oldest, chibi,
  Steps: 28, Sampler: DPM++ SDE Karras, CFG scale: 10, Seed: 2954169314, Size: 576x768, Model hash: 0866b17d46, Model: pvc-v3-fp16, Denoising strength: 0.6, Clip skip: 2, Hires upscale: 1.5, Hires upscaler: Latent</p>
  </details>
  </div>
</div>

<div class="border dakr:border-gray-750 dark:bg-gray-850 rounded-md overflow-hidden">
  <img class="w-full" src="https://s3.amazonaws.com/moonup/production/uploads/1677726308338-6305db1fcfbde33ef7d480ff.jpeg"/>
  <div class="px-4 py-2">
  <details>
  <p class="whitespace-pre-line">
  masterpiece, best quality, exceptional, pvc, 1girl, cat ears, red hair, long hair, hairpin, swept bangs, yellow eyes, black jacket, white shirt, blue tie, white gloves, hand up, upper body, looking at viewer, buildings
  Negative prompt: badquality, oldest, chibi, realistic
  Steps: 28, Sampler: DPM++ SDE Karras, CFG scale: 10, Seed: 2320075190, Size: 576x768, Model hash: 0866b17d46, Model: pvc-v3-fp16, Denoising strength: 0.6, Clip skip: 2, Hires upscale: 1.5, Hires upscaler: Latent
  </p>
  </details>
  </div>
</div>

<div class="border dakr:border-gray-750 dark:bg-gray-850 rounded-md overflow-hidden">
  <img class="w-full" src="https://s3.amazonaws.com/moonup/production/uploads/1677730950628-6305db1fcfbde33ef7d480ff.jpeg"/>
  <div class="px-4 py-2">
  <details>
  <p class="whitespace-pre-line">
  masterpiece, best quality, exceptional, pvc, anime, 1boy, grey hair, red eyes, holding gun, handgun, black coat, looking at viewer, dynamic,
  Negative prompt: badquality, oldest, chibi,
  Steps: 28, Sampler: DPM++ SDE Karras, CFG scale: 10, Seed: 2543033775, Size: 576x768, Model hash: 0866b17d46, Model: pvc-v3-fp16, Denoising strength: 0.6, Clip skip: 2, Hires upscale: 1.5, Hires upscaler: Latent
  </p>
  </details>
  </div>
</div>

<div class="border dakr:border-gray-750 dark:bg-gray-850 rounded-md overflow-hidden">
  <img class="w-full" src="https://s3.amazonaws.com/moonup/production/uploads/1677734822577-6305db1fcfbde33ef7d480ff.jpeg"/>
  <div class="px-4 py-2">
  <details>
  <p class="whitespace-pre-line">
  masterpiece, best quality, exceptional, figma, 1girl, cat ears, blue hair, high ponytail, parted bangs, white shirt, dress shirt, short sleeves, shorts, looking at viewer, doll joints,
  Negative prompt: badquality, oldest, chibi
  Steps: 28, Sampler: DPM++ SDE Karras, CFG scale: 10, Seed: 595390714, Size: 576x768, Model hash: 0866b17d46, Model: pvc-v3-fp16, Denoising strength: 0.6, Clip skip: 2, Hires upscale: 1.5, Hires upscaler: Latent
  </p>
  </details>
  </div>
</div>

<div class="border dakr:border-gray-750 dark:bg-gray-850 rounded-md overflow-hidden">
  <img class="w-full" src="https://s3.amazonaws.com/moonup/production/uploads/1677732154061-6305db1fcfbde33ef7d480ff.jpeg"/>
  <div class="px-4 py-2">
  <details>
  <p class="whitespace-pre-line">
  masterpiece, best quality, exceptional, figma, 1girl, brown hair, bob cut, blunt bangs, expressionless, red track suit, long pants, full body, running, dynamic, looking at viewer,
  Negative prompt: badquality, oldest, chibi, realistic,
  Steps: 28, Sampler: DPM++ SDE Karras, CFG scale: 10, Seed: 617339547, Size: 576x768, Model hash: 0866b17d46, Model: pvc-v3-fp16, Denoising strength: 0.6, Clip skip: 2, Hires upscale: 1.5, Hires upscaler: Latent
  </p>
  </details>
  </div>
</div>

<div class="border dakr:border-gray-750 dark:bg-gray-850 rounded-md overflow-hidden">
  <img class="w-full" src="https://s3.amazonaws.com/moonup/production/uploads/1677733209241-6305db1fcfbde33ef7d480ff.jpeg"/>
  <div class="px-4 py-2">
  <details>
  <p class="whitespace-pre-line">
  masterpiece, best quality, exceptional, nendoroid, chibi, masterpiece, best quality, exceptional, 1girl, aqua eyes, baseball cap, blonde hair, closed mouth, earrings, green background, hat, hoop earrings, jewelry, looking at viewer, shirt, short hair, simple background, solo, upper body, yellow shirt,
  Negative prompt: badquality, oldest, realistic,
  Steps: 28, Sampler: DPM++ SDE Karras, CFG scale: 10, Seed: 3673139852, Size: 576x768, Model hash: 0866b17d46, Model: pvc-v3-fp16, Denoising strength: 0.6, Clip skip: 2, Hires upscale: 1.5, Hires upscaler: Latent
  </p>
  </details>
  </div>
</div>


<div class="border dakr:border-gray-750 dark:bg-gray-850 rounded-md overflow-hidden">
  <img class="w-full" src="https://s3.amazonaws.com/moonup/production/uploads/1677733514916-6305db1fcfbde33ef7d480ff.jpeg"/>
  <div class="px-4 py-2">
  <details>
  <p class="whitespace-pre-line">
  masterpiece, best quality, exceptional, nendoroid, chibi, masterpiece, best quality, exceptional, 1girl, bare shoulders, baseball cap, black gloves, black headwear, black shirt, blue eyes, blue hair, breasts, coat, crop top, gloves, hand on hip, hat, large breasts, long hair, long sleeves, looking at viewer, mask, midriff, mouth mask, navel, off shoulder, open clothes, open coat, shirt, sleeveless, sleeveless shirt, solo, stomach, upper body, white coat, waifu,
  Negative prompt: badquality, oldest, realistic,
  Steps: 28, Sampler: DPM++ SDE Karras, CFG scale: 10, Seed: 3256539262, Size: 576x768, Model hash: 0866b17d46, Model: pvc-v3-fp16, Denoising strength: 0.6, Clip skip: 2, Hires upscale: 1.5, Hires upscaler: Latent
  </p>
  </details>
  </div>
</div>


<div class="border dakr:border-gray-750 dark:bg-gray-850 rounded-md overflow-hidden">
  <img class="w-full" src="https://s3.amazonaws.com/moonup/production/uploads/1677737218611-6305db1fcfbde33ef7d480ff.jpeg"/>
  <div class="px-4 py-2">
  <details>
  <p class="whitespace-pre-line">
  masterpiece, best quality, exceptional, pvc, anime, 1girl, brown hair, school uniform, aqua ribbon, hand up, upper body, looking at viewer, beach, ocean, orange, sky, clouds, sunset,
  Negative prompt: badquality, oldest, chibi, simple background, bad anatomy, realistic,
  Steps: 28, Sampler: DPM++ SDE Karras, CFG scale: 8, Seed: 537083103, Size: 768x576, Model hash: 0866b17d46, Model: pvc-v3-fp16, Denoising strength: 0.6, Clip skip: 2, Hires upscale: 1.5, Hires upscaler: Latent
  </p>
  </details>
  </div>
</div>


<div class="border dakr:border-gray-750 dark:bg-gray-850 rounded-md overflow-hidden">
  <img class="w-full" src="https://s3.amazonaws.com/moonup/production/uploads/1677742433908-6305db1fcfbde33ef7d480ff.jpeg"/>
  <div class="px-4 py-2">
  <details>
  <p class="whitespace-pre-line">
  masterpiece, best quality, exceptional, pvc, anime, 1girl, young, light purple hair, short hair, streaked hair, wavy hair, red eyes, queen, crown, white dress, crossed legs, thighhighs, boots, sitting, close-up, looking at viewer, throne, dark curtains, dark atmosphere
  Negative prompt: badquality, oldest, chibi, simple background, bad anatomy, realistic
  Steps: 28, Sampler: DPM++ SDE Karras, CFG scale: 8, Seed: 3981672289, Size: 768x576, Model hash: 0866b17d46, Model: pvc-v3-fp16, Denoising strength: 0.6, Clip skip: 2, Hires upscale: 1.5, Hires upscaler: Latent
  </p>
  </details>
  </div>
</div>

</div>

## Training information

<details>
<table>
<thead>
<tr><th>Parameter</td><td>Value</th></tr>
</thead>
<tbody>
  
<tr><td>Service</td><td>Runpod</td></tr>
<tr><td>GPU</td><td>A5000</td></tr>
<tr><td>Notebook</td><td><a href="https://github.com/Linaqruf/kohya-trainer/blob/main/kohya-trainer.ipynb" target="_blank">Linaqruf/kohya-trainer</a></td></tr>
<tr><td>Cost</td><td>about $2</td></tr>
<tr><td>Hours</td><td>about 6 hours</td></tr>

<tr><td>Dataset</td><td>7467 images from p1atdev/pvc</td></tr>
<tr><td>Resolution</td><td>896</td></tr>
<tr><td>Epochs</td><td>5</td></tr>
<tr><td>Optimizer</td><td>Lion</td></tr>
<tr><td>LR</td><td>4e-7</td></tr>
<tr><td>Scheduler</td><td>cosine_with_restarts</td></tr>
<tr><td>Train Batch Size</td><td>1</td></tr>

</tbody>
</table>
</details>


## 🧨 Diffusers

Using the [🤗's Diffusers library](https://github.com/huggingface/diffusers) to run Stable Diffusion 2 in a simple and efficient manner.

```bash
pip install diffusers transformers accelerate scipy safetensors
pip install --pre xformers
```

Using StableDiffusionPipeline:

```py
import torch
from diffusers import StableDiffusionPipeline

model_id = "p1atdev/pvc-v3"
revision = "fp16" # "main" or "fp16"

pipe = StableDiffusionPipeline.from_pretrained(
    model_id, 
    revision=revision, 
    torch_dtype=torch.float16,
)
pipe = pipe.to("cuda")
pipe.enable_attention_slicing()
pipe.enable_xformers_memory_efficient_attention() # required

prompt = "pvc, masterpiece, best quality, exceptional, 1girl, cat ears, red hair, long hair, hairpin, swept bangs, yellow eyes, black jacket, white shirt, blue tie, white gloves, hand up, upper body, looking at viewer, buildings"
negative_prompt = "nsfw, nude, worst quality, low quality, oldest, bad anatomy"
image = pipe(
    prompt, 
    negative_prompt=negative_prompt,
    guidance_scale=7.0,
    num_inference_steps=20
).images[0]

# save image
image.save("pvc_figure.png")

# or just display it
# display(image)
```

Using StableDiffusionLongPromptWeightingPipeline:

```py
import torch
from diffusers import DiffusionPipeline

model_id = "p1atdev/pvc-v3"
revision = "fp16" # "main" or "fp16"

pipe = DiffusionPipeline.from_pretrained(
    model_id, 
    revision=revision, 
    torch_dtype=torch.float16,
    custom_pipeline="lpw_stable_diffusion"
)
pipe = pipe.to("cuda")
pipe.enable_attention_slicing()
pipe.enable_xformers_memory_efficient_attention() # required

prompt = """
pvc, anime, masterpiece, best quality, exceptional,
1girl, bangs, bare shoulders, beret, black hair, black shorts, blue hair, bracelet, breasts, buttons,
colored inner hair, double-breasted, eyewear removed, green headwear, green jacket, grey eyes, grey sky,
hat, jacket, jewelry, long hair, looking at viewer, multicolored hair, neck ring, o-ring, off shoulder, rain,
round eyewear, shorts, sidelocks, small breasts, solo, sunglasses, wavy hair, wet, zipper
""" # long prompt

negative_prompt = "nsfw, nude, worst quality, low quality, oldest, bad anatomy"
image = pipe(
    prompt, 
    negative_prompt=negative_prompt,
    guidance_scale=7.0,
    num_inference_steps=20
).images[0]

display(image)
```


## License
PVC v3 is released under the Fair AI Public License 1.0-SD (https://freedevproject.org/faipl-1.0-sd/). If any derivative of this model is made, please share your changes accordingly. Special thanks to ronsor/undeleted (https://undeleted.ronsor.com/) for help with the license.