1. 29 Nov, 2023 1 commit
  2. 27 Nov, 2023 1 commit
  3. 23 Nov, 2023 2 commits
  4. 21 Nov, 2023 2 commits
    • Patrick von Platen's avatar
      [Lora] Seperate logic (#5809) · 13d73d93
      Patrick von Platen authored
      * [Lora] Seperate logic
      
      * [Lora] Seperate logic
      
      * [Lora] Seperate logic
      
      * add comments to explain the code better
      
      * add comments to explain the code better
      13d73d93
    • Linoy Tsaban's avatar
      Add features to the Dreambooth LoRA SDXL training script (#5508) · 6fac1369
      Linoy Tsaban authored
      
      
      * Additions:
      - support for different lr for text encoder
      - support for Prodigy optimizer
      - support for min snr gamma
      - support for custom captions and dataset loading from the hub
      
      * adjusted --caption_column behaviour (to -not- use the second column of the dataset by default if --caption_column is not provided)
      
      * fixed --output_dir / --model_dir_name confusion
      
      * added --repeats, --adam_weight_decay_text_encoder
      + some fixes
      
      * Update examples/dreambooth/train_dreambooth_lora_sdxl.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update examples/dreambooth/train_dreambooth_lora_sdxl.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update examples/dreambooth/train_dreambooth_lora_sdxl.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * - import compute_snr from diffusers/training_utils.py
      - cluster adamw together
      - when using 'prodigy', if --train_text_encoder == True and --text_encoder_lr != --learning rate, changes the lr of the text encoders optimization params to be --learning_rate (otherwise errors)
      
      * shape fixes when custom captions are used
      
      * formatting and a little cleanup
      
      * code styling
      
      * --repeats default value fixed, changed to 1
      
      * bug fix - removed redundant lines of embedding concatenation when using prior_preservation (that duplicated class_prompt embeddings)
      
      * changed dataset loading logic according to the following usecases (to avoid unnecessary dependency on datasets)-
      1. user provides --dataset_name
      2. user provides local dir --instance_data_dir that contains a metadata .jsonl file
      3. user provides local dir --instance_data_dir that contains only images
      in cases [1,2] we import datasets and use load_dataset method, in case [3] we process the data same as in the original script setting
      
      * styling fix
      
      * arg name fix
      
      * adjusted the --repeats logic
      
      * -removed redundant arg and 'if' when loading local folder with prompts
      -updated readme template
      -some default val fixes
      -custom caption tests
      
      * image path fix for readme
      
      * code style
      
      * bug fix
      
      * --caption_column arg
      
      * readme fix
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarLinoy Tsaban <linoy@huggingface.co>
      6fac1369
  5. 17 Nov, 2023 1 commit
  6. 14 Nov, 2023 1 commit
    • Sayak Paul's avatar
      [Refactor] refactor `loaders.py` to make it cleaner and leaner. (#5771) · ded93f79
      Sayak Paul authored
      
      
      * refactor loaders.py to make it cleaner and leaner.
      
      * refactor loaders init
      
      * inits.
      
      * textual inversion to the init.
      
      * inits.
      
      * remove certain modules from the main init.
      
      * AttnProcsLayers
      
      * fix imports
      
      * avoid circular import.
      
      * fix circular import pt 2.
      
      * address PR comments
      
      * imports
      
      * fix: imports.
      
      * remove from main init for avoiding circular deps.
      
      * remove spurious deps.
      
      * fix-copies.
      
      * fix imports.
      
      * more debug
      
      * more debug
      
      * Apply suggestions from code review
      
      * Apply suggestions from code review
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      ded93f79
  7. 10 Nov, 2023 1 commit
  8. 06 Nov, 2023 1 commit
  9. 27 Oct, 2023 1 commit
  10. 26 Oct, 2023 1 commit
  11. 23 Oct, 2023 2 commits
  12. 16 Oct, 2023 2 commits
  13. 11 Oct, 2023 1 commit
  14. 08 Oct, 2023 1 commit
  15. 02 Oct, 2023 1 commit
    • Sayak Paul's avatar
      fix: how print training resume logs. (#5117) · d56825e4
      Sayak Paul authored
      
      
      * fix: how print training resume logs.
      
      * propagate changes to text-to-image scripts.
      
      * propagate changes to instructpix2pix.
      
      * propagate changes to dreambooth
      
      * propagate changes to custom diffusion and instructpix2pix
      
      * propagate changes to kandinsky
      
      * propagate changes to textual inv.
      
      * debug
      
      * fix: checkpointing.
      
      * debug
      
      * debug
      
      * debug
      
      * back to the square
      
      * debug
      
      * debug
      
      * change condition order.
      
      * debug
      
      * debug
      
      * debug
      
      * debug
      
      * revert to original
      
      * clean
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      d56825e4
  16. 27 Sep, 2023 1 commit
  17. 21 Sep, 2023 1 commit
  18. 14 Sep, 2023 1 commit
  19. 08 Sep, 2023 1 commit
  20. 25 Aug, 2023 2 commits
  21. 23 Aug, 2023 1 commit
  22. 17 Aug, 2023 2 commits
  23. 09 Aug, 2023 1 commit
  24. 07 Aug, 2023 4 commits
  25. 04 Aug, 2023 2 commits
  26. 03 Aug, 2023 1 commit
  27. 01 Aug, 2023 1 commit
  28. 28 Jul, 2023 2 commits
    • Sayak Paul's avatar
      [Feat] Support SDXL Kohya-style LoRA (#4287) · 4a4cdd6b
      Sayak Paul authored
      
      
      * sdxl lora changes.
      
      * better name replacement.
      
      * better replacement.
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * remove print.
      
      * print state dict keys.
      
      * print
      
      * distingisuih better
      
      * debuggable.
      
      * fxi: tyests
      
      * fix: arg from training script.
      
      * access from class.
      
      * run style
      
      * debug
      
      * save intermediate
      
      * some simplifications for SDXL LoRA
      
      * styling
      
      * unet config is not needed in diffusers format.
      
      * fix: dynamic SGM block mapping for SDXL kohya loras (#4322)
      
      * Use lora compatible layers for linear proj_in/proj_out (#4323)
      
      * improve condition for using the sgm_diffusers mapping
      
      * informative comment.
      
      * load compatible keys and embedding layer maaping.
      
      * Get SDXL 1.0 example lora to load
      
      * simplify
      
      * specif ranks and hidden sizes.
      
      * better handling of k rank and hidden
      
      * debug
      
      * debug
      
      * debug
      
      * debug
      
      * debug
      
      * fix: alpha keys
      
      * add check for handling LoRAAttnAddedKVProcessor
      
      * sanity comment
      
      * modifications for text encoder SDXL
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * denugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * up
      
      * up
      
      * up
      
      * up
      
      * up
      
      * up
      
      * unneeded comments.
      
      * unneeded comments.
      
      * kwargs for the other attention processors.
      
      * kwargs for the other attention processors.
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * improve
      
      * debugging
      
      * debugging
      
      * more print
      
      * Fix alphas
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * clean up
      
      * clean up.
      
      * debugging
      
      * fix: text
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarBatuhan Taskaya <batuhan@python.org>
      4a4cdd6b
    • Patrick von Platen's avatar
      [SDXL] Make watermarker optional under certain circumstances to improve... · b7b6d613
      Patrick von Platen authored
      [SDXL] Make watermarker optional under certain circumstances to improve usability of SDXL 1.0 (#4346)
      
      * improve sdxl
      
      * more fixes
      
      * improve sdxl
      
      * improve sdxl
      
      * improve sdxl
      
      * finish
      b7b6d613
  29. 27 Jul, 2023 1 commit