"test/vscode:/vscode.git/clone" did not exist on "93c3025f935b9dae47ba8b8f78a8003eb3bb1ffd"
- 05 Dec, 2025 1 commit
-
-
swappy authored
* fix: group offloading to support standalone computational layers in block-level offloading * test: for models with standalone and deeply nested layers in block-level offloading * feat: support for block-level offloading in group offloading config * fix: group offload block modules to AutoencoderKL and AutoencoderKLWan * fix: update group offloading tests to use AutoencoderKL and adjust input dimensions * refactor: streamline block offloading logic * Apply style fixes * update tests * update * fix for failing tests * clean up * revert to use skip_keys * clean up --------- Co-authored-by:
github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by:
Dhruv Nair <dhruv.nair@gmail.com>
-
- 03 Dec, 2025 2 commits
-
-
Sayak Paul authored
* start zimage model tests. * up * up * up * up * up * up * up * up * up * up * up * up * Revert "up" This reverts commit bca3e27c96b942db49ccab8ddf824e7a54d43ed1. * expand upon compilation failure reason. * Update tests/models/transformers/test_models_transformer_z_image.py Co-authored-by:
dg845 <58458699+dg845@users.noreply.github.com> * reinitialize the padding tokens to ones to prevent NaN problems. * updates * up * skipping ZImage DiT tests * up * up --------- Co-authored-by:
dg845 <58458699+dg845@users.noreply.github.com>
-
Kimbing Ng authored
* Fixes #12673. Wrong default_stream is used. leading to wrong execution order when record_steram is enabled. * update * Update test --------- Co-authored-by:Sayak Paul <spsayakpaul@gmail.com>
-
- 17 Oct, 2025 1 commit
-
-
Sayak Paul authored
* up * up * up * up * up * u[ * up * up * up
-
- 02 Oct, 2025 1 commit
-
-
Benjamin Bossan authored
I noticed that the test should be for the option check_compiled="ignore" but it was using check_compiled="warn". This has been fixed, now the correct argument is passed. However, the fact that the test passed means that it was incorrect to begin with. The way that logs are collected does not collect the logger.warning call here (not sure why). To amend this, I'm now using assertNoLogs. With this change, the test correctly fails when the wrong argument is passed.
-
- 30 Sep, 2025 1 commit
-
-
Lucain authored
* Allow prerelease when installing transformers from main * maybe better * maybe better * and now? * just bored * should be better * works now
-
- 29 Sep, 2025 1 commit
-
-
Sayak Paul authored
u[
-
- 25 Sep, 2025 1 commit
-
-
Lucain authored
* Support huggingface_hub 0.x and 1.x * httpx
-
- 03 Sep, 2025 1 commit
-
-
Sayak Paul authored
* feat: add a test for aot. * up
-
- 28 Aug, 2025 1 commit
-
-
Dhruv Nair authored
* update * update * update * update * update * merge main * Revert "merge main" This reverts commit 65efbcead58644b31596ed2d714f7cee0e0238d3.
-
- 14 Aug, 2025 1 commit
-
-
Sayak Paul authored
* tighten compilation tests for quantization * feat: model_info but local. * up * Revert "tighten compilation tests for quantization" This reverts commit 8d431dc967a4118168af74aae9c41f2a68764851. * up * reviewer feedback. * reviewer feedback. * up * up * empty * update --------- Co-authored-by:DN6 <dhruv.nair@gmail.com>
-
- 13 Aug, 2025 1 commit
-
-
Sayak Paul authored
* checking. * checking * checking * up * up * up * Apply suggestions from code review Co-authored-by:
Dhruv Nair <dhruv.nair@gmail.com> * up * up * fix * review feedback. --------- Co-authored-by:
Dhruv Nair <dhruv.nair@gmail.com>
-
- 11 Aug, 2025 1 commit
-
-
Sayak Paul authored
* update * update * update * enable compilation in qwen image. * add tests --------- Co-authored-by:Aryan <aryan@huggingface.co>
-
- 29 Jul, 2025 1 commit
-
-
Aryan authored
* update * try test fix * add missing link * fix tests * Update src/diffusers/hooks/first_block_cache.py * make style
-
- 23 Jul, 2025 1 commit
-
-
Sayak Paul authored
enforce torch version in the compilation tests.
-
- 22 Jul, 2025 1 commit
-
-
Yao Matrix authored
* xx * fix Signed-off-by:
YAO Matrix <matrix.yao@intel.com> * Update model_loading_utils.py * Update test_models_unet_2d_condition.py * Update test_models_unet_2d_condition.py * fix style Signed-off-by:
YAO Matrix <matrix.yao@intel.com> * fix comments Signed-off-by:
Matrix Yao <matrix.yao@intel.com> * Update unet_2d_blocks.py * update Signed-off-by:
Matrix Yao <matrix.yao@intel.com> --------- Signed-off-by:
YAO Matrix <matrix.yao@intel.com> Signed-off-by:
Matrix Yao <matrix.yao@intel.com> Co-authored-by:
Sayak Paul <spsayakpaul@gmail.com>
-
- 09 Jul, 2025 1 commit
-
-
Sayak Paul authored
* fix memory address problem * add more tests * updates * updates * update * _group_id = group_id * update * Apply suggestions from code review Co-authored-by:
Dhruv Nair <dhruv.nair@gmail.com> * update * update * update * fix --------- Co-authored-by:
Dhruv Nair <dhruv.nair@gmail.com>
-
- 01 Jul, 2025 1 commit
-
-
Sayak Paul authored
* add resolution changes tests to hotswapping test suite. * fixes * docs * explain duck shapes * fix
-
- 26 Jun, 2025 2 commits
-
-
Sayak Paul authored
* add test for checking compile on different shapes. * update * update * Apply suggestions from code review Co-authored-by:
Steven Liu <59462357+stevhliu@users.noreply.github.com> --------- Co-authored-by:
Steven Liu <59462357+stevhliu@users.noreply.github.com>
-
Animesh Jain authored
* [rfc][compile] compile method for DiffusionPipeline * Apply suggestions from code review Co-authored-by:
Sayak Paul <spsayakpaul@gmail.com> * Apply style fixes * Update docs/source/en/optimization/fp16.md * check --------- Co-authored-by:
Sayak Paul <spsayakpaul@gmail.com> Co-authored-by:
github-actions[bot] <github-actions[bot]@users.noreply.github.com>
-
- 25 Jun, 2025 1 commit
-
-
Sayak Paul authored
skip instead of returning.
-
- 24 Jun, 2025 1 commit
-
-
Aryan authored
* update * update * update
-
- 23 Jun, 2025 1 commit
-
-
Sayak Paul authored
model test updates
-
- 19 Jun, 2025 1 commit
-
-
Sayak Paul authored
* start implementing disk offloading in group. * delete diff file. * updates.patch * offload_to_disk_path * check if safetensors already exist. * add test and clarify. * updates * update todos. * update more docs. * update docs
-
- 18 Jun, 2025 2 commits
-
-
Sayak Paul authored
change to 2025 licensing for remaining
-
Sayak Paul authored
* device_map tests for all models. * updates * Update tests/models/test_modeling_common.py Co-authored-by:
Aryan <aryan@huggingface.co> * fix device_map in test --------- Co-authored-by:
Aryan <aryan@huggingface.co>
-
- 13 Jun, 2025 1 commit
-
-
Sayak Paul authored
* feat: parse metadata from lora state dicts. * tests * fix tests * key renaming * fix * smol update * smol updates * load metadata. * automatically save metadata in save_lora_adapter. * propagate changes. * changes * add test to models too. * tigher tests. * updates * fixes * rename tests. * sorted. * Update src/diffusers/loaders/lora_base.py Co-authored-by:
Benjamin Bossan <BenjaminBossan@users.noreply.github.com> * review suggestions. * removeprefix. * propagate changes. * fix-copies * sd * docs. * fixes * get review ready. * one more test to catch error. * change to a different approach. * fix-copies. * todo * sd3 * update * revert changes in get_peft_kwargs. * update * fixes * fixes * simplify _load_sft_state_dict_metadata * update * style fix * uipdate * update * update * empty commit * _pack_dict_with_prefix * update * TODO 1. * todo: 2. * todo: 3. * update * update * Apply suggestions from code review Co-authored-by:
Benjamin Bossan <BenjaminBossan@users.noreply.github.com> * reraise. * move argument. --------- Co-authored-by:
Benjamin Bossan <BenjaminBossan@users.noreply.github.com> Co-authored-by:
Linoy Tsaban <57615435+linoytsaban@users.noreply.github.com>
-
- 06 Jun, 2025 1 commit
-
-
Sayak Paul authored
* add a test for group offloading + compilation. * tests
-
- 02 Jun, 2025 1 commit
-
-
Sayak Paul authored
chore: rename lora model-level tests.
-
- 26 May, 2025 1 commit
-
-
Sayak Paul authored
* remove compile cuda docker. * replace compile cuda docker path. * better manage compilation cache. * propagate similar to the pipeline tests. * remove unneeded compile test. * small. * don't check for deleted files.
-
- 15 May, 2025 1 commit
-
-
Sayak Paul authored
* add tests for combining layerwise upcasting and groupoffloading. * feedback
-
- 09 May, 2025 1 commit
-
-
Sayak Paul authored
* refactor hotswap tester. * fix seeds.. * add to nightly ci. * move comment. * move to nightly
-
- 28 Apr, 2025 3 commits
-
-
Sayak Paul authored
fix import.
-
Yao Matrix authored
* enable test_layerwise_casting_memory cases on XPU Signed-off-by:
Yao Matrix <matrix.yao@intel.com> * fix style Signed-off-by:
Yao Matrix <matrix.yao@intel.com> --------- Signed-off-by:
Yao Matrix <matrix.yao@intel.com>
-
Sayak Paul authored
[tests] add tests to check for graph breaks, recompilation, cuda syncs in pipelines during torch.compile() (#11085) * test for better torch.compile stuff. * fixes * recompilation and graph break. * clear compilation cache. * change to modeling level test. * allow running compilation tests during nightlies.
-
- 09 Apr, 2025 2 commits
-
-
Dhruv Nair authored
* update * update * update * update
-
hlky authored
* AutoModel * ... * lol * ... * add test * update * make fix-copies --------- Co-authored-by:Dhruv Nair <dhruv.nair@gmail.com>
-
- 08 Apr, 2025 2 commits
-
-
Sayak Paul authored
* implement record_stream for better performance. * fix * style. * merge #11097 * Update src/diffusers/hooks/group_offloading.py Co-authored-by:
Aryan <aryan@huggingface.co> * fixes * docstring. * remaining todos in low_cpu_mem_usage * tests * updates to docs. --------- Co-authored-by:
Aryan <aryan@huggingface.co>
-
Benjamin Bossan authored
* [WIP][LoRA] Implement hot-swapping of LoRA This PR adds the possibility to hot-swap LoRA adapters. It is WIP. Description As of now, users can already load multiple LoRA adapters. They can offload existing adapters or they can unload them (i.e. delete them). However, they cannot "hotswap" adapters yet, i.e. substitute the weights from one LoRA adapter with the weights of another, without the need to create a separate LoRA adapter. Generally, hot-swapping may not appear not super useful but when the model is compiled, it is necessary to prevent recompilation. See #9279 for more context. Caveats To hot-swap a LoRA adapter for another, these two adapters should target exactly the same layers and the "hyper-parameters" of the two adapters should be identical. For instance, the LoRA alpha has to be the same: Given that we keep the alpha from the first adapter, the LoRA scaling would be incorrect for the second adapter otherwise. Theoretically, we could override the scaling dict with the alpha values derived from the second adapter's config, but changing the dict will trigger a guard for recompilation, defeating the main purpose of the feature. I also found that compilation flags can have an impact on whether this works or not. E.g. when passing "reduce-overhead", there will be errors of the type: > input name: arg861_1. data pointer changed from 139647332027392 to 139647331054592 I don't know enough about compilation to determine whether this is problematic or not. Current state This is obviously WIP right now to collect feedback and discuss which direction to take this. If this PR turns out to be useful, the hot-swapping functions will be added to PEFT itself and can be imported here (or there is a separate copy in diffusers to avoid the need for a min PEFT version to use this feature). Moreover, more tests need to be added to better cover this feature, although we don't necessarily need tests for the hot-swapping functionality itself, since those tests will be added to PEFT. Furthermore, as of now, this is only implemented for the unet. Other pipeline components have yet to implement this feature. Finally, it should be properly documented. I would like to collect feedback on the current state of the PR before putting more time into finalizing it. * Reviewer feedback * Reviewer feedback, adjust test * Fix, doc * Make fix * Fix for possible g++ error * Add test for recompilation w/o hotswapping * Make hotswap work Requires https://github.com/huggingface/peft/pull/2366 More changes to make hotswapping work. Together with the mentioned PEFT PR, the tests pass for me locally. List of changes: - docstring for hotswap - remove code copied from PEFT, import from PEFT now - adjustments to PeftAdapterMixin.load_lora_adapter (unfortunately, some state dict renaming was necessary, LMK if there is a better solution) - adjustments to UNet2DConditionLoadersMixin._process_lora: LMK if this is even necessary or not, I'm unsure what the overall relationship is between this and PeftAdapterMixin.load_lora_adapter - also in UNet2DConditionLoadersMixin._process_lora, I saw that there is no LoRA unloading when loading the adapter fails, so I added it there (in line with what happens in PeftAdapterMixin.load_lora_adapter) - rewritten tests to avoid shelling out, make the test more precise by making sure that the outputs align, parametrize it - also checked the pipeline code mentioned in this comment: https://github.com/huggingface/diffusers/pull/9453#issuecomment-2418508871; when running this inside the with torch._dynamo.config.patch(error_on_recompile=True) context, there is no error, so I think hotswapping is now working with pipelines. * Address reviewer feedback: - Revert deprecated method - Fix PEFT doc link to main - Don't use private function - Clarify magic numbers - Add pipeline test Moreover: - Extend docstrings - Extend existing test for outputs != 0 - Extend existing test for wrong adapter name * Change order of test decorators parameterized.expand seems to ignore skip decorators if added in last place (i.e. innermost decorator). * Split model and pipeline tests Also increase test coverage by also targeting conv2d layers (support of which was added recently on the PEFT PR). * Reviewer feedback: Move decorator to test classes ... instead of having them on each test method. * Apply suggestions from code review Co-authored-by:
hlky <hlky@hlky.ac> * Reviewer feedback: version check, TODO comment * Add enable_lora_hotswap method * Reviewer feedback: check _lora_loadable_modules * Revert changes in unet.py * Add possibility to ignore enabled at wrong time * Fix docstrings * Log possible PEFT error, test * Raise helpful error if hotswap not supported I.e. for the text encoder * Formatting * More linter * More ruff * Doc-builder complaint * Update docstring: - mention no text encoder support yet - make it clear that LoRA is meant - mention that same adapter name should be passed * Fix error in docstring * Update more methods with hotswap argument - SDXL - SD3 - Flux No changes were made to load_lora_into_transformer. * Add hotswap argument to load_lora_into_transformer For SD3 and Flux. Use shorter docstring for brevity. * Extend docstrings * Add version guards to tests * Formatting * Fix LoRA loading call to add prefix=None See: https://github.com/huggingface/diffusers/pull/10187#issuecomment-2717571064 * Run make fix-copies * Add hot swap documentation to the docs * Apply suggestions from code review Co-authored-by:
Steven Liu <59462357+stevhliu@users.noreply.github.com> --------- Co-authored-by:
Sayak Paul <spsayakpaul@gmail.com> Co-authored-by:
hlky <hlky@hlky.ac> Co-authored-by:
YiYi Xu <yixu310@gmail.com> Co-authored-by:
Steven Liu <59462357+stevhliu@users.noreply.github.com>
-
- 20 Mar, 2025 1 commit
-
-
Fanli Lin authored
* enable bnb on xpu * add 2 more cases * add missing change * add missing change * add one more * enable cuda only tests on xpu * enable big gpu cases
-