Aryan
0454fbb30b
First Block Cache ( #11180 )
...
* update
* modify flux single blocks to make compatible with cache techniques (without too much model-specific intrusion code)
* remove debug logs
* update
* cache context for different batches of data
* fix hs residual bug for single return outputs; support ltx
* fix controlnet flux
* support flux, ltx i2v, ltx condition
* update
* update
* Update docs/source/en/api/cache.md
* Update src/diffusers/hooks/hooks.py
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
* address review comments pt. 1
* address review comments pt. 2
* cache context refacotr; address review pt. 3
* address review comments
* metadata registration with decorators instead of centralized
* support cogvideox
* support mochi
* fix
* remove unused function
* remove central registry based on review
* update
---------
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
2025-07-09 03:27:15 +05:30
Dhruv Nair
cbc8ced20f
[CI] Fix big GPU test marker ( #11786 )
...
* update
* update
2025-07-08 22:09:09 +05:30
Sayak Paul
01240fecb0
[training ] add Kontext i2i training ( #11858 )
...
* feat: enable i2i fine-tuning in Kontext script.
* readme
* more checks.
* Apply suggestions from code review
Co-authored-by: Linoy Tsaban <57615435+linoytsaban@users.noreply.github.com >
* fixes
* fix
* add proj_mlp to the mix
* Update README_flux.md
add note on installing from commit `05e7a854d0a5661f5b433f6dd5954c224b104f0b`
* fix
* fix
---------
Co-authored-by: Linoy Tsaban <57615435+linoytsaban@users.noreply.github.com >
2025-07-08 21:04:16 +05:30
Steven Liu
ce338d4e4a
[docs] LoRA metadata ( #11848 )
...
* draft
* hub image
* update
* fix
2025-07-08 08:29:38 -07:00
Sayak Paul
bc55b631fd
[tests] remove tests for deprecated pipelines. ( #11879 )
...
* remove tests for deprecated pipelines.
* remove folders
* test_pipelines_common
2025-07-08 07:13:16 +05:30
Sayak Paul
15d50f16f2
[docs] fix references in flux pipelines. ( #11857 )
...
* fix references in flux.
* Update src/diffusers/pipelines/flux/pipeline_flux_kontext.py
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
---------
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
2025-07-07 22:20:34 +05:30
Sayak Paul
2c30287958
[chore] deprecate blip controlnet pipeline. ( #11877 )
...
* deprecate blip controlnet pipeline.
* last_supported_version
2025-07-07 13:25:40 +05:30
Aryan
425a715e35
Fix Wan AccVideo/CausVid fuse_lora ( #11856 )
...
* fix
* actually, better fix
* empty commit; trigger tests again
* mark wanvace test as flaky
2025-07-04 21:10:35 +05:30
Benjamin Bossan
2527917528
FIX set_lora_device when target layers differ ( #11844 )
...
* FIX set_lora_device when target layers differ
Resolves #11833
Fixes a bug that occurs after calling set_lora_device when multiple LoRA
adapters are loaded that target different layers.
Note: Technically, the accompanying test does not require a GPU because
the bug is triggered even if the parameters are already on the
corresponding device, i.e. loading on CPU and then changing the device
to CPU is sufficient to cause the bug. However, this may be optimized
away in the future, so I decided to test with GPU.
* Update docstring to warn about device mismatch
* Extend docstring with an example
* Fix docstring
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2025-07-04 19:26:17 +05:30
Sayak Paul
e6639fef70
[benchmarks] overhaul benchmarks ( #11565 )
...
* start overhauling the benchmarking suite.
* fixes
* fixes
* checking.
* checking
* fixes.
* error handling and logging.
* add flops and params.
* add more models.
* utility to fire execution of all benchmarking scripts.
* utility to push to the hub.
* push utility improvement
* seems to be working.
* okay
* add torchprofile dep.
* remove total gpu memory
* fixes
* fix
* need a big gpu
* better
* what's happening.
* okay
* separate requirements and make it nightly.
* add db population script.
* update secret name
* update secret.
* population db update
* disable db population for now.
* change to every monday
* Update .github/workflows/benchmark.yml
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
* quality improvements.
* reparate hub upload step.
* repository
* remove csv
* check
* update
* update
* threading.
* update
* update
* updaye
* update
* update
* update
* remove peft dep
* upgrade runner.
* fix
* fixes
* fix merging csvs.
* push dataset to the Space repo for analysis.
* warm up.
* add a readme
* Apply suggestions from code review
Co-authored-by: Luc Georges <McPatate@users.noreply.github.com >
* address feedback
* Apply suggestions from code review
* disable db workflow.
* update to bi weekly.
* enable population
* enable
* updaye
* update
* metadata
* fix
---------
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
Co-authored-by: Luc Georges <McPatate@users.noreply.github.com >
2025-07-04 11:04:17 +05:30
Aryan
8c938fb410
[docs] Add a note of _keep_in_fp32_modules ( #11851 )
...
* update
* Update docs/source/en/using-diffusers/schedulers.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Update schedulers.md
---------
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
2025-07-02 15:51:57 -07:00
Linoy Tsaban
f864a9a352
[Flux Kontext] Support Fal Kontext LoRA ( #11823 )
...
* initial commit
* initial commit
* initial commit
* fix import
* fix prefix
* remove print
* Apply style fixes
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-07-02 16:57:08 +03:00
VΖ°Ζ‘ng ΔΓ¬nh Minh
d6fa3298fa
update: FluxKontextInpaintPipeline support ( #11820 )
...
* update: FluxKontextInpaintPipeline support
* fix: Refactor code, remove mask_image_latents and ruff check
* feat: Add test case and fix with pytest
* Apply style fixes
* copies
---------
Co-authored-by: YiYi Xu <yixu310@gmail.com >
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-07-01 23:34:27 -10:00
Sayak Paul
6f1d6694df
[lora] tests for exclude_modules with Wan VACE ( #11843 )
...
* wan vace.
* update
* update
* import problem
2025-07-02 14:23:26 +05:30
Ju Hoon Park
0e95aa853e
[From Single File] support from_single_file method for WanVACE3DTransformer ( #11807 )
...
* add `WandVACETransformer3DModel` in`SINGLE_FILE_LOADABLE_CLASSES`
* add rename keys for `VACE`
add rename keys for `VACE`
* fix typo
Sincere thanks to @nitinmukesh πββοΈ
* support for `1.3B VACE` model
Sincere thanks to @nitinmukesh againπββοΈ
* update
* update
* Apply style fixes
---------
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-07-02 05:55:36 +02:00
Luo Yihang
5ef74fd5f6
fix norm not training in train_control_lora_flux.py ( #11832 )
2025-07-01 17:37:54 -10:00
Steven Liu
64a9210315
[docs] Deprecated pipelines ( #11838 )
...
add warning
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2025-07-01 14:02:54 -10:00
Steven Liu
d31b8cea3e
[docs] Batch generation ( #11841 )
...
* draft
* fix
* fix
* feedback
* feedback
2025-07-01 17:00:20 -07:00
Mikko Tukiainen
62e847db5f
Use real-valued instead of complex tensors in Wan2.1 RoPE ( #11649 )
...
* use real instead of complex tensors in Wan2.1 RoPE
* remove the redundant type conversion
* unpack rotary_emb
* register rotary embedding frequencies as non-persistent buffers
* Apply style fixes
---------
Co-authored-by: Aryan <aryan@huggingface.co >
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-07-01 13:57:19 -10:00
Sayak Paul
470458623e
[docs] fix single_file example. ( #11847 )
...
fix single_file example.
2025-07-01 21:23:27 +05:30
Aryan
a79c3af6bb
[single file] Cosmos ( #11801 )
...
* update
* update
* update docs
2025-07-01 18:02:58 +05:30
Aryan
3f3f0c16a6
[tests] Fix failing float16 cuda tests ( #11835 )
...
* update
* update
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2025-07-01 11:13:58 +05:30
jiqing-feng
f3e1310469
reset deterministic in tearDownClass ( #11785 )
...
* reset deterministic in tearDownClass
Signed-off-by: jiqing-feng <jiqing.feng@intel.com >
* fix deterministic setting
Signed-off-by: jiqing-feng <jiqing.feng@intel.com >
---------
Signed-off-by: jiqing-feng <jiqing.feng@intel.com >
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2025-07-01 10:06:54 +05:30
Sayak Paul
87f83d3dd9
[tests] add test for hotswapping + compilation on resolution changes ( #11825 )
...
* add resolution changes tests to hotswapping test suite.
* fixes
* docs
* explain duck shapes
* fix
2025-07-01 09:40:34 +05:30
Aryan
f064b3bf73
Remove print statement in SCM Scheduler ( #11836 )
...
remove print
2025-06-30 09:07:34 -10:00
Benjamin Bossan
3b079ec3fa
ENH: Improve speed of function expanding LoRA scales ( #11834 )
...
* ENH Improve speed of expanding LoRA scales
Resolves #11816
The following call proved to be a bottleneck when setting a lot of LoRA
adapters in diffusers:
cdaf84a708/src/diffusers/loaders/peft.py (L482)
This is because we would repeatedly call unet.state_dict(), even though
in the standard case, it is not necessary:
cdaf84a708/src/diffusers/loaders/unet_loader_utils.py (L55)
This PR fixes this by deferring this call, so that it is only run when
it's necessary, not earlier.
* Small fix
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2025-06-30 20:25:56 +05:30
Sayak Paul
bc34fa8386
[lora]feat: use exclude modules to loraconfig. ( #11806 )
...
* feat: use exclude modules to loraconfig.
* version-guard.
* tests and version guard.
* remove print.
* describe the test
* more detailed warning message + shift to debug
* update
* update
* update
* remove test
2025-06-30 20:08:53 +05:30
Sayak Paul
05e7a854d0
[lora] fix: lora unloading behvaiour ( #11822 )
...
* fix: lora unloading behvaiour
* fix
* update
2025-06-28 12:00:42 +05:30
Aryan
76ec3d1fee
Support dynamically loading/unloading loras with group offloading ( #11804 )
...
* update
* add test
* address review comments
* update
* fixes
* change decorator order to fix tests
* try fix
* fight tests
2025-06-27 23:20:53 +05:30
Aryan
cdaf84a708
TorchAO compile + offloading tests ( #11697 )
...
* update
* update
* update
* update
* update
* user property instead
2025-06-27 18:31:57 +05:30
Sayak Paul
e8e44a510c
[CI] disable onnx, mps, flax from the CI ( #11803 )
...
* disable onnx, mps, flax
* remove
2025-06-27 16:33:43 +05:30
Sayak Paul
21543de571
remove syncs before denoising in Kontext ( #11818 )
2025-06-27 15:57:55 +05:30
Aryan
d7dd924ece
Kontext fixes ( #11815 )
...
fix
2025-06-26 13:03:44 -10:00
Sayak Paul
00f95b9755
Kontext training ( #11813 )
...
* support flux kontext
* make fix-copies
* add example
* add tests
* update docs
* update
* add note on integrity checker
* initial commit
* initial commit
* add readme section and fixes in the training script.
* add test
* rectify ckpt_id
* fix ckpt
* fixes
* change id
* update
* Update examples/dreambooth/train_dreambooth_lora_flux_kontext.py
Co-authored-by: Aryan <aryan@huggingface.co >
* Update examples/dreambooth/README_flux.md
---------
Co-authored-by: Aryan <aryan@huggingface.co >
Co-authored-by: linoytsaban <linoy@huggingface.co >
Co-authored-by: Linoy Tsaban <57615435+linoytsaban@users.noreply.github.com >
2025-06-26 19:31:42 +03:00
Aryan
eea76892e8
Flux Kontext ( #11812 )
...
* support flux kontext
* make fix-copies
* add example
* add tests
* update docs
* update
* add note on integrity checker
* make fix-copies issue
* add copied froms
* make style
* update repository ids
* more copied froms
2025-06-26 21:29:59 +05:30
kaixuanliu
27bf7fcd0e
adjust tolerance criteria for test_float16_inference in unit test ( #11809 )
...
Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com >
2025-06-26 13:19:59 +05:30
Sayak Paul
a185e1ab91
[tests] add a test on torch compile for varied resolutions ( #11776 )
...
* 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 >
2025-06-26 10:07:03 +05:30
Animesh Jain
d93381cd41
[rfc][compile] compile method for DiffusionPipeline ( #11705 )
...
* [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>
2025-06-26 08:41:38 +05:30
Dhruv Nair
3649d7b903
Follow up for Group Offload to Disk ( #11760 )
...
* update
* update
* update
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2025-06-26 07:24:24 +05:30
Sayak Paul
10c36e0b78
[chore] post release v0.34.0 ( #11800 )
...
* post release v0.34.0
* code quality
---------
Co-authored-by: YiYi Xu <yixu310@gmail.com >
2025-06-26 06:56:46 +05:30
Sayak Paul
8846635873
fix deprecation in lora after 0.34.0 release ( #11802 )
2025-06-25 08:48:20 -10:00
kaixuanliu
dd285099eb
adjust to get CI test cases passed on XPU ( #11759 )
...
* adjust to get CI test cases passed on XPU
Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com >
* fix format issue
Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com >
* Apply style fixes
---------
Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com >
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Aryan <aryan@huggingface.co >
2025-06-25 14:02:17 +05:30
Sayak Paul
80f27d7e8d
[tests] skip instead of returning. ( #11793 )
...
skip instead of returning.
2025-06-25 08:59:36 +05:30
Sayak Paul
d3e27e05f0
guard omnigen processor. ( #11799 )
2025-06-24 19:15:34 +05:30
Aryan
5df02fc171
[tests] Fix group offloading and layerwise casting test interaction ( #11796 )
...
* update
* update
* update
2025-06-24 17:33:32 +05:30
Sayak Paul
7392c8ff5a
[chore] raise as early as possible in group offloading ( #11792 )
...
* raise as early as possible in group offloading
* remove check from ModuleGroup
2025-06-24 15:05:23 +05:30
Aryan
474a248f10
[tests] Fix HunyuanVideo Framepack device tests ( #11789 )
...
update
2025-06-24 13:49:37 +05:30
YiYi Xu
7bc0a07b19
[lora] only remove hooks that we add back ( #11768 )
...
up
2025-06-23 16:49:19 -10:00
Sayak Paul
92542719ed
[docs] minor cleanups in the lora docs. ( #11770 )
...
* minor cleanups in the lora docs.
* Apply suggestions from code review
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* format docs
* fix copies
---------
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
2025-06-24 08:10:07 +05:30
imbr92
6760300202
Add --lora_alpha and metadata handling to train_dreambooth_lora_sana.py ( #11744 )
...
Co-authored-by: Linoy Tsaban <57615435+linoytsaban@users.noreply.github.com >
2025-06-23 15:46:44 +03:00