ai-toolkit icon indicating copy to clipboard operation
ai-toolkit copied to clipboard

distorted faces. What am i doing wrong? it dosnt learn tthe face

Open protector131090 opened this issue 1 year ago • 6 comments

1723823891168__000001500_0 1723661539532__000003750_0 1723788354985__000004250_0

Why am i getting weird distortion in faces? im using 24 vram config. i tried on multiple people datasets (Xl works amazing with them) but Flux dosnt learn them. it distorts faces and overtrains.

protector131090 avatar Aug 16 '24 16:08 protector131090

job: extension config: name: OPA_RANK64 process:

  • type: sd_trainer training_folder: P:\DREAMBOOTH\FLUX\Opa\model device: cuda:0 network: type: lora linear: 64 linear_alpha: 64 save: dtype: float16 save_every: 200 max_step_saves_to_keep: 40 datasets:
    • folder_path: P:\DREAMBOOTH\FLUX\Opa\img caption_ext: txt caption_dropout_rate: 0.05 shuffle_tokens: false cache_latents_to_disk: true resolution:
      • 512
      • 768
      • 1024 train: batch_size: 1 steps: 5000 gradient_accumulation_steps: 1 train_unet: true train_text_encoder: false content_or_style: balanced gradient_checkpointing: true noise_scheduler: flowmatch optimizer: adamw8bit lr: 0.0004 ema_config: use_ema: true ema_decay: 0.99 dtype: bf16 model: name_or_path: S:\ai-toolkit\black-forest-labs\FLUX.1-dev is_flux: true quantize: true sample: sampler: flowmatch sample_every: 250 width: 1024 height: 1024 prompts:
      • 'photo of a 20-year-old woman, medium shot, holding a coffe cup with text: ''OPA'' , and city in the background' neg: '' seed: 42 walk_seed: true guidance_scale: 3 sample_steps: 25 meta: name: OPA_RANK64 version: '1.0'

protector131090 avatar Aug 16 '24 16:08 protector131090

oh wow, that's a strange one. Only thing i can think of is changing the training type to content, see if that works

WarAnakin avatar Aug 16 '24 21:08 WarAnakin

it's probably overcooked, try less steps, 1500-2500 for datset of 15-20 images.

davsharian avatar Aug 17 '24 09:08 davsharian

did you solve this?

try:

linear: 32 # or 16
linear_alpha: 32 # or 16
steps: 2000
linear_timesteps: true

martintomov avatar Aug 18 '24 11:08 martintomov

Are you using webp images? Someone reported a bug with webp images previously. They are currently not officially supported.

jaretburkett avatar Aug 19 '24 03:08 jaretburkett

did you solve this?

try:

linear: 32 # or 16
linear_alpha: 32 # or 16
steps: 2000
linear_timesteps: true

yes. Lower the rank the better. Rank 16 with same dataset is perfect. 1024 only is even better

protector131090 avatar Aug 22 '24 14:08 protector131090