diff --git a/utils/registry.py b/utils/registry.py index 79e3be4..22f8c94 100644 --- a/utils/registry.py +++ b/utils/registry.py @@ -52,7 +52,19 @@ def build_from_config(cfg, registry, **kwargs): if isinstance(req_type, str): req_type_entry = registry.get(req_type) if req_type_entry is None: - raise KeyError(f"{req_type} not found in {registry.name} registry") + try: + print(f"For Windows users, we explicitly import registry function {req_type} !!!") + from tools.inferences.inference_unianimate_entrance import inference_unianimate_entrance + from tools.inferences.inference_unianimate_long_entrance import inference_unianimate_long_entrance + from tools.modules.diffusions.diffusion_ddim import DiffusionDDIM + from tools.modules.diffusions.diffusion_ddim import DiffusionDDIMLong + from tools.modules.autoencoder import AutoencoderKL + from tools.modules.clip_embedder import FrozenOpenCLIPTextVisualEmbedder + from tools.modules.unet.unet_unianimate import UNetSD_UniAnimate + + req_type_entry = eval(req_type) + except: + raise KeyError(f"{req_type} not found in {registry.name} registry") if kwargs is not None: cfg.update(kwargs)