sd-webui-roop
sd-webui-roop copied to clipboard
I did install the insightface lib, but it still report No module named 'insightface'
after I pip install insightface==0.7.3 it shows: "Successfully built insightface Installing collected packages: insightface Successfully installed insightface-0.7.3" on my cmd,
however, when I started the webui, it still can not find insightface, report like this:
_Error loading script: swapper.py
Traceback (most recent call last):
File "F:\novelai-webui-aki-v2\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "F:\novelai-webui-aki-v2\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "
Looks like it can't find the insightface library eventhough I have already installed it, any thing I could do to guide roop to find it?
Same here. It also happens for ifnude.
I also get a ModuleNotFoundError for '_socket', but I can't install this one with a [ERROR: Invalid requirement: '_socket'] message.
Check module installation, Double-check that the insightface module is installed correctly by running pip show insightface in your command prompt. this command will display information about the installed package, including the installation location.
Ensure that you are using the same Python environment where you installed the insightface module, modules need to be installed specifically within that environment.
I'm not a programmer, so I did it in a simple way. The package is installed in users\user\AppData\Local\Programs\Python\Python310\Lib\site-packages And from there I manually copied to the sd\venv\lib\site-packages folder and everything worked there are two folders insightface and insightface-0.7.3.dist-info
@spacesugam, thanks for the help! How can I change the environment?
@Salexxxx23, thanks! I copied all the packages I was getting errors and it almost worked. Now I'm only getting the following error:
ImportError: cannot import name 'mesh_core_cython' from 'insightface.thirdparty.face3d.mesh.cython' (unknown location)
same error for me. At last I go to insightface\thirdparty\face3d\mesh\cython , open a cmd, run python setup.py build_ext -i
. this works for me.
Just to add to this - I was also getting 'ModuleNotFoundError for '_socket' - My solution was to uninstall Python 3.10 from the windows 'Add or Remove programs`, and download it again, reinstall but with Custom installation, and making sure to check the Add to PATH (or enviroment vars). The reason being (i think) pip install was trying to run and didnt have the right permissions / couldnt find the right executable or something along those lines. I removed my current install of Automatic1111 and reinstalled to a different path this time, and it worked.
@spacesugam, thanks for the help! How can I change the environment?
@Salexxxx23, thanks! I copied all the packages I was getting errors and it almost worked. Now I'm only getting the following error:
ImportError: cannot import name 'mesh_core_cython' from 'insightface.thirdparty.face3d.mesh.cython' (unknown location)
I got to this point without success. In the end I ended up reinstalling everything from SD, the only thing I did differently is that the install.py file did not have execution permissions, immediately after installing it I placed them. I got the same errors, but this time manually importing all the dependencies no longer gave me this error.
Checking the permits could be a good idea.
I think I found the problem -- at least for me.
For me, a1111 was running its own python inside venv
-- which is located in automatic1111/venv/scripts/python.exe
-- not the global python install. So when I was doing pip install insightface==0.7.3
it was installing it to the global python install, not the venv version.
So running venv\scripts\python.exe -m pip install insightface==0.7.3
instead from inside a1111 folder /should/ do it?