Skip to content

Commit 71a4706

Browse files
committed
fix
1 parent 5b1dcd1 commit 71a4706

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/pipelines/pipeline_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ def remove_all_hooks(self):
10421042
"""
10431043
for _, model in self.components.items():
10441044
if isinstance(model, torch.nn.Module) and hasattr(model, "_hf_hook"):
1045-
accelerate.hooks.remove_hook_from_module(model, recurse=True)
1045+
accelerate.hooks.remove_hook_from_module(_unwrap_model(model), recurse=True)
10461046
self._all_hooks = []
10471047

10481048
def enable_model_cpu_offload(self, gpu_id: Optional[int] = None, device: Union[torch.device, str] = "cuda"):

0 commit comments

Comments
 (0)