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

347 Commits

Author SHA1 Message Date
Sayak Paul
a5eb4c1364 Fix PyArrow compatibility in CPU CI (#15082) 2026-10-20 19:24:14 +05:30
Sayak Paul
7ecb1e1b4f Flux3 image (#15046)
* Bump the actions group with 17 updates (#12)

Bumps the actions group with 17 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `6` | `7` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `4.6.2` | `7.0.1` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3.12.0` | `4.2.0` |
| [docker/login-action](https://github.com/docker/login-action) | `3.7.0` | `4.6.0` |
| [docker/build-push-action](https://github.com/docker/build-push-action) | `6.19.2` | `7.3.0` |
| [huggingface/doc-builder/.github/workflows/build_main_documentation.yml](https://github.com/huggingface/doc-builder) | `e60a538eea9817ab312196d0d233604b01697265` | `af49b8dc3859c3d80c7220c8c0ba146431132e49` |
| [actions/setup-python](https://github.com/actions/setup-python) | `5.6.0` | `7.0.0` |
| [huggingface/doc-builder/.github/workflows/build_pr_documentation.yml](https://github.com/huggingface/doc-builder) | `e60a538eea9817ab312196d0d233604b01697265` | `af49b8dc3859c3d80c7220c8c0ba146431132e49` |
| [anthropics/claude-code-action](https://github.com/anthropics/claude-code-action) | `1.0.155` | `1.0.193` |
| [huggingface/security-workflows/.github/workflows/codeql-reusable.yml](https://github.com/huggingface/security-workflows) | `1.1.0` | `1.2.0` |
| [actions/download-artifact](https://github.com/actions/download-artifact) | `4.3.0` | `8.0.1` |
| [actions/labeler](https://github.com/actions/labeler) | `5.0.0` | `7.0.0` |
| [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) | `1.13.0` | `1.14.2` |
| [huggingface/tailscale-action](https://github.com/huggingface/tailscale-action) | `7d53c9737e53934c30290b5524d1c9b4a7c98c8a` | `07d36e4c3b68707bd3fe070dbb96f03f993a6efd` |
| [trufflesecurity/trufflehog](https://github.com/trufflesecurity/trufflehog) | `3.94.2` | `3.97.0` |
| [crate-ci/typos](https://github.com/crate-ci/typos) | `1.42.1` | `1.49.0` |
| [huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml](https://github.com/huggingface/doc-builder) | `9ad2de8582b56c017cb530c1165116d40433f1c6` | `af49b8dc3859c3d80c7220c8c0ba146431132e49` |


Updates `actions/checkout` from 6 to 7
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

Updates `actions/upload-artifact` from 4.6.2 to 7.0.1
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4.6.2...v7.0.1)

Updates `docker/setup-buildx-action` from 3.12.0 to 4.2.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](8d2750c68a...bb05f3f551)

Updates `docker/login-action` from 3.7.0 to 4.6.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](c94ce9fb46...dbcb813823)

Updates `docker/build-push-action` from 6.19.2 to 7.3.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](10e90e3645...53b7df96c9)

Updates `huggingface/doc-builder/.github/workflows/build_main_documentation.yml` from e60a538eea9817ab312196d0d233604b01697265 to af49b8dc3859c3d80c7220c8c0ba146431132e49
- [Release notes](https://github.com/huggingface/doc-builder/releases)
- [Commits](e60a538eea...af49b8dc38)

Updates `actions/setup-python` from 5.6.0 to 7.0.0
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5.6.0...v7)

Updates `huggingface/doc-builder/.github/workflows/build_pr_documentation.yml` from e60a538eea9817ab312196d0d233604b01697265 to af49b8dc3859c3d80c7220c8c0ba146431132e49
- [Release notes](https://github.com/huggingface/doc-builder/releases)
- [Commits](e60a538eea...af49b8dc38)

Updates `anthropics/claude-code-action` from 1.0.155 to 1.0.193
- [Release notes](https://github.com/anthropics/claude-code-action/releases)
- [Commits](80b3182633...9d7150bc8a)

Updates `huggingface/security-workflows/.github/workflows/codeql-reusable.yml` from 1.1.0 to 1.2.0
- [Release notes](https://github.com/huggingface/security-workflows/releases)
- [Commits](dc6ca34688...e0d40aaf3c)

Updates `actions/download-artifact` from 4.3.0 to 8.0.1
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4.3.0...3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c)

Updates `actions/labeler` from 5.0.0 to 7.0.0
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](8558fd7429...bf12e9b00b)

Updates `pypa/gh-action-pypi-publish` from 1.13.0 to 1.14.2
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](ed0c53931b...dc37677b2e)

Updates `huggingface/tailscale-action` from 7d53c9737e53934c30290b5524d1c9b4a7c98c8a to 07d36e4c3b68707bd3fe070dbb96f03f993a6efd
- [Release notes](https://github.com/huggingface/tailscale-action/releases)
- [Commits](7d53c9737e...07d36e4c3b)

Updates `trufflesecurity/trufflehog` from 3.94.2 to 3.97.0
- [Release notes](https://github.com/trufflesecurity/trufflehog/releases)
- [Commits](6bd2d14f7a...bcfcf73aaf)

Updates `crate-ci/typos` from 1.42.1 to 1.49.0
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](65120634e7...8a48f81b6c)

Updates `huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml` from 9ad2de8582b56c017cb530c1165116d40433f1c6 to af49b8dc3859c3d80c7220c8c0ba146431132e49
- [Release notes](https://github.com/huggingface/doc-builder/releases)
- [Commits](9ad2de8582...af49b8dc38)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: docker/setup-buildx-action
  dependency-version: 4.2.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: docker/login-action
  dependency-version: 4.6.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: docker/build-push-action
  dependency-version: 7.3.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: huggingface/doc-builder/.github/workflows/build_main_documentation.yml
  dependency-version: af49b8dc3859c3d80c7220c8c0ba146431132e49
  dependency-type: direct:production
  dependency-group: actions
- dependency-name: actions/setup-python
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml
  dependency-version: af49b8dc3859c3d80c7220c8c0ba146431132e49
  dependency-type: direct:production
  dependency-group: actions
- dependency-name: anthropics/claude-code-action
  dependency-version: 1.0.193
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: huggingface/security-workflows/.github/workflows/codeql-reusable.yml
  dependency-version: 1.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: actions/download-artifact
  dependency-version: 8.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/labeler
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: pypa/gh-action-pypi-publish
  dependency-version: 1.14.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: huggingface/tailscale-action
  dependency-version: 07d36e4c3b68707bd3fe070dbb96f03f993a6efd
  dependency-type: direct:production
  dependency-group: actions
- dependency-name: trufflesecurity/trufflehog
  dependency-version: 3.97.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: crate-ci/typos
  dependency-version: 1.49.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml
  dependency-version: af49b8dc3859c3d80c7220c8c0ba146431132e49
  dependency-type: direct:production
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Scope GITHUB_TOKEN permissions per job (#16)

A job with no `permissions:` block inherits whatever the repository
hands out. Each block added here grants what that job's own steps
need and nothing more.

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

* Pin GitHub Actions to commit SHAs (#17)

A tag is mutable: whoever controls the action's repository can move
`v4` to different code, and the next run picks it up with no diff to
review. Pinning to the commit SHA freezes the code that runs today.

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

* Bump doc-builder workflow pin (#22)

* Bump doc-builder pin to 9fc8a41 in build_documentation.yml

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

* Bump doc-builder pin to 9fc8a41 in build_pr_documentation.yml

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

* Bump doc-builder pin to 9fc8a41 in upload_pr_documentation.yml

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

---------

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

* Add FLUX.3 image: Flux3Transformer2DModel and modular text-to-image / image-to-image pipeline

Adds the FLUX.3 image transformer, the modular pipeline (text-to-image and image-to-image with one
prompt per call and one or more reference images), Flux3ImageProcessor, the converter for BFL's
model package, tests and docs. Verified against BFL's reference on the real checkpoint
(integration-notes/parity_bf16.py, temporary folder).

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

* integration-notes: ship the knight example image with the doc examples

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

* integration-notes: drop the tokenizer config workaround (not needed with transformers 5.x)

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

* Address review: rename the mode channel dict and the final norm, name the reference workflow
image_conditioned, document the guidance scale

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

* Add the step-distilled FLUX.3 image model (flow map)

- transformer: `flow_map` config and `target_timestep_embedder`; forward takes
  `target_timestep` (the timestep each step jumps to), added to the modulation
  of every mode and the final layer
- convert script: map `ref_time_in.*` and read `flow_map` from the package config
- modular: dedicated `Flux3Distilled*` blocks (text encoder, text input, text
  RoPE inputs, denoiser) with no guider and no negative prompt, 16 steps by
  default; `Flux3DistilledAutoBlocks` and `Flux3DistilledModularPipeline`
- tests for the flow-map transformer path and the distilled modular pipeline
- docs: step-distilled section and autodoc entries

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

* Add the step-distilled examples script

Same four cases as flux3_examples.py, run against the distilled Hub repo.

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

* feat: add a single file support in Flux3 image. (#32)

* Warn about the denoiser input fields that are not passed to the transformer

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

* Document reproducible generation with user-provided latents

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

* Run the QK norm and RoPE in fp32 with a single cast back, matching the BFL implementation

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

* parity script: run against the Hub repos and print the imported diffusers source

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

* Wrap a forward docstring line for the doc-builder style check

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

* support lora loading (including ostris) in flux3 image pipeline. (#25)

* feat: support loading and performing inference with single-file formatted FP8 and NVFP4 checkpoints (#24)

* feat: support loading siungle file format checkpoints including quants.

* remove updates.patch

* remove fluff.

* feat: add a single file support in Flux3 image.

* bfl prefix

* version guard.

* prpoagate changes.

* add tests

* doc mods and remove integration notes

* remove script for quant

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

* add LoRA training for Flux 3 image small

* tests: clarify FLUX3_TINY_REPO comment

The tiny repo is uploaded to hf-internal-testing and the env var is a
local-dev escape hatch, not a pre-PR TODO.

* examples/flux3: drop unused args and dead class

Remove the text-encoder weight-decay arg from both trainers (neither
trains the text encoder) and, from the img2img trainer, the
prior-preservation leftovers (--class_data_dir, --sample_batch_size,
PromptDataset) that it never uses.

* bump yarn example rank to 32 in flux3 small readme

* Document <ref_image_n> references and layout prompts for FLUX.3

Matches the prompt grammar in BFL's reference inference code (bfl-hf-flux3-confidential#3): references are addressed as <ref_image_n> in the order passed to image, and regions can be placed with a trailing JSON list of id / bbox / desc (from / src_bbox / tgt_bbox when editing).

* examples/flux3: set klein model id, document ref image prompts, clean leftover refs

* point flux3 image docs at the klein release model ids

* fix: TestFlux3DistilledModularPipelineWorkflow::test_workflow_defaults test (#35)

* fix checkpoint ids in the flux3 docs. (#38)

* [docs] update pipe loading with vae fp32 dtype (#39)

* update pipe loading with vae fp32 dtype

* updating `load_componenets`

* use actual ckpts. (#42)

* flux3 klein example: rename from "small" and fix caption dropout for long prompts (#41)

* examples/flux3: rename small trainer, tests and readme files to klein

* examples/flux3: fix caption dropout shape mismatch for prompts longer than the pad window

* examples/flux3: add caption dropout to the i2i trainer

* examples/flux3: complete the klein rename (test class names, example output dirs)

* examples/flux3: guard against train_batch_size>1 with variable-length captions

* update flux3.md (#43)

* examples/flux3: support train_batch_size>1 and prior preservation with variable-length captions (#44)

* doc

* autodocstrings.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: hf-security-analysis[bot] <265538906+hf-security-analysis[bot]@users.noreply.github.com>
Co-authored-by: Pauline Bailly-Masson <155966238+paulinebm@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: yiyixuxu <yixu310@gmail.com>
Co-authored-by: linoytsaban <linoy.tsaban@gmail.com>
Co-authored-by: apolinário <joaopaulo.passos@gmail.com>
Co-authored-by: Linoy Tsaban <57615435+linoytsaban@users.noreply.github.com>
Co-authored-by: Aritra Roy Gosthipaty <aritra.born2fly@gmail.com>
Co-authored-by: Yumeng Li <109459218+YumengLi007@users.noreply.github.com>
2026-10-15 22:00:50 +05:30
Sayak Paul
efe46a5b17 ci: move to python 3.11. (#15030)
* move to python 3.11.

* update setup.py along with others.

* fix(ci): pin GitHub Actions to commit SHAs (#15030) (#15033)

fix(ci): pin actions in workflows flagged on #15030

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

* up

* fix(ci): pin GitHub Actions to commit SHAs (#15030) (#15036)

fix(ci): pin actions in workflows flagged on #15030

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

* up

---------

Co-authored-by: hf-security-analysis[bot] <265538906+hf-security-analysis[bot]@users.noreply.github.com>
2026-10-14 20:11:45 +05:30
Pauline Bailly-Masson
40f63690da 🔒 Pin GitHub Actions to commit SHAs (#15028)
Pin GitHub Actions to commit SHAs

Replace mutable tags and branch refs in workflow files with full commit SHAs,
keeping the original version as a trailing comment.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 12:55:44 +02:00
Sayak Paul
d7d0b9c2c7 [ci] consolidate labeling on PRs. (#14911)
consolidate labeling on PRs.

Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com>
2026-10-09 10:49:19 +05:30
Pauline Bailly-Masson
71774d9bc8 Bump doc-builder workflow pin (#14957)
* Bump doc-builder pin to 9fc8a41 in build_documentation.yml

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

* Bump doc-builder pin to 9fc8a41 in build_pr_documentation.yml

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

* Bump doc-builder pin to 9fc8a41 in upload_pr_documentation.yml

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

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-10-06 19:51:32 +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
4ac08e9408 [diffusers-cli] add a dockerfile for diffusers cli hf jobs (#14550)
* add a dockerfile for diffusers cli hf jobs

* up

* up

* use diffusers from pypi

* fix(ci): harden GitHub Actions workflows (#14550) (#14851)

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

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

* Apply batched suggestions from code review

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

* lower bound for tokenizers.

---------

Co-authored-by: hf-security-analysis[bot] <265538906+hf-security-analysis[bot]@users.noreply.github.com>
Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com>
2026-09-29 16:50:36 +05:30
hf-security-analysis[bot]
0377f0c1b3 Pin GitHub Actions to commit SHAs (#14853)
A tag is mutable: whoever controls the action's repository can move
`v4` to different code, and the next run picks it up with no diff to
review. Pinning to the commit SHA freezes the code that runs today.

Co-authored-by: hf-security-analysis[bot] <265538906+hf-security-analysis[bot]@users.noreply.github.com>
2026-09-23 16:05:59 +02:00
hf-security-analysis[bot]
256e9fbc0b Scope GITHUB_TOKEN permissions per job (#14852)
A job with no `permissions:` block inherits whatever the repository
hands out. Each block added here grants what that job's own steps
need and nothing more.

Co-authored-by: hf-security-analysis[bot] <265538906+hf-security-analysis[bot]@users.noreply.github.com>
2026-09-23 14:39:08 +02:00
hf-security-analysis[bot]
654dac8880 fix(ci): harden GitHub Actions workflows (#14798) (#14800)
fix(ci): harden workflow files flagged on #14798

Co-authored-by: hf-security-analysis[bot] <265538906+hf-security-analysis[bot]@users.noreply.github.com>
2026-09-17 14:01:00 +02:00
Sayak Paul
570b470947 changes in the pr_link_issue_reminder workjflow (#14798) 2026-09-17 17:27:16 +05:30
hf-security-analysis[bot]
ae2e4c7907 fix(ci): harden GitHub Actions workflows (#14623) (#14788)
fix(ci): harden workflow files flagged on #14623

Co-authored-by: hf-security-analysis[bot] <265538906+hf-security-analysis[bot]@users.noreply.github.com>
2026-09-16 20:30:44 +05:30
Dhruv Nair
5211641272 [CI] Consolidate style, Serge review and GPU test bots under @diffusers-bot (#14623)
* [CI] Consolidate style, Serge review and GPU test bots under `@diffusers-bot`

* split bot workflows

* update

* update

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-09-16 14:16:37 +05:30
Sayak Paul
d30c748f5f tests: add lora tester mixin for modular and migrate minimax h3. (#14605)
* tests: add lora tester mixin for modular and migrate minimax h3.

* enable lora testing modular ci.

* remove seed.

* up
2026-09-09 07:59:46 +02:00
Sayak Paul
7c79e70607 [core] deprecate onnx (#14658)
* deprecate onnx

* up
2026-09-01 18:24:03 +05:30
Sayak Paul
119c339551 ci: fix invocation for compile tests. (#14552)
ci: fix invokation for compile tests.
2026-08-27 17:34:54 +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
5900dbf0da [CI] Fix build and test step in release workflow (#14543)
update build test to use tiny flux
2026-08-20 19:48:39 +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
Sayak Paul
0aa743c08d [tests] migrate lora tests for pipelines to use new mixins (#14268)
* start migrating lora tests.

* massive refactor.

* up

* remove planning doc

* address review: tighten lora bias tests

* move run_pipe()

* collapse.

* up

* done

* update

* only use diffusers api contract in tests.

* fix: pass tmp_path through AuraFlow test_lora_B_bias override

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

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-20 17:19:50 +05:30
Dhruv Nair
ac56fa2f25 [CI] Fix authentication on forked PRs (#14534)
fix auth for forked PRs
2026-08-19 17:41:04 +05:30
Dhruv Nair
aeda394db7 [CI] Allow single file tests to run as fast tests (#14324)
* update

* update

* update

* update

* [FA2] Use `kernels-community/aiter-flash-attn-ck` Hub kernel for ROCm FlashAttention (drop `aiter` dependency) (#14436)

Use  Hub kernel

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

* add HF_TOKEN to pr workflow

* fix token

* clean up

* Apply suggestions from code review

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

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: BADAOUI Abdennacer <106801897+Abdennacer-Badaoui@users.noreply.github.com>
2026-08-19 10:32:03 +05:30
Sayak Paul
425b113c21 [tests] refactor pipeline-level quantization tests (#14435)
* fix(torchao): route root-level tensors around safetensors reconstruction

Models with parameters at the root of the module tree (e.g. Wan's
`scale_shift_table`) crashed torchao's `unflatten_tensor_state_dict`
when loading serialized checkpoints, since flattened tensor names are
assumed to carry a module prefix. Filter such tensors and their
metadata entries out of the reconstruction and merge them back
unchanged.

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

* fix(bnb): defer 8-bit weights split from their SCB stats across shards

Sharded serialization can place an 8-bit weight and its `SCB`
statistics in different shard files, in which case the shard-by-shard
loader failed with "Missing quantization component `SCB`". Hold the
incomplete half of the pair back until its counterpart arrives with a
later shard, mirroring the torchao pending mechanism, and disable
parallel shard loading for prequantized 8-bit checkpoints.

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

* [tests] extend model-level quantization tester mixins

Migrate remaining model-level coverage from tests/quantization into the
tester mixins so it runs for every wired model:

- base: buffer-placement assertions in the device-map test, and an
  opt-in sharded-serialization test enabled by setting
  `sharded_serialization_config`
- bnb: serialization across all configs (sharded included), dtype
  assignment and adapter training for 8-bit, device moves preserving
  the memory footprint, corrupted-state-dict loading error, and a fixed
  modules-to-not-convert test (BitsAndBytesConfig only exposes
  llm_int8_skip_modules; the old test passed an unsupported kwarg and
  only survived by being skipped)
- torchao: custom device maps with cpu/disk offload, generalized from
  the Flux-specific test
- gguf: the diffusers-format single-file loading path, wired into the
  Flux model tests

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

* [tests] fix model-level quantization test wiring

- SD3.5: the quantized testers reused the random-init dummy inputs
  (4 latent channels, fp32) while the tiny Hub checkpoint has
  in_channels=8 and the quantizers load the model in half precision;
  give them matching inputs and relax the 4-bit memory expectation for
  the tiny checkpoint.
- QwenImage / Flux2: the quantized testers had no Hub checkpoint wired
  at all, so every test errored; point them at
  hf-internal-testing/tiny-qwenimage-pipe and tiny-flux2 with matching
  inputs.
- NucleusMoE: no tiny checkpoint exists on the Hub yet; comment the
  testers out like the LTX ones.

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

* [tests] split tests/quantization into pipeline-level and backend-level tiers

Pipeline-level quantization tests (pipeline quality slices, cpu offload,
LoRA loading, compile, PipelineQuantizationConfig) move to
tests/pipelines/testing_utils/quantization.py, marked per backend so the
nightly CI can select them with `pytest -m`. tests/quantization keeps
only backend-level tests that fit neither tier: config validation,
utility warnings, and GGUF CUDA kernel correctness. Tests already
covered by the model-level mixins are dropped.

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

* [ci] select nightly quantization tests by marker across test tiers

Each backend job now runs `pytest -m <marker>` over tests/models,
tests/quantization, and tests/pipelines/testing_utils/quantization.py,
giving the model-level mixin tests a nightly home with the backend
dependencies installed. The torchao job additionally installs mslk.

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

---------

Co-authored-by: sayak@huggingface.co <sayak@ip-10-53-90-45.ec2.internal>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 20:53:32 +02:00
Sayak Paul
9284607295 ci: drop stale tokenizers<0.23.0 override (#14504)
transformers now hard-requires tokenizers>=0.23.1,<0.24.0 at import time,
so the override from #13767 breaks every job at the environment step
(ImportError: tokenizers>=0.23.1,<0.24.0 is required ... found 0.22.2).
The originally-problematic 0.23.0 is already excluded by transformers'
own lower bound, so the override can go entirely.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 13:09:05 +02:00
YiYi Xu
6f2010e8bb Auto-reply to new model requests with remote code guidance (#14343)
* Auto-reply to new model requests with Modular Diffusers guidance

Points new model/pipeline/scheduler requests at building a Hub-hosted
modular pipeline instead of waiting on a core PR, and asks requesters to
tag @asomoza when they have something to share.

Gates on the `### Model/Pipeline/Scheduler description` heading the issue
form renders rather than on a label: the label the template declares does
not exist in this repo, so GitHub never applies it, and template labels
land after issue creation anyway.

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

* Apply suggestion from @yiyixuxu

* Tighten the new model request reply

Lead with starting on the Hub and frame what follows as a support
decision (work with the authors, upstream a community version, or point
people at the Hub one) rather than a soft no to PRs. Trims the message
by collapsing the author section and the resource list.

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

* Link the Modular Pipelines collection in the reply

Community-built model pipelines belong in the Modular Pipelines
collection rather than Custom Blocks, so point the "we'll add the ones we
like" line there and keep both collections in the resource list.

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

* Recommend starting on the Hub for new models

Adds a callout to the contribution guide asking model authors to get in
touch on a feature request, and community contributors to coordinate
there and start with a Hub repo at the same time.

Points agents the same way: default to publishing a modular pipeline as
remote code rather than opening a PR against src/diffusers.

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

* Apply suggestion from @yiyixuxu

* Apply suggestion from @yiyixuxu

* Update .github/workflows/new_model_request_reply.yml

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

* Consolidate the Hub-first guidance into one place

stevhliu noted the new callout in "Adding pipelines, models, schedulers"
overlapped the last two paragraphs of the AI-assisted contributions
section. Drop the community-contributor paragraph there — it is general
contribution policy rather than agent-specific guidance — and point the
model-author paragraph at the callout instead. Carry the custom models
link over so the non-modular Hub path stays covered.

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

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
2026-08-03 06:40:38 -10:00
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
YiYi Xu
485610972d update agent doc to cover more on tests + include it in review CI scope (#14197)
* Add agent-doc gotcha: build pipeline test components from real classes, not mocks

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

* Document modular pipeline tests; soften tiny-repo policy; move mock rule to skill only

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

* Split testing conventions into .ai/testing.md; include tests/ in review scope

Move the Testing section out of the model-integration skill into a
standalone .ai/testing.md so it loads in both the authoring and review
flows, add it to review-rules' reading list and the reference guides,
extend the mock rule to call-level doubles (monkeypatched component
methods), and widen the @claude CI reviewer's review scope to tests/
(edit/commit scope unchanged).

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

* Document how to run modular pipelines/blocks; add callback_kwargs gotcha

- modular.md: new 'Running a modular pipeline' section — init_pipeline()/
  load_components()/output= usage, from_blocks_dict composition,
  update_components() for config values, and the anti-pattern of calling
  blocks directly with a hand-built PipelineState
- testing.md: modular block tests run through the pipeline API and assert
  on outputs; tiny repos must mirror the real checkpoint's shape (per-variant
  repos when configs differ); bespoke tests live on the tester class
- pipelines.md: callback_kwargs must be built with a loop — locals() inside
  a dict comprehension sees the comprehension's scope and always KeyErrors

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

* Apply suggestions from code review

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

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-07-16 10:10:32 -10:00
Mishig
a7166cee37 Make doc builds faster (#14131)
* Update doc build workflow: light installs, drop custom container

* Update doc build workflow: light installs, drop custom container

* Keep the pin comment dependabot-compatible

* Keep the pin comment dependabot-compatible
2026-07-06 16:18:24 +02:00
Sayak Paul
eb0a900caa fix claude code review fix in PRs. (#14058) 2026-06-24 12:02:38 -07:00
Tarek Ziade
b596c83aef ci: use hosted runners (#13987)
hosted runners can now reach Serge directly without creating a tailscale session
2026-06-18 17:38:04 +02: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
fd823e825c fix untrusted fork secret mixing (#13970) 2026-06-16 13:27:23 +05:30
Sayak Paul
21e33389cd [CI] allow running tests as PR comments through a bot (#13873)
* start

* fix

* remove planning
2026-06-16 08:32:45 +05:30
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
Tarek Ziade
adbe0d8b43 switch to a webhook (#13884)
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-06-08 13:01:51 +02:00
Sayak Paul
6a43fb6e8a [ci] add hook tests to our CI. (#13848)
add hook tests to our CI.
2026-06-04 13:50:14 +05:30
Tarek Ziade
07de1f6fe8 moved to a webhook (#13836) 2026-06-01 12:11:06 +05:30
Sayak Paul
de6b049539 override torch stuff to prevent them from getting updated (#13831) 2026-05-29 11:44:45 +05:30
Sayak Paul
ff3b86b475 [ci] shorten serge name. (#13795)
* shorten serge name.

* change path
2026-05-27 21:43:56 +05:30
Sayak Paul
216e245c74 ci: use uv overrides to make sure tokenizers install from <=0.23.0 under subs (#13767)
* ci: use uv overrides to make sure tokenizers install from <=0.23.0 under subs

* up
2026-05-21 18:20:37 +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
YiYi Xu
fece08aa62 [CI] claude_review: target source PR's branch for follow-up PRs (#13774)
* [CI] claude_review: target source PR's branch for follow-up PRs

The follow-up PR was always cut from main, so once main moved on from the
PR's base the cherry-pick conflicted and the run failed (see run
26191835696). For non-fork PRs we now target the PR's own head branch
instead — Claude's edits apply cleanly regardless of how main has diverged,
and merging the follow-up folds them into the original PR. Fork PRs still
target the default branch since we can't push to a fork.

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

* [CI] claude_review: skip COMMIT THIS on fork PRs

Falling back to main as the base for fork PRs hits the same cherry-pick
conflict pattern the previous commit fixed for source PRs, and we can't
push to the fork's branch anyway. Bail early with a friendly comment
pointing users to apply Claude's suggestions manually or open an issue.

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

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 13:21:51 -10:00
Dhruv Nair
9c4e201dd1 [CI] Replace print_env step in CI with diffusers-cli env (#13662)
update

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-05-20 16:31:43 +05:30
Sayak Paul
776282c5d0 [ci] switch to a more unique name (#13738)
switch to a more unique name
2026-05-13 16:38:54 +09:00
Sayak Paul
8ad63fb1b5 Serge reviewer (#13735)
* add serge reviewer to enable claude for inline reviews.

* remove local settings

* up

* up

* switch the trigger word to goku
2026-05-13 16:34:07 +09:00
Sayak Paul
303f3a7061 Install transformers from main for doc and staging (#13723)
* Use Mistral3Model/Ministral3ForCausalLM

* [docs] add magcache to caching api listing (#13714)

add magcache to caching api listing

* install transformers from main

* up

* up

* up

* up[

* shorten deprecation cycle for flax.

* Revert "shorten deprecation cycle for flax."

This reverts commit 692d98db7b.

---------

Co-authored-by: Akshan Krithick <akshankrithick305@gmail.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>
2026-05-12 18:50:50 +09:00