# ============================================================== # == Krea 2 Raw — Rook LoRA # ============================================================== # -- Map exported subset names to source subfolders in MANIFEST.knf.xlsx. mappings: felkin_anchor: - "0-ANCHOR" genitals: - "6-DICK" - "6-SHEATH" fullbody: - "0-FULLBODY" - "99-VERSION-LEANER" body_details: - "1-TORSO" - "3-HANDS" - "4-LEGS" - "5-TAIL" fur: - "7-FUR" head: - "2-HEAD" export_sfw_subset: false # ============================================================== # == Images and captions # ============================================================== augmentations: mirrored_extra: true mirrored_transform: flip_only seed: 12345 image_resize: min_pixel_area: 512 max_pixel_area: 768 caption: subject_sex: male add_domains_to_tags: false # > Krea 2 uses a Qwen-style text stack, so retain the established prose captions. caption_outputs: mode: hybrid_txt formats: [nlg] tag_scope: supplemental publishing: huggingface: pretty_name: Ladybug Felkin version: v5.5-krea2 optimized_for_model: Krea 2 Raw tags: [krea2, krea-2-raw, lora, diffusion-training, image-captioning] adult_content: true # ============================================================== # == LoRA training # ============================================================== training: enabled: true backend: simpletuner simpletuner: # > Keep ANIMA's intentional balance of identity, body, and detail images. subsets: felkin_anchor: probability: 1 crop: false fullbody: probability: 4 crop: false repeats: 1 # !! doubled once. This keeps buckets at least 4 body_details: probability: 4 crop: false fur: probability: 1 crop: false head: probability: 2 crop: false genitals: probability: 3 crop: false # > These limits, rather than a top-level resolution alone, control Krea 2 input sizing. dataset: type: local dataset_type: image resolution: 768 minimum_image_size: 512 maximum_image_size: 768 target_downsample_size: 768 resolution_type: pixel_area caption_strategy: textfile metadata_backend: discovery crop: false crop_style: center crop_aspect: preserve # > Keep exactly two prompts from ANIMA: face identity and explicit anatomy. validation_prompts: enabled: true custom: portrait: "Rook_Kaefer, a male felkin character, close-up portrait, detailed expressive face, black and red fur markings, soft studio lighting, clean illustration." sheath: "Rook_Kaefer, a nude male felkin character, fully sheathed genitalia, clean lighting, neutral reference pose, detailed illustration." penis: "Rook_Kaefer, a nude male felkin character, erect penis is knotted and flared, clean lighting, neutral reference pose, detailed illustration." from_manifest: enabled: true seed: 42 profile: nlg # from_prompts: # caption_styles: [nlg] model: model_type: lora model_family: krea2 model_flavour: raw pretrained_model_name_or_path: krea/Krea-2-Raw lora_rank: 64 lora_alpha: 64 lora_type: standard # > Save standard PEFT/Diffusers keys. ComfyUI maps these native Krea 2 # > Q/K/V/O adapters directly; fused QKV adapter keys would not load there. lora_format: diffusers fuse_qkv_projections: false flux_lora_target: null # > The official Diffusers base downloads on first training start. Do not # > point this run at the separate local ComfyUI FP8 checkpoint. pretrained_transformer_model_name_or_path: null pretrained_transformer_subfolder: null pretrained_unet_model_name_or_path: null pretrained_vae_model_name_or_path: null pretrained_t5_model_name_or_path: null pretrained_text_encoder_model_name_or_path: null # > Int8 base weights with BF16 LoRA weights lower the 1024px VRAM requirement. base_model_precision: int8-torchao base_model_default_dtype: bf16 mixed_precision: bf16 quantize_via: cpu # > Omit Torch compile: it adds substantial VRAM and is not needed for batch 1. dynamo_backend: null dynamo_mode: null dynamo_use_regional_compilation: false # > Learn full-body identity and anatomy first, then expose the complete mix. curriculum: enabled: true phases: - name: focus_dick start_step: 0 subsets: [genitals, fullbody] - name: focus_head start_step: 400 subsets: [head, fullbody] - name: full_mix start_step: 600 subsets: all trainer: tracker_project_name: kneifftools-lora-training tracker_run_name: ladybird-krea2 hub_model_id: ladybird-krea2-lora optimizer: optimi-lion learning_rate: 0.0001 lr_scheduler: constant_with_warmup lr_warmup_steps: 100 seed: 42 gradient_checkpointing: true max_grad_norm: 0.01 grad_clip_method: norm train_batch_size: 1 gradient_accumulation_steps: 4 num_train_epochs: 0 # > A 300-image set reaches roughly four nominal passes at this ceiling; # > choose the best 400/600/800/1000/1200-step validation checkpoint. max_train_steps: 1200 ignore_final_epochs: true caption_dropout_probability: 0.0 data_backend_sampling: auto-weighting checkpoints_total_limit: 3 checkpoint_step_interval: 200 validation_step_interval: 200 disable_benchmark: false validation_prompt_library: false validation_disable_unconditional: true validation_resolution: 768x768 validation_num_inference_steps: 28 validation_guidance: 4.5 validation_guidance_real: null validation_guidance_rescale: 0.0 validation_seed: 42 num_eval_images: 1 validation_negative_prompt: "worst quality, low quality, blurry, cropped, malformed anatomy" report_to: tensorboard logging_dir: logs aspect_bucket_alignment: 16 tokenizer_max_length: 512 t5_padding: null # > Artifact-only smoke profile: prepare it, but do not launch this run. trainer_testrun: disable_benchmark: true tracker_run_name: ladybird-krea2-testrun max_train_steps: 12 checkpoint_step_interval: 12 validation_step_interval: 12 validation_num_inference_steps: 12