[None][refactor] visual_gen Attention: drop redundant enable_ulysses kwarg (rebase artifact from #13978)#15141
Conversation
|
/bot run --disable-fail-fast |
|
PR_Github #52965 [ run ] triggered by Bot. Commit: |
|
PR_Github #52965 [ run ] completed with state |
📝 WalkthroughWalkthroughThe PR refactors Ulysses-parallel-attention gating in the visual generation modules. The ChangesUlysses Gating Refactoring
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/bot run --disable-fail-fast |
|
PR_Github #52970 [ run ] triggered by Bot. Commit: |
|
PR_Github #52970 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #53079 [ run ] triggered by Bot. Commit: |
|
PR_Github #53079 [ run ] completed with state
|
…kwarg The enable_ulysses kwarg was a rebase artifact in PR NVIDIA#13978. Before that PR merged, base Attention had only enable_sequence_parallel as the single sequence-parallel master switch (Attention2D PR NVIDIA#13944 had already consolidated the kwarg surface). NVIDIA#13978's rebase resolution kept the older enable_ulysses kwarg in a union with enable_sequence_parallel, re-introducing the redundant gate. Only LTX2Attention explicitly forwarded enable_ulysses=use_ulysses, and it always co-varied with enable_sequence_parallel (line 591 self-attn: both True; line 605 cross-attn: both False). No model uses the SP-on-but-Ulysses-off escape hatch the kwarg notionally provided. Changes: - Drop enable_ulysses kwarg from base Attention.__init__. - Simplify the use_ulysses local: gate on (ulysses_size > 1 and enable_sequence_parallel and (qkv_mode != SEPARATE_QKV or async_ulysses)). - Drop the enable_ulysses=use_ulysses forwarding from LTX2Attention.__init__. LTX2Attention's own use_ulysses kwarg is preserved -- it still drives async_ulysses gating (line 109) and the audio dual-attn (_has_dual_attn) setup (line 176) independent of the base. Verified locally: 6/6 test_ltx2_attention.py + 14/14 test_ltx2_transformer.py pass on the parent k_pe-drop branch which carries the same Attention surface. Signed-off-by: Yiyun Lu <55233584+luyiyun1021@users.noreply.github.com>
2a28cf0 to
33f449a
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #53222 [ run ] triggered by Bot. Commit: |
|
PR_Github #53222 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
1 similar comment
|
/bot run --disable-fail-fast |
|
PR_Github #53361 [ run ] triggered by Bot. Commit: |
|
PR_Github #53361 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #53603 [ run ] triggered by Bot. Commit: |
|
PR_Github #53603 [ run ] completed with state |
@coderabbitai summary
Description
The
enable_ulysseskwarg onAttention.__init__is a rebase artifact from #13978. Before that PR merged, #13944 (Attention2D) had already consolidated the kwarg surface to a singleenable_sequence_parallelmaster switch — the rebase resolution re-introduced the olderenable_ulyssesas a redundant gate.Only
LTX2Attentionforwardedenable_ulysses=use_ulysses, and it always co-varied withenable_sequence_parallel(self-attn: bothTrue; cross-attn: bothFalse). No model uses the SP-on-but-Ulysses-off escape hatch.enable_ulysseskwarg from baseAttention.__init__.use_ulysseslocal-var gate (removeand enable_ulysses).enable_ulysses=use_ulyssesforwarding fromLTX2Attention.__init__.LTX2Attention's ownuse_ulysseskwarg is preserved — it still drivesasync_ulyssesgating and the audio dual-attention setup, both LTX-local logic.Test Coverage
tests/unittest/_torch/visual_gen/test_ltx2_attention.py(6/6) +test_ltx2_transformer.py(14/14) — covered by existing tests.PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
If PR introduces API changes, an appropriate PR label is added - either
api-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin the PR title.Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.