"vscode:/vscode.git/clone" did not exist on "8024ded58f94a6ca0a1dc187ecb3e4a963ebb8fc"
  1. 13 Jun, 2025 1 commit
  2. 30 May, 2025 1 commit
  3. 27 May, 2025 1 commit
  4. 22 May, 2025 1 commit
  5. 15 Apr, 2025 1 commit
    • Hameer Abbasi's avatar
      [LoRA] Add LoRA support to AuraFlow (#10216) · 9352a5ca
      Hameer Abbasi authored
      
      
      * Add AuraFlowLoraLoaderMixin
      
      * Add comments, remove qkv fusion
      
      * Add Tests
      
      * Add AuraFlowLoraLoaderMixin to documentation
      
      * Add Suggested changes
      
      * Change attention_kwargs->joint_attention_kwargs
      
      * Rebasing derp.
      
      * fix
      
      * fix
      
      * Quality fixes.
      
      * make style
      
      * `make fix-copies`
      
      * `ruff check --fix`
      
      * Attept 1 to fix tests.
      
      * Attept 2 to fix tests.
      
      * Attept 3 to fix tests.
      
      * Address review comments.
      
      * Rebasing derp.
      
      * Get more tests passing by copying from Flux. Address review comments.
      
      * `joint_attention_kwargs`->`attention_kwargs`
      
      * Add `lora_scale` property for te LoRAs.
      
      * Make test better.
      
      * Remove useless property.
      
      * Skip TE-only tests for AuraFlow.
      
      * Support LoRA for non-CLIP TEs.
      
      * Restore LoRA tests.
      
      * Undo adding LoRA support for non-CLIP TEs.
      
      * Undo support for TE in AuraFlow LoRA.
      
      * `make fix-copies`
      
      * Sync with upstream changes.
      
      * Remove unneeded stuff.
      
      * Mirror `Lumina2`.
      
      * Skip for MPS.
      
      * Address review comments.
      
      * Remove duplicated code.
      
      * Remove unnecessary code.
      
      * Remove repeated docs.
      
      * Propagate attention.
      
      * Fix TE target modules.
      
      * MPS fix for LoRA tests.
      
      * Unrelated TE LoRA tests fix.
      
      * Fix AuraFlow LoRA tests by applying to the right denoiser layers.
      Co-authored-by: default avatarAstraliteHeart <81396681+AstraliteHeart@users.noreply.github.com>
      
      * Apply style fixes
      
      * empty commit
      
      * Fix the repo consistency issues.
      
      * Remove unrelated changes.
      
      * Style.
      
      * Fix `test_lora_fuse_nan`.
      
      * fix quality issues.
      
      * `pytest.xfail` -> `ValueError`.
      
      * Add back `skip_mps`.
      
      * Apply style fixes
      
      * `make fix-copies`
      
      ---------
      Co-authored-by: default avatarWarlord-K <warlordk28@gmail.com>
      Co-authored-by: default avatarhlky <hlky@hlky.ac>
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      Co-authored-by: default avatarAstraliteHeart <81396681+AstraliteHeart@users.noreply.github.com>
      Co-authored-by: default avatargithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
      9352a5ca
  6. 10 Apr, 2025 1 commit
  7. 12 Mar, 2025 1 commit
  8. 10 Mar, 2025 1 commit
  9. 04 Mar, 2025 1 commit
    • Aryan's avatar
      [LoRA] Support Wan (#10943) · 3ee899fa
      Aryan authored
      * update
      
      * refactor image-to-video pipeline
      
      * update
      
      * fix copied from
      
      * use FP32LayerNorm
      3ee899fa
  10. 19 Feb, 2025 1 commit
    • Sayak Paul's avatar
      [LoRA] make `set_adapters()` robust on silent failures. (#9618) · 6fe05b9b
      Sayak Paul authored
      * make set_adapters() robust on silent failures.
      
      * fixes to tests
      
      * flaky decorator.
      
      * fix
      
      * flaky to sd3.
      
      * remove warning.
      
      * sort
      
      * quality
      
      * skip test_simple_inference_with_text_denoiser_multi_adapter_block_lora
      
      * skip testing unsupported features.
      
      * raise warning instead of error.
      6fe05b9b
  11. 13 Feb, 2025 1 commit
    • Aryan's avatar
      Disable PEFT input autocast when using fp8 layerwise casting (#10685) · a0c22997
      Aryan authored
      * disable peft input autocast
      
      * use new peft method name; only disable peft input autocast if submodule layerwise casting active
      
      * add test; reference PeftInputAutocastDisableHook in peft docs
      
      * add load_lora_weights test
      
      * casted -> cast
      
      * Update tests/lora/utils.py
      a0c22997
  12. 22 Jan, 2025 1 commit
    • Aryan's avatar
      [core] Layerwise Upcasting (#10347) · beacaa55
      Aryan authored
      
      
      * update
      
      * update
      
      * make style
      
      * remove dynamo disable
      
      * add coauthor
      Co-Authored-By: default avatarDhruv Nair <dhruv.nair@gmail.com>
      
      * update
      
      * update
      
      * update
      
      * update mixin
      
      * add some basic tests
      
      * update
      
      * update
      
      * non_blocking
      
      * improvements
      
      * update
      
      * norm.* -> norm
      
      * apply suggestions from review
      
      * add example
      
      * update hook implementation to the latest changes from pyramid attention broadcast
      
      * deinitialize should raise an error
      
      * update doc page
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * update docs
      
      * update
      
      * refactor
      
      * fix _always_upcast_modules for asym ae and vq_model
      
      * fix lumina embedding forward to not depend on weight dtype
      
      * refactor tests
      
      * add simple lora inference tests
      
      * _always_upcast_modules -> _precision_sensitive_module_patterns
      
      * remove todo comments about review; revert changes to self.dtype in unets because .dtype on ModelMixin should be able to handle fp8 weight case
      
      * check layer dtypes in lora test
      
      * fix UNet1DModelTests::test_layerwise_upcasting_inference
      
      * _precision_sensitive_module_patterns -> _skip_layerwise_casting_patterns based on feedback
      
      * skip test in NCSNppModelTests
      
      * skip tests for AutoencoderTinyTests
      
      * skip tests for AutoencoderOobleckTests
      
      * skip tests for UNet1DModelTests - unsupported pytorch operations
      
      * layerwise_upcasting -> layerwise_casting
      
      * skip tests for UNetRLModelTests; needs next pytorch release for currently unimplemented operation support
      
      * add layerwise fp8 pipeline test
      
      * use xfail
      
      * Apply suggestions from code review
      Co-authored-by: default avatarDhruv Nair <dhruv.nair@gmail.com>
      
      * add assertion with fp32 comparison; add tolerance to fp8-fp32 vs fp32-fp32 comparison (required for a few models' test to pass)
      
      * add note about memory consumption on tesla CI runner for failing test
      
      ---------
      Co-authored-by: default avatarDhruv Nair <dhruv.nair@gmail.com>
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      beacaa55
  13. 23 Dec, 2024 3 commits
  14. 19 Dec, 2024 2 commits
  15. 18 Dec, 2024 1 commit
    • Sayak Paul's avatar
      [LoRA] feat: lora support for SANA. (#10234) · 9408aa2d
      Sayak Paul authored
      
      
      * feat: lora support for SANA.
      
      * make fix-copies
      
      * rename test class.
      
      * attention_kwargs -> cross_attention_kwargs.
      
      * Revert "attention_kwargs -> cross_attention_kwargs."
      
      This reverts commit 23433bf9bccc12e0f2f55df26bae58a894e8b43b.
      
      * exhaust 119 max line limit
      
      * sana lora fine-tuning script.
      
      * readme
      
      * add a note about the supported models.
      
      * Apply suggestions from code review
      Co-authored-by: default avatarAryan <aryan@huggingface.co>
      
      * style
      
      * docs for attention_kwargs.
      
      * remove lora_scale from pag pipeline.
      
      * copy fix
      
      ---------
      Co-authored-by: default avatarAryan <aryan@huggingface.co>
      9408aa2d
  16. 12 Dec, 2024 1 commit
  17. 05 Dec, 2024 1 commit
  18. 22 Nov, 2024 1 commit
  19. 19 Nov, 2024 1 commit
  20. 02 Nov, 2024 1 commit
  21. 16 Oct, 2024 1 commit
  22. 13 Oct, 2024 1 commit
  23. 09 Oct, 2024 1 commit
  24. 27 Sep, 2024 2 commits
  25. 21 Sep, 2024 1 commit
    • Aryan's avatar
      [refactor] LoRA tests (#9481) · e5d0a328
      Aryan authored
      * refactor scheduler class usage
      
      * reorder to make tests more readable
      
      * remove pipeline specific checks and skip tests directly
      
      * rewrite denoiser conditions cleaner
      
      * bump tolerance for cog test
      e5d0a328
  26. 19 Sep, 2024 1 commit
    • Aryan's avatar
      [training] CogVideoX Lora (#9302) · 2b443a5d
      Aryan authored
      
      
      * cogvideox lora training draft
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * make fix-copies
      
      * update
      
      * update
      
      * apply suggestions from review
      
      * apply suggestions from reveiw
      
      * fix typo
      
      * Update examples/cogvideo/train_cogvideox_lora.py
      Co-authored-by: default avatarYiYi Xu <yixu310@gmail.com>
      
      * fix lora alpha
      
      * use correct lora scaling for final test pipeline
      
      * Update examples/cogvideo/train_cogvideox_lora.py
      Co-authored-by: default avatarYiYi Xu <yixu310@gmail.com>
      
      * apply suggestions from review; prodigy optimizer
      
      YiYi Xu <yixu310@gmail.com>
      
      * add tests
      
      * make style
      
      * add README
      
      * update
      
      * update
      
      * make style
      
      * fix
      
      * update
      
      * add test skeleton
      
      * revert lora utils changes
      
      * add cleaner modifications to lora testing utils
      
      * update lora tests
      
      * deepspeed stuff
      
      * add requirements.txt
      
      * deepspeed refactor
      
      * add lora stuff to img2vid pipeline to fix tests
      
      * fight tests
      
      * add co-authors
      Co-Authored-By: default avatarFu-Yun Wang <1697256461@qq.com>
      Co-Authored-By: default avatarzR <2448370773@qq.com>
      
      * fight lora runner tests
      
      * import Dummy optim and scheduler only wheh required
      
      * update docs
      
      * add coauthors
      Co-Authored-By: default avatarFu-Yun Wang <1697256461@qq.com>
      
      * remove option to train text encoder
      Co-Authored-By: default avatarbghira <bghira@users.github.com>
      
      * update tests
      
      * fight more tests
      
      * update
      
      * fix vid2vid
      
      * fix typo
      
      * remove lora tests; todo in follow-up PR
      
      * undo img2vid changes
      
      * remove text encoder related changes in lora loader mixin
      
      * Revert "remove text encoder related changes in lora loader mixin"
      
      This reverts commit f8a8444487db27859be812866db4e8cec7f25691.
      
      * update
      
      * round 1 of fighting tests
      
      * round 2 of fighting tests
      
      * fix copied from comment
      
      * fix typo in lora test
      
      * update styling
      Co-Authored-By: default avatarYiYi Xu <yixu310@gmail.com>
      
      ---------
      Co-authored-by: default avatarYiYi Xu <yixu310@gmail.com>
      Co-authored-by: default avatarzR <2448370773@qq.com>
      Co-authored-by: default avatarFu-Yun Wang <1697256461@qq.com>
      Co-authored-by: default avatarbghira <bghira@users.github.com>
      2b443a5d
  27. 05 Aug, 2024 1 commit
    • Sayak Paul's avatar
      [FLUX] support LoRA (#9057) · fc6a91e3
      Sayak Paul authored
      * feat: lora support for Flux.
      
      add tests
      
      fix imports
      
      major fixes.
      
      * fix
      
      fixes
      
      final fixes?
      
      * fix
      
      * remove is_peft_available.
      fc6a91e3
  28. 26 Jul, 2024 1 commit
    • Sayak Paul's avatar
      [Chore] add `LoraLoaderMixin` to the inits (#8981) · d87fe95f
      Sayak Paul authored
      
      
      * introduce  to promote reusability.
      
      * up
      
      * add more tests
      
      * up
      
      * remove comments.
      
      * fix fuse_nan test
      
      * clarify the scope of fuse_lora and unfuse_lora
      
      * remove space
      
      * rewrite fuse_lora a bit.
      
      * feedback
      
      * copy over load_lora_into_text_encoder.
      
      * address dhruv's feedback.
      
      * fix-copies
      
      * fix issubclass.
      
      * num_fused_loras
      
      * fix
      
      * fix
      
      * remove mapping
      
      * up
      
      * fix
      
      * style
      
      * fix-copies
      
      * change to SD3TransformerLoRALoadersMixin
      
      * Apply suggestions from code review
      Co-authored-by: default avatarDhruv Nair <dhruv.nair@gmail.com>
      
      * up
      
      * handle wuerstchen
      
      * up
      
      * move lora to lora_pipeline.py
      
      * up
      
      * fix-copies
      
      * fix documentation.
      
      * comment set_adapters().
      
      * fix-copies
      
      * fix set_adapters() at the model level.
      
      * fix?
      
      * fix
      
      * loraloadermixin.
      
      ---------
      Co-authored-by: default avatarDhruv Nair <dhruv.nair@gmail.com>
      d87fe95f
  29. 25 Jul, 2024 2 commits
    • YiYi Xu's avatar
      Revert "[LoRA] introduce LoraBaseMixin to promote reusability." (#8976) · 62863bb1
      YiYi Xu authored
      Revert "[LoRA] introduce LoraBaseMixin to promote reusability. (#8774)"
      
      This reverts commit 527430d0.
      62863bb1
    • Sayak Paul's avatar
      [LoRA] introduce LoraBaseMixin to promote reusability. (#8774) · 527430d0
      Sayak Paul authored
      
      
      * introduce  to promote reusability.
      
      * up
      
      * add more tests
      
      * up
      
      * remove comments.
      
      * fix fuse_nan test
      
      * clarify the scope of fuse_lora and unfuse_lora
      
      * remove space
      
      * rewrite fuse_lora a bit.
      
      * feedback
      
      * copy over load_lora_into_text_encoder.
      
      * address dhruv's feedback.
      
      * fix-copies
      
      * fix issubclass.
      
      * num_fused_loras
      
      * fix
      
      * fix
      
      * remove mapping
      
      * up
      
      * fix
      
      * style
      
      * fix-copies
      
      * change to SD3TransformerLoRALoadersMixin
      
      * Apply suggestions from code review
      Co-authored-by: default avatarDhruv Nair <dhruv.nair@gmail.com>
      
      * up
      
      * handle wuerstchen
      
      * up
      
      * move lora to lora_pipeline.py
      
      * up
      
      * fix-copies
      
      * fix documentation.
      
      * comment set_adapters().
      
      * fix-copies
      
      * fix set_adapters() at the model level.
      
      * fix?
      
      * fix
      
      ---------
      Co-authored-by: default avatarDhruv Nair <dhruv.nair@gmail.com>
      527430d0
  30. 03 Jul, 2024 2 commits
  31. 18 Jun, 2024 1 commit
    • Gæros's avatar
      [LoRA] text encoder: read the ranks for all the attn modules (#8324) · 298ce679
      Gæros authored
      
      
      * [LoRA] text encoder: read the ranks for all the attn modules
      
       * In addition to out_proj, read the ranks of adapters for q_proj, k_proj, and  v_proj
      
       * Allow missing adapters (UNet already supports this)
      
      * ruff format loaders.lora
      
      * [LoRA] add tests for partial text encoders LoRAs
      
      * [LoRA] update test_simple_inference_with_partial_text_lora to be deterministic
      
      * [LoRA] comment justifying test_simple_inference_with_partial_text_lora
      
      * style
      
      ---------
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      298ce679
  32. 29 May, 2024 1 commit
  33. 29 Mar, 2024 1 commit
    • UmerHA's avatar
      Implements Blockwise lora (#7352) · 03024468
      UmerHA authored
      
      
      * Initial commit
      
      * Implemented block lora
      
      - implemented block lora
      - updated docs
      - added tests
      
      * Finishing up
      
      * Reverted unrelated changes made by make style
      
      * Fixed typo
      
      * Fixed bug + Made text_encoder_2 scalable
      
      * Integrated some review feedback
      
      * Incorporated review feedback
      
      * Fix tests
      
      * Made every module configurable
      
      * Adapter to new lora test structure
      
      * Final cleanup
      
      * Some more final fixes
      
      - Included examples in `using_peft_for_inference.md`
      - Added hint that only attns are scaled
      - Removed NoneTypes
      - Added test to check mismatching lens of adapter names / weights raise error
      
      * Update using_peft_for_inference.md
      
      * Update using_peft_for_inference.md
      
      * Make style, quality, fix-copies
      
      * Updated tutorial;Warning if scale/adapter mismatch
      
      * floats are forwarded as-is; changed tutorial scale
      
      * make style, quality, fix-copies
      
      * Fixed typo in tutorial
      
      * Moved some warnings into `lora_loader_utils.py`
      
      * Moved scale/lora mismatch warnings back
      
      * Integrated final review suggestions
      
      * Empty commit to trigger CI
      
      * Reverted emoty commit to trigger CI
      
      ---------
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      03024468
  34. 27 Mar, 2024 1 commit