1. 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
  2. 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
  3. 30 Aug, 2023 1 commit
  4. 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
  5. 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
  6. 26 Aug, 2023 2 commits
  7. 25 Aug, 2023 1 commit
  8. 22 Aug, 2023 2 commits
  9. 18 Aug, 2023 1 commit
  10. 17 Aug, 2023 2 commits
  11. 11 Aug, 2023 2 commits
  12. 02 Aug, 2023 1 commit
  13. 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
  14. 26 Jul, 2023 1 commit
  15. 25 Jul, 2023 5 commits
  16. 24 Jul, 2023 1 commit
  17. 21 Jul, 2023 2 commits
  18. 19 Jul, 2023 1 commit
  19. 17 Jul, 2023 1 commit
  20. 14 Jul, 2023 1 commit
    • Sayak Paul's avatar
      [Feat] add: utility for unloading lora. (#4034) · 692b7a90
      Sayak Paul authored
      * add: test for testing unloading lora.
      
      * add :reason to skipif.
      
      * initial implementation of lora unload().
      
      * apply styling.
      
      * add: doc.
      
      * change checkpoints.
      
      * reinit generator
      
      * finalize slow test.
      
      * add fast test for unloading lora.
      692b7a90
  21. 11 Jul, 2023 1 commit
  22. 09 Jul, 2023 1 commit
    • Will Berman's avatar
      Refactor LoRA (#3778) · c2a28c34
      Will Berman authored
      
      
      * refactor to support patching LoRA into T5
      
      instantiate the lora linear layer on the same device as the regular linear layer
      
      get lora rank from state dict
      
      tests
      
      fmt
      
      can create lora layer in float32 even when rest of model is float16
      
      fix loading model hook
      
      remove load_lora_weights_ and T5 dispatching
      
      remove Unet#attn_processors_state_dict
      
      docstrings
      
      * text encoder monkeypatch class method
      
      * fix test
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      c2a28c34
  23. 07 Jul, 2023 1 commit
    • Yorai Levi's avatar
      typo in safetensors (safetenstors) (#3976) · 1fbcc78d
      Yorai Levi authored
      * Update pipeline_utils.py
      
      typo in safetensors (safetenstors)
      
      * Update loaders.py
      
      typo in safetensors (safetenstors)
      
      * Update modeling_utils.py
      
      typo in safetensors (safetenstors)
      1fbcc78d
  24. 06 Jul, 2023 1 commit
  25. 28 Jun, 2023 1 commit
  26. 21 Jun, 2023 1 commit
  27. 08 Jun, 2023 1 commit
  28. 06 Jun, 2023 2 commits