Skip to content

Commit 1d63306

Browse files
committed
make it work with lora
1 parent 6c93626 commit 1d63306

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/loaders/unet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ def _optionally_disable_offloading(cls, _pipeline):
403403
is_model_cpu_offload = False
404404
is_sequential_cpu_offload = False
405405

406-
if _pipeline is not None and _pipeline.hf_device_map is None:
406+
if _pipeline is not None and hasattr(_pipeline,"hf_device_map") and _pipeline.hf_device_map is None:
407407
for _, component in _pipeline.components.items():
408408
if isinstance(component, nn.Module) and hasattr(component, "_hf_hook"):
409409
if not is_model_cpu_offload:

0 commit comments

Comments
 (0)