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

Function unwrap_module

src/diffusers/utils/torch_utils.py:209–211  ·  view source on GitHub ↗

Unwraps a module if it was compiled with torch.compile()

(module)

Source from the content-addressed store, hash-verified

207
208
209def unwrap_module(module):
210 """Unwraps a module if it was compiled with torch.compile()"""
211 return module._orig_mod if is_compiled_module(module) else module
212
213
214def fourier_filter(x_in: "torch.Tensor", threshold: int, scale: int) -> "torch.Tensor":

Callers 12

__call__Method · 0.85
__call__Method · 0.85
__call__Method · 0.85
__call__Method · 0.85
initialize_hookMethod · 0.85
initialize_hookMethod · 0.85
initialize_hookMethod · 0.85
reset_stateful_hooksMethod · 0.85
_get_child_registriesMethod · 0.85
initialize_hookMethod · 0.85
initialize_hookMethod · 0.85
initialize_hookMethod · 0.85

Calls 1

is_compiled_moduleFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…