MCPcopy Create free account
hub / github.com/huggingface/diffusers / deinitalize_hook

Method deinitalize_hook

src/diffusers/hooks/hooks.py:79–87  ·  view source on GitHub ↗

r""" Hook that is executed when a model is deinitialized. Args: module (`torch.nn.Module`): The module attached to this hook.

(self, module: torch.nn.Module)

Source from the content-addressed store, hash-verified

77 return module
78
79 def deinitalize_hook(self, module: torch.nn.Module) -> torch.nn.Module:
80 r"""
81 Hook that is executed when a model is deinitialized.
82
83 Args:
84 module (`torch.nn.Module`):
85 The module attached to this hook.
86 """
87 return module
88
89 def pre_forward(self, module: torch.nn.Module, *args, **kwargs) -> tuple[tuple[Any], dict[str, Any]]:
90 r"""

Callers 1

remove_hookMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected