Repository navigation
Studio video: Auto keeps INT8 attention off for the two-expert Wan 2.2 A14B - #18790
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
With INT8 attention on Auto (the default), Wan 2.2 A14B renders a different clip from the one it renders with INT8 attention off. Auto races the INT8 kernel for every
WanTransformer3DModel, and the two A14B experts are that class, so on A100 both experts take it: 160 attention modules, the CUDA kernel. It is about 10% faster per step, but the error compounds over the steps of both experts and the clip changes. On a busy prompt the stall layout, a vehicle, the signs and the lighting all change.Change
diffusion_int8_attention_dispatch.py: a newAUTO_SINGLE_EXPERT_ONLYset (WanTransformer3DModel) and atwo_expert_pipeline(pipe)check (transformer_2present). With the switch unset, a DiT in that set is not raced when its pipeline has a second expert.diffusion_int8_attention.install_autoapplies the same rule to the strided route.unsloth_int8requested by name,UNSLOTH_DIFFUSION_INT8_ATTENTION_KERNEL=1.Evidence
Colab A100-SXM4-40GB, main
8b7cde79eb, hosted INT8 pair (group offload, FP8 text encoder). 832x480, 33 frames, 10 steps, 2 prompts, fresh process per arm.022433d8.../ef160cf3...022433d8.../ef160cf3...d39260ae.../9303ed2a...d39260ae.../9303ed2a...(the forced-on clip)022433d8.../ef160cf3...(the off clip)Tests
tests/test_diffusion_int8_attention_dispatch.py::test_auto_leaves_a_two_expert_wan_alone_and_keeps_a_one_expert_wan, on CPU with a fake card:test_differential.pyreports DISCRIMINATING: 1 fixed, 0 head failures.tests/test_diffusion_int8_attention_{dispatch,auto,families,toggle}.py: 164 passed and 7 skipped here, against 163 passed and 7 skipped on main.Not covered