khanon commited on
Commit
c487f9f
1 Parent(s): 2ca36bc

adds new Haruka LoRA

Browse files
haruka/README.md ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Igusa Haruka (Blue Archive)
2
+ 伊草ハルカ (ブルーアーカイブ) / 이구사 하루카 (블루 아카이브) / 伊草春香 (碧蓝档案)
3
+
4
+ [**Download here.**](https://huggingface.co/khanon/lora-training/blob/main/haruka/chara-haruka-v1c.safetensors)
5
+
6
+ ## Table of Contents
7
+ - [Preview](#preview)
8
+ - [Usage](#usage)
9
+ - [Training](#training)
10
+ - [Revisions](#revisions)
11
+
12
+ ## Preview
13
+ ![Haruka portrait](chara-haruka-v1c.png)
14
+ ![Haruka preview 1](example-001b-v1c.png)
15
+ ![Haruka preview 2](example-002b-v1c.png)
16
+ ![Haruka preview 3](example-003b-v1c.png)
17
+
18
+ ## Usage
19
+ Use any or all of the following tags to summon Haruka: `haruka, 1girl, halo, short hair with long locks, purple eyes`
20
+
21
+ For her normal outfit: `school uniform, hairclip, purple jacket, collared shirt, juliet sleeves, belt, miniskirt, black skirt, boots`
22
+ - The AI is slightly stubborn with Haruka's normal outfit, likely because she doesn't have much art that does not feature long sleeves of some sort.
23
+ - To remove her jacket sleeves, prompt `sleeveless` and use `long sleeves` in the negative prompt.
24
+ - To remove the purple bowtie/tie clip, prompt `collarbone` and use `bowtie` in the negative prompt.
25
+
26
+ For her nervous/creepy smile: `nervous smile, nervous, sweat, wavy mouth, [closed mouth:parted lips:0.75]`
27
+ - Use `sanpaku, constricted pupils, crazy eyes, yandere` or similar for more intense expressions.
28
+
29
+ [Here is a list of all tags including in the training dataset, sorted by frequency.](all_tags.txt)
30
+
31
+ ## Training
32
+ *Exact parameters are provided in the accompanying JSON files.*
33
+ - Trained on a set of 143 images.
34
+ - 138 without "multiple views" (9 repeats)
35
+ - 5 "multiple views" (4 repeats)
36
+ - 3 batch size, 4 epochs
37
+ - `(138 * 9 + 5 * 4) / 3 * 4` = 1683 steps
38
+ - 0.083 loss
39
+ - Initially tagged with WD1.4 swin-v2 model. Tags pruned/edited for consistency.
40
+ - [Tagging methodology detailed here.](tagging%20methodology.md)
41
+ - `constant_with_warmup` scheduler
42
+ - 1.5e-5 text encoder LR
43
+ - 1.5e-4 unet LR
44
+ - 1e-5 optimizer LR
45
+ - Used network_dimension 128 (same as usual) / network alpha 128 (default)
46
+ - Resized to 32 after training
47
+ - Training resolution 832x832.
48
+ - Trained without VAE.
49
+
50
+ ## Revisions
51
+ - v1b (2023-02-18)
52
+ - Initial release.
haruka/chara-haruka-v1b.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b751170286f8135cd25ae375a961fb9c9df68df130d4bf3120cebfade8151168
3
+ size 37882638
haruka/example-001-v1b.png ADDED

Git LFS Details

  • SHA256: 8108629f8aa325547a01f3b30b6f9091f0fa3acaad6024afcb2baedc23fe15f4
  • Pointer size: 132 Bytes
  • Size of remote file: 1.75 MB
haruka/example-002-v1b.png ADDED

Git LFS Details

  • SHA256: a82f74cf1b9d2664e84b4e322984348f7b36068b43a5acc55f2367dc735059c8
  • Pointer size: 132 Bytes
  • Size of remote file: 1.78 MB
haruka/example-003-v1b.png ADDED

Git LFS Details

  • SHA256: 4c73af9b6717c460d41eaf9dbb09b8da9eeabe9f6b002ef4bbc77a01495f1221
  • Pointer size: 132 Bytes
  • Size of remote file: 1.82 MB
haruka/lora_chara_haruka_v1b_138i9r-5i4r.json ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "pretrained_model_name_or_path": "G:/sd/repo/models/Stable-diffusion/nai-animefull-final-pruned.safetensors",
3
+ "v2": false,
4
+ "v_parameterization": false,
5
+ "logging_dir": "",
6
+ "train_data_dir": "G:/sd/training/datasets/haruka/dataset",
7
+ "reg_data_dir": "",
8
+ "output_dir": "G:/sd/lora/trained/chara/haruka",
9
+ "max_resolution": "832,832",
10
+ "learning_rate": "1e-5",
11
+ "lr_scheduler": "constant_with_warmup",
12
+ "lr_warmup": "5",
13
+ "train_batch_size": 3,
14
+ "epoch": "4",
15
+ "save_every_n_epochs": "",
16
+ "mixed_precision": "fp16",
17
+ "save_precision": "fp16",
18
+ "seed": "31337",
19
+ "num_cpu_threads_per_process": 32,
20
+ "cache_latents": true,
21
+ "caption_extension": ".txt",
22
+ "enable_bucket": true,
23
+ "gradient_checkpointing": false,
24
+ "full_fp16": false,
25
+ "no_token_padding": false,
26
+ "stop_text_encoder_training": 0,
27
+ "use_8bit_adam": true,
28
+ "xformers": true,
29
+ "save_model_as": "safetensors",
30
+ "shuffle_caption": true,
31
+ "save_state": false,
32
+ "resume": "",
33
+ "prior_loss_weight": 1.0,
34
+ "text_encoder_lr": "1.5e-5",
35
+ "unet_lr": "1.5e-4",
36
+ "network_dim": 128,
37
+ "lora_network_weights": "",
38
+ "color_aug": false,
39
+ "flip_aug": false,
40
+ "clip_skip": 2,
41
+ "gradient_accumulation_steps": 1.0,
42
+ "mem_eff_attn": false,
43
+ "output_name": "chara-haruka-v1b-128",
44
+ "model_list": "",
45
+ "max_token_length": "150",
46
+ "max_train_epochs": "",
47
+ "max_data_loader_n_workers": "",
48
+ "network_alpha": 128,
49
+ "training_comment": "Character: `haruka, 1girl, halo, short hair with long locks, purple eyes`\nStandard outfit: `hairclip, garrison cap, purple jacket, collared shirt, black skirt, miniskirt, black belt, boots`\nNew Year alt: `kimono skirt, purple kimono, floral print, purple hairband, hair flower, wide sleeves, obi, geta, tabi`\nNervous expression: `nervous, sweat, wavy mouth`\nVaguely yandere-like smile: `naughty face, nervous smile`\nFlustered: `sanpaku, wide-eyed, shaded face, flustered`\n\nNot all tags are necessary.\n\n(138 normal * 9 repeats + 5 multipleviews * 4 repeats) / 3 batch size * 4 epochs = 1683 steps",
50
+ "keep_tokens": 2,
51
+ "lr_scheduler_num_cycles": "",
52
+ "lr_scheduler_power": "",
53
+ "persistent_data_loader_workers": true,
54
+ "bucket_no_upscale": true,
55
+ "random_crop": false,
56
+ "bucket_reso_steps": 64.0,
57
+ "caption_dropout_every_n_epochs": 0.0,
58
+ "caption_dropout_rate": 0
59
+ }
haruka/tagging methodology.md ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Tagging methodology for Haruka (blue archive)
2
+
3
+ Start with WD1.4 Swinv2 at ~0.25-0.3 confidence.
4
+
5
+ - Tag unique features
6
+ - ie. `halo` / `demon horns` / `low wings`
7
+ - Remove when not present or out of view. WD1.4 likes putting `halo` even on images where no halo is visible.
8
+ - Tag outfit variants with a single master tag
9
+ - ie. for Haruka:
10
+ - Uniform: `school uniform`
11
+ - NY Alt: `japanese clothes`
12
+ - Add `official alternate costume`
13
+ - Non-canon costumes
14
+ - Add `alternate costume`
15
+ - Nudity (WD1.4 usually does this accurately)
16
+ - `nude` / `completely nude`
17
+ - Prune eye colors
18
+ - Keep tags which describe unusual eye features (`multicolored eyes`, `heterochromia`, `slit pupils`) as they can otherwise be too subtle and inconsistently drawn for the AI to learn
19
+ - Prune hair colors
20
+ - This includes `two-toned hair`, `gradiant hair`, etc. The AI learns all of these very consistently without the tags, likely because artists tend to draw them consistently
21
+ - Partially prune hair styles
22
+ - Leave key style tags like `twintails`, `ponytail`, `short hair with long locks`.
23
+ - Prune exceedingly common tags like `bangs`, `eyebrows visible through hair`, `hair between eyes`, etc.
24
+ - Prune length, except for images which differ from the character's usual length
25
+ - Add `alternate hairstyle` and/or `alternate hair length` for these
26
+ - Fixup hair ornaments
27
+ - Prune generic `hair ornament` in favor of more specificity
28
+ - `hairclip` / `black headband` / `hair flower` / `hair ribbon`, etc.
29
+ - Consolidate tags that have color variants (`headband` >> `black headband`)
30
+ - Consolidate outfits
31
+ - Only tag an item when it is actually visible. If it is only barely visible along the edge of an image, keep in mind it may be cropped during bucketing.
32
+ - Danbooru's wiki entry for a character often provides a good list of tags commonly used to describe a character's outfits.
33
+ - Haruka outfits:
34
+ - Uniform
35
+ - `garrison cap`
36
+ - `miniskirt`
37
+ - `pleated skirt`
38
+ - `black skirt`
39
+ - `boots`
40
+ - `hairclip`
41
+ - `juliet sleeves`
42
+ - `black belt`
43
+ - `red shirt`
44
+ - `collared shirt`
45
+ - `purple jacket`
46
+ - NY Alt
47
+ - `frilled kimono`
48
+ - `purple kimono`
49
+ - `kimono skirt`
50
+ - `floral print`
51
+ - `purple hairband`
52
+ - `hair flower`
53
+ - `wide sleeves`
54
+ - `obi`
55
+ - `geta`
56
+ - `tabi`
57
+ - Fixup sleeves
58
+ - ie. `long sleeves` / `puffy long sleeves` / `detached sleeves` / `off shoulder`
59
+ - You only need one, but pick one and be consistent. If sleeves aren't tagged properly the tends to add them inappropriately (such as when prompting for sleeveless outfits or nudity)
60
+ - Fixup collars
61
+ - ie. `detached dollar` / `collared shirt` / `choker` / etc.
62
+ - Same deal as sleeves, they tend to appear when unwanted if not consistently tagged according to visibility in the training data.
63
+ - Tag expressions
64
+ - WD1.4 rarely tags these, but doing them manually can help the AI reproduce a character's iconic expressions well.
65
+ - Start by searching for images without one of these, and add them.
66
+ - `open mouth`
67
+ - `closed mouth`
68
+ - `parted lips`
69
+ - Add less common expressions
70
+ - `wavy mouth`
71
+ - `surprised` / `o_o`
72
+ - `embarrassed` / `flustered` / `panicked` / `swirly eyes` / `@_@`
73
+ - `smile` / `light smile` / `:d`
74
+ - `upset` / `annoyed` / `frustrated`
75
+ - `naughty face` / `seductive smile`
76
+ - `smug` / `:3`
77
+ - `eyes closed` / `one eye closed`
78
+ - WD1.4 usually gets these for you.
79
+ - Tag camera angles/composition
80
+ - `cowboy shot`
81
+ - `upper body`
82
+ - `full body`
83
+ - `portrait`
84
+ - `cropped torso` / `cropped legs`
85
+ - `feet out of frame`
86
+ - `from side` / `from above` / `from below` / `from behind`
87
+ - Tag iconic poses/actions
88
+ - ie. `v` / `standing on one leg`
89
+ - Haruka
90
+ - `object hug`
91
+ - `holding weapon`
92
+ - Flip through each image and use Hydrus's "related tags" feature to quickly identify important tags that might be missing.
93
+ - This feature looks at other images with similar tags to provide suggestions.