kneiff commited on
Commit
a860588
·
1 Parent(s): 0a96502

add NOOB config

Browse files
Files changed (1) hide show
  1. configs/NOOB.knf.yaml +309 -0
configs/NOOB.knf.yaml ADDED
@@ -0,0 +1,309 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ==============================================================
2
+ # == Directories
3
+ # ==============================================================
4
+
5
+
6
+ # > Dataset sync derives SOURCE/, MANIFEST.knf.xlsx, and HF/<config-id>/ from this filename.
7
+
8
+ # -- Map exported subset names to source subfolders in MANIFEST.knf.xlsx.
9
+ mappings:
10
+ # > Anchor identity examples get sampled at a lower probability below.
11
+ felkin_anchor:
12
+ - "0-ANCHOR" # Source folder for anchor identity images.
13
+ # > Explicit anatomy close-up subsets are kept separate for sampling control.
14
+ genitals:
15
+ - "6-DICK" # Source folder for exposed anatomy close-ups.
16
+ - "6-SHEATH" # Source folder for sheathed anatomy close-ups.
17
+ # > Complete body.
18
+ fullbody:
19
+ - "0-FULLBODY" # Full-body identity examples; also included in rest subset.
20
+ - "99-VERSION-LEANER" # Alternate leaner full-body examples.
21
+ # > General body, hand, leg, tail, and leaner variant images.
22
+ body_details:
23
+ - "1-TORSO" # Torso detail examples.
24
+ - "3-HANDS" # Hand detail examples.
25
+ - "4-LEGS" # Leg/foot detail examples.
26
+ - "5-TAIL" # Tail detail examples.
27
+ # > Focused fur-texture crops derived from high-resolution Rook sources.
28
+ fur:
29
+ - "7-FUR" # Fur crops for coat, mane, spots, paws, tail, and anatomy-adjacent texture.
30
+ head:
31
+ - "2-HEAD" # Face/head detail examples.
32
+
33
+ # > Also export manifest rows marked sfw into an additional generated sfw subset.
34
+ export_sfw_subset: false # < Keep NOOB focused on the explicit mapped subsets.
35
+
36
+ # ==============================================================
37
+ # == Images
38
+ # ==============================================================
39
+
40
+ # Export-time mirroring writes fixed extra image/caption pairs before
41
+ # SimpleTuner sees the dataset. flip_only keeps kneifftools from applying its
42
+ # own random crop, rotation, or color jitter.
43
+ augmentations:
44
+ mirrored_extra: true # Add one mirrored copy per selected source image.
45
+ mirrored_transform: flip_only # Exact horizontal mirror, no kneifftools crop/jitter.
46
+ seed: 12345 # Makes mirrored export naming deterministic.
47
+
48
+ # Export image area bounds before SimpleTuner sees the dataset.
49
+ image_resize:
50
+ min_pixel_area: 512 # Upscale tiny images below roughly 512x512 area.
51
+ max_pixel_area: 1024 # Downscale large images above roughly 1024x1024 area.
52
+
53
+ # ==============================================================
54
+ # == Captions
55
+ # ==============================================================
56
+
57
+ # Controlled caption rendering context used by all generated sidecars.
58
+ caption:
59
+ subject_sex: male # Adds male subject wording to prose renderers.
60
+ add_domains_to_tags: false # SDXL tag captions should stay plain, not domain-prefixed.
61
+
62
+ # NOOB uses SDXL-style tag captions. Use one .txt sidecar per image so
63
+ # SimpleTuner's textfile strategy reads the intended caption directly.
64
+ caption_outputs:
65
+ mode: hybrid_txt # One .txt sidecar per image containing selected formats.
66
+ formats: [tag] # Tag-only captions for NOOB/SDXL training.
67
+ tag_scope: all # Keep the full tag tail, including identity and anatomy tags.
68
+
69
+ # Optional per-subset caption output overrides. Keep commented unless a subset
70
+ # needs different caption files or formats.
71
+ # caption_outputs_overrides:
72
+ # felkin_anchor:
73
+ # mode: hybrid_txt
74
+ # formats: [tag]
75
+ # tag_scope: all
76
+ # genitals:
77
+ # mode: hybrid_txt
78
+ # formats: [tag]
79
+ # tag_scope: all
80
+ # fullbody:
81
+ # mode: hybrid_txt
82
+ # formats: [tag]
83
+ # tag_scope: all
84
+ # body_details:
85
+ # mode: hybrid_txt
86
+ # formats: [tag]
87
+ # tag_scope: all
88
+ # fur:
89
+ # mode: hybrid_txt
90
+ # formats: [tag]
91
+ # tag_scope: all
92
+ # head:
93
+ # mode: hybrid_txt
94
+ # formats: [tag]
95
+ # tag_scope: all
96
+ # sfw:
97
+ # mode: hybrid_txt
98
+ # formats: [tag]
99
+ # tag_scope: all
100
+
101
+ # ==============================================================
102
+ # == Publishing
103
+ # ==============================================================
104
+
105
+ publishing:
106
+ huggingface:
107
+ enabled: true # Generate dataset-card metadata during dataset sync.
108
+ repo_id: null # Optional Hugging Face dataset repo id.
109
+ pretty_name: Rook NOOB SDXL LoRA # Human-readable dataset-card base title.
110
+ version: null # Public dataset version label.
111
+ optimized_for_model: Willys Noob Realism Core V1 # Rendered as [For Willys Noob Realism Core V1].
112
+ license: null # Optional dataset license.
113
+ tags: [sdxl, noob, lora] # Dataset-card tags.
114
+ provenance: null # Optional dataset provenance note.
115
+ adult_content: false # Render the adult-content notice in README.md.
116
+ notes: null # Optional free-form dataset-card notes.
117
+
118
+ # ==============================================================
119
+ # == LoRA Training
120
+ # ==============================================================
121
+
122
+ training:
123
+ enabled: true # Enables kneifftools training artifact generation.
124
+ backend: simpletuner # Selects the SimpleTuner LoRA backend.
125
+
126
+ simpletuner:
127
+ enabled: true # Optional backend-specific switch; defaults to enabled.
128
+
129
+ # -- Generated artifact filenames written into TRAINING/<config-id>_<run>.
130
+ config_filename: simpletuner-config.json # Top-level SimpleTuner config.
131
+ data_backend_filename: simpletuner-multidatabackend.json # Multi-databackend config.
132
+
133
+ # Generated cache/output directories. Relative paths resolve below TRAINING/<config-id>_<run>.
134
+ cache_root: .simpletuner-cache # Shared model, text, and VAE cache root.
135
+ output_dir: _simpletuner-output # Normal full-run checkpoint output dir.
136
+
137
+ # Subset-specific SimpleTuner dataloader overrides. Any key here is merged
138
+ # into the subset backend entry after the dataset defaults below.
139
+ subsets:
140
+ felkin_anchor:
141
+ probability: 1 # Sample anchor identity images at steady exposure.
142
+ crop: false # Preserve full source composition.
143
+ # repeats: 0 # Optional per-subset repeat count.
144
+ # disabled: false # Optional per-subset on/off switch.
145
+ fullbody:
146
+ probability: 8 # Sample full-body subset at high probability.
147
+ crop: false # Preserve full-body composition.
148
+ # repeats: 0
149
+ # disabled: false
150
+ body_details:
151
+ probability: 4 # Sample body detail subset at normal probability.
152
+ crop: false # Preserve detail framing; many samples are already close crops.
153
+ # repeats: 0
154
+ # disabled: false
155
+ fur:
156
+ probability: 1 # Give focused fur crops extra exposure.
157
+ crop: false # Preserve texture crop intent; do not random-crop fur samples.
158
+ # repeats: 0
159
+ # disabled: false
160
+ head:
161
+ probability: 2 # Sample head/face details at extra exposure.
162
+ crop: false # Preserve detail framing; many samples are close crops.
163
+ genitals:
164
+ probability: 4 # Sample anatomy subset at normal probability.
165
+ crop: false # Preserve anatomy crop framing.
166
+ # repeats: 0
167
+ # disabled: false
168
+
169
+ # Dataset backend defaults copied into every image subset entry.
170
+ dataset:
171
+ type: local # SimpleTuner local filesystem backend.
172
+ dataset_type: image # Image dataset backend, not text embeds.
173
+ resolution: 1024 # Target area edge; pixel_area means 1024^2 area.
174
+ minimum_image_size: 512 # SimpleTuner lower bound for SDXL image handling.
175
+ maximum_image_size: 1024 # Upper bound for input image sizing.
176
+ target_downsample_size: 1024 # Downsample target for cache generation.
177
+ resolution_type: pixel_area # Area-based buckets, not smaller-edge resize.
178
+ caption_strategy: textfile # Read captions from exported .txt sidecars.
179
+ metadata_backend: discovery # Discover images/captions from directories.
180
+ crop: false # Default only; every configured subset disables crop above.
181
+ crop_style: random # Inert for crop:false subsets.
182
+ crop_aspect: preserve # Preserve original aspect instead of square crop.
183
+ repeats: 0 # Dataset-level repeat count; subset can override.
184
+ disabled: false # Dataset-level backend switch.
185
+
186
+ # Optional shared text-embedding backend overrides. Commented keys show the
187
+ # kneifftools-owned defaults for the generated text_embeds backend.
188
+ text_embeds:
189
+ id: text-embeds # Backend id used by SimpleTuner.
190
+ type: local # Store embeddings on local filesystem.
191
+ dataset_type: text_embeds
192
+ default: true # Marks this as the shared embedding backend.
193
+ # cache_dir: .simpletuner-cache/text # Override generated text cache dir.
194
+ disabled: false
195
+
196
+ # Generate a SimpleTuner user_prompt_library JSON from manifest-sampled tag
197
+ # prompts plus a few stable NOOB probes.
198
+ validation_prompts:
199
+ enabled: true
200
+ filename: simpletuner-validation-prompts.json
201
+ positive_prefix: "masterpiece, best quality, newest, "
202
+ from_manifest:
203
+ profile: tag
204
+ seed: 42
205
+ activation_token: Rook_Kaefer
206
+ species_token: felkin
207
+ negative_control_species: wolf
208
+ custom:
209
+ noob_safe_portrait: "Rook_Kaefer, felkin, fur, red fur, black spots, spotted fur, fur markings, close-up portrait, detailed lighting"
210
+ noob_safe_fullbody_reference: "Rook_Kaefer, felkin, fur, red fur, black spots, spotted fur, fur markings, musclegut, full-body character reference, standing, solo"
211
+ noob_safe_fur_detail: "Rook_Kaefer, felkin, fur, red fur, black spots, spotted fur, fur markings, musclegut, fur texture reference, mane, tail, paws"
212
+ noob_explicit_anatomy_reference: "Rook_Kaefer, felkin, fur, red fur, black spots, spotted fur, fur markings, musclegut, nude anatomy reference, sheath detail, clean lighting"
213
+
214
+ # Model and LoRA settings merged into the top-level SimpleTuner config.
215
+ model:
216
+ model_type: lora # Train a LoRA adapter.
217
+ model_family: sdxl # Use SimpleTuner's SDXL model family.
218
+ model_flavour: null # Loaded from a local SDXL checkpoint.
219
+ lora_rank: 64 # LoRA rank/capacity.
220
+ lora_alpha: 64 # LoRA alpha scaling.
221
+ lora_type: standard # Standard LoRA, not an alternate adapter type.
222
+ lora_format: diffusers # SDXL LoRA format expected by SimpleTuner for this run.
223
+ flux_lora_target: null # Remove the Flux/Chroma default from generated config.
224
+
225
+ # Converted full SDXL Diffusers directory from the WSL ComfyUI model store.
226
+ pretrained_model_name_or_path: /mnt/wsl/comfyui-models/models/checkpoints/_base_finetunes/willysRealism_coreV1Diffusers
227
+ pretrained_unet_model_name_or_path: null
228
+ pretrained_vae_model_name_or_path: madebyollin/sdxl-vae-fp16-fix
229
+ pretrained_transformer_model_name_or_path: null
230
+ pretrained_t5_model_name_or_path: null
231
+ pretrained_text_encoder_model_name_or_path: null
232
+
233
+ # Precision defaults for SDXL LoRA training.
234
+ base_model_precision: no_change
235
+ base_model_default_dtype: bf16
236
+ mixed_precision: bf16
237
+ # init_lora: /path/to/existing.safetensors # Optional LoRA resume/init weights.
238
+ # lycoris_config: /path/to/lycoris.json # Optional LyCORIS config path.
239
+
240
+ # == Curricular warmup
241
+ subset_warmup:
242
+ enabled: true
243
+ subsets: [fullbody, head]
244
+ steps: 800 # !! First steps of the total run are ONLY listed subsets when enabled!
245
+
246
+ # Full-run trainer config. trainer_testrun below overrides selected keys
247
+ # only when knf train prepare/start is called with --testrun.
248
+ trainer:
249
+ # tracker_project_name: kneifftools-lora-training # Experiment tracker project.
250
+ # tracker_run_name: ladybird-noob # Full-run tracker name.
251
+ # hub_model_id: ladybird-noob-lora # Optional Hub model id if push_to_hub is enabled.
252
+
253
+ optimizer: adamw_bf16 # BF16 AdamW optimizer.
254
+ learning_rate: 0.0002 # SDXL LoRA learning rates fall between 1e-4 and 5e-4
255
+ lr_scheduler: constant_with_warmup # Ramp up LR to avoid weird color biases.
256
+ lr_warmup_steps: 100
257
+ seed: 42 # Training seed.
258
+ gradient_checkpointing: true # Reduce VRAM by recomputing activations.
259
+ # max_grad_norm: 1.0 # Optional gradient clipping.
260
+ # grad_clip_method: norm # Optional gradient clipping method.
261
+
262
+ train_batch_size: 4 # Per-device batch size.
263
+ gradient_accumulation_steps: 1 # Effective batch multiplier.
264
+ num_train_epochs: 0 # Step-based training; max_train_steps controls run length.
265
+ max_train_steps: 2500 # Current short SDXL run length.
266
+
267
+ caption_dropout_probability: 0.0 # Caption dropout for regularization.
268
+ data_backend_sampling: uniform # Uniform dataloader sampling.
269
+ allow_dataset_oversubscription: true
270
+
271
+ push_to_hub: false # Upload final artifacts to Hugging Face Hub.
272
+ push_checkpoints_to_hub: false # Upload intermediate checkpoints.
273
+ # checkpoints_total_limit: 5 # Keep latest 5 checkpoints.
274
+ checkpoint_step_interval: 200 # Save checkpoint every 200 steps.
275
+ validation_step_interval: 200 # Run validation every 200 steps.
276
+ # validation_on_startup: true # Render baseline validation before training.
277
+ validation_prompt_library: false # Disable SimpleTuner built-in prompt library.
278
+ validation_disable_unconditional: true # Skip unconditional validation branch.
279
+ validation_resolution: 1024x1024 # Validation image size.
280
+ validation_num_inference_steps: 30 # Full-run validation sampling steps.
281
+ validation_guidance_real: 7.5 # SDXL validation guidance.
282
+ # validation_guidance: 5.0 # Alternative CFG field for some SimpleTuner versions.
283
+ # validation_guidance_rescale: 0.0 # Guidance rescale; 0 disables rescale.
284
+ # validation_seed: 42 # Deterministic validation seed.
285
+ num_eval_images: 1 # Images per validation prompt.
286
+ # validation_negative_prompt: "signature, ugly, cropped, blurry, low-quality"
287
+
288
+ report_to: none # Set to tensorboard to write TensorBoard logs.
289
+ # logging_dir: logs # TensorBoard log dir relative to TRAINING/<config-id>_<run>.
290
+
291
+ # Additional kneifftools-owned SimpleTuner defaults. Leave commented to
292
+ # use defaults from src/kneiff/training/lora/simpletuner.py.
293
+ use_ema: false
294
+ vae_batch_size: 1
295
+ aspect_bucket_alignment: 64
296
+ tokenizer_max_length: 77
297
+ t5_padding: null
298
+ fully_unload_text_encoder: true
299
+ offload_during_startup: true
300
+ keep_vae_loaded: false
301
+ resume_from_checkpoint: null
302
+
303
+ # Short smoke-run overrides. These merge last only with --testrun.
304
+ trainer_testrun:
305
+ output_dir: _simpletuner-output-testrun # Keep smoke checkpoints away from full run.
306
+ max_train_steps: 4 # Tiny run to verify plumbing.
307
+ checkpoint_step_interval: 100 # Avoid extra smoke checkpoints.
308
+ validation_step_interval: 4 # Validate at the end of the smoke run.
309
+ ignore_final_epochs: true # Fix early stop due to SimpleTuner epoch calculation.