1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-10-27 21:33:02 +03:00

2022 Commits

Author SHA1 Message Date
Sayak Paul
8e7f4c9068 [tests] refactor h and i series pipelines (#14633)
refactor h and i series pipelines
2026-08-28 12:46:48 +05:30
Sayak Paul
552db5faf2 [tests] refactor e and g series pipeline tests (#14631)
refactor e and g series pipeline tests
2026-08-28 12:46:31 +05:30
Sayak Paul
a6c181cd88 [tests] refactor b* pipeline tests (#14625)
* refactor b* pipeline tests

* get_pipeline

* use get_pipeline())
2026-08-28 12:17:19 +05:30
Sayak Paul
14c4f874df [tests] refactor a* pipeline tests. (#14622)
* refactor a* pipeline tests.

* [tests] fix expected slice in the sparsectrl dict/tuple test

The `test_dict_tuple_outputs_equivalent` override ported in e10f8d08e carried a
nine-value expected slice that is not the one the pre-migration file used, so CI
failed on CPU with `Shape mismatch: actual torch.Size([6]) vs expected
torch.Size([9])`.

Six is correct: the base test slices `output_tuple[0, -3:, -3:, -1, -1]` and this
pipeline's dummy inputs use `num_frames=2`, so the frame axis yields 2 rather
than 3. Restored the original values, unchanged since #14120.

The literal is only read when `torch_device == "cpu"`, which is why local GPU
runs did not catch it.

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

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 11:45:54 +05:30
Sayak Paul
679c77463f [tests] refactor d series pipeline tests. (#14630)
refactor d series pipeline tests.
2026-08-28 11:44:31 +05:30
Akshan Krithick
a8c33fe99f refactor lumina2 pipeline tests to the new mixin structure (#14629)
* refactor lumina2 pipeline tests to the new mixin structure

* move lumina2 lora tests to the pipeline-level mixins

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-08-28 10:14:37 +05:30
Akshan Krithick
741c7d0c60 migrate ideogram4 lora tests to the pipeline-level mixins (#14628)
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-08-28 09:43:17 +05:30
Shadow_Lu
265b3f4e4a Fix callback tensor inputs that are never bound in the denoising loop (#14416)
Drop callback tensor inputs that are never bound in the denoising loop

LEditsPPPipelineStableDiffusion allows prompt_embeds, LEditsPPPipelineStableDiffusionXL
allows negative_add_time_ids and StableDiffusionXLControlNetUnionInpaintPipeline allows
masked_image_latents, but none of those names exist as locals in the respective __call__,
so callback_kwargs[k] = locals()[k] raises KeyError as soon as a user requests them.

Add a test_callback_inputs fast test to both LEdits++ test classes, which are plain
unittest.TestCase and therefore never ran the PipelineTesterMixin callback tests.

Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
2026-08-27 20:17:24 -07:00
dg845
9602fc5264 Fix Ideogram 4 Callback Handling and Tests (#14621)
Fix Ideogram 4 callback_kwargs and corresponding callback tests
2026-08-27 18:27:04 -07:00
Sayak Paul
df07532b39 tests: migrate tests from tests/lora (#14559)
* tests: migrate tests from tests/lora

* up
2026-08-27 15:08:42 +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
2371082217 [tests] refactor sdxl tests. (#14619)
refactor sdxl tests.
2026-08-27 13:30:12 +05:30
Sayak Paul
3d8d2e7218 [tests] refactor zimage and krea2 pipeline tests (#14563)
* refactor zimage and krea2 pipeline tests

* remove group offloading skip and propaget the refactors to the rest of zimage

* add negative prompt

---------

Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
2026-08-27 13:29:56 +05:30
Sayak Paul
fc1b2870cc [tests] migrate remaining flux pipeline tests to use new mixins (#14560)
* migrate remaining flux pipeline tests to use new mixins

* up

---------

Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
2026-08-27 13:02:34 +05:30
Sayak Paul
0351a3ab30 [tests] fix remote decoding tests and disable encode tests. (#14601)
fix remote decoding tests and disable encode tests.
2026-08-27 13:00:26 +05:30
Sayak Paul
02654ab749 tests: add ideogram4 tests for pipelines. (#14599)
* tests: add ideogram4 tests for pipelines.

* skip callback tests

* Update tests/pipelines/ideogram4/test_pipeline_ideogram4.py

Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>

* up

* up

* allow pipeline level group offloading test

* loosen tolerance.

---------

Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
2026-08-27 12:33:44 +05:30
Akshan Krithick
913ab2281a migrate wan lora tests to the pipeline-level mixins (#14613)
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-08-27 12:31:17 +05:30
Sayak Paul
82f175e05a post release 0.40.0 (#14545)
* post release 0.40.0

* quality

* remove dduf

* remove deprecated methods from export_utils
2026-08-27 10:12:56 +05:30
Akshan Krithick
c14a1e80ec migrate wan vace lora tests to the pipeline-level mixins (#14614)
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-08-27 10:11:34 +05:30
Sayak Paul
276ac2f8c4 [tests] migrate flux2 lora. (#14610)
migrate flux2 lora.
2026-08-27 10:11:28 +05:30
Akshan Krithick
20dc622fea migrate cogvideox lora tests to the pipeline-level mixins (#14615)
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-08-27 10:03:10 +05:30
Akshan Krithick
ec94eec6ca remove dead deepfloyd if shared test mixin (#14611) 2026-08-27 08:29:34 +05:30
Sayak Paul
d57cecde92 [tests] migrate acestep, auraflow, cogview4, and helios tests (#14582)
* migrate acestep, auraflow, cogview4, and helios tests

* fixes
2026-08-26 14:59:16 +05:30
Akshan Krithick
e300a4ee2e refactor deepfloyd if inpainting superresolution pipeline tests to the new mixin structure (#14606)
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-08-26 14:26:26 +05:30
Akshan Krithick
d354c13b48 refactor deepfloyd if img2img superresolution pipeline tests to the new mixin structure (#14604)
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-08-26 10:27:04 +05:30
Akshan Krithick
ee9f497576 refactor deepfloyd if superresolution pipeline tests to the new mixin structure (#14603)
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-08-26 09:40:40 +05:30
Akshan Krithick
ef0436f1f1 refactor deepfloyd if inpainting pipeline tests to the new mixin structure (#14602)
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-08-26 08:55:36 +05:30
Akshan Krithick
d299278d83 refactor deepfloyd if img2img pipeline tests to the new mixin structure (#14596)
* refactor deepfloyd if img2img pipeline tests to the new mixin structure

* drop float16 tolerance override

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-08-26 08:54:15 +05:30
dg845
c969cf2f7e Move LTX2Guidance Guider to guiders/ Folder (#14558)
* Move LTX2Guidance from /modular_pipelines/ltx2/ to guiders/ to allow LTX-2 guiders to be correctly loaded from checkpoint

* Add regression test for LTX-2 guiders declared as from_pretrained components

Covers the round trip this move fixes: a checkpoint that declares `guider` and
`audio_guider` in `modular_model_index.json` must record a resolvable
(library, class_name) pair and reload its non-default guidance scales. The
existing `test_modular_index_consistency` skips components without a
`pretrained_model_name_or_path`, so `from_config` guiders were uncovered.

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

* Migrate LTX2Guidance docs to guider docs after move

* Improve LTX2Guidance docs and add arg docstrings

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-25 07:27:18 -10:00
Sayak Paul
34d989f7ef [tests] hunyuan, ltx, ltx2 (#14587)
hunyuan, ltx, ltx2
2026-08-25 20:39:05 +05:30
Sayak Paul
be81dd0f4e [tests] migrate test_pipelines.py to use pytest. (#14222)
* migrate test_pipelines.py to use pytest.

* use pytest fixtures.

* up

* fix
2026-08-25 17:21:09 +05:30
Sayak Paul
a949d3dd90 [tests] refactor flux control lora tests (#14557)
* refactor flux control lora tests

* change layout

---------

Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
2026-08-25 09:26:17 +05:30
dg845
0c8981bffe [tests] Add Config to Exclude Modules from Leaf-Level Group Offloading (#14564)
* skip hunyuan framepack group offloading tests

* exclude only the SigLIP image encoder from leaf-level group offloading

`test_pipeline_level_group_offloading_inference` was skipped outright for
HunyuanVideoFramepack because `image_encoder` is a `SiglipVisionModel`, whose
attention pooling head wraps a `torch.nn.MultiheadAttention`. That hands
`self.out_proj.weight` to `torch.nn.functional.multi_head_attention_forward`
instead of calling `self.out_proj`, so the leaf-level onload hook on `out_proj`
never fires and its weights stay on the offload device.

Add a `group_offloading_leaf_level_exclude_modules` knob to the old-style
`PipelineTesterMixin` and the new-style `BasePipelineTesterConfig` (empty by
default, so no behavior change elsewhere), pass it through to
`enable_group_offload(exclude_modules=...)` in both implementations of the test,
and set it to `["image_encoder"]` for framepack instead of skipping. Block-level
offloading is unaffected — the whole head is onloaded as one unmatched module —
hence the level in the name.

The test now passes and covers leaf-level offloading of the transformer, VAE and
both text encoders. The VAE is coverage nothing else provided:
`test_group_offloading_inference` deliberately excludes `vae` and
`image_encoder`.

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

* docs: note how to handle a component that breaks leaf-level offloading

Records the rule behind `group_offloading_leaf_level_exclude_modules`: leaf-level
offloading hooks only the supported leaf types and onloads each on its own
forward, so any code that reads a leaf's `.weight` instead of calling the leaf
bypasses that hook.

Routes the fix by who owns the component. A diffusers model declares the gap with
`_supports_group_offloading = False` on the `ModelMixin` subclass, which both
offload mixins honor. A third-party component that can't be annotated goes in
`group_offloading_leaf_level_exclude_modules`, which keeps offload coverage for
every other component — where a hand-written skip would drop it for the whole
pipeline, the VAE included, since the component-scoped
`test_group_offloading_inference` deliberately excludes it.

`torch.nn.MultiheadAttention` is called out as the common instance rather than as
the definition, with `HunyuanDiTAttentionPool` as a case that fails the same way
with no MHA module involved, so the guidance still applies when a future
component fails for a different reason.

Also notes that a failure should be reproduced before a skip or exclusion is
added: of the five pipelines currently skipping the pipeline-level test, only
framepack and motif_video still fail.

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

* Drop old style test info and simplify leaf level group offloading testing.md note.

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 19:52:27 -07:00
Shivam Shrirao
06e0f2a81c Fibo Edit: multi-reference conditioning and batching (#14566)
* Fibo Edit: multi-reference conditioning, batching, timesteps

* docs: simplify Fibo Edit page, fix EXAMPLE_DOC_STRING to the VLM prompt flow

* docs: point Fibo Edit at the Gemini prompt-to-JSON block and the 1.5 base/turbo ids

briaai/FIBO-edit-prompt-to-JSON is retired in favor of
briaai/FIBO-edit-gemini-prompt-to-JSON, which handles multiple reference
images and masks. Also corrects the checkpoint ids to their canonical
briaai/Fibo-Edit-1.5-base and briaai/Fibo-Edit-1.5-turbo spellings.

* apply review feedback on reference handling and the attention mask

- collapse the mask branch to `if not attention_mask.all():` in both Fibo pipelines
- encode references via `self.image_processor.preprocess(...)`, dropping the manual
  numpy normalization and the `_vae_safe_size` helper
- normalize `image` into a reference list once in `__call__`, pass it to `check_inputs`

* make style

* make style
2026-08-24 11:13:05 -10:00
Akshan Krithick
77d9eb4ed7 refactor deepfloyd if pipeline tests to the new mixin structure (#14580) 2026-08-24 09:19:17 +05:30
Akshan Krithick
beb65407d9 refactor bria fibo pipeline tests to the new mixin structure (#14570) 2026-08-24 08:38:57 +05:30
Akshan Krithick
ad90df4847 refactor bria fibo edit pipeline tests to the new mixin structure (#14577) 2026-08-24 08:38:40 +05:30
Sayak Paul
58eb52c080 tests: fix CUDA OOM in VidTok slicing/tiling tests (#14554)
TestAutoencoderVidTokSlicingTiling overrode test_enable_disable_tiling and
test_enable_disable_slicing with copies that ran their three forward passes
outside torch.no_grad(). The retained autograd graphs pushed each test to a
10.9 GiB peak on a 14.74 GiB T4, so with any memory left over from earlier
files in the same xdist worker the class OOM'd -- taking
test_forward_with_norm_groups down with it.

The mixin already implements both tests correctly (no_grad, plus torch.allclose
for the disable-comparison instead of the `.all() == .all()` idiom the copies
used, which compares two booleans and always passes). Drop the overrides and
inherit them.

Peak memory on a T4, measured per test:

  before   10937.3 MiB
  after     1666.5 MiB

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-23 00:34:28 +05:30
Sayak Paul
4c52cb267a [tests] remove autoencodertestermixin and rename new one. (#14555)
remove autoencodertestermixin and rename new one.
2026-08-22 22:27:36 +05:30
Sayak Paul
1b98ae1060 [tests] skip hunyuan framepack group offloading tests (#14551)
skip hunyuan framepack group offloading tests
2026-08-22 13:13:24 +05:30
Akshan Krithick
398106a40f refactor bria pipeline tests to the new mixin structure (#14547)
* refactor bria pipeline tests to the new mixin structure

* add lora tester class

* remove lora tester class

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-08-22 08:49:52 +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
192cf685ec [distributed] fix corrupted gradient problem under ring CP. (#14274)
* fix corrupted gradient problem under ring CP.

* address dhruv's comments.

* handle torch version

* varlens too
2026-08-20 18:16:17 +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
Atharva Joshi
4e0466f3e5 fix: image preprocessing for cosmos3 (#14519)
fix: preserve Cosmos3 conditioning image aspect ratio
2026-08-19 08:43:50 -10:00
Dhruv Nair
ac56fa2f25 [CI] Fix authentication on forked PRs (#14534)
fix auth for forked PRs
2026-08-19 17:41:04 +05:30
Jingya HUANG
7d2e86a85a [core] Support tensor parallelism for model inference (CUDA, Neuron) (#13718)
* draft:add neuron as a legit backend

* feat: neuron-specific changes in the pipeline

* tests: eager tests

* draft: start with tp for flux2

* fix: style

* fix:apr_02 beta

* feat:add wan

* fix:pixart

* fix: rewrite flux swiglu activation to avoid gather op in neuron IR

* test: pixart compile mode on neuron

* cleanup & fix style

* merge: another change

* review: cleanup+suggestions

* fix: CIs style

* tests: add test units for tp

* fix: in case of text-encoder(s) on CPU

* review:cleanup+add test

* fix: style

* doc: remove it for now

* Add from_single_file support for SkyReelsV2 and ChronoEdit transformers (#13946)

SkyReels-V2 and ChronoEdit are both built on Wan, and their transformers have
the same keys as WanTransformer3DModel, so they reuse
convert_wan_transformer_to_diffusers (like WanVACE / WanAnimate). This lets the
community GGUF builds load directly.

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

* multi-GPU VAE Fix for Cosmos 3 (#13924)

fix(cosmos3): pin VAE latent norm buffers to encode output device

Under sharded placement (device_map="balanced"), vae.encode() runs on the
VAE's own device while the mean/inv_std buffers were pinned to x.device,
causing a cross-device RuntimeError. Compute raw_mu first, then pin the
normalization buffers to its device so all tensors share one device.

Co-authored-by: Atharva Joshi <atjoshi@smc521ge-0036.ipp2a2.colossus.nvidia.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>

* docs: fix repeated word typo in set_timesteps docstring (#13876)

* docs: fix repeated word typo in set_timesteps docstring

Removed the duplicate word "schedule" from the docstring for the sigmas argument in EulerDiscreteScheduler.set_timesteps.

* Update scheduling_euler_discrete.py

* Apply style fixes

---------

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

* clean some stuff to simplify code.

* clean more to remove permutation related shenanigans.

* revert: put torch.chunk back

* Update docs/source/en/training/distributed_inference.md

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

* Address Sayak's TP review nits (docstrings + stale comments)

- _modeling_parallel: fix stale comment claiming attention processors read
  tp_degree at runtime (no longer true after the PackedColwise/Rowwise
  refactor; processors are TP-agnostic via head_dim).
- tensor_parallel: single backticks instead of double in docstrings, add
  input/output examples to _blocks_to_block_sizes and _resolve_tp_plan, and
  drop the stale "applies the Flux2 fused-weight permutations" line from
  apply_tensor_parallel (permuters were removed).

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

* Fix stale permuter reference in Flux2ParallelSelfAttnProcessor comment

The proportional QKV/MLP slice is now guaranteed by PackedColwiseParallel
block-by-block sharding, not the removed fused-weight permuter.

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

* Derive TP backend inside apply_tensor_parallel from the mesh device type

Drops the `backend` parameter: apply_tensor_parallel already holds the TP
mesh, so it derives neuron-vs-default from `config._mesh.device_type` itself.
The caller no longer computes it. Documents why torch_device can't be used
(Neuron reports as "cpu" via torch's accelerator API). Removes the now-unused
is_torch_neuronx_available import from modeling_utils.

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

* Simplify TP backend derivation to the mesh device type alone

Drop the redundant is_torch_neuronx_available() guard: a DeviceMesh("neuron", ...)
only exists when running on Neuron, so tp_mesh.device_type is the single source
of truth.

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

* Remove incorrect "Neuron reports as cpu" rationale from TP backend docstring

Verified on the current native torch_neuronx drop that Neuron does surface as
the torch accelerator (torch._C._get_accelerator().type == "neuron",
get_device() == "neuron"); the old "reports as cpu" claim was stale. The
mesh-device-type derivation is unchanged — it's the device being sharded onto.

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

* Drop stale "XLA" labels from Neuron device/runtime comments

Neuron is a native torch backend now (not XLA-routed): remove the "(XLA)"
parenthetical from the randn-on-CPU note in torch_utils and the "XLA runtime"
mention from the Neuron TP test docstring. Behavior unchanged.

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

* make style: reflow tensor_parallel docstrings

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

* Revert "revert: put torch.chunk back"

This reverts commit 7ea75f771a.

* fix: sharding for neuron + validate flux 1

* fix: change for check_repository_consistency

* feat: support qwen image as well

* Update docs/source/en/training/distributed_inference.md

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

* review: keep bria and nucleusmoe out

* review: keep bria and nucleusmoe out

* review: keep bria and nucleusmoe out

* review: address agent review

* review: apply suggestions

* Update docs/source/en/training/distributed_inference.md

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

* review: change example tp size to 4

* review: add flux tp test

* review: address comments

* review: improve the doc

* review:apply qwen rotary_emb per device

* review:remove redundant device def after PR #14383

* review: doc title suggestion

* review: restore copy comment

* review: remove cp divisibility explanation from doc on parallelism guide

* fix style

---------

Co-authored-by: Hz_Zhang <47402297+HaozheZhang6@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Atharva Joshi <atjoshi@nvidia.com>
Co-authored-by: Atharva Joshi <atjoshi@smc521ge-0036.ipp2a2.colossus.nvidia.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: Ramkumar R <ramkumarashvanth09@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
2026-08-19 16:20:59 +05:30
Buffett Liu
360bef8074 Feat -- Stable Audio 3 (#14119)
* Stable Audio 3 First Version Commit, require model dict loading on GPUs

* Fixing bugs for sa3 VAE

* Make quality fix

* Fix the unit test failure

* Fix SA3 pipeline noise: learned text-padding embedding + no cross-attn mask

The diffusers Stable Audio 3 pipeline produced noise instead of music because
the cross-attention conditioning was built differently from the reference:

- The reference text conditioner uses padding_mode="learned": padded text
  positions (~245 of 256 for a short prompt) are filled with a trained
  `padding_embedding`, and the DiT attends to *all* positions (its
  cross-attention mask is intentionally disabled). Our pipeline instead zeroed
  padded positions and masked them out, wiping ~95% of the conditioning signal.

Changes:
- transformer_stable_audio3: add learned `prompt_padding_embedding`; in forward,
  replace masked text positions with it (in cond_token_dim space, before
  to_cond_embed) then attend to the full context, matching the reference.
- pipeline_stable_audio_3: stop zeroing padded positions (the DiT now handles
  them); default `silence_padding_duration` to 6.0 (reference headroom default).
- convert_..._to_diffusers: convert
  `conditioner.conditioners.prompt.padding_embedding` into the DiT.
- scheduling_ping_pong: pin schedule endpoints (sigmas[0]=1.0, sigmas[-1]=0.0)
  to match the reference LogSNRShift endpoint preservation.
- run_..._inference: coerce float16->float32 on CPU.
- tests: update transformer state-dict expectations (523 tensors, add
  prompt_padding_embedding) and ping-pong sigma endpoint assertions.

Verified against the reference with identical noise + identical conditioning:
full 8-step ping-pong trajectories agree to 4e-6 (final latent). Removed the
dev-only parity scripts (verify_*_dit_parity, verify_*_vae_parity) from the tree.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Style fix

* Autopipeline available

* Adding document description for testing examples.

* Solving fix for serge review bot suggestion

* Design review comments fix

* CI/CD Fix for ping pong scheduler md file

* Fix doc build: remove autodoc for nonexistent StableAudio3EulerSchedulerOutput

* Fix doc build: qualify non-exported autodoc references with module paths

* Fix details in scheduler and some nits

* suggestion fix

* fix-copies: propagate prepare_latents dtype fix to audio2audio/inpaint pipelines

---------

Co-authored-by: Buffett Liu <jengliu@linkedin.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
2026-08-18 22:09:32 -07:00
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
Dhruv Nair
f3175baf6a [CLI] Clean up and improvements to diffusers CLI (#14381)
* [CLI] Clean up and improvements to `diffusers-cli`

Modular pipelines:
- `custom_blocks` also writes `modular_model_index.json`, so a packaged repo is
  loadable by `ModularPipeline.from_pretrained` (and runnable by `run`), not just
  importable as blocks.
- Add `--cpu-offload auto`, which offloads through the pipeline's
  `ComponentsManager`, plus `--offload-margin` to set its `memory_reserve_margin`.
- Add `--workflow` passthrough; warn and ignore it on standard pipelines.
- Route `model_index.json` repos whose `_class_name` is modular to the modular path.

Output saving:
- Resolve every media field on the output object (`images`, `frames`, `audios`,
  `audio`) instead of the first match, keeping the batch dimension. Fixes video
  output being misrouted through the image branch and LTX2's audio being dropped.
- Fix the `output_type="pt"` video transpose: `postprocess_video` returns
  `(B, F, C, H, W)`, not `(B, C, F, H, W)`.
- Save `(B, C, samples)` waveforms as multi-channel wavs (StableAudio).
- Write each video's frames to `<stem>-frames/<NNNN>.png`. Frames need no video
  backend, so they replace the `.pt` fallback when `export_to_video` fails.
- Report frame directories as a single path so hundreds of frames don't flood the
  terminal; `--push-to` and the sandbox download preserve subfolder structure.
- Raise on unrecognized payloads instead of dumping JSON/pickle.

Remote:
- Add `imageio`, `imageio-ffmpeg`, and `peft` to the default sandbox deps.
- Raise sandbox `start_timeout` to 600s; the 120s default expires while a cold node
  pulls the pytorch base image.

* Apply suggestion from @sayakpaul

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

* update

* update

---------

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
2026-08-19 09:55:26 +05:30