File size: 6,679 Bytes
7cd2fd4 8ab0fc3 7cd2fd4 6b474ba 7cd2fd4 6b474ba 7cd2fd4 8ab0fc3 7cd2fd4 8ab0fc3 7cd2fd4 8ab0fc3 7cd2fd4 68f4580 c8763d3 7cd2fd4 6b474ba 7cd2fd4 6b474ba 7cd2fd4 68f4580 7cd2fd4 68f4580 7cd2fd4 68f4580 7cd2fd4 68f4580 7cd2fd4 8ab0fc3 7cd2fd4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | # ==============================================================
# == 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
|