Commit Graph

6293 Commits

Author SHA1 Message Date
sayakpaul
afafb247cc fix dduf 2026-02-14 15:55:16 +05:30
sayakpaul
6c2e10adf6 more fixes. 2026-02-14 10:39:54 +05:30
Sayak Paul
ea27dd36af Merge branch 'main' into transformers-v5-pr 2026-02-14 08:30:28 +05:30
Sayak Paul
8abcf351c9 feat: implement apply_lora_scale to remove boilerplate. (#12994)
* feat: implement apply_lora_scale to remove boilerplate.

* apply to the rest.

* up

* remove more.

* remove.

* fix

* apply feedback.
2026-02-13 23:25:46 +05:30
sayakpaul
104aa6989e fix variant loading issues. 2026-02-13 19:39:49 +05:30
sayakpaul
8f0786a013 up 2026-02-13 19:26:41 +05:30
sayakpaul
1220500064 up 2026-02-13 19:06:58 +05:30
Sayak Paul
67fc007035 Merge branch 'main' into transformers-v5-pr 2026-02-13 19:04:00 +05:30
Sayak Paul
2843b3d37a Sunset Python 3.8 & get rid of explicit typing exports where possible (#12524)
* drop python 3.8

* remove list, tuple, dict from typing

* fold Unions into |

* up

* fix a bunch and please me.

* up

* up

* up

* up

* up

* up

* enforce 3.10.0.

* up

* up

* up

* up

* up

* up

* up

* up

* Update setup.py

Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com>

* up.

* python 3.10.

* ifx

* up

* up

* up

* up

* final

* up

* fix typing utils.

* up

* up

* up

* up

* up

* up

* fix

* up

* up

* up

* up

* up

* up

* handle modern types.

* up

* up

* fix ip adapter type checking.

* up

* up

* up

* up

* up

* up

* up

* revert docstring changes.

* keep deleted files deleted.

* keep deleted files deleted.

---------

Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com>
2026-02-13 18:16:51 +05:30
Sayak Paul
76af013a41 fix cosmos transformer typing. (#13134) 2026-02-13 14:51:19 +05:30
dg845
277e305589 [CI] Fix setuptools pkg_resources Bug for PR GPU Tests (#13132)
Try to fix setuptools pkg_resources error for PR GPU test workflow
2026-02-13 10:09:32 +05:30
David El Malih
5f3ea22513 docs: improve docstring scheduling_flow_match_heun_discrete.py (#13130)
Improve docstring scheduling flow match heun discrete
2026-02-12 14:32:04 -08:00
Sayak Paul
2402990609 Merge branch 'main' into transformers-v5-pr 2026-02-12 17:59:23 +05:30
dg845
427472eb00 [CI] Fix setuptools pkg_resources Errors (#13129)
Try to fix setuptools pkg_resources issue on CI
2026-02-12 17:48:44 +05:30
dg845
985d83c948 Fix LTX-2 Inference when num_videos_per_prompt > 1 and CFG is Enabled (#13121)
Fix LTX-2 inference when num_videos_per_prompt > 1 and CFG is enabled
2026-02-11 22:35:29 -08:00
Sayak Paul
eac49882d3 Merge branch 'main' into transformers-v5-pr 2026-02-12 10:33:27 +05:30
Sayak Paul
ed77a246c9 [modular] add tests for robust model loading. (#13120)
* add tests for robust model loading.

* apply review feedback.
2026-02-12 10:04:29 +05:30
Miguel Martin
a1816166a5 Cosmos Transfer2.5 inference pipeline: general/{seg, depth, blur, edge} (#13066)
* initial conversion script

* cosmos control net block

* CosmosAttention

* base model conversion

* wip

* pipeline updates

* convert controlnet

* pipeline: working without controls

* wip

* debugging

* Almost working

* temp

* control working

* cleanup + detail on neg_encoder_hidden_states

* convert edge

* pos emb for control latents

* convert all chkpts

* resolve TODOs

* remove prints

* Docs

* add siglip image reference encoder

* Add unit tests

* controlnet: add duplicate layers

* Additional tests

* skip less

* skip less

* remove image_ref

* minor

* docs

* remove skipped test in transfer

* Don't crash process

* formatting

* revert some changes

* remove skipped test

* make style

* Address comment + fix example

* CosmosAttnProcessor2_0 revert + CosmosAttnProcessor2_5 changes

* make style

* make fix-copies
2026-02-11 18:33:09 -10:00
David El Malih
06a0f98e6e docs: improve docstring scheduling_flow_match_euler_discrete.py (#13127)
Improve docstring scheduling flow match euler discrete
2026-02-11 16:39:55 -08:00
Jared Wen
d32483913a [Fix]Allow prompt and prior_token_ids to be provided simultaneously in GlmImagePipeline (#13092)
* allow loose input

Signed-off-by: JaredforReal <w13431838023@gmail.com>

* add tests

Signed-off-by: JaredforReal <w13431838023@gmail.com>

* format test_glm_image

Signed-off-by: JaredforReal <w13431838023@gmail.com>

---------

Signed-off-by: JaredforReal <w13431838023@gmail.com>
2026-02-11 08:29:36 -10:00
David El Malih
64e2adf8f5 docs: improve docstring scheduling_edm_dpmsolver_multistep.py (#13122)
Improve docstring scheduling edm dpmsolver multistep
2026-02-11 08:59:33 -08:00
Dhruv Nair
c3a4cd14b8 [CI] Refactor Wan Model Tests (#13082)
* update

* update

* update

* update

* update

* update

* update

* update
2026-02-11 14:42:58 +05:30
sayakpaul
4455f147aa fix skyreels type annotation. 2026-02-11 10:45:17 +05:30
sayakpaul
a3fc01ccca up with skyreelsv2 fixes. 2026-02-11 09:28:44 +05:30
Sayak Paul
e12d87e7a2 Merge branch 'main' into transformers-v5-pr 2026-02-11 08:46:41 +05:30
Sayak Paul
4d00980e25 [lora] fix non-diffusers lora key handling for flux2 (#13119)
fix non-diffusers lora key handling for flux2
2026-02-11 08:06:36 +05:30
Álvaro Somoza
5bf248ddd8 [SkyReelsV2] Fix ftfy import (#13113)
fix
2026-02-10 12:56:13 +05:30
Dhruv Nair
bedc67c75f [Docs] Add guide for AutoModel with custom code (#13099)
update
2026-02-10 12:19:44 +05:30
Sayak Paul
20efb79d49 [modular] add modular tests for Z-Image and Wan (#13078)
* add wan modular tests

* style.

* add z-image tests and other fixes.

* style.

* increase tolerance for zimage

* style

* address reviewer feedback.

* address reviewer feedback.

* remove unneeded func

* simplify even more.
2026-02-09 08:27:59 -10:00
Linoy Tsaban
8933686770 Z image lora training (#13056)
* initial commit

* initial commit

* initial commit

* initial commit

* initial commit

* initial commit

* initial commit

* fix vae

* fix prompts

* Apply style fixes

* fix license

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-09 15:45:59 +02:00
dg845
baaa8d040b LTX 2 Improve encode_video by Accepting More Input Types (#13057)
* Support different pipeline outputs for LTX 2 encode_video

* Update examples to use improved encode_video function

* Fix comment

* Address review comments

* make style and make quality

* Have non-iterator video inputs respect video_chunks_number

* make style and make quality

* Add warning when encode_video receives a non-denormalized np.ndarray

* make style and make quality

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-02-08 19:40:34 -08:00
YiYi Xu
44f4dc0054 [Modular] guard ModularPipeline.blocks attribute (#13014)
* up

* style
2026-02-08 16:12:47 -10:00
YiYi Xu
fd705bd8ff [Modular] refactor Wan: modular pipelines by task etc (#13063)
* initil

* fix init_pipeline etc

* style

* copies

* fix copies

* upup more

* fix test

* add output type (#13091)

---------

Co-authored-by: yiyi@huggingface.co <yiyi@ip-26-0-160-103.ec2.internal>
Co-authored-by: Álvaro Somoza <asomoza@users.noreply.github.com>
2026-02-07 11:28:27 -10:00
hlky
09dca386d0 ZImageControlNet cfg (#13080)
Co-authored-by: Álvaro Somoza <asomoza@users.noreply.github.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>
2026-02-07 10:40:55 -10:00
YiYi Xu
10dc589a94 [modular]simplify components manager doc (#13088)
* simplify components manager doc

* Apply suggestion from @yiyixuxu

* Apply suggestion from @stevhliu

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>

* Apply suggestion from @stevhliu

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>

---------

Co-authored-by: yiyi@huggingface.co <yiyi@ip-26-0-160-103.ec2.internal>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
2026-02-06 09:55:34 -10:00
David El Malih
44b8201d98 docs: improve docstring scheduling_dpmsolver_multistep_inverse.py (#13085)
* Improve docstring scheduling dpmsolver sde

* Update scheduling_dpmsolver_sde.py

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>

* run make fix-copies

---------

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
2026-02-06 09:20:05 -08:00
dxqb
ca79f8ccc4 GGUF fix for unquantized types when using unquantize kernels (#12498)
Even if the `qweight_type` is one of the `UNQUANTIZED_TYPES`, qweight still has to be "dequantized" because it is stored as an 8-bit tensor. Without doing so, it is therefore a shape mismatch in the following matmul.

Side notes:
 - why isn't DIFFUSERS_GGUF_CUDA_KERNELS on by default? It's significantly faster and only used when installed
 - https://huggingface.co/Isotr0py/ggml/tree/main/build has no build for torch 2.8 (or the upcoming 2.9). Who can we contact to make such a build?

Co-authored-by: YiYi Xu <yixu310@gmail.com>
2026-02-06 08:56:19 +05:30
CalamitousFelicitousness
99e2cfff27 Feature/zimage inpaint pipeline (#13006)
* Add ZImageInpaintPipeline

Updated the pipeline structure to include ZImageInpaintPipeline
    alongside ZImagePipeline and ZImageImg2ImgPipeline.
Implemented the ZImageInpaintPipeline class for inpainting
    tasks, including necessary methods for encoding prompts,
    preparing masked latents, and denoising.
Enhanced the auto_pipeline to map the new ZImageInpaintPipeline
    for inpainting generation tasks.
Added unit tests for ZImageInpaintPipeline to ensure
    functionality and performance.
Updated dummy objects to include ZImageInpaintPipeline for
    testing purposes.

* Add documentation and improve test stability for ZImageInpaintPipeline

- Add torch.empty fix for x_pad_token and cap_pad_token in test
- Add # Copied from annotations for encode_prompt methods
- Add documentation with usage example and autodoc directive

* Address PR review feedback for ZImageInpaintPipeline

Add batch size validation and callback handling fixes per review,
using diffusers conventions rather than suggested code verbatim.

* Update src/diffusers/pipelines/z_image/pipeline_z_image_inpaint.py

Co-authored-by: Álvaro Somoza <asomoza@users.noreply.github.com>

* Update src/diffusers/pipelines/z_image/pipeline_z_image_inpaint.py

Co-authored-by: Álvaro Somoza <asomoza@users.noreply.github.com>

* Add input validation and fix XLA support for ZImageInpaintPipeline

- Add missing is_torch_xla_available import for TPU support
- Add xm.mark_step() in denoising loop for proper XLA execution
- Add check_inputs() method for comprehensive input validation
- Call check_inputs() at the start of __call__

Addresses PR review feedback from @asomoza.

* Cleanup

---------

Co-authored-by: Álvaro Somoza <asomoza@users.noreply.github.com>
2026-02-05 11:48:25 -03:00
Sayak Paul
a3dcd9882f [core] make qwen hidden states contiguous to make torchao happy. (#13081)
make qwen hidden states contiguous to make torchao happy.
2026-02-05 09:02:32 +05:30
Sayak Paul
9fe0a9cac4 [core] make flux hidden states contiguous (#13068)
* make flux hidden states contiguous

* make fix-copies
2026-02-05 08:39:44 +05:30
David El Malih
03af690b60 docs: improve docstring scheduling_dpmsolver_multistep_inverse.py (#13083)
Improve docstring scheduling dpmsolver multistep inverse
2026-02-04 09:21:57 -08:00
Sayak Paul
90818e82b3 [docs] Fix syntax error in quantization configuration (#13076)
Fix syntax error in quantization configuration
2026-02-04 08:31:03 -08:00
Alan Ponnachan
430c557b6a Add support for Magcache (#12744)
* add magcache

* formatting

* add magcache support with calibration mode

* add imports

* improvements

* Apply style fixes

* fix kandinsky errors

* add tests and documentation

* Apply style fixes

* improvements

* Apply style fixes

* make fix-copies.

* minor fixes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-02-04 13:45:12 +05:30
Sayak Paul
1b8fc6c589 [modular] change the template modular pipeline card (#13072)
* start better template for modular pipeline card.

* simplify structure.

* refine.

* style.

* up

* add tests
2026-02-04 10:09:10 +05:30
YiYi Xu
6d4fc6baa0 [Modular] mellon doc etc (#13051)
* add metadata field to input/output param

* refactor mellonparam: move the template outside, add metaclass, define some generic template for custom node

* add from_custom_block

* style

* up up fix

* add mellon guide

* add to toctree

* style

* add mellon_types

* style

* mellon_type -> inpnt_types + output_types

* update doc

* add quant info to components manager

* fix more

* up up

* fix components manager

* update custom block guide

* update

* style

* add a warn for mellon and add new guides to overview

* Apply suggestions from code review

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>

* Update docs/source/en/modular_diffusers/mellon.md

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>

* more update on custom block guide

* Update docs/source/en/modular_diffusers/mellon.md

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>

* a few mamual

* apply suggestion: turn into bullets

* support define mellon meta with MellonParam directly, and update doc

* add the video

---------

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Co-authored-by: yiyi@huggingface.co <yiyi@ip-26-0-160-103.ec2.internal>
2026-02-03 13:38:57 -10:00
YiYi Xu
ebd06f9b11 [Modular] loader related (#13025)
* tag loader_id from Automodel

* style

* load_components by default only load components that are not already loaded

* by default, skip loading the componeneets does not have the repo id
2026-02-03 05:34:33 -10:00
Sayak Paul
10ef2269a9 Merge branch 'main' into transformers-v5-pr 2026-02-03 10:59:44 +05:30
songkey
b712042da1 [Flux2] Fix LoRA loading for Flux2 Klein by adaptively enumerating transformer blocks (#13030)
* Resolve Flux2 Klein 4B/9B LoRA loading errors

* Apply style fixes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-02-02 20:36:19 +05:30
Dhruv Nair
0b76728e27 Refactor Model Tests (#12822)
* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-02-02 18:51:44 +05:30
DefTruth
973e334443 feat: support Ulysses Anything Attention (#12996)
* feat: support Ulysses Anything Attention

* feat: support Ulysses Anything Attention

* feat: support Ulysses Anything Attention

* feat: support Ulysses Anything Attention

* fix UAA broken while using joint attn

* update

* post check

* add docs

* add docs

* remove lru cache

* move codes

* update
2026-02-02 17:04:32 +05:30