MCPcopy Create free account
hub / github.com/TencentARC/T2I-Adapter / get_obj_from_str

Function get_obj_from_str

configs/utils.py:86–91  ·  view source on GitHub ↗
(string, reload=False)

Source from the content-addressed store, hash-verified

84
85
86def get_obj_from_str(string, reload=False):
87 module, cls = string.rsplit(".", 1)
88 if reload:
89 module_imp = importlib.import_module(module)
90 importlib.reload(module_imp)
91 return getattr(importlib.import_module(module, package=None), cls)
92
93
94checkpoint_dict_replacements = {

Callers 1

instantiate_from_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected