Repository navigation
Bump diffusers to >=0.37 and other [hf] floors; drop older-version code paths - #3092
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
|
| Layer / File(s) | Summary |
|---|---|
Dependency requirements and version policy pyproject.toml, CHANGELOG.rst, examples/gpt-oss/requirements.txt, examples/speculative_decoding/requirements.txt, examples/torch_trt/requirements.txt |
The [hf] extra raises minimum versions for accelerate, diffusers, huggingface_hub, and peft, and adds an nltk minimum. Example requirements also change. The changelog records selected minimum versions. |
Diffusers imports, registrations, and version checks modelopt/torch/quantization/plugins/diffusion/diffusers.py, examples/diffusers/quantization/*, modelopt/torch/export/unified_export_hf.py, modelopt/torch/fastgen/plugins/qwen_image_pdd.py, tests/_test_utils/torch/diffusers_models.py, tests/unit/torch/fastgen/test_qwen_image_pdd_plugin.py |
Diffusers classes are imported directly, and attention registrations are unconditional. The Wan export check accesses WanTransformer3DModel directly. Qwen PDD raises RuntimeError below Diffusers 0.39. Diffusers test helpers construct models without availability skips. |
Transformers and Nemotron API usage modelopt/torch/speculative/utils.py, modelopt/torch/models/nemotron_h/mtp.py, modelopt/torch/utils/moe.py, tests/_test_utils/torch/transformers_models.py |
VLM loading uses AutoModelForImageTextToText directly. Nemotron-H code and model helpers use module-level imports. Qwen3-VL config construction assigns rope_parameters directly. |
Transformers compatibility tests and helpers tests/_test_utils/import_helper.py, tests/gpu/torch/export/*, tests/unit/recipe/test_qwen_vision_recipe.py, tests/unit/torch/export/*, tests/unit/torch/utils/test_hf_checkpoint_utils.py |
Export and recipe tests remove several version- and symbol-availability skips. Conversion-mapping helpers are imported directly, and the ONNX version skip helper is removed. |
NLTK tokenizer resources examples/llm_sparsity/weight_sparsity/eval.py, modelopt/torch/sparsity/attention_sparsity/calibration/ruler_dataset.py |
NLTK evaluation and calibration setup use punkt_tab instead of selecting or checking for punkt. |
Estimated code review effort: 3 (Moderate) | ~25 minutes
Priority:
Change: Other
Possibly related PRs
- NVIDIA/Model-Optimizer#3072: Both PRs change the Wan image-to-video export path in
unified_export_hf.py. - NVIDIA/Model-Optimizer#2929: Both PRs change the Wan image-to-video export path in
unified_export_hf.py.
Merge Risk: 
Minimal · previous review 5dc11
-
No merge-blocking issue was established in the selected change. Merge after normal checks.
Pre-merge checks: 
4 · 
2
-
Failed checks: 2 warnings Passed checks: 4 passed-
Full details: Security Anti-Patterns
-
Explanation
No listed security anti-pattern was introduced. The changed Python files add no hardcoded unsafe
torch.load,numpy.load(..., allow_pickle=True),trust_remote_code=True,eval,exec, or# nosecusage. Thepyproject.tomlchanges only raise versions of existing dependencies; they add no new PIP dependency.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 61.54% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 13 functions across 21 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Full details: Title check
-
Explanation
The title says the PR bumps transformers to >=5.9, but the changeset sets the transformers floor to 5.8 (pyproject.toml, noxfile.py, modelopt/torch/init.py). The objectives also state transformers>=5.8. The title does not match the actual minimum version. The other parts of the title (diffusers >=0.37, peft/accelerate floors, dropping older-version code paths) are only partly reflected: the diffusers and accelerate floors are raised, but no peft floor change appears in the summaries, and the title is also long at 14 words.
Resolution
Correct the title so it matches the changeset. Use transformers >=5.8 instead of >=5.9. Remove or verify the peft floor claim, since no peft change appears in the file summaries. Shorten the title to the main change, such as: Raise [hf] minimum dependency versions and remove older-version code paths.
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
/claude review |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3092 +/- ##
==========================================
+ Coverage 78.09% 79.76% +1.67%
==========================================
Files 662 662
Lines 76122 76302 +180
==========================================
+ Hits 59445 60860 +1415
+ Misses 16677 15442 -1235
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
meenchen
left a comment
There was a problem hiding this comment.
Bot review (gpt-6.1-sol) — DM the bot to share feedback.
Nudge: the new minimum still needs Qwen PDD compatibility evidence, despite the example’s separate 0.39 pin.
Needs action:
- Resolve the 0.37 padded-mask failure in
test_qwen_image_pdd_plugin.py: check the adapter separately from the canonical assertion, enforce a feature-specific 0.39 requirement if necessary, and report the result. - Correct the PR description: use 0.37 in the compatibility checklist, and justify the Accelerate bump without assuming
transformers[torch];pyproject.tomlrequests plaintransformers.
No action needed:
- The test-helper edits are justified: removing old-version availability skips strengthens coverage, and no callers were found for the deleted ONNX helper.
There was a problem hiding this comment.
Claude review — dependency-floor bump + compat-shim removal
Scope: full review (trigger was a bare /claude review). All 8 changed files reviewed: pyproject.toml, modelopt/torch/quantization/plugins/diffusion/diffusers.py, modelopt/torch/export/unified_export_hf.py, both examples/diffusers/quantization/ files, both tests/_test_utils/ files, CHANGELOG.rst. (Note: a two-dot diff against the shallow base also surfaces unrelated core_utils.py/test_utils.py reversals because the base tip is ahead of this branch — I excluded those per the PR's authoritative file list.)
Findings
| Severity | Count |
|---|---|
| CRITICAL | 0 |
| IMPORTANT | 1 |
| SUGGESTION | 1 |
[IMPORTANT Compatibility] — the 0.37.0 floor admits a range where Qwen-Image PDD is silently wrong (inline)
This is the one finding I'd ask you to act on before merge. Your description already identifies that the padded-token mask is "only correct from diffusers 0.39", and your floor-install run confirms the test fails at 0.37.0 — but the stated mitigation (the PDD example pins diffusers==0.39.0) doesn't cover the affected code, which is library code: modelopt/torch/fastgen/plugins/qwen_image_pdd.py. It validates the mask contract thoroughly and then hands encoder_hidden_states_mask to diffusers to apply, with no version check. A user installing modelopt[hf] and resolving the floor to 0.37/0.38 therefore distills Qwen-Image PDD against padding garbage in the text conditioning, with nothing raised — which also sits oddly against that file's own fail-loud style elsewhere. Either raise the floor to >=0.39.0 (smaller diff, and lets the example drop its pin), or add an explicit version guard plus a matching test skip so the supported range and the passing range coincide.
[SUGGESTION] — plugin imports are now all-or-nothing (inline)
import_plugin catches bare Exception and only warns, so any future rename of the now-unguarded internal paths (transformer_flux2, attention_dispatch) silently disables all diffusion quantization rather than just Flux2. Not a problem at the declared floor — your 0.37.0 run is good evidence the symbols resolve — purely forward-looking, and non-blocking.
Verified clean
The cleanup itself is careful and I found no correctness problems in it:
unified_export_hf.py—isinstance(component, diffusers.WanTransformer3DModel)is safe:import diffuserssits inside the sametrythat setsHAS_DIFFUSERS(lines 48-65), and theHAS_DIFFUSERS and ...short-circuit means noNameErrorwhen diffusers is absent. Replacinggetattr(..., ())with direct access doesn't change behavior at the new floor (Wan predates 0.37).plugins/diffusion/diffusers.py— removing theAttentionModuleMixinstand-in is clean: after this change the name is no longer referenced anywhere in the plugin (its only remaining use isexamples/.../utils.py, correctly repointed todiffusers.models.attention). No leftoverparse_version/diffusers.__version__references, every remaining import is used, and the unconditional registrations are equivalent to the old guarded ones at the new floor.examples/.../models_utils.py— no now-deadis not Noneguards left behind; both pipelines are consumed directly in theModelTypedict (lines 109, 114).import_helper.py—skip_if_onnx_version_above_1_18has zero remaining callers repo-wide; removal is safe, and theimportlib.metadata/packagingimports were correctly dropped with it.diffusers_models.py— converting the fallbacks to hard imports afterpytest.importorskip("diffusers")behaves as intended: these tests now error loudly instead of skipping silently. Good change.- No stale older-diffusers guards remain anywhere in
modelopt/,examples/, ortests/— the cleanup is complete. huggingface_hub>=1.5.0/accelerate>=1.1.0are metadata-only as described;transformers>=5.5,<5.19(pyproject:89) already transitively enforces both floors.
Minor, no action needed: the PR checklist says "Requires diffusers>=0.36" while the title, CHANGELOG, and pyproject.toml all say 0.37 — worth aligning that line.
Risk assessment
Low risk overall. This is a well-scoped, mostly-deletion change (+36/-123) that removes genuinely dead compatibility branches, and the floor is justified by real API requirements (QwenEmbedRope(max_txt_seq_len=...), transformer_flux2). The two-version test matrix (floor and latest) is exactly the right way to validate a floor bump, and I'd note that it already caught the issue above — the finding is really about where the fix belongs, since the example pin doesn't reach library users. Backward-breaking status is correctly declared and changelogged under 0.49.0.
79f41b6 to
6fd18d8
Compare
0.37 is the first release with QwenEmbedRope's max_txt_seq_len, which the Qwen-Image FastGen plugin passes. Also raise huggingface_hub to >=1.5 and accelerate to >=1.1, which transformers>=5.5 already requires, and remove the unused skip_if_onnx_version_above_1_18 helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
diffusers 0.39 moved the joint text/image mask from the root forward into the attention processor. The PDD forward replaces the root forward, so on older diffusers padded text tokens leak into attention; fail loudly instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
Drop the transformers<5.6 expert-parallel test skips and the pre-punkt_tab nltk path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
Use AutoModelForImageTextToText directly, import native NemotronH, Qwen3.5 and conversion_mapping at module top, and remove test skips for APIs and models every transformers>=5.8 has. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
A module-level MIXER_TYPES import kept a stale mapping once a test patched it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
transformers 5.8.0 and 5.8.1 skip their own weight init for models built from a config, leaving every nn.Linear at PyTorch's default init. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
5dc11c4 to
1c5f591
Compare
transformers>=5.6 refuses peft<0.18.2 in add_adapter/enable_adapters, which the QAT trainer calls, and ModelOpt's HF trainers read Accelerator.is_fsdp2 (accelerate 1.6+). Drop example pins the new floors already cover. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
kevalmorabia97
left a comment
There was a problem hiding this comment.
Pensieve lgtm review using kmorabia's profile (revision 4).
LGTM: the floor bump and compat cleanup look correct and earlier concerns are fixed, but pyproject.toml and noxfile.py are setup-owned and need human sign-off.
Needs action:
- Get
@NVIDIA/modelopt-setup-codeownerssign-off on the dependency floors inpyproject.tomland thetf_minpin innoxfile.py(transformers 5.9, diffusers 0.37, peft 0.19, accelerate 1.6, huggingface_hub 1.5, nltk 3.9).
No action needed:
- ✔️ Resolved since the last review: the Qwen-Image PDD refusal below diffusers 0.39 (guard plus test), and the Nemotron-H stale
MIXER_TYPESbinding (now read frommodeling_nemotron_hat call time). - The deleted skips and test edits are justified by the raised floors, with assertions intact. The removed ONNX helper has no callers.
- The floors in
pyproject.toml,modelopt/torch/__init__.pyandnoxfile.pyagree at 5.9. The CodeRabbit summary and title check still say 5.8 and are stale. - Not run here: the reported test passes were not independently executed. The commit after the last reviewed one (5dc11c4) was inspected only through the diff, and history checking covers the supplied excerpts only.
Review run: 27109a155bfa4692abdec1962494d5b5
meenchen
left a comment
There was a problem hiding this comment.
Bot review (gpt-6.1-sol) — DM the bot to share feedback.
Comment: the earlier correctness fixes are present, but the PEFT floor now conflicts with the speculative-decoding example’s pinned requirements.
Needs action:
- Align
examples/speculative_decoding/requirements.txtwithpeft>=0.19and validate installation alongside[hf]; see the inline comment. - Refresh the PR body’s autogenerated release notes to state Transformers 5.9, Accelerate 1.6, and PEFT 0.19, matching
pyproject.toml.
No action needed:
- ✔️ Resolved since the last review: the Nemotron-H stale binding, the Qwen PDD compatibility refusal, and the handwritten dependency rationale/checklist corrections.
- Obsolete availability-skip removals and the PDD-specific version gating are justified by the declared support changes.
It downgraded peft below the [hf] extra's new >=0.19 floor; the EAGLE LoRA tests pass on peft 0.18.1 through 0.21.2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
|
@coderabbitai summary |
✅ Action performed
|
meenchen
left a comment
There was a problem hiding this comment.
Bot review (gpt-6.1-sol) — DM the bot to share feedback.
Nudge: the previous code fixes are present, but the requested combined-install validation is still unreported.
Needs action:
- 💬 Author removed the PEFT pin and reported PEFT test runs — still record combined installation or resolver validation of
.[hf]withexamples/speculative_decoding/requirements.txt. - Update the PR’s testing checklist to cite
test_qwen_pdd_forward_binding_rejects_old_diffusersinstead of marking new testsN/A.
No action needed:
- ✔️ Resolved since the last review: the PEFT pin conflict, stale release notes, Nemotron-H registry binding, and Qwen-PDD compatibility refusal.
- Availability-skip removals and PDD-specific gating are justified by the declared support changes; numerical assertions remain intact.
|
@meenchen re the bot review: the combined install resolves. |
meenchen
left a comment
There was a problem hiding this comment.
Bot review (gpt-6.1-sol) — DM the bot to share feedback.
LGTM: the new discussion resolves both remaining requests; human sign-off is required for the justified existing-test edits.
Needs action:
- Obtain human sign-off on the test-skip removals, justified by the raised dependency floors with numerical assertions preserved.
No action needed:
- ✔️ Combined resolver validation is now reported, and the testing checklist correctly cites
test_qwen_pdd_forward_binding_rejects_old_diffusers.
TensorRT-LLM 1.3.0 pins transformers==5.5.4 and peft<0.19, so higher floors upgrade them in its container and break TensorRT-LLM's own Qwen3-VL loading. Restore the transformers<5.6 expert-parallel test skips. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
|
@coderabbitai summary |
✅ Action performed
|
meenchen
left a comment
There was a problem hiding this comment.
Bot review (gpt-6.1-sol) — DM the bot to share feedback.
LGTM: prior correctness concerns are resolved; a human must sign off on the justified existing-test edits.
Needs action:
- Obtain human sign-off on the dependency-related test-skip removals, justified by the supported-version floors with numerical assertions preserved.
No action needed:
- ✔️ Resolved since earlier reviews: Qwen PDD compatibility refusal, Nemotron-H registry lookup, and example-install/testing documentation.
### What does this PR do?
Type of change: Cleanup (drops Transformer Engine 1.x support)
Removes version checks for dependency releases that no supported install
or CI container can have anymore. No install metadata changes.
| Dependency | Removed | Why it is dead |
|---|---|---|
| onnxruntime | 4 `onnxruntime<1.21` test skips in
`test_nodeclassifier.py`; the `>=1.21` DDS-op check in
`ort_utils.update_trt_ep_support` | Every platform pin in the `[onnx]`
extra is >= 1.22 |
| Transformer Engine | `<2.0` branches in `_QuantLayerNormLinearFunc`,
and the two helpers that only dispatched on it | TE 2.0 shipped in early
2025; `nemo:26.08` has TE 2.17 |
| megatron-core | `mcore_version_higher_than("0.9.0")` around
`packed_seq_params` in EAGLE | megatron-core 0.9 is from 2024;
`nemo:26.08` has 0.19 |
| vLLM | `<=0.11` `FlexibleArgumentParser` import branches in
`examples/vllm_serve` | vLLM 0.11 is from Oct 2025; CI uses 0.30 |
The vLLM >= 0.15 check in the sparse-attention plugin and the
`lm_eval>=0.4.12` checks in `examples/llm_eval` stay: they are real
errors that match their requirement floors. So does the TensorRT-LLM
`<1.1.0rc2` context-logits / stop-words gate in
`modelopt/deploy/llm/generate.py`: TensorRT-LLM 1.0 (the install guide's
floor) still imports that module.
TE and megatron-core are not in `pyproject.toml`; ModelOpt's
Megatron-Bridge / Megatron-LM features require `nemo:26.08` (CHANGELOG),
which ships TE 2.17 and megatron-core 0.19. For standalone TE
quantization, the install guide now lists Transformer Engine >=2.0 and
`CHANGELOG.rst` notes that TE 1.x is no longer supported (its last
release, 1.13, is from Dec 2024).
### Usage
N/A
### Testing
- `tests/unit/onnx` (incl. the previously gated `test_nodeclassifier.py`
tests): 498 passed.
- In `nvcr.io/nvidia/nemo:26.08` (TE 2.17.1, megatron-core 0.19):
`tests/gpu_megatron/torch/quantization/plugins/test_transformer_engine.py`
passes (21 passed, 4 skipped), `RotaryEmbedding.get_rotary_seq_len`
accepts `packed_seq_params`, and the EAGLE Megatron plugin imports.
### Before your PR is "*Ready for review*"
Make sure you read and follow [Contributor
guidelines](https://github.com/NVIDIA/Model-Optimizer/blob/main/CONTRIBUTING.md)
and your commits are signed (`git commit -s -S`).
Make sure you read and follow the [Security Best
Practices](https://github.com/NVIDIA/Model-Optimizer/blob/main/SECURITY.md#security-coding-practices-for-contributors)
(e.g. avoiding hardcoded `trust_remote_code=True`, `torch.load(...,
weights_only=False)`, `pickle`, etc.).
- Is this change backward compatible?: ❌ Transformer Engine 1.x is no
longer supported; the other removed paths are for releases that cannot
be installed alongside ModelOpt's supported stack.
- If you copied code from any other sources or added a new PIP
dependency, did you follow guidance in `CONTRIBUTING.md`: N/A
- Did you write any new necessary tests?: N/A
- Did you update
[Changelog](https://github.com/NVIDIA/Model-Optimizer/blob/main/CHANGELOG.rst)?:
✅
- Did you get Claude approval on this PR?: ❌
### Additional Information
Companion to #3091 (torch 2.10 floor) and #3092 (transformers /
diffusers floors).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Refactor**
* Simplified compatibility handling for model serving, quantization, and
speculative decoding integrations.
* ONNX operations and tests are no longer conditionally excluded based
on the ONNX Runtime version.
* **Breaking Changes**
* Transformer Engine 2.0 or later is required for module quantization;
Transformer Engine 1.x is no longer supported.
* **Documentation**
* Updated Linux installation requirements to list Transformer Engine 2.0
or later as an optional dependency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
What does this PR do?
Type of change: Backward breaking change (dependency bump) + cleanup
Raises the
[hf]extra's minimum versions and removes the compatibility code that only existed for older releases:transformersstays at>=5.5: TensorRT-LLM 1.3.0 ships transformers 5.5 (pyproject.tomlnow says so), and a higher floor upgrades it in that container and breaks TensorRT-LLM's own Qwen3-VL loading. Drops the transformers 4.x leftovers, all dead at 5.5: theAutoModelForVision2Seqfallback, theconversion_mapping/ Qwen3.5 / Mixtral-mapping test skips, and the lazy NemotronH / Qwen3.5 imports (nemotron_h/mtp.pynow reads them from themodeling_nemotron_hmodule at call time).nltk→>=3.9: always usepunkt_tab(thellm_sparsityexample and the RULER calibration dataset no longer download the oldpunkt).diffusers>=0.32.2→>=0.37.0(released 2026-03-05). The Qwen-Image FastGen PDD plugin passesQwenEmbedRope(max_txt_seq_len=...), which 0.37 added, so it already crashed on older diffusers; 0.36 also addedtransformer_flux2. CHANGELOG entry (diffusers, peft, accelerate, nltk) under 0.49.0 Backward Breaking Changes.plugins/diffusion/diffusers.py: drop the>= 0.35.0version branch, its stand-inAttentionModuleMixin, theFlux2ImportErrorfallback and theis not Noneregistration guards.unified_export_hf.py: referencediffusers.WanTransformer3DModeldirectly instead of throughgetattr(..., ()).examples/diffusers/quantization/models_utils.py: importFlux2PipelineandQwenImagePipelinedirectly.utils.pynow importsAttentionModuleMixinfrom diffusers instead of through the ModelOpt plugin.tests/_test_utils/torch/diffusers_models.py: import the DiT / Flux / Flux2 / Wan / Qwen-Image classes directly and drop the "not available in this diffusers version" skips, so those tests can no longer skip silently.huggingface_hub>=0.24.0→>=1.5.0: what transformers 5.5 itself requires.accelerate>=1.0.0→>=1.6.0: ModelOpt's HF trainers (distill, opt, QAT) readAccelerator.is_fsdp2whenever FSDP is enabled, which accelerate added in 1.6.0.peft>=0.17.0→>=0.18.1: TensorRT-LLM 1.3.0's own floor (transformers 5.5'sadd_adapter, which the QAT trainer calls, needs >=0.18.0).transformers>=5.3(gpt-oss),transformers>=4.56(torch_trt), anddatasets, thetransformers>=5.0lower bound and thepeft==0.18.1pin (speculative_decoding); raisetorch_trt'storch-tensorrtfloor to 2.10 to match torch.skip_if_onnx_version_above_1_18test helper (no callers; ONNX is pinned to 1.21 / 1.23).Qwen-Image PDD needs diffusers 0.39, which moved the joint text/image mask from the root forward into the attention processor; the PDD forward replaces the root forward, so on 0.37/0.38 padded text tokens leaked into attention.
enable_qwen_image_pdd_forwardnow raises for diffusers<0.39 (the PDD example already pinsdiffusers==0.39.0), and the PDD tests skip below 0.39. The package floor stays at 0.37.Usage
N/A
Testing
HF / diffusers-related unit tests (
test_moe_a2a.py,tests/unit/torch/models,test_huggingface.py,test_peft.py,test_unified_export_hf.py,test_export_diffusers.py,tests/unit/torch/fastgen,tests/unit/torch/opt/plugins,test_diffusers_fp4.py,test_diffusers_wan_conv3d.py,test_import.py):tests/unit/torch/speculative,tests/unit/torch/quantization/plugins,tests/unit/torch/export,test_utils.py,test_qwen_vision_recipe.pyandtest_hf_checkpoint_utils.pyadded: 1580 passed, 43 skipped (incl. the PDD tests below diffusers 0.39 and the expert-parallel tests below transformers 5.6).test_qwen_pdd_forward_binding_rejects_old_diffusers) fails with the guard removed.uv pip install --dry-run -e ".[hf]" -r examples/speculative_decoding/requirements.txtresolves (peft 0.21.2, transformers 5.12.1, accelerate 1.15.0).Before your PR is "Ready for review"
Make sure you read and follow Contributor guidelines and your commits are signed (
git commit -s -S).Make sure you read and follow the Security Best Practices (e.g. avoiding hardcoded
trust_remote_code=True,torch.load(..., weights_only=False),pickle, etc.).[hf]extra.CONTRIBUTING.md: N/Atest_qwen_pdd_forward_binding_rejects_old_diffusersfor the new Qwen-Image PDD diffusers check.Additional Information
Follow-up to #3091 (torch 2.10 floor). Both add a CHANGELOG line in the same spot and touch neighboring lines of
plugins/diffusion/diffusers.py, so whichever merges second needs a trivial rebase.🤖 Generated with Claude Code
Summary by CodeRabbit