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

Having Issue with installation on Insightface Package #34

Closed
jimweaver opened this issue Aug 6, 2024 · 6 comments
Closed

Having Issue with installation on Insightface Package #34

jimweaver opened this issue Aug 6, 2024 · 6 comments

Comments

@jimweaver
Copy link

Shiimizu, I'm facing this issue hopefully you can figure this out.

(IMPORT FAILED): C:\Art and Media\Data\Packages\ComfyUI\custom_nodes\ComfyUI-PhotoMaker-Plus

Message from console:

Loading: ComfyUI-Manager (V2.48.1)
ComfyUI Revision: 2474 [2d75df45] | Released on '2024-08-05'
Traceback (most recent call last):
File "C:\Art and Media\Data\Packages\ComfyUI\nodes.py", line 1941, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Art and Media\Data\Packages\ComfyUI\custom_nodes\ComfyUI-PhotoMaker-Plus_init
.py", line 1, in
from .photomaker import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
File "C:\Art and Media\Data\Packages\ComfyUI\custom_nodes\ComfyUI-PhotoMaker-Plus\photomaker.py", line 20, in
from .insightface_package import FaceAnalysis2, analyze_faces, insightface_loader
File "C:\Art and Media\Data\Packages\ComfyUI\custom_nodes\ComfyUI-PhotoMaker-Plus\insightface_package.py", line 3, in
from insightface import FaceAnalysis
ModuleNotFoundError: No module named 'insightface'
Cannot import C:\Art and Media\Data\Packages\ComfyUI\custom_nodes\ComfyUI-PhotoMaker-Plus module for custom nodes: No module named 'insightface'

From cmd:

pip check pydantic
confection 0.0.4 has requirement pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4, but you have pydantic 2.7.0.
spacy 3.4.4 has requirement pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4, but you have pydantic 2.7.0.
thinc 8.1.9 has requirement pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4, but you have pydantic 2.7.0.

@jimweaver
Copy link
Author

pip check insightface
confection 0.0.4 has requirement pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4, but you have pydantic 2.7.0.
spacy 3.4.4 has requirement pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4, but you have pydantic 2.7.0.
thinc 8.1.9 has requirement pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4, but you have pydantic 2.7.0.

@shiimizu
Copy link
Owner

shiimizu commented Aug 6, 2024

Did you run

pip install -U insightface

@jimweaver
Copy link
Author

Yeah, I already did. The version I have installed is 0.7.3.

@shiimizu
Copy link
Owner

shiimizu commented Aug 6, 2024

It seems like many people have this issue1 2 3. Make sure you use the python that runs ComfyUI.
So, something like python_embeded\python.exe -m pip install -U insightface

There are also prebuilt packages so you don’t have to build it yourself:

instructions from the reactor node.

Instructions from a reddit user:

From the ComfyUI root folder (where you have "webui-user.bat" file) check the version of Python aka run CMD and type "python_embeded\python.exe -V"

Footnotes

  1. Dependencies missing for Insightface · Issue #162 · cubiq/ComfyUI_IPAdapter_plus (github.com)

  2. Installing Insightface : r/comfyui (reddit.com)

  3. Installing insightface... : r/comfyui (reddit.com)

@jimweaver
Copy link
Author

I'm using a launcher called Stability Matrix as a manager for ComfyUI. I'll go ahead and try to install insightface again.

@jimweaver
Copy link
Author

Problem solved! I guess the Stability Matrix has it own python 3.10 env.

I have follow the https://github.com/Gourieff/comfyui-reactor-node#i-for-windows-users-if-you-still-cannot-build-insightface-for-some-reasons-or-just-dont-want-to-install-visual-studio-or-vs-c-build-tools---do-the-following and downloaded prebuilt Insightface package into ComfyUI root folder in .venv/script through CMD

  • python.exe -m pip install insightface

Finally, Stable Matrix is able to find insightface and install ComfyUI-PhotoMaker-Plus.

@shiimizu shiimizu pinned this issue Sep 1, 2024
@shiimizu shiimizu closed this as completed Sep 1, 2024
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