MCPcopy Create free account
hub / github.com/cientgu/VQ-Diffusion / class_from_string

Function class_from_string

image_synthesis/utils/misc.py:134–137  ·  view source on GitHub ↗
(class_name)

Source from the content-addressed store, hash-verified

132 return cls(**config.get("params", dict()))
133
134def class_from_string(class_name):
135 module, cls = class_name.rsplit(".", 1)
136 cls = getattr(importlib.import_module(module, package=None), cls)
137 return cls
138
139def get_all_file(dir, end_with='.h5'):
140 if isinstance(end_with, str):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected