1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-10-23 09:09:01 +03:00
Commit Graph

107 Commits

Author SHA1 Message Date
yiyixuxu
ca94c2de7d Do not count issues the PR author opened after the PR as linked
Applies to both the fixes-issue label and the issue-link reminder.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-21 09:30:33 +02:00
Dhruv Nair
ea981b8b7d [CI] Clean up test_modeling_common.py (#14988)
clean up
2026-10-14 16:48:28 +05:30
Sayak Paul
771779849b [tests] remove test_pipelines_common.py (#14669)
* migrate imports

* migrate stable diffusion adapter tests

* up

* move last remaining bits.

* simplify test policy wording

* move around

* move flux ip adapter testing stuff to flux module of test

* fix(ci): harden GitHub Actions workflows (#14669) (#14787)

fix(ci): harden workflow files flagged on #14669

Co-authored-by: hf-security-analysis[bot] <265538906+hf-security-analysis[bot]@users.noreply.github.com>

* clarify comment.

* remove name from batch_input

---------

Co-authored-by: hf-security-analysis[bot] <265538906+hf-security-analysis[bot]@users.noreply.github.com>
2026-10-06 11:43:52 +05:30
Steven Liu
c60830ee36 [fix] Add return types (#14874)
* add return types

* add return blocks

* style

* modular pipelines

* add a test to validate

* feedback - skip deprecated stuff
2026-09-30 08:59:23 -07:00
Sayak Paul
031b2798ad spit output to stderr when extracting GPU tests for PRs (#14847)
* update

* don't use xdist during gpu tests in PRs.

* Revert "update"

This reverts commit 0906d05c8b.

* fix(ci): harden GitHub Actions workflows (#14847) (#14849)

fix(ci): harden workflow files flagged on #14847

Co-authored-by: hf-security-analysis[bot] <265538906+hf-security-analysis[bot]@users.noreply.github.com>

* redirect to stderr

---------

Co-authored-by: DN6 <dhruv.nair@gmail.com>
Co-authored-by: hf-security-analysis[bot] <265538906+hf-security-analysis[bot]@users.noreply.github.com>
2026-09-30 10:47:09 +05:30
Sayak Paul
daad99a04a [tests] remove quanto tests. (#14254)
* remove quanto tests.

* deprecate quanto and remove tests
2026-08-27 13:59:40 +05:30
Sayak Paul
0a0c57d388 feat: improve issue reminder workflow and introduce conditional autoclose (#14477)
* feat: improve issue reminder workflow and introduce conditional auto-close

* up

* filter the comments coming from the bot.

* include older PRs.

* implement point 1 of Yiyi's feedback

* clarify reminder message

* report each at-risk PR to Slack once, widen the rescue window

The Slack rescue branch fired on every daily run between SLACK_RESCUE_DAYS and
AUTOCLOSE_DAYS, so a PR the team decided not to rescue came back three times.
Append a hidden marker to the warning comment once a PR has been reported, and
skip PRs that already carry it.

Also move the Slack ping from 7 to 5 days after the warning, leaving 5 days
(instead of 3) between the message and the auto-close, so a Friday message
still gets a reply.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* clarify reminder message

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 09:02:14 +05:30
Dhruv Nair
3681e65996 Restructure skill files and reference guides for CLI based installation. (#14454)
* restructure guides as skill references

* reorganize AGENTS.md and references

* clean up

* clean up

* clean up

* fix AGENTS.md references and add check_ai to Makefile

* clean up

* update paths

* clean up
2026-08-20 18:16:49 +05:30
YiYi Xu
4d89a88748 [modular] detect stale auto docstrings in CI + regenerate current ones (#14241)
* Regenerate stale modular auto docstrings

Mechanical output of `python utils/modular_auto_docstring.py
src/diffusers/modular_pipelines --fix_and_overwrite` on current main.
These docstrings drifted because the CI check only verifies a docstring
exists, not that its content matches the current block declarations.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Make auto docstring check detect stale content, not just missing docstrings

Check mode now regenerates each # auto_docstring docstring the same way
--fix_and_overwrite does (generate -> insert -> ruff/doc-builder format,
on a temp copy) and compares with the checked-in file, reporting the
stale classes. Works like check_copies: forgetting to run the fixer now
fails CI on the PR that caused the drift, including when the causing
change is in another file (leaf block declarations, templates, specs).

The check now imports diffusers to evaluate doc properties, so the
check_auto_docs CI job moves to the torch container with the test job's
dependency install.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-07-22 09:05:54 -10:00
Dhruv Nair
80bfe77b57 Remove JAX/Flax (#14169)
* Remove JAX/Flax support

Deletes all Flax models, schedulers, pipelines, and loading utilities,
the from_flax loading path, flax/jax packaging extras, Flax CI filters,
Flax training examples, and Flax content in translated docs.

Hub compatibility is preserved: Flax class names in old model_index.json
files are still stripped to their PyTorch equivalents, and *.msgpack
files in repos are still ignored during download.

* Drop Flax class-name remapping from model_index.json loading

Flax-saved checkpoint metadata is no longer recognized: class names like
FlaxStableDiffusionPipeline in model_index.json now fail to resolve
instead of being remapped to their PyTorch equivalents. *.msgpack files
in hub repos are still ignored during download.

* Restore Flax training examples

The example scripts are standalone and still work with diffusers<=0.39.x.
A warning note is added to each Flax README section pointing out the
version requirement now that the library itself no longer ships Flax.

* update

* Repoint scheduler default-config tests off the Flax fixture

* Repoint example training tests off the Flax fixture
2026-07-21 13:12:27 +05:30
Sayak Paul
5f33428194 update licensing for others to 2026. (#14128)
Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
2026-07-08 07:40:20 +05:30
Sayak Paul
4f37263ab7 [chore] update to 2026 finally. (#14079)
update to 2026 finally.
2026-06-29 20:20:44 -04:00
Sayak Paul
9a72cd3ee9 ci: don't remind on prs from admins, etc. (#13965)
* ci: don't remind on prs from admins, etc.

* don't remind model authors about linking issues/.
2026-06-18 13:53:10 +05:30
Sayak Paul
5e7540fc5c [tests] port final set of model tests and others (#13974)
* port final set of model tests and others

* fix extracter.
2026-06-17 15:27:03 +05:30
YiYi Xu
4757c7c465 Make root PHILOSOPHY.md a symlink to the docs philosophy page (#13954)
* Make root PHILOSOPHY.md a symlink to the docs philosophy page

The root PHILOSOPHY.md had drifted into a stale duplicate of
docs/source/en/conceptual/philosophy.md (which was rewritten in #13808 to
cover the single-file model policy and Modular Diffusers). Replace it with a
symlink to the docs file, mirroring CONTRIBUTING.md -> contribution.md, so
there's a single source of truth.

A symlink renders as a path stub (not content) on GitHub, so repoint the
links that pointed at blob/main/PHILOSOPHY.md to the rendered docs site:
the PR template and the English contribution guide.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Point contributor-guide links at the rendered docs site

CONTRIBUTING.md is a symlink, so blob/main/CONTRIBUTING.md renders as a path
stub on GitHub rather than the guide. Repoint the PR template and README
links to the rendered docs page, matching the philosophy/AI-agents links.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Repoint remaining symlink-stub doc links to the rendered docs site

The stale-bot comment and the ko/zh contribution guides still linked to
blob/main/{CONTRIBUTING,PHILOSOPHY}.md, which render as path stubs because
those root files are symlinks. Point them at the rendered docs pages
(localized /ko/ and /zh/ for the translations).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 07:39:24 -10:00
Sayak Paul
f7f1f6304d [CI] implement a bot to remind prs to link issues if not. (#13744)
* implement a bot to remind prs to link issues if not.

* up

* remove auto-close and add contribution guide.

* restrict to one comment

* Apply suggestions from code review

Co-authored-by: sergereview[bot] <283583894+sergereview[bot]@users.noreply.github.com>

* put dodgy stuff in try-except

* limit to 2 days

* style.

---------

Co-authored-by: sergereview[bot] <283583894+sergereview[bot]@users.noreply.github.com>
2026-06-13 09:15:09 +05:30
Sayak Paul
e87b2a7ad8 [docs] Follow ups for consistent forward docstrings (#13779)
* feat: allow docstring checker to fix unused args in docstrings.

* feat: check for returns, too.

* [docs] add missing Returns sections to forward/__call__ docstrings (#13830)

Adds a Returns: section to the 43 model forward() and pipeline __call__()
methods flagged by utils/check_forward_call_docstrings.py, which requires a
Returns: section whenever the method has a non-None return annotation.

Descriptions reflect the actual return statements (Output dataclass when
return_dict=True, plain tuple otherwise; bare tensors / lists where
applicable) and reuse each file's existing doc-builder link form. Also
reformats a malformed single-line Returns: in pipeline_aura_flow.py that the
check could not detect.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

* Apply style fixes

---------

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-29 09:07:10 +05:30
Sayak Paul
f502538134 [WIP] chore: add utilities to check if call/forward methods are documented. (#13758)
* chore: add utilities to check if call/forward methods are documented.

* Fix missing forward/__call__ docstring entries (#13769)

add missing

* style.

---------

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>
2026-05-21 08:00:22 +05:30
Sayak Paul
cbdedbaf03 [tests] add attention backend tests. (#13174)
* add attention backend tests.

* remove existing tests/others/test_attention_backends.py file

* modify generate_model_tests.py

* remove native.

* account for _keep_in_fp32_modules

* don't skip when exception is raised.

* use is_kernels_available()

* mark with compile.

* move rtol and atol to methods as defaults.

* Apply suggestions from code review

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>

* up

* up
2026-05-12 17:00:00 +09:00
Sayak Paul
f7fd76adcd [attention backends] fix ring CP for flash and flash 3 (#13182)
* tests: add cp backend and attention backend tests.

* up

* up

* up

* fix ring for flash and flash_3

* generate.

* Apply suggestions from code review

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

* up

* up

---------

Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com>
2026-04-24 20:35:08 -03:00
Sayak Paul
dad80d728d [ci] simplify release workflow. (#13329)
* simplify release workflow.

* up

* trigger on branches too.

* restrict permissions to read.

* use sha

* remove determination step of latest branch

* resolve rest
2026-04-24 19:56:20 -03:00
Dhruv Nair
d7bc233b4b [CI] Add PR/Issue Auto Labeler (#13380)
* update

* update

* update

* update

* update

* update

* update

* update

* Apply suggestion from @sayakpaul

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-04-07 10:02:18 +05:30
Dhruv Nair
7bbd96da5d [CI] Update fetching pipelines for latest HF Hub Version (#13322)
update
2026-03-24 16:42:32 +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
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
YiYi Xu
b1c77f67ac [modular] add auto_docstring & more doc related refactors (#12958)
* up

* up up

* update outputs

* style

* add modular_auto_docstring!

* more auto docstring

* style

* up up up

* more more

* up

* address feedbacks

* add TODO in the description for empty docstring

* refactor based on dhruv's feedback: remove the class method

* add template method

* up

* up up up

* apply auto docstring

* make style

* rmove space in make docstring

* Apply suggestions from code review

* revert change in z

* fix

* Apply style fixes

* include auto-docstring check in the modular ci. (#13004)

* Run ruff format after auto docstring generation

* up

* upup

* upup

* style

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-01-26 17:12:13 -10:00
Steven Liu
6a2309b98d [utils] Update check_doc_toc (#12642)
update

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2025-11-13 08:42:31 -08:00
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
a4df8dbc40 Update more licenses to 2025 (#11746)
update
2025-06-19 07:46:01 +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
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
Yao Matrix
0ba1f76d4d enable print_env on xpu (#11507)
* detect xpu in print_env

Signed-off-by: YAO Matrix <matrix.yao@intel.com>

* enhance code, test passed on XPU

Signed-off-by: Yao Matrix <matrix.yao@intel.com>

---------

Signed-off-by: YAO Matrix <matrix.yao@intel.com>
Signed-off-by: Yao Matrix <matrix.yao@intel.com>
2025-05-09 16:30:51 +05:30
Sayak Paul
efc9d68b15 [chore] fix lora docs utils (#11338)
fix lora docs utils
2025-04-17 09:25:53 +05:30
Ishan Modi
d63e6fccb1 [BUG] fixed _toctree.yml alphabetical ordering (#11277)
update
2025-04-16 09:04:22 -07:00
Sayak Paul
7054a34978 do not use DIFFUSERS_REQUEST_TIMEOUT for notification bot (#11273)
fix to a constant
2025-04-11 14:19:46 +05:30
Sayak Paul
d1387ecee5 fix timeout constant (#11252)
* fix timeout constant

* style

* fix
2025-04-09 17:48:52 +05:30
Dhruv Nair
edc154da09 Update Ruff to latest Version (#10919)
* update

* update

* update

* update
2025-04-09 16:51:34 +05:30
Kenneth Gerald Hamilton
f10775b1b5 Fixed requests.get function call by adding timeout parameter. (#11156)
* Fixed requests.get function call by adding timeout parameter.

* declare DIFFUSERS_REQUEST_TIMEOUT in constants and import when needed

* remove unneeded os import

* Apply style fixes

---------

Co-authored-by: Sai-Suraj-27 <sai.suraj.27.729@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-04 07:23:14 +01:00
Dhruv Nair
cc7b5b873a [CI] Improvements to conditional GPU PR tests (#10859)
* update

* update

* update

* update

* update

* update

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* update
2025-02-25 09:49:29 +05:30
Dhruv Nair
b27d4edbe1 [CI] Update always test Pipelines list in Pipeline fetcher (#10856)
* update

* update

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2025-02-21 16:24:20 +05:30
Sayak Paul
f550745a2b [Utils] add utilities for checking if certain utilities are properly documented (#7763)
* add; utility to check if attn_procs,norms,acts are properly documented.

* add support listing to the workflows.

* change to 2024.

* small fixes.

* does adding detailed docstrings help?

* uncomment image processor check

* quality

* fix, thanks to @mishig.

* Apply suggestions from code review

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

* style

* JointAttnProcessor2_0

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* Update docs/source/en/api/normalization.md

Co-authored-by: hlky <hlky@hlky.ac>

---------

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Co-authored-by: hlky <hlky@hlky.ac>
2025-02-20 12:37:00 +05:30
Sayak Paul
4ace7d0483 [chore] change licensing to 2025 from 2024. (#10615)
change licensing to 2025 from 2024.
2025-01-20 16:57:27 -10:00
Sayak Paul
02cbe972c3 [Tests] update always test pipelines list. (#10143)
update always test pipelines list.
2024-12-16 08:51:55 +05:30
Pedro Cuenca
acf79b3487 Don't stale close-to-merge (#10096)
Re: https://github.com/huggingface/diffusers/discussions/10046#discussioncomment-11443466
2024-12-03 13:00:01 +05:30
Sayak Paul
ff182ad669 [CI] add a big GPU marker to run memory-intensive tests separately on CI (#9691)
* add a marker for big gpu tests

* update

* trigger on PRs temporarily.

* onnx

* fix

* total memory

* fixes

* reduce memory threshold.

* bigger gpu

* empty

* g6e

* Apply suggestions from code review

* address comments.

* fix

* fix

* fix

* fix

* fix

* okay

* further reduce.

* updates

* remove

* updates

* updates

* updates

* updates

* fixes

* fixes

* updates.

* fix

* workflow fixes.

---------

Co-authored-by: Aryan <aryan@huggingface.co>
2024-10-31 18:44:34 +05:30
Tolga Cangöz
7071b7461b Errata: Fix typos & \s+$ (#9008)
* Fix typos

* chore: Fix typos

* chore: Update README.md for promptdiffusion example

* Trim trailing white spaces

* Fix a typo

* update number

* chore: update number

* Trim trailing white space

* Update README.md

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

* Update README.md

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

---------

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
2024-08-02 21:24:25 -07:00
Dhruv Nair
5fbb4d32d5 [CI] Slow Test Updates (#8870)
* update

* update

* update
2024-07-25 16:00:43 +05:30
Sayak Paul
d8bcb33f4b [Tests] fix slices of 26 tests (first half) (#8959)
* check for assertions.

* update with correct slices.

* okay

* style

* get it ready

* update

* update

* update

---------

Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com>
2024-07-25 14:56:49 +05:30
Dhruv Nair
f57b27d2ad Update pipeline test fetcher (#8931)
update
2024-07-23 10:02:22 +05:30
Dhruv Nair
c7a84ba2f4 Enforce ordering when running Pipeline slow tests (#8763)
update
2024-07-02 10:55:50 +05:30