Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'inference_unianimate_entrance not found in INFER_ENGINE registry' #48

Open
Inmiy opened this issue Jul 5, 2024 · 1 comment

Comments

@Inmiy
Copy link

Inmiy commented Jul 5, 2024

按照说明流程安装后,执行python inference.py --cfg configs/UniAnimate_infer.yaml 报错了,以下是报错信息:
Traceback (most recent call last):
File "D:\0xProgramTool\Anaconda3\Miniconda3\envs\UniAnimate-GradioUI\inference.py", line 18, in
INFER_ENGINE.build(dict(type=cfg_update.TASK_TYPE), cfg_update=cfg_update.cfg_dict)
File "D:\0xProgramTool\Anaconda3\Miniconda3\envs\UniAnimate-GradioUI\utils\registry.py", line 107, in build
return self.build_func(*args, **kwargs, registry=self)
File "D:\0xProgramTool\Anaconda3\Miniconda3\envs\UniAnimate-GradioUI\utils\registry_class.py", line 7, in build_func
return build_from_config(cfg, registry, **kwargs)
File "D:\0xProgramTool\Anaconda3\Miniconda3\envs\UniAnimate-GradioUI\utils\registry.py", line 55, in build_from_config
raise KeyError(f"{req_type} not found in {registry.name} registry")
KeyError: 'inference_unianimate_entrance not found in INFER_ENGINE registry'
不知道是哪里出问题了。

@wangxiang1230
Copy link
Collaborator

Hi, we have updated the code and fixed this issue for Windows users. Please refer to

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")

You can also refer to this issue(#46) for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants