mirror of
https://github.com/TencentARC/GFPGAN.git
synced 2026-04-27 00:01:00 +00:00
in Windows AssertionError: An object named 'ResNetArcFace' was already registered in 'arch' registry! #169
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Mehrancd on GitHub (Mar 2, 2022).
runfile('../GFPGAN/inference_gfpgan.py', args='-i inputs/whole_imgs -o results -v 1.3 -s 2', wdir='../GFPGAN')
Traceback (most recent call last):
File "..\GFPGAN\inference_gfpgan.py", line 9, in
from gfpgan import GFPGANer
File "..\GFPGAN\gfpgan_init_.py", line 2, in
from .archs import *
File "..\GFPGAN\gfpgan\archs_init_.py", line 10, in
_arch_modules = [importlib.import_module(f'gfpgan.archs.{file_name}') for file_name in arch_filenames]
File "..\GFPGAN\gfpgan\archs_init_.py", line 10, in
_arch_modules = [importlib.import_module(f'gfpgan.archs.{file_name}') for file_name in arch_filenames]
File "..\anaconda3\lib\importlib_init_.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "..\GFPGAN\gfpgan\archs\arcface_arch.py", line 172, in
class ResNetArcFace(nn.Module):
File "..\anaconda3\lib\site-packages\basicsr\utils\registry.py", line 53, in deco
self._do_register(name, func_or_class)
File "..\anaconda3\lib\site-packages\basicsr\utils\registry.py", line 39, in _do_register
assert (name not in self._obj_map), (f"An object named '{name}' was already registered "
AssertionError: An object named 'ResNetArcFace' was already registered in 'arch' registry!
@tengshaofeng commented on GitHub (Jan 18, 2023):
It is because of the conflict of local basicsr and package installed. So you can change the order of sys.path of local basicsr and site-packages
@bring-nirachornkul commented on GitHub (Feb 10, 2023):
how can change the order of sys.path of local basicsr and site-packages?
Which item or site-packages need to come first and last?