1. 18 Sep, 2023 2 commits
    • Ruoxi's avatar
      Implement `CustomDiffusionAttnProcessor2_0`. (#4604) · 16b9a57d
      Ruoxi authored
      * Implement `CustomDiffusionAttnProcessor2_0`
      
      * Doc-strings and type annotations for `CustomDiffusionAttnProcessor2_0`. (#1)
      
      * Update attnprocessor.md
      
      * Update attention_processor.py
      
      * Interops for `CustomDiffusionAttnProcessor2_0`.
      
      * Formatted `attention_processor.py`.
      
      * Formatted doc-string in `attention_processor.py`
      
      * Conditional CustomDiffusion2_0 for training example.
      
      * Remove unnecessary reference impl in comments.
      
      * Fix `save_attn_procs`.
      16b9a57d
    • Patrick von Platen's avatar
      [Textual inversion] Refactor textual inversion to make it cleaner (#5076) · 7b39f43c
      Patrick von Platen authored
      * [Textual inversion] Clean loading
      
      * [Textual inversion] Clean loading
      
      * [Textual inversion] Clean up
      
      * [Textual inversion] Clean up
      
      * [Textual inversion] Clean up
      
      * [Textual inversion] Clean up
      7b39f43c
  2. 14 Sep, 2023 2 commits
  3. 13 Sep, 2023 2 commits
  4. 12 Sep, 2023 1 commit
    • Patrick von Platen's avatar
      [Lora] Speed up lora loading (#4994) · 37cb819d
      Patrick von Platen authored
      * speed up lora loading
      
      * Apply suggestions from code review
      
      * up
      
      * up
      
      * Fix more
      
      * Correct more
      
      * Apply suggestions from code review
      
      * up
      
      * Fix more
      
      * Fix more -
      
      * up
      
      * up
      37cb819d
  5. 11 Sep, 2023 2 commits
  6. 09 Sep, 2023 1 commit
  7. 06 Sep, 2023 1 commit
  8. 05 Sep, 2023 1 commit
    • Sayak Paul's avatar
      [Core] better support offloading when side loading is enabled. (#4855) · e4b8e792
      Sayak Paul authored
      * better support offloading when side loading is enabled.
      
      * load_textual_inversion
      
      * better messaging for textual inversion.
      
      * fixes
      
      * address PR feedback.
      
      * sdxl support.
      
      * improve messaging
      
      * recursive removal when cpu sequential offloading is enabled.
      
      * add: lora tests
      
      * recruse.
      
      * add: offload tests for textual inversion.
      e4b8e792
  9. 04 Sep, 2023 1 commit
    • Sayak Paul's avatar
      [Core] LoRA improvements pt. 3 (#4842) · c81a88b2
      Sayak Paul authored
      
      
      * throw warning when more than one lora is attempted to be fused.
      
      * introduce support of lora scale during fusion.
      
      * change test name
      
      * changes
      
      * change to _lora_scale
      
      * lora_scale to call whenever applicable.
      
      * debugging
      
      * lora_scale additional.
      
      * cross_attention_kwargs
      
      * lora_scale -> scale.
      
      * lora_scale fix
      
      * lora_scale in patched projection.
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * styling.
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * remove unneeded prints.
      
      * remove unneeded prints.
      
      * assign cross_attention_kwargs.
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * clean up.
      
      * refactor scale retrieval logic a bit.
      
      * fix nonetypw
      
      * fix: tests
      
      * add more tests
      
      * more fixes.
      
      * figure out a way to pass lora_scale.
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * unify the retrieval logic of lora_scale.
      
      * move adjust_lora_scale_text_encoder to lora.py.
      
      * introduce dynamic adjustment lora scale support to sd
      
      * fix up copies
      
      * Empty-Commit
      
      * add: test to check fusion equivalence on different scales.
      
      * handle lora fusion warning.
      
      * make lora smaller
      
      * make lora smaller
      
      * make lora smaller
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      c81a88b2
  10. 30 Aug, 2023 1 commit
  11. 29 Aug, 2023 2 commits
    • zideliu's avatar
      fix typo (#4822) · 0699ac62
      zideliu authored
      0699ac62
    • Patrick von Platen's avatar
      Fuse loras (#4473) · c583f3b4
      Patrick von Platen authored
      
      
      * Fuse loras
      
      * initial implementation.
      
      * add slow test one.
      
      * styling
      
      * add: test for checking efficiency
      
      * print
      
      * position
      
      * place model offload correctly
      
      * style
      
      * style.
      
      * unfuse test.
      
      * final checks
      
      * remove warning test
      
      * remove warnings altogether
      
      * debugging
      
      * tighten up tests.
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * denugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debuging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * suit up the generator initialization a bit.
      
      * remove print
      
      * update assertion.
      
      * debugging
      
      * remove print.
      
      * fix: assertions.
      
      * style
      
      * can generator be a problem?
      
      * generator
      
      * correct tests.
      
      * support text encoder lora fusion.
      
      * tighten up tests.
      
      ---------
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      c583f3b4
  12. 28 Aug, 2023 2 commits
    • chillpixel's avatar
      Update loaders.py (#4805) · e8c9069d
      chillpixel authored
      * Update loaders.py
      
      Solves an error sometimes thrown while iterating over state_dict.keys() caused by using the .pop() method within the loop.
      
      * Update loaders.py
      e8c9069d
    • Patrick von Platen's avatar
      [LoRA Attn Processors] Refactor LoRA Attn Processors (#4765) · 766aa50f
      Patrick von Platen authored
      * [LoRA Attn] Refactor LoRA attn
      
      * correct for network alphas
      
      * fix more
      
      * fix more tests
      
      * fix more tests
      
      * Move below
      
      * Finish
      
      * better version
      
      * correct serialization format
      
      * fix
      
      * fix more
      
      * fix more
      
      * fix more
      
      * Apply suggestions from code review
      
      * Update src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_img2img.py
      
      * deprecation
      
      * relax atol for slow test slighly
      
      * Finish tests
      
      * make style
      
      * make style
      766aa50f
  13. 26 Aug, 2023 2 commits
  14. 25 Aug, 2023 1 commit
  15. 22 Aug, 2023 2 commits
  16. 18 Aug, 2023 1 commit
  17. 17 Aug, 2023 2 commits
  18. 11 Aug, 2023 2 commits
  19. 02 Aug, 2023 1 commit
  20. 28 Jul, 2023 1 commit
    • 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
  21. 26 Jul, 2023 1 commit
  22. 25 Jul, 2023 5 commits
  23. 24 Jul, 2023 1 commit
  24. 21 Jul, 2023 2 commits
  25. 19 Jul, 2023 1 commit