[Diffusion] Document DLO mmap model opt-in

Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
Hongsheng Liu committed 2026-08-15 06:57:38 +08:00
1 parent 76e257b0f3
commit 1c3d59796f
3 files changed
+31 -4

No files matched your search

@@ -532,9 +532,11 @@ class MiniMaxH3Pipeline(
encoder_block_attrs={"text_encoder": ("vision.blocks", "text_model.layers")},
on_demand_component_paths=frozenset({"text_encoder", "video_vae", "audio_vae"}),
)
# TP1 DLO mmap applies the grouped-QKV adapter while packing each block.
# The fused MLP checkpoint is already gate-then-up, matching its TP1
# runtime layout. TP>1 and quantized layouts stay on the regular loader.
# Explicit mmap opt-in: weights_sources below provide exact pipeline
# prefixes, and TP1 DLO mmap applies the grouped-QKV adapter while packing
# each block. The fused MLP checkpoint is already gate-then-up, matching
# its TP1 runtime layout. TP>1 and quantized layouts stay on the regular
# loader. See the DLO design doc for the model opt-in contract.
_supports_mmap_loading: ClassVar[bool] = True
_PROFILER_TARGETS: ClassVar[list[str]] = [
"_prepare_reference_videos",
+3 -1
View File
@@ -32,7 +32,9 @@ class OffloadConfig:
dlo_use_allgather: bool = True
dlo_resident_layers: int = 0 # leading DiT layers kept on device
model_path: str | None = None # checkpoint path for mmap weight loading
# Appended to preserve the positional order of the pre-existing fields.
# Rank-local mmap bypasses TP-aware loader callbacks, so the backend needs
# the configured TP size when selecting mmap versus standard-loader host
# storage. Appended to preserve the positional order of existing fields.
tensor_parallel_size: int = 1
@classmethod