Repository: stable-diffusion-webui
Issue: [Bug]: AssertionError: An object named 'ResNetArcFace' was already registered in 'arch' registry!
Labels: bug-report

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

Error while running webui-user.bat happens after installation of basicsr
Traceback (most recent call last):
  File "D:\stable-diffusion-webui-master\launch.py", line 353, in <module>
    start()
  File "D:\stable-diffusion-webui-master\launch.py", line 344, in start
    import webui
  File "D:\stable-diffusion-webui-master\webui.py", line 47, in <module>
    import modules.gfpgan_model as gfpgan
  File "D:\stable-diffusion-webui-master\modules\gfpgan_model.py", line 6, in <module>
    import gfpgan
  File "D:\stable-diffusion-webui-master\venv\lib\site-packages\gfpgan\__init__.py", line 2, in <module>
    from .archs import *
  File "D:\stable-diffusion-webui-master\venv\lib\site-packages\gfpgan\archs\__init__.py", line 10, in <module>
    _arch_modules = [importlib.import_module(f'gfpgan.archs.{file_name}') for file_name in arch_filenames]
  File "D:\stable-diffusion-webui-master\venv\lib\site-packages\gfpgan\archs\__init__.py", line 10, in <listcomp>
    _arch_modules = [importlib.import_module(f'gfpgan.archs.{file_name}') for file_name in arch_filenames]
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "D:\stable-diffusion-webui-master\venv\lib\site-packages\gfpgan\archs\arcface_arch.py", line 172, in <module>
    class ResNetArcFace(nn.Module):
  File "D:\stable-diffusion-webui-master\repositories\CodeFormer\basicsr\utils\registry.py", line 53, in deco
    self._do_register(name, func_or_class)
  File "D:\stable-diffusion-webui-master\repositories\CodeFormer\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!

### Steps to reproduce the problem

idk, I am trying to launch webui after installing basicsr.

### What should have happened?

It should open local server with stable diffusion

### Commit where the problem happens

1.1.0

### What platforms do you use to access the UI ?

_No response_

### What browsers do you use to access the UI ?

_No response_

### Command Line Arguments

```Shell
no
```


### List of extensions

no

### Console logs

```Shell
venv "D:\stable-diffusion-webui-master\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: <none>
Installing requirements
Launching Web UI with arguments:
No module 'xformers'. Proceeding without it.
Traceback (most recent call last):
  File "D:\stable-diffusion-webui-master\launch.py", line 353, in <module>
    start()
  File "D:\stable-diffusion-webui-master\launch.py", line 344, in start
    import webui
  File "D:\stable-diffusion-webui-master\webui.py", line 47, in <module>
    import modules.gfpgan_model as gfpgan
  File "D:\stable-diffusion-webui-master\modules\gfpgan_model.py", line 6, in <module>
    import gfpgan
  File "D:\stable-diffusion-webui-master\venv\lib\site-packages\gfpgan\__init__.py", line 2, in <module>
    from .archs import *
  File "D:\stable-diffusion-webui-master\venv\lib\site-packages\gfpgan\archs\__init__.py", line 10, in <module>
    _arch_modules = [importlib.import_module(f'gfpgan.archs.{file_name}') for file_name in arch_filenames]
  File "D:\stable-diffusion-webui-master\venv\lib\site-packages\gfpgan\archs\__init__.py", line 10, in <listcomp>
    _arch_modules = [importlib.import_module(f'gfpgan.archs.{file_name}') for file_name in arch_filenames]
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "D:\stable-diffusion-webui-master\venv\lib\site-packages\gfpgan\archs\arcface_arch.py", line 172, in <module>
    class ResNetArcFace(nn.Module):
  File "D:\stable-diffusion-webui-master\repositories\CodeFormer\basicsr\utils\registry.py", line 53, in deco
    self._do_register(name, func_or_class)
  File "D:\stable-diffusion-webui-master\repositories\CodeFormer\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!
```


### Additional information

I did tried everything from issue 2993, and still error pops up