dependabot[bot]
7251bb4fd0
Bump urllib3 from 2.2.3 to 2.5.0 in /examples/server ( #11748 )
...
Bumps [urllib3](https://github.com/urllib3/urllib3 ) from 2.2.3 to 2.5.0.
- [Release notes](https://github.com/urllib3/urllib3/releases )
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst )
- [Commits](https://github.com/urllib3/urllib3/compare/2.2.3...2.5.0 )
---
updated-dependencies:
- dependency-name: urllib3
dependency-version: 2.5.0
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-19 11:09:33 +05:30
Aryan
3fba74e153
Add missing HiDream license ( #11747 )
...
update
2025-06-19 08:07:47 +05:30
Aryan
a4df8dbc40
Update more licenses to 2025 ( #11746 )
...
update
2025-06-19 07:46:01 +05:30
Sayak Paul
48eae6f420
[Quantizers] add is_compileable property to quantizers. ( #11736 )
...
add is_compileable property to quantizers.
2025-06-19 07:45:06 +05:30
Dhruv Nair
66394bf6c7
Chroma Follow Up ( #11725 )
...
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* updte
* update
* update
* update
2025-06-18 22:24:41 +05:30
Sayak Paul
62cce3045d
[chore] change to 2025 licensing for remaining ( #11741 )
...
change to 2025 licensing for remaining
2025-06-18 20:56:00 +05:30
Sayak Paul
05e867784d
[tests] device_map tests for all models. ( #11708 )
...
* 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 >
2025-06-18 10:52:06 +05:30
Leo Jiang
d72184eba3
[training] add ds support to lora hidream ( #11737 )
...
* [training] add ds support to lora hidream
* Apply style fixes
---------
Co-authored-by: J石页 <jiangshuo9@h-partners.com >
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-06-18 09:26:02 +05:30
Saurabh Misra
5ce4814af1
⚡ ️ Speed up method AutoencoderKLWan.clear_cache by 886% ( #11665 )
...
* ⚡ ️ Speed up method `AutoencoderKLWan.clear_cache` by 886%
**Key optimizations:**
- Compute the number of `WanCausalConv3d` modules in each model (`encoder`/`decoder`) **only once during initialization**, store in `self._cached_conv_counts`. This removes unnecessary repeated tree traversals at every `clear_cache` call, which was the main bottleneck (from profiling).
- The internal helper `_count_conv3d_fast` is optimized via a generator expression with `sum` for efficiency.
All comments from the original code are preserved, except for updated or removed local docstrings/comments relevant to changed lines.
**Function signatures and outputs remain unchanged.**
* Apply style fixes
* Apply suggestions from code review
Co-authored-by: Aryan <contact.aryanvs@gmail.com >
* Apply style fixes
---------
Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Aryan <aryan@huggingface.co >
Co-authored-by: Aryan <contact.aryanvs@gmail.com >
Co-authored-by: Aseem Saxena <aseem.bits@gmail.com >
2025-06-18 08:46:03 +05:30
Linoy Tsaban
1bc6f3dc0f
[LoRA training] update metadata use for lora alpha + README ( #11723 )
...
* lora alpha
* Apply style fixes
* Update examples/advanced_diffusion_training/README_flux.md
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
* fix readme format
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com >
2025-06-17 12:19:27 +03:00
Aryan
79bd7ecc78
Support more Wan loras (VACE) ( #11726 )
...
update
2025-06-17 10:39:18 +05:30
David Berenstein
9b834f8710
Add Pruna optimization framework documentation ( #11688 )
...
* Add Pruna optimization framework documentation
- Introduced a new section for Pruna in the table of contents.
- Added comprehensive documentation for Pruna, detailing its optimization techniques, installation instructions, and examples for optimizing and evaluating models
* Enhance Pruna documentation with image alt text and code block formatting
- Added alt text to images for better accessibility and context.
- Changed code block syntax from diff to python for improved clarity.
* Add installation section to Pruna documentation
- Introduced a new installation section in the Pruna documentation to guide users on how to install the framework.
- Enhanced the overall clarity and usability of the documentation for new users.
* Update pruna.md
* Update pruna.md
* Update Pruna documentation for model optimization and evaluation
- Changed section titles for consistency and clarity, from "Optimizing models" to "Optimize models" and "Evaluating and benchmarking optimized models" to "Evaluate and benchmark models".
- Enhanced descriptions to clarify the use of `diffusers` models and the evaluation process.
- Added a new example for evaluating standalone `diffusers` models.
- Updated references and links for better navigation within the documentation.
* Refactor Pruna documentation for clarity and consistency
- Removed outdated references to FLUX-juiced and streamlined the explanation of benchmarking.
- Enhanced the description of evaluating standalone `diffusers` models.
- Cleaned up code examples by removing unnecessary imports and comments for better readability.
* Apply suggestions from code review
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
* Enhance Pruna documentation with new examples and clarifications
- Added an image to illustrate the optimization process.
- Updated the explanation for sharing and loading optimized models on the Hugging Face Hub.
- Clarified the evaluation process for optimized models using the EvaluationAgent.
- Improved descriptions for defining metrics and evaluating standalone diffusers models.
---------
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com >
2025-06-16 12:25:05 -07:00
Carl Thomé
81426b0f19
Fix misleading comment ( #11722 )
2025-06-16 08:47:00 -10:00
Sayak Paul
f0dba33d82
[training] show how metadata stuff should be incorporated in training scripts. ( #11707 )
...
* show how metadata stuff should be incorporated in training scripts.
* typing
* fix
---------
Co-authored-by: Linoy Tsaban <57615435+linoytsaban@users.noreply.github.com >
2025-06-16 16:42:34 +05:30
Sayak Paul
d1db4f853a
[LoRA ]fix flux lora loader when return_metadata is true for non-diffusers ( #11716 )
...
* fix flux lora loader when return_metadata is true for non-diffusers
* remove annotation
2025-06-16 14:26:35 +05:30
Edna
8adc6003ba
Chroma Pipeline ( #11698 )
...
* working state from hameerabbasi and iddl
* working state form hameerabbasi and iddl (transformer)
* working state (normalization)
* working state (embeddings)
* add chroma loader
* add chroma to mappings
* add chroma to transformer init
* take out variant stuff
* get decently far in changing variant stuff
* add chroma init
* make chroma output class
* add chroma transformer to dummy tp
* add chroma to init
* add chroma to init
* fix single file
* update
* update
* add chroma to auto pipeline
* add chroma to pipeline init
* change to chroma transformer
* take out variant from blocks
* swap embedder location
* remove prompt_2
* work on swapping text encoders
* remove mask function
* dont modify mask (for now)
* wrap attn mask
* no attn mask (can't get it to work)
* remove pooled prompt embeds
* change to my own unpooled embeddeer
* fix load
* take pooled projections out of transformer
* ensure correct dtype for chroma embeddings
* update
* use dn6 attn mask + fix true_cfg_scale
* use chroma pipeline output
* use DN6 embeddings
* remove guidance
* remove guidance embed (pipeline)
* remove guidance from embeddings
* don't return length
* dont change dtype
* remove unused stuff, fix up docs
* add chroma autodoc
* add .md (oops)
* initial chroma docs
* undo don't change dtype
* undo arxiv change
unsure why that happened
* fix hf papers regression in more places
* Update docs/source/en/api/pipelines/chroma.md
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
* do_cfg -> self.do_classifier_free_guidance
* Update docs/source/en/api/models/chroma_transformer.md
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
* Update chroma.md
* Move chroma layers into transformer
* Remove pruned AdaLayerNorms
* Add chroma fast tests
* (untested) batch cond and uncond
* Add # Copied from for shift
* Update # Copied from statements
* update norm imports
* Revert cond + uncond batching
* Add transformer tests
* move chroma test (oops)
* chroma init
* fix chroma pipeline fast tests
* Update src/diffusers/models/transformers/transformer_chroma.py
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
* Move Approximator and Embeddings
* Fix auto pipeline + make style, quality
* make style
* Apply style fixes
* switch to new input ids
* fix # Copied from error
* remove # Copied from on protected members
* try to fix import
* fix import
* make fix-copes
* revert style fix
* update chroma transformer params
* update chroma transformer approximator init params
* update to pad tokens
* fix batch inference
* Make more pipeline tests work
* Make most transformer tests work
* fix docs
* make style, make quality
* skip batch tests
* fix test skipping
* fix test skipping again
* fix for tests
* Fix all pipeline test
* update
* push local changes, fix docs
* add encoder test, remove pooled dim
* default proj dim
* fix tests
* fix equal size list input
* update
* push local changes, fix docs
* add encoder test, remove pooled dim
* default proj dim
* fix tests
* fix equal size list input
* Revert "fix equal size list input"
This reverts commit 3fe4ad67d5 .
* update
* update
* update
* update
* update
---------
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com >
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-06-14 06:52:56 +05:30
Aryan
9f91305f85
Cosmos Predict2 ( #11695 )
...
* support text-to-image
* update example
* make fix-copies
* support use_flow_sigmas in EDM scheduler instead of maintain cosmos-specific scheduler
* support video-to-world
* update
* rename text2image pipeline
* make fix-copies
* add t2i test
* add test for v2w pipeline
* support edm dpmsolver multistep
* update
* update
* update
* update tests
* fix tests
* safety checker
* make conversion script work without guardrail
2025-06-14 01:51:29 +05:30
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