MCPcopy Create free account
hub / github.com/AlayaLab/Hive / is_compiled_module

Function is_compiled_module

models/flowsep/diffusers/utils/torch_utils.py:80–84  ·  view source on GitHub ↗

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

(module)

Source from the content-addressed store, hash-verified

78
79
80def is_compiled_module(module):
81 """Check whether the module was compiled with torch.compile()"""
82 if is_torch_version("<", "2.0.0") or not hasattr(torch, "_dynamo"):
83 return False
84 return isinstance(module, torch._dynamo.eval_frame.OptimizedModule)

Callers 6

maybe_raise_or_warnFunction · 0.85
register_modulesMethod · 0.85
save_pretrainedMethod · 0.85
__call__Method · 0.85
__call__Method · 0.85
__call__Method · 0.85

Calls 1

is_torch_versionFunction · 0.85

Tested by

no test coverage detected