pvc-v3 / README.md
p1atdev's picture
Update README.md
faaa32d
---
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.