[Diffusion] Address rank-local mmap review feedback

Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
Hongsheng Liu committed 2026-08-14 17:12:05 +08:00
1 parent 2956af1e9d
commit 76e257b0f3
5 files changed
+81 -8

No files matched your search

@@ -88,6 +88,11 @@ def supports_mmap_loading(pipeline: nn.Module) -> bool:
return declared_support is True and bool(getattr(pipeline, "weights_sources", ()))
def has_online_quantization(model: nn.Module) -> bool:
"""Whether any module defers online-quantized weights on ``meta``."""
return any(getattr(getattr(module, "quant_method", None), "uses_meta_device", False) for module in model.modules())
def should_select_dlo_mmap(
*,
mmap_supported: bool,