Sayak Paul
368958df6f
[LoRA] parse metadata from LoRA and save metadata ( #11324 )
...
* 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 >
2025-06-13 14:37:49 +05:30
Aryan
e52ceae375
Support Wan AccVideo lora ( #11704 )
...
* update
* make style
* Update src/diffusers/loaders/lora_conversion_utils.py
* add note explaining threshold
2025-06-13 11:55:08 +05:30
Sayak Paul
62cbde8d41
[docs] mention fp8 benefits on supported hardware. ( #11699 )
...
* mention fp8 benefits on supported hardware.
* Update docs/source/en/quantization/torchao.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
---------
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
2025-06-13 07:17:03 +05:30
Sayak Paul
648e8955cf
swap out token for style bot. ( #11701 )
2025-06-13 06:51:19 +05:30
Sayak Paul
00b179fb1a
[docs] add compilation bits to the bitsandbytes docs. ( #11693 )
...
* add compilation bits to the bitsandbytes docs.
* Apply suggestions from code review
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* finish
---------
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
2025-06-12 08:49:24 +05:30
Tolga Cangöz
47ef79464f
Apply Occam's Razor in position embedding calculation ( #11562 )
...
* fix: remove redundant indexing
* style
2025-06-11 13:47:37 -10:00
Joel Schlosser
b272807bc8
Avoid DtoH sync from access of nonzero() item in scheduler ( #11696 )
2025-06-11 12:03:40 -10:00
rasmi
447ccd0679
Set _torch_version to N/A if torch is disabled. ( #11645 )
2025-06-11 11:59:54 -10:00
Aryan
f3e09114f2
Improve Wan docstrings ( #11689 )
...
* improve docstrings for wan
* Apply suggestions from code review
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* make style
---------
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
2025-06-12 01:18:40 +05:30
Sayak Paul
91545666e0
[tests] model-level device_map clarifications ( #11681 )
...
* add clarity in documentation for device_map
* docs
* fix how compiler tester mixins are used.
* propagate
* more
* typo.
* fix tests
* fix order of decroators.
* clarify more.
* more test cases.
* fix doc
* fix device_map docstring in pipeline_utils.
* more examples
* more
* update
* remove code for stuff that is already supported.
* fix stuff.
2025-06-11 22:41:59 +05:30
Sayak Paul
b6f7933044
[tests] tests for compilation + quantization (bnb) ( #11672 )
...
* start adding compilation tests for quantization.
* fixes
* make common utility.
* modularize.
* add group offloading+compile
* xfail
* update
* Update tests/quantization/test_torch_compile_utils.py
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
* fixes
---------
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
2025-06-11 21:14:24 +05:30
Yao Matrix
33e636cea5
enable torchao test cases on XPU and switch to device agnostic APIs for test cases ( #11654 )
...
* enable torchao cases on XPU
Signed-off-by: Matrix YAO <matrix.yao@intel.com >
* device agnostic APIs
Signed-off-by: YAO Matrix <matrix.yao@intel.com >
* more
Signed-off-by: YAO Matrix <matrix.yao@intel.com >
* fix style
Signed-off-by: YAO Matrix <matrix.yao@intel.com >
* enable test_torch_compile_recompilation_and_graph_break on XPU
Signed-off-by: YAO Matrix <matrix.yao@intel.com >
* resolve comments
Signed-off-by: YAO Matrix <matrix.yao@intel.com >
---------
Signed-off-by: Matrix YAO <matrix.yao@intel.com >
Signed-off-by: YAO Matrix <matrix.yao@intel.com >
2025-06-11 15:17:06 +05:30
Tolga Cangöz
e27142ac64
[Wan] Fix VAE sampling mode in WanVideoToVideoPipeline ( #11639 )
...
* fix: vae sampling mode
* fix a typo
2025-06-11 14:19:23 +05:30
Sayak Paul
8e88495da2
[LoRA] support Flux Control LoRA with bnb 8bit. ( #11655 )
...
support Flux Control LoRA with bnb 8bit.
2025-06-11 08:32:47 +05:30
Akash Haridas
b79803fe08
Allow remote code repo names to contain "." ( #11652 )
...
* allow loading from repo with dot in name
* put new arg at the end to avoid breaking compatibility
* add test for loading repo with dot in name
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2025-06-10 13:38:54 -10:00
Meatfucker
b0f7036d9a
Update pipeline_flux_inpaint.py to fix padding_mask_crop returning only the inpainted area ( #11658 )
...
* Update pipeline_flux_inpaint.py to fix padding_mask_crop returning only the inpainted area and not the entire image.
* Apply style fixes
* Update src/diffusers/pipelines/flux/pipeline_flux_inpaint.py
2025-06-10 13:07:22 -04:00
Philip Brown
6c7fad7ec8
Add community class StableDiffusionXL_T5Pipeline ( #11626 )
...
* Add community class StableDiffusionXL_T5Pipeline
Will be used with base model opendiffusionai/stablediffusionxl_t5
* Changed pooled_embeds to use projection instead of slice
* "make style" tweaks
* Added comments to top of code
* Apply style fixes
2025-06-09 15:57:51 -04:00
Dhruv Nair
5b0dab1253
Introduce DeprecatedPipelineMixin to simplify pipeline deprecation process ( #11596 )
...
* update
* update
* update
* update
* update
* update
* update
2025-06-09 13:03:40 +05:30
Sayak Paul
7c6e9ef425
[tests] Fix how compiler mixin classes are used ( #11680 )
...
* fix how compiler tester mixins are used.
* propagate
* more
2025-06-09 09:24:45 +05:30
Valeriy Sofin
f46abfe4ce
fixed axes_dims_rope init (huggingface#11641) ( #11678 )
2025-06-09 01:16:30 +05:30
Aryan
73a9d5856f
Wan VACE ( #11582 )
...
* initial support
* make fix-copies
* fix no split modules
* add conversion script
* refactor
* add pipeline test
* refactor
* fix bug with mask
* fix for reference images
* remove print
* update docs
* update slices
* update
* update
* update example
2025-06-06 17:53:10 +05:30
Sayak Paul
16c955c5fd
[tests] add test for torch.compile + group offloading ( #11670 )
...
* add a test for group offloading + compilation.
* tests
2025-06-06 11:34:44 +05:30
jiqing-feng
0f91f2f6fc
use deterministic to get stable result ( #11663 )
...
* use deterministic to get stable result
Signed-off-by: jiqing-feng <jiqing.feng@intel.com >
* add deterministic for int8 test
Signed-off-by: jiqing-feng <jiqing.feng@intel.com >
---------
Signed-off-by: jiqing-feng <jiqing.feng@intel.com >
2025-06-06 09:14:00 +05:30
Markus Pobitzer
745199a869
[examples] flux-control: use num_training_steps_for_scheduler ( #11662 )
...
[examples] flux-control: use num_training_steps_for_scheduler in get_scheduler instead of args.max_train_steps * accelerator.num_processes
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2025-06-05 14:56:25 +05:30
Sayak Paul
0142f6f35a
[chore] bring PipelineQuantizationConfig at the top of the import chain. ( #11656 )
...
bring PipelineQuantizationConfig at the top of the import chain.
2025-06-05 14:17:03 +05:30
Dhruv Nair
d04cd95012
[CI] Some improvements to Nightly reports summaries ( #11166 )
...
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* updatee
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
2025-06-05 13:55:01 +05:30
Steven Liu
c934720629
[docs] Model cards ( #11112 )
...
* initial
* update
* hunyuanvideo
* ltx
* fix
* wan
* gen guide
* feedback
* feedback
* pipeline-level quant config
* feedback
* ltx
2025-06-02 16:55:14 -07:00
Steven Liu
9f48394bf7
[docs] Caching methods ( #11625 )
...
* cache
* feedback
2025-06-02 10:58:47 -07:00
Sayak Paul
20273e5503
[tests] chore: rename lora model-level tests. ( #11481 )
...
chore: rename lora model-level tests.
2025-06-02 09:21:40 -07:00
Sayak Paul
d4dc4d7654
[chore] misc changes in the bnb tests for consistency. ( #11355 )
...
misc changes in the bnb tests for consistency.
2025-06-02 08:41:10 -07:00
Roy Hvaara
3a31b291f1
Use float32 RoPE freqs in Wan with MPS backends ( #11643 )
...
Use float32 for RoPE on MPS in Wan
2025-06-02 09:30:09 +05:30
Sayak Paul
b975bceff3
[docs] update torchao doc link ( #11634 )
...
update torchao doc link
2025-05-30 08:30:36 -07:00
co63oc
8183d0f16e
Fix typos in strings and comments ( #11476 )
...
* Fix typos in strings and comments
Signed-off-by: co63oc <co63oc@users.noreply.github.com >
* Update src/diffusers/hooks/hooks.py
Co-authored-by: Aryan <contact.aryanvs@gmail.com >
* Update src/diffusers/hooks/hooks.py
Co-authored-by: Aryan <contact.aryanvs@gmail.com >
* Update layerwise_casting.py
* Apply style fixes
* update
---------
Signed-off-by: co63oc <co63oc@users.noreply.github.com >
Co-authored-by: Aryan <contact.aryanvs@gmail.com >
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-05-30 18:49:00 +05:30
Yaniv Galron
6508da6f06
typo fix in pipeline_flux.py ( #11623 )
2025-05-30 11:32:13 +05:30
VLT Media
d0ec6601df
Bug: Fixed Image 2 Image example ( #11619 )
...
Bug: Fixed Image 2 Image example where a PIL.Image was improperly being asked for an item via index.
2025-05-30 11:30:52 +05:30
Yao Matrix
a7aa8bf28a
enable group_offloading and PipelineDeviceAndDtypeStabilityTests on XPU, all passed ( #11620 )
...
* enable group_offloading and PipelineDeviceAndDtypeStabilityTests on XPU,
all passed
Signed-off-by: Matrix YAO <matrix.yao@intel.com >
* fix style
Signed-off-by: Matrix YAO <matrix.yao@intel.com >
* fix
Signed-off-by: Matrix YAO <matrix.yao@intel.com >
---------
Signed-off-by: Matrix YAO <matrix.yao@intel.com >
Co-authored-by: Aryan <aryan@huggingface.co >
2025-05-30 11:30:37 +05:30
Yaniv Galron
3651bdb766
removing unnecessary else statement ( #11624 )
...
Co-authored-by: Aryan <aryan@huggingface.co >
2025-05-30 11:29:24 +05:30
Justin Ruan
df55f05358
Fix wrong indent for examples of controlnet script ( #11632 )
...
fix wrong indent for training controlnet
2025-05-29 15:26:39 -07:00
Yuanzhou Cai
89ddb6c0a4
[textual_inversion_sdxl.py] fix lr scheduler steps count ( #11557 )
...
fix lr scheduler steps count
Co-authored-by: Linoy Tsaban <57615435+linoytsaban@users.noreply.github.com >
2025-05-29 15:25:45 +03:00
Steven Liu
be2fb77dc1
[docs] PyTorch 2.0 ( #11618 )
...
* combine
* Update docs/source/en/optimization/fp16.md
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2025-05-28 09:42:41 -07:00
Sayak Paul
54cddc1e12
[CI] fix the filename for displaying failures in lora ci. ( #11600 )
...
fix the filename for displaying failures in lora ci.
2025-05-27 22:27:27 -07:00
Linoy Tsaban
28ef0165b9
[Sana Sprint] add image-to-image pipeline ( #11602 )
...
* sana sprint img2img
* fix import
* fix name
* fix image encoding
* fix image encoding
* fix image encoding
* fix image encoding
* fix image encoding
* fix image encoding
* try w/o strength
* try scaling differently
* try with strength
* revert unnecessary changes to scheduler
* revert unnecessary changes to scheduler
* Apply style fixes
* remove comment
* add copy statements
* add copy statements
* add to doc
* add to doc
* add to doc
* add to doc
* Apply style fixes
* empty commit
* fix copies
* fix copies
* fix copies
* fix copies
* fix copies
* docs
* make fix-copies.
* fix doc building error.
* initial commit - add img2img test
* initial commit - add img2img test
* fix import
* fix imports
* Apply style fixes
* empty commit
* remove
* empty commit
* test vocab size
* fix
* fix prompt missing from last commits
* small changes
* fix image processing when input is tensor
* fix order
* Apply style fixes
* empty commit
* fix shape
* remove comment
* image processing
* remove comment
* skip vae tiling test for now
* Apply style fixes
* empty commit
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: sayakpaul <spsayakpaul@gmail.com >
2025-05-27 22:09:51 +03:00
Sayak Paul
a4da216125
[LoRA] improve LoRA fusion tests ( #11274 )
...
* improve lora fusion tests
* more improvements.
* remove comment
* update
* relax tolerance.
* num_fused_loras as a property
Co-authored-by: BenjaminBossan <benjamin.bossan@gmail.com >
* updates
* update
* fix
* fix
Co-authored-by: BenjaminBossan <benjamin.bossan@gmail.com >
* Update src/diffusers/loaders/lora_base.py
Co-authored-by: Benjamin Bossan <BenjaminBossan@users.noreply.github.com >
---------
Co-authored-by: BenjaminBossan <benjamin.bossan@gmail.com >
Co-authored-by: Benjamin Bossan <BenjaminBossan@users.noreply.github.com >
2025-05-27 09:02:12 -07:00
Leo Jiang
5939ace91b
Adding NPU for get device function ( #11617 )
...
* Adding device choice for npu
* Adding device choice for npu
---------
Co-authored-by: J石页 <jiangshuo9@h-partners.com >
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2025-05-27 06:59:15 -07:00
Linoy Tsaban
cc59505e26
[training docs] smol update to README files ( #11616 )
...
add comment to install prodigy
2025-05-27 06:26:54 -07:00
Sayak Paul
5f5d02fbf1
Make group offloading compatible with torch.compile() ( #11605 )
...
wip: check if we can make go compile compat
2025-05-26 20:15:29 -07:00
Sayak Paul
53748217e6
fix security issue in build docker ci ( #11614 )
...
* fix security issue in build docker ci
* better
* update
2025-05-26 22:43:01 +05:30
Dhruv Nair
826f43505d
Fix mixed variant downloading ( #11611 )
...
* update
* update
2025-05-26 21:43:48 +05:30
Sayak Paul
4af76d0d7d
[tests] Changes to the torch.compile() CI and tests ( #11508 )
...
* 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.
2025-05-26 08:31:04 -07:00
kaixuanliu
b5c2050a16
Fix bug when variant and safetensor file does not match ( #11587 )
...
* Apply style fixes
* init test
Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com >
* adjust
Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com >
* add the variant check when there are no component folders
Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com >
* update related test cases
Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com >
* update related unit test cases
Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com >
* adjust
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>
2025-05-26 14:18:41 +05:30