kneiff commited on
Commit
7cd2fd4
·
1 Parent(s): 4715655

validation prompts

Browse files
Files changed (1) hide show
  1. configs/KREA2.knf.yaml +217 -0
configs/KREA2.knf.yaml ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ==============================================================
2
+ # == Krea 2 Raw — Rook LoRA
3
+ # ==============================================================
4
+
5
+ # -- Map exported subset names to source subfolders in MANIFEST.knf.xlsx.
6
+ mappings:
7
+ felkin_anchor:
8
+ - "0-ANCHOR"
9
+ genitals:
10
+ - "6-DICK"
11
+ - "6-SHEATH"
12
+ fullbody:
13
+ - "0-FULLBODY"
14
+ - "99-VERSION-LEANER"
15
+ body_details:
16
+ - "1-TORSO"
17
+ - "3-HANDS"
18
+ - "4-LEGS"
19
+ - "5-TAIL"
20
+ fur:
21
+ - "7-FUR"
22
+ head:
23
+ - "2-HEAD"
24
+
25
+ export_sfw_subset: false
26
+
27
+ # ==============================================================
28
+ # == Images and captions
29
+ # ==============================================================
30
+
31
+ augmentations:
32
+ mirrored_extra: true
33
+ mirrored_transform: flip_only
34
+ seed: 12345
35
+
36
+ image_resize:
37
+ min_pixel_area: 512
38
+ max_pixel_area: 1024
39
+
40
+ caption:
41
+ subject_sex: male
42
+ add_domains_to_tags: false
43
+
44
+ # > Krea 2 uses a Qwen-style text stack, so retain the established prose captions.
45
+ caption_outputs:
46
+ mode: hybrid_txt
47
+ formats: [nlg]
48
+ tag_scope: supplemental
49
+
50
+ publishing:
51
+ huggingface:
52
+ pretty_name: Ladybug Felkin
53
+ version: v5.5-krea2
54
+ optimized_for_model: Krea 2 Raw
55
+ tags: [krea2, krea-2-raw, lora, diffusion-training, image-captioning]
56
+ adult_content: true
57
+
58
+ # ==============================================================
59
+ # == LoRA training
60
+ # ==============================================================
61
+
62
+ training:
63
+ enabled: true
64
+ backend: simpletuner
65
+
66
+ simpletuner:
67
+ # > Keep ANIMA's intentional balance of identity, body, and detail images.
68
+ subsets:
69
+ felkin_anchor:
70
+ probability: 1
71
+ crop: false
72
+ fullbody:
73
+ probability: 8
74
+ crop: false
75
+ body_details:
76
+ probability: 4
77
+ crop: false
78
+ fur:
79
+ probability: 1
80
+ crop: false
81
+ head:
82
+ probability: 2
83
+ crop: false
84
+ genitals:
85
+ probability: 3
86
+ crop: false
87
+
88
+ # > These limits, rather than a top-level resolution alone, control Krea 2 input sizing.
89
+ dataset:
90
+ type: local
91
+ dataset_type: image
92
+ resolution: 1024
93
+ minimum_image_size: 512
94
+ maximum_image_size: 1024
95
+ target_downsample_size: 1024
96
+ resolution_type: pixel_area
97
+ caption_strategy: textfile
98
+ metadata_backend: discovery
99
+ crop: false
100
+ crop_style: center
101
+ crop_aspect: preserve
102
+
103
+ # > Keep exactly two ANIMA-derived probes: face identity and explicit anatomy.
104
+ validation_prompts:
105
+ enabled: true
106
+ custom:
107
+ krea2_portrait: "Rook_Kaefer, a male felkin character, close-up portrait, detailed expressive face, black and red fur markings, soft studio lighting, clean illustration."
108
+ krea2_anatomy_reference: "Rook_Kaefer, a nude male felkin character, genitalia fully sheathed, clean lighting, neutral reference pose, detailed illustration."
109
+ from_manifest:
110
+ enabled: true
111
+ seed: 42
112
+ profile: nlg
113
+ from_prompts:
114
+ caption_styles: [nlg]
115
+
116
+
117
+ model:
118
+ model_type: lora
119
+ model_family: krea2
120
+ model_flavour: raw
121
+ pretrained_model_name_or_path: krea/Krea-2-Raw
122
+
123
+ lora_rank: 64
124
+ lora_alpha: 64
125
+ lora_type: standard
126
+
127
+ # > Save standard PEFT/Diffusers keys. ComfyUI maps these native Krea 2
128
+ # > Q/K/V/O adapters directly; fused QKV adapter keys would not load there.
129
+ lora_format: diffusers
130
+ fuse_qkv_projections: false
131
+ flux_lora_target: null
132
+
133
+ # > The official Diffusers base downloads on first training start. Do not
134
+ # > point this run at the separate local ComfyUI FP8 checkpoint.
135
+ pretrained_transformer_model_name_or_path: null
136
+ pretrained_transformer_subfolder: null
137
+ pretrained_unet_model_name_or_path: null
138
+ pretrained_vae_model_name_or_path: null
139
+ pretrained_t5_model_name_or_path: null
140
+ pretrained_text_encoder_model_name_or_path: null
141
+
142
+ # > Int8 base weights with BF16 LoRA weights lower the 1024px VRAM requirement.
143
+ base_model_precision: int8-torchao
144
+ base_model_default_dtype: bf16
145
+ mixed_precision: bf16
146
+ quantize_via: cpu
147
+
148
+ # > Omit Torch compile: it adds substantial VRAM and is not needed for batch 1.
149
+ dynamo_backend: null
150
+ dynamo_mode: null
151
+ dynamo_use_regional_compilation: false
152
+
153
+ # > Learn full-body identity and anatomy first, then expose the complete mix.
154
+ curriculum:
155
+ enabled: true
156
+ phases:
157
+ - name: focused_start
158
+ start_step: 0
159
+ subsets: [genitals, fullbody]
160
+ - name: full_mix
161
+ start_step: 400
162
+ subsets: all
163
+
164
+ trainer:
165
+ tracker_project_name: kneifftools-lora-training
166
+ tracker_run_name: ladybird-krea2
167
+ hub_model_id: ladybird-krea2-lora
168
+
169
+ optimizer: optimi-lion
170
+ learning_rate: 0.0001
171
+ lr_scheduler: constant_with_warmup
172
+ lr_warmup_steps: 100
173
+ seed: 42
174
+ gradient_checkpointing: true
175
+ max_grad_norm: 0.01
176
+ grad_clip_method: norm
177
+
178
+ train_batch_size: 1
179
+ gradient_accumulation_steps: 1
180
+ num_train_epochs: 0
181
+ # > A 300-image set reaches roughly four nominal passes at this ceiling;
182
+ # > choose the best 400/600/800/1000/1200-step validation checkpoint.
183
+ max_train_steps: 1200
184
+ ignore_final_epochs: true
185
+
186
+ caption_dropout_probability: 0.0
187
+ data_backend_sampling: auto-weighting
188
+
189
+ checkpoints_total_limit: 4
190
+ checkpoint_step_interval: 200
191
+ validation_step_interval: 200
192
+ disable_benchmark: false
193
+ validation_prompt_library: false
194
+ validation_disable_unconditional: true
195
+ validation_resolution: 1024x1024
196
+ validation_num_inference_steps: 28
197
+ validation_guidance: 4.5
198
+ validation_guidance_real: null
199
+ validation_guidance_rescale: 0.0
200
+ validation_seed: 42
201
+ num_eval_images: 1
202
+ validation_negative_prompt: "worst quality, low quality, blurry, cropped, malformed anatomy"
203
+
204
+ report_to: tensorboard
205
+ logging_dir: logs
206
+ aspect_bucket_alignment: 16
207
+ tokenizer_max_length: 512
208
+ t5_padding: null
209
+
210
+ # > Artifact-only smoke profile: prepare it, but do not launch this run.
211
+ trainer_testrun:
212
+ disable_benchmark: true
213
+ tracker_run_name: ladybird-krea2-testrun
214
+ max_train_steps: 12
215
+ checkpoint_step_interval: 12
216
+ validation_step_interval: 12
217
+ validation_num_inference_steps: 12