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

Error The insightface 0.7.3 distribution was not found and is required #72

Closed
qawasx opened this issue Aug 29, 2023 · 15 comments
Closed

Comments

@qawasx
Copy link

qawasx commented Aug 29, 2023

Did i do something wrong?

`Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.5.2
Commit hash: c9c8485bc1e8720aba70f029d25cba1c4abf2b5c
Collecting insightface==0.7.3
Using cached insightface-0.7.3.tar.gz (439 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Checking ReActor requirements... Error: The 'insightface==0.7.3' distribution was not found and is required by the application

--- PLEASE, RESTART the Server! ---

Launching Web UI with arguments:
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
*** Error loading script: console_log_patch.py
Traceback (most recent call last):
File "E:\Downloads\sd.webui\webui\modules\scripts.py", line 319, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "E:\Downloads\sd.webui\webui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "E:\Downloads\sd.webui\webui\extensions\sd-webui-reactor\scripts\console_log_patch.py", line 4, in
import insightface
ModuleNotFoundError: No module named 'insightface'


*** Error loading script: faceswap.py
Traceback (most recent call last):
File "E:\Downloads\sd.webui\webui\modules\scripts.py", line 319, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "E:\Downloads\sd.webui\webui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "E:\Downloads\sd.webui\webui\extensions\sd-webui-reactor\scripts\faceswap.py", line 16, in
from scripts.swapper import UpscaleOptions, swap_face, check_process_halt, reset_messaged
File "E:\Downloads\sd.webui\webui\extensions\sd-webui-reactor\scripts\swapper.py", line 10, in
import insightface
ModuleNotFoundError: No module named 'insightface'


*** Error loading script: reactor_api.py
Traceback (most recent call last):
File "E:\Downloads\sd.webui\webui\modules\scripts.py", line 319, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "E:\Downloads\sd.webui\webui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "E:\Downloads\sd.webui\webui\extensions\sd-webui-reactor\scripts\reactor_api.py", line 17, in
from scripts.swapper import UpscaleOptions, swap_face
File "E:\Downloads\sd.webui\webui\extensions\sd-webui-reactor\scripts\swapper.py", line 10, in
import insightface
ModuleNotFoundError: No module named 'insightface'


*** Error loading script: swapper.py
Traceback (most recent call last):
File "E:\Downloads\sd.webui\webui\modules\scripts.py", line 319, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "E:\Downloads\sd.webui\webui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "E:\Downloads\sd.webui\webui\extensions\sd-webui-reactor\scripts\swapper.py", line 10, in
import insightface
ModuleNotFoundError: No module named 'insightface'
`

@Gourieff
Copy link
Owner

Did you try "--- PLEASE, RESTART the Server! ---" ? I hope you did :)
Do you have the "insightface" folder inside the "E:\Downloads\sd.webui\webui\venv\Lib\site-packages" directory?
If no - please read "Step 1" of installation or "Sec. VIII" of troubleshooting

The most common issue about that - is you need to have C++ Build Tools in your OS, otherwise Insightface dependency won't be installed

@qawasx
Copy link
Author

qawasx commented Aug 29, 2023

I did restart it of course.
The folder venv does not exist.

@Gourieff
Copy link
Owner

What sd-webui do you use? Some portable version?

@Gourieff
Copy link
Owner

Do you have "Visual Studio 2022" or "VS C++ Build Tools" installed?

@qawasx
Copy link
Author

qawasx commented Aug 29, 2023

no, only git and python

@Gourieff
Copy link
Owner

This is the reason, Insightface cannot be built without C++ Build Tools
But ok, you can download pre-built Insightface package https://github.com/Gourieff/sd-webui-reactor/raw/main/example/insightface-0.7.3-cp310-cp310-win_amd64.whl
Then:

  1. Put the file in the E:\Downloads\sd.webui\system folder
  2. Run CMD for that folder (just type cmd instead of your folder path)
  3. Close sd-webui server if it's running
  4. Run python\python.exe -m pip install insightface-0.7.3-cp310-cp310-win_amd64.whl and wait for the process to complete
  5. That's all, ReActor should work after that

@bytechomp
Copy link

I'm facing same issue - running sd-webui-reactor on macOS arm64. Previous versions of reactor worked without issues.

@Gourieff
Copy link
Owner

Gourieff commented Sep 6, 2023

I'm facing same issue - running sd-webui-reactor on macOS arm64. Previous versions of reactor worked without issues.

If you have any troubles with installing Insightface package on Mac M1/M2, you can try this solution #42

@Creepybits
Copy link

I got it to work eventually. I had to check VS again and make sure to download:

Desktop development with C++

And then select the following individual components:

Windows 11 SDK
C++ x64/x86 build tools

After that I CMD in \venv\Lib\site-packages

And did the following:

pip uninstall insightface

git clone https://github.com/deepinsight/insightface.git

cd insightface

pip install -r requirements.txt

cd python-package

pip install -e .

After a couple of restarts it seems to work.

@00RohitRoshan
Copy link

It seems to work when installed from the ~Stable Diffusion\stable-diffusion-webui\venv\Scripts folder.
run pip install insightface-0.7.3-cp310-cp310-win_amd64.whl .
and keep the .whl file in the same folder.

@EGCReborn
Copy link

It seems to work when installed from the ~Stable Diffusion\stable-diffusion-webui\venv\Scripts folder.
run pip install insightface-0.7.3-cp310-cp310-win_amd64.whl .
and keep the .whl file in the same folder.

@xenjee
Copy link

xenjee commented Mar 18, 2024

@Gourieff
Copy link
Owner

@xenjee
Copy link

xenjee commented Mar 21, 2024

@Gourieff thank you, appreciated.

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

7 participants