-
-
Notifications
You must be signed in to change notification settings - Fork 315
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
Using face-ID got error 'onnx.onnx_cpp2py_export' is not a package #156
Comments
I'm facing the same issue with the Load InsightFace node in ComfyUI Portable(Python 3.10. I've already tried all the troubleshooting steps below to no success: I have Reactor on this same comfyui install and it's using Insightface perfectly fine. Any assistance with this would be appreciated. |
I find a strange workaround for that, but I think it is related to python module importing on Windows.
There may be some other way to solve the problem. |
@ultimatech-cn Strange workaround indeed. Unfortunately, once comfyui is restarted we go back to the same situation. Maybe something is being cached once ONNX is initially loaded and causing a conflict with insightface or the other modules. Once we make the change to init.py, the cache is purged. This is all a guess tho since I know next to nothing about the onnx module. |
You are right, it is related to insightface package importing. I have changed the code of IPAdapterPlus.py. First and # to line from 457 to 460. And add "from insightface.app import FaceAnalysis" to top of the code
It worked. |
Had the same problem. If comfyui-reactor-node is loaded as well, the problem persis even when moving the import to the beginning of IPAdapterPlus.py as suggested above. It's some kind of clash between reactor-node's use of onnx/protobuf and IPAdapter-plus's use of it when loading the insightface/buffalo model. |
I can confirm the issue is indeed caused by a conflict with the comfyui-reactor node. |
I am getting the error below ... If the ReActor Node for ComfyUI node is ENABLED in the ComfyUI Manager. DISABLING the ReActor node in the manager resolves the issue. `Error occurred when executing InsightFaceLoader: No module named 'onnx.onnx_cpp2py_export.defs'; 'onnx.onnx_cpp2py_export' is not a package File "/home/admin/ComfyUI/execution.py", line 154, in recursive_execute |
And also ComfyUI_roop may cause the same problem. |
The same "problem" here. I did already reinstall as mentioned. (using python 3.10.10 on Windows) As workaround I move the custom node "reactor" out of comfyui, and it works. I will try to reinstall comfyui from scratch, and see if it works. Thank you for a hint. |
It works for me! Yesterday I reinstalled comfy from scratch (not portable). Now I just did a Update all inside comfyui manager. Enabled Reactor node again, and no errors anymore, Thanks a lot👍 |
Had the same problem |
how to chang defs__init_.py file ,i had same problem |
我觉得他的意思大概是,随便写点什么,让comfui启动报错。 |
还可以参考我那个修改代码的方法。
|
What I need to mention. I installed comfyui from scratch using python 3.12 and the nightly version of pytorch. |
方便提供一下具体代码吗,我把from insightface.app import FaceAnalysis这个加载首行,直接就报错,IPAdapterPlus直接就不可用,非常感谢 |
你配置的IPAdapterPlus插件是可以工作了吗 |
worked for me as well, thanks 🙏 IP-Adapter && Reactor both work in the same flow with this fix. For others with same problem, trying to clarify what is meant: Find this method Then change top of the file to be like this:
Then restart ComfyUI and error should be gone. |
|
we already have a thread about insightface moving the import position is not a great solution anyway |
According to the Issue cubiq/ComfyUI_IPAdapter_plus#156
Hi @cubiq |
@Gourieff Thank you so much. This is great news. |
Add |
When I trying new face-id sample got following error
Check the package insighface and onnx by pip show
I try to import module in python as below, there is no error.
Any workaround for this?
The text was updated successfully, but these errors were encountered: