Skip to content

Commit

Permalink
fix import error
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaolao committed Jul 7, 2024
1 parent 549ee5f commit dfa7598
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion utils/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit dfa7598

Please sign in to comment.