MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / is_compiled_module

Function is_compiled_module

diffusers/src/diffusers/utils/torch_utils.py:86–90  ·  view source on GitHub ↗

Check whether the module was compiled with torch.compile()

(module)

Source from the content-addressed store, hash-verified

84
85
86def is_compiled_module(module) -> bool:
87 """Check whether the module was compiled with torch.compile()"""
88 if is_torch_version("<", "2.0.0") or not hasattr(torch, "_dynamo"):
89 return False
90 return isinstance(module, torch._dynamo.eval_frame.OptimizedModule)
91
92
93def fourier_filter(x_in: "torch.Tensor", threshold: int, scale: int) -> "torch.Tensor":

Callers 15

unwrap_modelFunction · 0.90
unwrap_modelFunction · 0.90
unwrap_modelFunction · 0.90
unwrap_modelFunction · 0.90
unwrap_modelFunction · 0.90
unwrap_modelFunction · 0.90
unwrap_modelFunction · 0.90
unwrap_modelFunction · 0.90
unwrap_modelFunction · 0.90
unwrap_modelFunction · 0.90
unwrap_modelFunction · 0.90

Calls 1

is_torch_versionFunction · 0.85

Tested by 1