File size: 7,526 Bytes
52320a6 0389d12 503432b b36b6ec 0389d12 49647d1 b36b6ec 49647d1 b36b6ec 49647d1 1aec69b 49647d1 1aec69b 49647d1 1aec69b 49647d1 1aec69b 49647d1 08298f8 49647d1 1ea1f35 |
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 |
---
license: other
thumbnail: >-
https://s3.amazonaws.com/moonup/production/uploads/6305db1fcfbde33ef7d480ff/AWS1FulVrdoZGB-WIejqQ.jpeg
datasets:
- p1atdev/pvc
language:
- en
library_name: diffusers
tags:
- stable-diffusion
- safetensors
widget:
- text: >-
pvc, masterpiece, best quality, exceptional, 1girl, red hair, cat ears, red
eyes, curly hair, long hair, maid costume, frills, upper body, looking at
viewer, red flowers, indoors, beautiful view, medieval,
example_title: PVC
- text: >-
figma, masterpiece, best quality, best aesthetic, 1girl, cat ears, blue
hair, high ponytail, parted bangs, white shirt, dress shirt, short sleeves,
shorts, looking at viewer,
example_title: Figma
- text: >-
nendoroid, masterpiece, best quality, best aesthetic, 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,
example_title: Nendoroid
- text: >-
pvc, masterpiece, best quality, best aesthetic, 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: Green jacket
pipeline_tag: text-to-image
---
# PVC v4
This model is a latent diffusion model finetuned on Waifu Diffusion v1.5 beta 2.6 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-v4/resolve/checkpoints/pvc-v4-fp16.safetensors">pvc-v4-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-v4/resolve/checkpoints/pvc-v4-fp32.safetensors">pvc-v4-fp32.safetensors</a>
<div>4.31 GB</div>
</div>
<div class="flex justify-between px-4 py-1">
<a class="underline opacity-75" href="https://huggingface.co/p1atdev/pvc-v4/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!
## Prompt guide
**Highres fix is highly recommended.**
### 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. To get joints, please emphasize `figma` by 1.2 ~ 1.5 or use `doll joints` tag.
- `nendoroid` means the style of chibi figures. Use with `chibi` to get better chibis.
### Negative prompt
```
(worst quality, low quality, bad aesthetic, oldest), bad anatomy, bad hands, text, cropped, signature, blurry
```
## Comparison to v3

```
masterpiece, best quality, best aesthetic, 1girl, red hair, cat ears, closed eyes, closed mouth, expressionless, maid costume, apron, lolita dress, frills, lying on back, sheets, red flowers, from above
Negative prompt: (worst quality, low quality, bad aesthetic, oldest), bad anatomy, bad hands, text, error, cropped, jpeg artifacts, signature, watermark, username, blurry
Steps: 18, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 1166304922, Size: 512x768, Model hash: 0866b17d46, Model: pvc-v3-fp16, Denoising strength: 0.7, Clip skip: 2, Hires upscale: 1.5, Hires steps: 12, Hires upscaler: Latent
```
## Examples
TODO: あとでやる
## 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>A4500</td></tr>
<tr><td>Script</td><td><a href="https://github.com/kohya-ss/sd-scripts" target="_blank">kohya-ss/sd-scripts</a></td></tr>
<tr><td>Cost</td><td>about $10</td></tr>
<tr><td>Hours</td><td>about 30 hours</td></tr>
<tr><td>Dataset</td><td>about 18000 images from p1atdev/pvc</td></tr>
<tr><td>Resolution</td><td>768</td></tr>
<tr><td>Epochs</td><td>13</td></tr>
<tr><td>Optimizer</td><td>Lion</td></tr>
<tr><td>LR</td><td>1e-7</td></tr>
<tr><td>Scheduler</td><td>cosine_with_restarts</td></tr>
<tr><td>Train Batch Size</td><td>12</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 xformers
```
Using StableDiffusionPipeline:
```py
import torch
from diffusers import StableDiffusionPipeline
model_id = "p1atdev/pvc-v4"
pipe = StableDiffusionPipeline.from_pretrained(
model_id,
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, bad aesthetic, 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-v4"
pipe = DiffusionPipeline.from_pretrained(
model_id,
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, bad aesthetic, oldest, bad anatomy"
image = pipe(
prompt,
negative_prompt=negative_prompt,
guidance_scale=7.0,
num_inference_steps=20
).images[0]
display(image)
```
## License
This model 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.
WD1.5 と同じ Fair AI Public License 1.0-SD ライセンスです。生成サービスなどでこのモデルまたは派生モデルを使う場合は、サービスの利用者にモデルを公開する必要があります。詳しい/正確なライセンスは [原文](https://freedevproject.org/faipl-1.0-sd/) を参照ください。 |