Conversation
…tions
ParallelismConfig gains an extra_parallel_kwargs dict (distinct from the
deprecated parallel_kwargs, which maps to standard config fields). Its
entries are opaque to cache-dit and forwarded to
_ContextParallelConfig.extra_kwargs on both transformer and controlnet
dispatch, letting downstream model hooks read custom toggles, e.g.
{"boogu_double_stream_cp": False} to opt out of fast-boogu's
default-on double-stream CP wrapper.
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
All async Ulysses processor wrappers (flux, flux2, qwen_image, zimage, zimage_controlnet, ovis_image, longcat_image) entered the async path on `cp_config.ulysses_degree > 1` alone. Because the class-level patch is process-wide and cannot be unpatched, any second instance of the same processor class with CP enabled but ulysses_async=False (e.g. klein-ht and klein-fit, two Flux2Transformer2DModel instances in one worker) was forced onto the async path once any instance opted in. Gates now also require getattr(cp_config, "ulysses_async", False), matching the fast-boogu hooks gate semantics, so per-instance opt-in works as documented. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
The flux2 async wrappers constructed _All2AllComm and called send_q/k/v/o + handle.wait() inline. Under torch.compile these comm-induced graph breaks push the surrounding fp8 Linear calls (torchao per-row subclass) into nested resume frames, where torchao's _dispatch__torch_function__ CONTAINS_OP crashes dynamo with "Polyfill handler does not have a traceable function" (reproduced with fast-boogu klein fp8 + compile + ulysses_async). Route all comm construction/launches/waits through a new _AsyncA2A helper whose three methods are @torch.compiler.disable, making them opaque in-graph calls that do not break the graph; projections, norms, rope and the attention dispatch remain traceable. Mirrors the fast-boogu async launcher pattern. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
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.
ParallelismConfig gains an extra_parallel_kwargs dict (distinct from the deprecated parallel_kwargs, which maps to standard config fields). Its entries are opaque to cache-dit and forwarded to
_ContextParallelConfig.extra_kwargs on both transformer and controlnet dispatch, letting downstream model hooks read custom toggles, e.g. {"boogu_double_stream_cp": False} to opt out of fast-boogu's default-on double-stream CP wrapper.