| # ============================================================== | |
| # == Directories | |
| # ============================================================== | |
| # > Dataset sync derives SOURCE/, MANIFEST.knf.xlsx, and HF/<config-id>/ from this filename. | |
| # -- Map exported subset names to source subfolders in MANIFEST.knf.xlsx. | |
| mappings: | |
| # > Anchor identity examples get sampled at a lower probability below. | |
| felkin_anchor: | |
| - "0-ANCHOR" # Source folder for anchor identity images. | |
| # > Explicit anatomy close-up subsets are kept separate for sampling control. | |
| genitals: | |
| - "6-DICK" # Source folder for exposed anatomy close-ups. | |
| - "6-SHEATH" # Source folder for sheathed anatomy close-ups. | |
| # > Complete Body | |
| fullbody: | |
| - "0-FULLBODY" # Full-body identity examples; also included in rest subset. | |
| - "99-VERSION-LEANER" # Alternate leaner full-body examples. | |
| # > General identity, body, face, hand, leg, tail, and leaner variant images. | |
| body_details: | |
| - "1-TORSO" # Torso detail examples. | |
| - "3-HANDS" # Hand detail examples. | |
| - "4-LEGS" # Leg/foot detail examples. | |
| - "5-TAIL" # Tail detail examples. | |
| # > Focused fur-texture crops derived from high-resolution Rook sources. | |
| fur: | |
| - "7-FUR" # Fur texture crops for coat, mane, spots, paws, tail, and anatomy-adjacent texture. | |
| head: | |
| - "2-HEAD" # Face/head detail examples. | |
| # > Also export manifest rows marked sfw into an additional generated sfw subset. | |
| export_sfw_subset: false # < Add generated sfw subset from rows marked sfw. | |
| # ============================================================== | |
| # == Images | |
| # ============================================================== | |
| # Export-time mirroring writes fixed extra image/caption pairs before | |
| # SimpleTuner sees the dataset. flip_only keeps kneifftools from applying its | |
| # own random crop, rotation, or color jitter. | |
| augmentations: | |
| mirrored_extra: true # Add one mirrored copy per selected source image. | |
| mirrored_transform: flip_only # Exact horizontal mirror, no kneifftools crop/jitter. | |
| seed: 12345 # Makes mirrored export naming deterministic. | |
| # Export image area bounds before SimpleTuner sees the dataset. Chroma1-Base | |
| # starts from SimpleTuner's 512px Chroma example; validation still renders at 1024. | |
| image_resize: | |
| min_pixel_area: 512 # Upscale tiny images below roughly 512x512 area. | |
| max_pixel_area: 512 # Downscale large images above roughly 512x512 area. | |
| # ============================================================== | |
| # == Captions | |
| # ============================================================== | |
| # Controlled caption rendering context used by all generated sidecars. | |
| caption: | |
| subject_sex: male # Adds male subject wording to prose renderers. | |
| add_domains_to_tags: true # Emits domain tags, e.g. meta:shaded. | |
| # Default caption sidecar layout for every exported subset. | |
| caption_outputs: | |
| mode: hybrid_txt # One .txt sidecar per image containing selected formats. | |
| formats: [chroma] # Chroma-profile single-line captions for Chroma training. | |
| tag_scope: supplemental # Kept explicit for consistency with shipped overlays. | |
| # Optional per-subset caption output overrides. Keep commented unless a subset | |
| # needs different caption files or formats. | |
| # caption_outputs_overrides: | |
| # felkin_anchor: | |
| # mode: hybrid_txt | |
| # formats: [chroma] | |
| # genitals: | |
| # mode: hybrid_txt | |
| # formats: [chroma] | |
| # fullbody: | |
| # mode: hybrid_txt | |
| # formats: [chroma] | |
| # body_details: | |
| # mode: hybrid_txt | |
| # formats: [chroma] | |
| # fur: | |
| # mode: hybrid_txt | |
| # formats: [chroma] | |
| # head: | |
| # mode: hybrid_txt | |
| # formats: [chroma] | |
| # sfw: | |
| # mode: hybrid_txt | |
| # formats: [chroma] | |
| # ============================================================== | |
| # == Publishing | |
| # ============================================================== | |
| publishing: | |
| huggingface: | |
| pretty_name: Ladybug Felkin # Human-readable dataset-card base title. | |
| version: v5.4-chroma-base # Public dataset version label. | |
| optimized_for_model: Chroma1-Base # Rendered as [For Chroma1-Base]. | |
| tags: [chroma, chroma1-base, lora, diffusion-training, image-captioning] | |
| adult_content: true # Render the adult-content notice in README.md. | |
| # ============================================================== | |
| # == LoRA Training | |
| # ============================================================== | |
| training: | |
| enabled: true # Enables kneifftools training artifact generation. | |
| backend: simpletuner # Selects the SimpleTuner LoRA backend. | |
| simpletuner: | |
| # enabled: true # Optional backend-specific switch; defaults to enabled. | |
| # Subset-specific SimpleTuner dataloader overrides. Any key here is merged | |
| # into the subset backend entry after the dataset defaults below. | |
| subsets: | |
| felkin_anchor: | |
| probability: 0.2 # Sample anchor identity images at steady exposure. | |
| crop: false # Preserve full source composition. | |
| # repeats: 0 # Optional per-subset repeat count. | |
| # disabled: false # Optional per-subset on/off switch. | |
| fullbody: | |
| probability: 8 # Sample full-body subset at high probability. | |
| crop: false # Preserve full-body composition. | |
| # repeats: 0 | |
| # disabled: false | |
| body_details: | |
| probability: 4 # Sample body detail subset at normal probability. | |
| crop: false # Preserve detail framing; many samples are already close crops. | |
| # repeats: 0 | |
| # disabled: false | |
| fur: | |
| probability: 1 # Give focused fur crops extra exposure. | |
| crop: false # Preserve texture crop intent; do not random-crop fur samples. | |
| # repeats: 0 | |
| # disabled: false | |
| head: | |
| probability: 2 # Sample head/face details at extra exposure. | |
| crop: false # Preserve detail framing; many samples are close crops. | |
| genitals: | |
| probability: 3 # Sample anatomy subset at normal probability. | |
| crop: false # Preserve anatomy crop framing. | |
| # repeats: 0 | |
| # disabled: false | |
| # Dataset backend defaults copied into every image subset entry. | |
| dataset: | |
| type: local # SimpleTuner local filesystem backend. | |
| dataset_type: image # Image dataset backend, not text embeds. | |
| resolution: 512 # First Chroma1-Base profile follows SimpleTuner's 512px example. | |
| minimum_image_size: 512 # Keep smaller detail/anatomy crops after export upscaling. | |
| maximum_image_size: 512 # Upper bound for input image sizing. | |
| target_downsample_size: 512 # Downsample target for cache generation. | |
| resolution_type: pixel_area # Area-based buckets, not smaller-edge resize. | |
| caption_strategy: textfile # Read captions from exported .txt sidecars. | |
| metadata_backend: discovery # Discover images/captions from directories. | |
| crop: false # Preserve source framing for the Chroma run. | |
| crop_style: center # Inert while crop is false; avoids random-crop defaults. | |
| crop_aspect: preserve # Preserve original aspect instead of square crop. | |
| # repeats: 0 # Dataset-level repeat count; subset can override. | |
| # disabled: false # Dataset-level backend switch. | |
| # Optional shared text-embedding backend overrides. Commented keys show the | |
| # kneifftools-owned defaults for the generated text_embeds backend. | |
| # text_embeds: | |
| # id: text-embeds # Backend id used by SimpleTuner. | |
| # type: local # Store embeddings on local filesystem. | |
| # dataset_type: text_embeds | |
| # default: true # Marks this as the shared embedding backend. | |
| # cache_dir: .simpletuner-cache/text # Override generated text cache dir. | |
| # disabled: false | |
| # Generate a SimpleTuner user_prompt_library JSON from the curated Rook | |
| # showcase prompts plus manifest-derived controls. | |
| validation_prompts: | |
| enabled: true | |
| from_prompts: | |
| caption_styles: [nlg] | |
| from_manifest: | |
| enabled: true | |
| seed: 42 | |
| profile: chroma | |
| # Model and LoRA settings merged into the top-level SimpleTuner config. | |
| model: | |
| model_type: lora # Train a LoRA adapter. | |
| model_family: chroma # Use SimpleTuner's Chroma model family. | |
| model_flavour: base # Chroma1-Base foundation variant. | |
| lora_rank: 64 # LoRA rank/capacity. | |
| lora_alpha: 64 # LoRA alpha scaling. | |
| lora_type: standard # Standard LoRA, not an alternate adapter type. | |
| lora_format: comfyui # Convert output naming/layout for ComfyUI. | |
| flux_lora_target: all # Train all Flux/Chroma LoRA target modules. | |
| # Base Chroma assets. The active transformer is loaded from the HF repo | |
| # because no local Chroma1-Base single-file checkpoint is staged yet. | |
| pretrained_model_name_or_path: lodestones/Chroma1-Base | |
| pretrained_transformer_model_name_or_path: null | |
| pretrained_transformer_subfolder: null | |
| pretrained_vae_model_name_or_path: /mnt/wsl/comfyui-models/models/vae/ae.safetensors | |
| pretrained_t5_model_name_or_path: /mnt/wsl/comfyui-models/models/text_encoders/t5xxl/flanT5XXLTextEncorder_fp16.safetensors | |
| # Precision defaults for Chroma LoRA training. | |
| base_model_precision: no_change | |
| base_model_default_dtype: bf16 | |
| mixed_precision: bf16 | |
| # init_lora: /path/to/existing.safetensors # Optional LoRA resume/init weights. | |
| # lycoris_config: /path/to/lycoris.json # Optional LyCORIS config path. | |
| # == Curriculum | |
| curriculum: | |
| enabled: true | |
| phases: | |
| - name: focused_start | |
| start_step: 0 | |
| subsets: [genitals, fullbody, head] | |
| - name: full_mix | |
| start_step: 1000 # !! From this step onward, all subsets are active. | |
| subsets: all | |
| # Full-run trainer config. trainer_testrun below overrides selected keys | |
| # only when knf lora sync/train is called with --testrun. | |
| trainer: | |
| tracker_project_name: kneifftools-lora-training # Experiment tracker project. | |
| tracker_run_name: ladybird-chroma-base # Full-run tracker name. | |
| hub_model_id: ladybird-chroma-base-lora # Optional Hub model id if push_to_hub is enabled. | |
| optimizer: adamw_bf16 # BF16 AdamW optimizer. | |
| learning_rate: 0.00005 # Conservative Chroma LoRA starting point. | |
| lr_scheduler: constant_with_warmup # ramp up LR to avoid weird color biases. | |
| lr_warmup_steps: 200 | |
| seed: 42 # Training seed. | |
| gradient_checkpointing: true # Reduce VRAM by recomputing activations. | |
| max_grad_norm: 1.0 # Clip gradients for stability. | |
| grad_clip_method: norm # Clip by gradient norm. | |
| train_batch_size: 4 # Per-device batch size. | |
| gradient_accumulation_steps: 1 # Effective batch multiplier. | |
| num_train_epochs: 0 # Step-based training; max_train_steps controls run length. | |
| max_train_steps: 4000 # ANIMA-aligned Chroma character run with extended curriculum. | |
| ignore_final_epochs: true # This fixes early stop due to weird epoch calculation by simpletuner | |
| caption_dropout_probability: 0.0 # Disable caption dropout; keep trigger behavior stable. | |
| data_backend_sampling: auto-weighting # Auto-balance dataloader sampling based on subset probabilities and sizes. | |
| # push_to_hub: false # Upload final artifacts to Hugging Face Hub. | |
| # push_checkpoints_to_hub: false # Upload intermediate checkpoints. | |
| checkpoints_total_limit: 5 # Keep latest 5 checkpoints. | |
| checkpoint_step_interval: 400 # Save checkpoint every 200 steps. | |
| validation_step_interval: 400 # Run validation every 200 steps. | |
| disable_benchmark: false # Render baseline validation before training. | |
| validation_prompt_library: false # Disable SimpleTuner built-in prompt library. | |
| validation_disable_unconditional: true # Skip unconditional validation branch. | |
| validation_resolution: 512x512 # Keep Base validation at native Chroma/Flux image size. | |
| validation_num_inference_steps: 40 # Full-run validation sampling steps. | |
| validation_guidance: 3 # CFG guidance used by validation. | |
| validation_guidance_real: 3 # Chroma/flow guidance-real default. | |
| validation_guidance_rescale: 0.0 # Guidance rescale; 0 disables rescale. | |
| validation_seed: 42 # Deterministic validation seed. | |
| num_eval_images: 1 # Images per validation prompt. | |
| validation_negative_prompt: "signature, worst quality, low quality, score_1, score_2, score_3, artist name" # Shared validation negative prompt. | |
| report_to: tensorboard # Write TensorBoard logs. | |
| logging_dir: logs # TensorBoard log dir relative to TRAINING/<config-id>_<run>. | |
| # Additional kneifftools-owned SimpleTuner defaults. Leave commented to | |
| # use defaults from src/kneiff/training/lora/simpletuner.py. | |
| # use_ema: false | |
| # vae_batch_size: 1 | |
| # data_backend_sampling: uniform | |
| # allow_dataset_oversubscription: true | |
| aspect_bucket_alignment: 64 | |
| tokenizer_max_length: 512 | |
| t5_padding: zero | |
| # fully_unload_text_encoder: true | |
| # offload_during_startup: true | |
| # keep_vae_loaded: false | |
| # resume_from_checkpoint: /path/to/checkpoint | |
| # Short smoke-run overrides. These merge last only with --testrun. | |
| trainer_testrun: | |
| disable_benchmark: true | |
| tracker_run_name: ladybird-chroma-base-testrun # Separate tracker/log name for smoke runs. | |
| max_train_steps: 12 # Tiny run to verify plumbing. | |
| checkpoint_step_interval: 12 # Save at the end of the smoke run. | |
| validation_step_interval: 12 # Validate at the end of the smoke run. | |
| validation_num_inference_steps: 12 # Faster validation for smoke runs. | |