Update README.md
Browse files
README.md
CHANGED
@@ -1,21 +1,41 @@
|
|
1 |
-
---
|
2 |
-
# For reference on model card metadata, see the spec: https://github.com/huggingface/hub-docs/blob/main/modelcard.md?plain=1
|
3 |
-
# Doc / guide: https://huggingface.co/docs/hub/model-cards
|
4 |
-
{}
|
5 |
-
---
|
6 |
-
|
7 |
# LoRA model of the Genshin Characters
|
8 |
## Data source:
|
9 |
Manually captured 64 characters at different angles in the character directory of the Genshin game, 20 pictures for each character.
|
10 |
|
11 |
-
##
|
12 |
-
[lora-scripts](https://github.com/Akegarasu/lora-scripts).
|
13 |
|
14 |
-
|
15 |
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
Negative prompt (You can choose the following three ways):
|
|
|
19 |
1. \
|
20 |
2. (((NSFW))),poorly drawn, anatomical nonsense, bad anatomy, bad feet, bad hands, bad proportions, quality
|
21 |
3. (worst quality, low quality:1.4), (monochrome:1.1), turn pale, text, watermark
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# LoRA model of the Genshin Characters
|
2 |
## Data source:
|
3 |
Manually captured 64 characters at different angles in the character directory of the Genshin game, 20 pictures for each character.
|
4 |
|
5 |
+
## Train:
|
6 |
+
Training code: [lora-scripts](https://github.com/Akegarasu/lora-scripts).
|
7 |
|
8 |
+
Batch training code: [batch_train_loras](https://github.com/RobertLau666/batch_train_loras).
|
9 |
|
10 |
+
## Usage:
|
11 |
+
prompt:
|
12 |
+
```txt
|
13 |
+
1[Gender], solo, [EN_Name], [Arbitrary scene description]
|
14 |
+
```
|
15 |
+
For example:
|
16 |
+
```txt
|
17 |
+
"1girl, solo, Nahida, on the playground
|
18 |
+
```
|
19 |
|
20 |
Negative prompt (You can choose the following three ways):
|
21 |
+
```txt
|
22 |
1. \
|
23 |
2. (((NSFW))),poorly drawn, anatomical nonsense, bad anatomy, bad feet, bad hands, bad proportions, quality
|
24 |
3. (worst quality, low quality:1.4), (monochrome:1.1), turn pale, text, watermark
|
25 |
+
```
|
26 |
+
|
27 |
+
```python
|
28 |
+
from diffusers import StableDiffusionPipeline
|
29 |
+
import torch
|
30 |
+
|
31 |
+
model_id = "ckpt/anything-v3.0"
|
32 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
33 |
+
|
34 |
+
lora_file = "Nahida.safetensors"
|
35 |
+
pipe.load_lora_weights(lora_file)
|
36 |
+
pipe = pipe.to("cuda")
|
37 |
+
|
38 |
+
prompt = "1girl, Nahida, solo, on the playground"
|
39 |
+
image = pipe(prompt).images[0]
|
40 |
+
image.save("./hatsune_miku.png")
|
41 |
+
```
|