Style Training for StableDiffusion with DreamBooth and Automatic1111

Описание к видео Style Training for StableDiffusion with DreamBooth and Automatic1111

Welcome to this new tutorial. Today, we will see how to train a specific style on a Stablediffusion model. We will be using the Dreambooth extension for Automatic1111. All of this can be done on your home PC.

Workflow

1. Install Dreambooth Extension
2. Restart Automatic1111
3. Check in command line if there are issues with requirements.txt
4. In case of issues you can check at https://github.com/d8ahazard/sd_dream... because you may need to change requirements.txt
5. Create a Copy of Checkpoint starting from one you like
6. pepare ~100 images and descriptions (total ~200 files) with the style you desire. Image size must match model training size. For SD 1.5 it's 512x512. Use copyright-free image.
7. filename should be like "036@A Woman Sitting in a Park in the style of XXX" (replace XXX with your trained style)
8. Use parameters in the video (also below) to much ~10000 steps
9. Train
10. Have fun. Remember to use in the style of XXX in your prompt

Parameters :

{
"adamw_weight_decay": 0.01,
"adaptation_beta1": 0,
"adaptation_beta2": 0,
"adaptation_d0": 1e-08,
"adaptation_eps": 1e-08,
"attention": "xformers",
"cache_latents": false,
"clip_skip": 1,
"concepts_list": [
{
"class_data_dir": "",
"class_guidance_scale": 7.5,
"class_infer_steps": 40,
"class_negative_prompt": "",
"class_prompt": "",
"class_token": "in the style of NealAdams",
"instance_data_dir": "G:\\Download\\Neal Adams 512",
"instance_prompt": "",
"instance_token": "NealAdams",
"is_valid": true,
"n_save_sample": 1,
"num_class_images_per": 0,
"sample_seed": -1,
"save_guidance_scale": 7.5,
"save_infer_steps": 20,
"save_sample_negative_prompt": "",
"save_sample_prompt": "[filewords]",
"save_sample_template": ""
}
],
"concepts_path": "",
"custom_model_name": "",
"noise_scheduler": "DDPM",
"deterministic": false,
"ema_predict": false,
"epoch": 125,
"epoch_pause_frequency": 0,
"epoch_pause_time": 0,
"freeze_clip_normalization": false,
"gradient_accumulation_steps": 1,
"gradient_checkpointing": false,
"gradient_set_to_none": true,
"graph_smoothing": 50,
"half_model": false,
"train_unfrozen": false,
"has_ema": false,
"hflip": false,
"infer_ema": false,
"initial_revision": 0,
"learning_rate": 0.0001,
"learning_rate_min": 1e-06,
"lifetime_revision": 0,
"lora_learning_rate": 0.0001,
"lora_model_name": "",
"lora_unet_rank": 4,
"lora_txt_rank": 4,
"lora_txt_learning_rate": 5e-05,
"lora_txt_weight": 1,
"lora_weight": 1,
"lr_cycles": 1,
"lr_factor": 0.5,
"lr_power": 1,
"lr_scale_pos": 0.5,
"lr_scheduler": "constant_with_warmup",
"lr_warmup_steps": 0,
"max_token_length": 75,
"mixed_precision": "bf16",
"model_name": "SDLoraNealAdams",
"model_dir": "D:\\stable-diffusion-webui\\models\\dreambooth\\SDLoraNealAdams",
"model_path": "D:\\stable-diffusion-webui\\models\\dreambooth\\SDLoraNealAdams",
"num_train_epochs": 100,
"offset_noise": 0,
"optimizer": "8bit AdamW",
"pad_tokens": true,
"pretrained_model_name_or_path": "D:\\stable-diffusion-webui\\models\\dreambooth\\SDLoraNealAdams\\working",
"pretrained_vae_name_or_path": null,
"prior_loss_scale": false,
"prior_loss_target": 100.0,
"prior_loss_weight": 0.75,
"prior_loss_weight_min": 0.1,
"resolution": 512,
"revision": 10500,
"sample_batch_size": 1,
"sanity_prompt": "",
"sanity_seed": 420420.0,
"save_ckpt_after": true,
"save_ckpt_cancel": false,
"save_ckpt_during": false,
"save_ema": true,
"save_embedding_every": 25,
"save_lora_after": true,
"save_lora_cancel": false,
"save_lora_during": false,
"save_lora_for_extra_net": false,
"save_preview_every": 5,
"save_safetensors": true,
"save_state_after": false,
"save_state_cancel": false,
"save_state_during": false,
"scheduler": "DEISMultistep",
"shuffle_tags": true,
"snapshot": "",
"split_loss": true,
"src": "D:\\stable-diffusion-webui\\models\\Stable-diffusion\\dreamshaper_6BakedVae.safetensors",
"stop_text_encoder": 0.75,
"strict_tokens": false,
"tf32_enable": false,
"train_batch_size": 2,
"train_imagic": false,
"train_unet": true,
"use_concepts": false,
"use_ema": false,
"use_lora": true,
"use_lora_extended": true,
"use_subdir": true,
"v2": false
}

Комментарии

Информация по комментариям в разработке