Repository navigation
[Fix] Keep diffusion encoder TP context bindings consistent - #40646
Merged
Merged
Conversation
ch-wan
requested review from
AgainstEntropy,
BBuf,
HaiShaw,
kevin-mii,
mickqian,
ping1jing2 and
yichiche
as code owners
September 21, 2026 23:32
3 of 4 tasks
Collaborator
Author
|
/rerun-test test_component_accuracy_2_gpu.py test_component_accuracy_parallel_runtime.py test_qwen_image21_distributed.py |
Contributor
|
Results for 🚀 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The LTX-2 two-GPU encoder accuracy test fails while entering
use_tensor_parallel_group: diffusion initialization stamps a TP=1 attention group, but encoder folding only overrides the TP group and widths. The context then reportsattn_tp_size=2alongside anattn_tp_groupof size 1 and rejects the scope before loading the encoder.This is present on main (
00986c81be687d82e66651fb3ce9a096070b06e6) and was exposed by this component accuracy CI failure.Modifications
Override
attn_tp_group,attn_tp_rank, andmoe_tp_rankalongside the folded TP group. The existing context manager restores these bindings when the scope exits.Strengthen the existing folding tests to start from diffusion's stamped TP=1 context, cover both ranks of TP=2, and check restoration after an exception in a nested folding scope.
Accuracy Tests
00986c81be687d82e66651fb3ce9a096070b06e6, the strengthened folding regressions fail in all three cases before applying the fix.PYTHONPATH=python python3 -m pytest python/sglang/multimodal_gen/test/unit/test_component_accuracy_parallel_runtime.py -q— 9 passed.The full LTX-2 model-weight accuracy test has not been rerun.
The manual rerun stopped at the first Wan VAE test because the generic rerun workflow started only one process for a two-GPU test. That launcher issue is fixed separately in #40652; this run did not reach the LTX-2 encoder case.
Speed Tests and Profiling
Not applicable: this changes the encoder-loading context, with no kernel or forward-path changes.
CI States
Latest PR Test (Base): ❌ Run #35668042419
Latest PR Test (Extra): ❌ Run #35668042190
Latest PR Test (AMD ROCm 10): ❌ Run #35668042267