We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c93626 commit 1d63306Copy full SHA for 1d63306
src/diffusers/loaders/unet.py
@@ -403,7 +403,7 @@ def _optionally_disable_offloading(cls, _pipeline):
403
is_model_cpu_offload = False
404
is_sequential_cpu_offload = False
405
406
- if _pipeline is not None and _pipeline.hf_device_map is None:
+ if _pipeline is not None and hasattr(_pipeline,"hf_device_map") and _pipeline.hf_device_map is None:
407
for _, component in _pipeline.components.items():
408
if isinstance(component, nn.Module) and hasattr(component, "_hf_hook"):
409
if not is_model_cpu_offload:
0 commit comments