p1atdev commited on
Commit
08298f8
β€’
1 Parent(s): 1f487ac

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +96 -0
README.md CHANGED
@@ -17,6 +17,8 @@ widget:
17
  example_title: Figma
18
  - 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,
19
  example_title: Nendoroid
 
 
20
  ---
21
 
22
  # PVC v4
@@ -79,6 +81,100 @@ Steps: 18, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 1166304922, Size: 512x7
79
 
80
  TODO: あとでやる
81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  ## License
83
  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.
84
 
 
17
  example_title: Figma
18
  - 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,
19
  example_title: Nendoroid
20
+ - 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,
21
+ example_title: Green jacket
22
  ---
23
 
24
  # PVC v4
 
81
 
82
  TODO: あとでやる
83
 
84
+ ## Training information
85
+
86
+ <details>
87
+ <table>
88
+ <thead>
89
+ <tr><th>Parameter</td><td>Value</th></tr>
90
+ </thead>
91
+ <tbody>
92
+
93
+ <tr><td>Service</td><td>Runpod</td></tr>
94
+ <tr><td>GPU</td><td>A4500</td></tr>
95
+ <tr><td>Script</td><td><a href="https://github.com/kohya-ss/sd-scripts" target="_blank">kohya-ss/sd-scripts</a></td></tr>
96
+ <tr><td>Cost</td><td>about $10</td></tr>
97
+ <tr><td>Hours</td><td>about 30 hours</td></tr>
98
+
99
+ <tr><td>Dataset</td><td>about 18000 images from p1atdev/pvc</td></tr>
100
+ <tr><td>Resolution</td><td>768</td></tr>
101
+ <tr><td>Epochs</td><td>13</td></tr>
102
+ <tr><td>Optimizer</td><td>Lion</td></tr>
103
+ <tr><td>LR</td><td>1e-7</td></tr>
104
+ <tr><td>Scheduler</td><td>cosine_with_restarts</td></tr>
105
+ <tr><td>Train Batch Size</td><td>12</td></tr>
106
+
107
+ </tbody>
108
+ </table>
109
+ </details>
110
+
111
+ ## 🧨 Diffusers
112
+
113
+ Using the [πŸ€—'s Diffusers library](https://github.com/huggingface/diffusers) to run Stable Diffusion 2 in a simple and efficient manner.
114
+
115
+ ```bash
116
+ pip install diffusers transformers accelerate scipy safetensors
117
+ pip install xformers
118
+ ```
119
+
120
+ Using StableDiffusionPipeline:
121
+
122
+ ```py
123
+ import torch
124
+ from diffusers import StableDiffusionPipeline
125
+ model_id = "p1atdev/pvc-v4"
126
+ pipe = StableDiffusionPipeline.from_pretrained(
127
+ model_id,
128
+ torch_dtype=torch.float16,
129
+ )
130
+ pipe = pipe.to("cuda")
131
+ pipe.enable_attention_slicing()
132
+ pipe.enable_xformers_memory_efficient_attention() # required
133
+ 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"
134
+ negative_prompt = "nsfw, nude, worst quality, low quality, bad aesthetic, oldest, bad anatomy"
135
+ image = pipe(
136
+ prompt,
137
+ negative_prompt=negative_prompt,
138
+ guidance_scale=7.0,
139
+ num_inference_steps=20
140
+ ).images[0]
141
+ # save image
142
+ image.save("pvc_figure.png")
143
+ # or just display it
144
+ # display(image)
145
+ ```
146
+
147
+ Using StableDiffusionLongPromptWeightingPipeline:
148
+
149
+ ```py
150
+ import torch
151
+ from diffusers import DiffusionPipeline
152
+ model_id = "p1atdev/pvc-v4"
153
+ pipe = DiffusionPipeline.from_pretrained(
154
+ model_id,
155
+ torch_dtype=torch.float16,
156
+ custom_pipeline="lpw_stable_diffusion"
157
+ )
158
+ pipe = pipe.to("cuda")
159
+ pipe.enable_attention_slicing()
160
+ pipe.enable_xformers_memory_efficient_attention() # required
161
+ prompt = """
162
+ pvc, anime, masterpiece, best quality, exceptional,
163
+ 1girl, bangs, bare shoulders, beret, black hair, black shorts, blue hair, bracelet, breasts, buttons,
164
+ colored inner hair, double-breasted, eyewear removed, green headwear, green jacket, grey eyes, grey sky,
165
+ hat, jacket, jewelry, long hair, looking at viewer, multicolored hair, neck ring, o-ring, off shoulder, rain,
166
+ round eyewear, shorts, sidelocks, small breasts, solo, sunglasses, wavy hair, wet, zipper
167
+ """ # long prompt
168
+ negative_prompt = "nsfw, nude, worst quality, low quality, bad aesthetic, oldest, bad anatomy"
169
+ image = pipe(
170
+ prompt,
171
+ negative_prompt=negative_prompt,
172
+ guidance_scale=7.0,
173
+ num_inference_steps=20
174
+ ).images[0]
175
+ display(image)
176
+ ```
177
+
178
  ## License
179
  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.
180