[Diffusion] Add FLUX.2-dev CPU Offload (Layerwise) (#5256)

Signed-off-by: dpeng123 <diyapeng123@gmail.com>
This commit is contained in:
Diya Peng authored and GitHub committed 2026-07-23 14:53:04 +08:00
1 parent 96235da468
commit b471a5cf23
5 files changed
+40 -2

No files matched your search

@@ -765,6 +765,7 @@ class Flux2Transformer2DModel(nn.Module):
)
_repeated_blocks = ["Flux2TransformerBlock", "Flux2SingleTransformerBlock"]
_layerwise_offload_blocks_attrs = ["transformer_blocks", "single_transformer_blocks"]
_sp_plan = {
"": {
"hidden_states": SequenceParallelInput(split_dim=1, expected_dims=3, auto_pad=True),