[diffusion][feature] Add component-selective offload policies (#5929)

Signed-off-by: lishunyang12 <lishunyang12@163.com>
This commit is contained in:
SYLAR authored and GitHub committed 2026-09-06 05:40:09 +08:00
1 parent 44d3ae100a
commit ea3cf99894
74 files changed
+5121 -1584

No files matched your search

@@ -237,6 +237,13 @@ class DiffusersAdapterPipeline(nn.Module, DiffusionPipelineProfilerMixin):
def _raise_unsupported_features(self) -> None:
"""Raise an error for incompatible feature switches."""
if self.od_config.diffusion_offload_config is not None:
raise NotImplementedError(
"diffusion_offload_config is not supported with the diffusers backend. "
"Its component selectors cannot be represented by Diffusers' pipeline-wide "
"CPU-offload hooks. Use the legacy enable_cpu_offload or "
"enable_layerwise_offload option, or use a native pipeline."
)
pc = self.od_config.parallel_config
if pc.tensor_parallel_size > 1:
raise NotImplementedError(