cubiq / ComfyUI_IPAdapter_plus

GNU General Public License v3.0
4.2k stars 315 forks source link

Dependencies missing for Insightface #162

Open pphoto808 opened 11 months ago

pphoto808 commented 11 months ago

Screenshot 2023-12-24 at 19 27 54

I have followed in the installation guide lines. Installed all the appropriate files in ComfyUI environment, updated Comfy and still get the same error.

Running Comfy on Mac Studio M2 Ultra.

pphoto808 commented 11 months ago

removed сomfyui-reactor-node + installed ComfyUI-FaceSwap +

after that ip-adapter-faceid_sd15.bin works but ip-adapter-faceid-plus_sd15.bin does not work

Noted the same...I disabled Reactor and didn't get the dependencies error from the Load Insightface node. Didn't try the faceid-plus tho.

cubiq commented 11 months ago

faceid-plus is not supported yet. check again later today

nyukers commented 11 months ago

removed сomfyui-reactor-node + installed ComfyUI-FaceSwap + after that ip-adapter-faceid_sd15.bin works but ip-adapter-faceid-plus_sd15.bin does not work

Noted the same...I disabled Reactor and didn't get the dependencies error from the Load Insightface node. Didn't try the faceid-plus tho. I find it funny how swappers don't get along. And we're each forced to choose between them.((

daconl commented 11 months ago

removed сomfyui-reactor-node + installed ComfyUI-FaceSwap + after that ip-adapter-faceid_sd15.bin works but ip-adapter-faceid-plus_sd15.bin does not work

Noted the same...I disabled Reactor and didn't get the dependencies error from the Load Insightface node. Didn't try the faceid-plus tho. I find it funny how swappers don't get along. And we're each forced to choose between them.((

I uninstalled Reactor and insightface -> re-installed insightface, then re-installed Reactor via ComfyUI manager, and now everything is working (without editing any file).

nyukers commented 11 months ago

removed сomfyui-reactor-node + installed ComfyUI-FaceSwap + after that ip-adapter-faceid_sd15.bin works but ip-adapter-faceid-plus_sd15.bin does not work

Noted the same...I disabled Reactor and didn't get the dependencies error from the Load Insightface node. Didn't try the faceid-plus tho. I find it funny how swappers don't get along. And we're each forced to choose between them.((

I uninstalled Reactor and insightface -> re-installed insightface, then re-installed Reactor via ComfyUI manager, and now everything is working (without editing any file).

I'm glad for you. I did to disable Reactor temporary, while I will understand that I need FaceID.

moh777 commented 11 months ago

removed сomfyui-reactor-node + installed ComfyUI-FaceSwap + after that ip-adapter-faceid_sd15.bin works but ip-adapter-faceid-plus_sd15.bin does not work

Noted the same...I disabled Reactor and didn't get the dependencies error from the Load Insightface node. Didn't try the faceid-plus tho. I find it funny how swappers don't get along. And we're each forced to choose between them.((

I uninstalled Reactor and insightface -> re-installed insightface, then re-installed Reactor via ComfyUI manager, and now everything is working (without editing any file).

This worked like magic after hours of fiddling with all types on nodes, even reinstalled comfyui on another drive from scratch ! Thank a million!

moh777 commented 11 months ago

removed сomfyui-reactor-node + installed ComfyUI-FaceSwap + after that ip-adapter-faceid_sd15.bin works but ip-adapter-faceid-plus_sd15.bin does not work

Noted the same...I disabled Reactor and didn't get the dependencies error from the Load Insightface node. Didn't try the faceid-plus tho. I find it funny how swappers don't get along. And we're each forced to choose between them.((

I uninstalled Reactor and insightface -> re-installed insightface, then re-installed Reactor via ComfyUI manager, and now everything is working (without editing any file).

This worked like magic after hours of fiddling with all types on nodes, even reinstalled comfyui on another drive from scratch !

removed сomfyui-reactor-node + installed ComfyUI-FaceSwap + after that ip-adapter-faceid_sd15.bin works but ip-adapter-faceid-plus_sd15.bin does not work

Noted the same...I disabled Reactor and didn't get the dependencies error from the Load Insightface node. Didn't try the faceid-plus tho. I find it funny how swappers don't get along. And we're each forced to choose between them.((

I uninstalled Reactor and insightface -> re-installed insightface, then re-installed Reactor via ComfyUI manager, and now everything is working (without editing any file).

I'm glad for you. I did to disable Reactor temporary, while I will understand that I need FaceID.

Thank you too, since when I reinstalled Reactor it stopped working but when I disabled it by your advice all worked again, so we no know the Insightface and Reactor have a conflict and we need to disable reactor to use insightface. You made my day you and daconl !

ultimatech-cn commented 11 months ago

removed сomfyui-reactor-node + installed ComfyUI-FaceSwap + after that ip-adapter-faceid_sd15.bin works but ip-adapter-faceid-plus_sd15.bin does not work

Noted the same...I disabled Reactor and didn't get the dependencies error from the Load Insightface node. Didn't try the faceid-plus tho. I find it funny how swappers don't get along. And we're each forced to choose between them.((

I uninstalled Reactor and insightface -> re-installed insightface, then re-installed Reactor via ComfyUI manager, and now everything is working (without editing any file).

This worked like magic after hours of fiddling with all types on nodes, even reinstalled comfyui on another drive from scratch !

removed сomfyui-reactor-node + installed ComfyUI-FaceSwap + after that ip-adapter-faceid_sd15.bin works but ip-adapter-faceid-plus_sd15.bin does not work

Noted the same...I disabled Reactor and didn't get the dependencies error from the Load Insightface node. Didn't try the faceid-plus tho. I find it funny how swappers don't get along. And we're each forced to choose between them.((

I uninstalled Reactor and insightface -> re-installed insightface, then re-installed Reactor via ComfyUI manager, and now everything is working (without editing any file).

I'm glad for you. I did to disable Reactor temporary, while I will understand that I need FaceID.

Thank you too, since when I reinstalled Reactor it stopped working but when I disabled it by your advice all worked again, so we no know the Insightface and Reactor have a conflict and we need to disable reactor to use insightface. You made my day you and daconl !

I am using reactor node and IPAdaptor-plus together by changing the IPAdapterPlus.py source code. Disable " from insightface.app import FaceAnalysis" in the middle of code. Import on the top of code.

cqwcqwcqwa commented 11 months ago

delete reactor node then can use this

cubiq commented 11 months ago

even if you don't use cuda, remember to install onnxruntime-gpu otherwise it might not work

2PeteShakur commented 11 months ago

yeah strange, on one system, got faceid working by just updating comfyui and python dependencies and on another system, it works when reactor nodes are removed from custom nodes dir, oh well least we found a solution! :)

johndeu commented 11 months ago

"Fixed" the problem for Mac Studio M2 Ultra. Some steps I took before last step... I did a lot of the recommendations to no avail. For Mac Silicon users, you don't have python_embed and you won't have the Update folder. I used "/usr/local/opt/python@3.11/bin/python3.11 -m pip install" instead Today I did the following: Brew update Brew upgrade /usr/local/bin/python3 -m pip install insightface (don't think this matters)

Before I started uninstalling things (onnx stuff), I renamed my current ComfyUI to ComfyUI-Old and created new ComfyUI from latest Github version. Installed Manager, loaded my FaceID graph, installed missing nodes (IPAdapter-Plus), restarted and it works. This time it actually downloaded the insightface files.

WHY it works...no real clue. I didn't note that in the new Comfy folder, there is no venv folder. Removed it from old Comfy folder but still got missing dependencies error. So, clearly the dependencies are there since it works with new Comfy install.

For now, satisfied that it works but still mystified why it doesn't work in old install.

Thanks!

I got it working on my Macbook M2 Pro as well after doing a bit of modifying of my Python installation. I was on Python 3.12 in a virtual environment folder in the ComfyUI folder. It was failling at getting the onnxruntime for that version of Python. I installed Python 3.11 and created a new venv in the Comfy folder and activated that one instead, re-installed all requirements from the requirement.txt file, pip installed insightface and onnxruntime.

After that I got the following error when runnning the sample FaceID2 workflow,

_AttributeError: module 'cv2.gapi.wip.draw' has no attribute 'Text'_ 

to fix that I downgraded my opencv installation using:

pip install opencv-python==4.5.5.64

Like magic, it is now working perfectly on my M2 silicon mac. Hope that helps someone else!

bihailantian655 commented 11 months ago

try this insightface-0.7.3-cp310-cp310-win_amd64

https://github.com/bihailantian655/insightface_wheel

https://github.com/deepinsight/insightface/releases/download/v0.7/buffalo_l.zip

unzip into path ComfyUI\models\insightface\models\buffalo_l

julien-blanchon commented 10 months ago

Anyone able to summary what are the current working solutions ?

erba1684 commented 10 months ago

No matter what I try I still get this error, I updated everything, manually and automatically, disabled and uninstalled reActor nodes. still nothing. Any idea why?

Screenshot 2024-01-03 104806
budihartono commented 10 months ago

I tried this on a JarvisLabs instance using a Colab file. At first, I always got the error message that InsightFace was not installed. I thought if I downloaded the Insightface models, it might work. Then I downloaded the buffalo_l models listed by @bihailantian655 above, and then I downloaded the Inswapper model which I downloaded from Inswapper download link (though I'm not sure if it fixed the problem). I uninstalled and then reinstalled insightface, too.

And it just worked. I have created a new instance on JarvisLabs, and the problem has gone. I haven't tried it on my Mac M1, so I don't know if it will also work on my Mac.

Below is the snippet of Colab code I have added (here ~/ComfyUI is the base directory).

%pip install onnxruntime-gpu
%pip uninstall insightface
%pip install insightface
%mkdir ~/ComfyUI/models/ipadapter
%cd ~/ComfyUI/models/ipadapter
!wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plus_sd15.bin
!wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sd15.bin

%cd ~/ComfyUI/models/clip_vision/
!wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/image_encoder/model.safetensors && mv model.safetensors CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors
!wget https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/image_encoder/model.safetensors && mv model.safetensors CLIP-ViT-bigG-14-laion2B-39B-b160k.safetensors

%cd ~/ComfyUI/models/loras/
!wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plus_sd15_lora.safetensors
!wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sd15_lora.safetensors

%mkdir -p ~/ComfyUI/models/insightface/models/buffalo_l
%cd ~/ComfyUI/models/insightface/models/buffalo_l
!wget https://github.com/deepinsight/insightface/releases/download/v0.7/buffalo_l.zip
!unzip buffalo_l.zip
%cd ~/ComfyUI/models/insightface/models
!wget https://huggingface.co/AIBrainBox/inswapper_128.onnx/resolve/main/inswapper_128.onnx

Besides that, I also modified the IPAdapterPlus.py

# INSIGHTFACE_DIR = os.path.join(folder_paths.models_dir, "insightface")
INSIGHTFACE_DIR = os.path.join(os.path.expanduser('~/ComfyUI/models/'), "insightface") # Modified code

After all, I'm still not sure what really happens and what may have fixed this issue in my case.

MMoneer commented 10 months ago

Hello, For insightFace issue, I suggest trying the following steps: 1- First update Comfyui from update_comfyui_and_python_dependencies.bat 2- python_embeded\python.exe -m pip uninstall insightface 3- python_embeded\python.exe -m pip install --upgrade --force-reinstall insightface-0.7.3-cp310-cp310-win_amd64.whl (for 3.10) or python_embeded\python.exe -m pip install --upgrade --force-reinstall insightface-0.7.3-cp311-cp311-win_amd64.whl (for 3.11) -It's important to use "--upgrade --force-reinstall" the new reinstallation should redownload requirements If the above does not work try to downgrade Pillow from 10.1.0 to version 9.5.0, and check if it works, if not then redo steps 2 and 3 again with Pillow 9.5.0.

danielfennelly commented 10 months ago

@cubiq mentioned this above but I want to highlight it because I think most folks will run into it. I solved my issue last night by digging into the insightface installation instructions, and realizing that onnxruntime-gpu has to be installed manually. (Note: I'm using ComfyUI in a Linux environment.)

You have to install onnxruntime-gpu manually to enable GPU inference, or install onnxruntime to use CPU only inference. Docs: InsightFace Python Library - Install Inference Backend

cubiq commented 10 months ago

I have pushed a new version that gives better error reporting.

Please don't post screenshots! Copy/paste the full text in the console.

Like so:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/matteo/bin/ComfyUI/execution.py", line 154, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/matteo/bin/ComfyUI/execution.py", line 84, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/matteo/bin/ComfyUI/execution.py", line 77, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/matteo/bin/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/IPAdapterPlus.py", line 529, in load_insight_face
    raise Exception(e)
Exception: Unable to import dependency onnxruntime.

In the above example you are missing onnxruntime-gpu extension

AI2lab commented 10 months ago

To see the GUI go to: http://127.0.0.1:8188 To see the GUI go to: https://127.0.0.1:8189 got prompt [ReActor] 12:08:05 - STATUS - Working: source face index [0], target face index [0] [ReActor] 12:08:05 - STATUS - Analyzing Source Image... [ReActor] 12:08:07 - STATUS - Analyzing Target Image... [ReActor] 12:08:08 - STATUS - Swapping... [ReActor] 12:08:10 - STATUS - --Done!-- [ReActor] 12:08:10 - STATUS - Restoring with codeformer.pth Loads SAM model: /home/liguo/deploy/ComfyUI/models/sams/sam_vit_h_4b8939.pth (device:Prefer GPU)

0: 640x480 1 face, 57.4ms Speed: 1.9ms preprocess, 57.4ms inference, 0.9ms postprocess per image at shape (1, 3, 640, 480) model_type EPS adm 0 Using pytorch attention in VAE Working with z of shape (1, 4, 32, 32) = 4096 dimensions. Using pytorch attention in VAE missing {'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_l.logit_scale'} left over keys: dict_keys(['cond_stage_model.clip_l.transformer.text_model.embeddings.position_ids']) ERROR:root:!!! Exception during processing !!! ERROR:root:Traceback (most recent call last): File "/home/liguo/deploy/ComfyUI/execution.py", line 154, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "/home/liguo/deploy/ComfyUI/execution.py", line 84, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "/home/liguo/deploy/ComfyUI/execution.py", line 77, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "/home/liguo/deploy/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/IPAdapterPlus.py", line 570, in apply_ipadapter raise Exception('InsightFace must be provided for FaceID models.') Exception: InsightFace must be provided for FaceID models.

Prompt executed in 13.16 seconds

PancrasPZ commented 10 months ago

I have got this logs. How could i fix it?

Error occurred when executing InsightFaceLoader:

A Message class can only inherit from Message

File "D:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 153, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "D:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 83, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "D:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 76, in map_node_over_list results.append(getattr(obj, func)(*slice_dict(input_data_all, i))) File "D:\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 527, in load_insight_face from insightface.app import FaceAnalysis File "D:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface__init__.py", line 16, in from . import model_zoo File "D:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface\model_zoo__init__.py", line 1, in from .model_zoo import get_model File "D:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface\model_zoo\model_zoo.py", line 11, in from .arcface_onnx import File "D:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface\model_zoo\arcface_onnx.py", line 10, in import onnx File "D:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnx__init__.py", line 77, in from onnx.external_data_helper import ( File "D:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnx\external_data_helper.py", line 11, in from onnx.onnx_pb import AttributeProto, GraphProto, ModelProto, TensorProto File "D:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnx\onnx_pb.py", line 4, in from .onnx_ml_pb2 import * # noqa File "D:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnx\onnx_ml_pb2.py", line 19, in _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'onnx.onnx_ml_pb2', globals()) File "D:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\google\protobuf\internal\builder.py", line 108, in BuildTopDescriptorsAndMessages module[name] = BuildMessage(msg_des) File "D:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\google\protobuf\internal\builder.py", line 85, in BuildMessage message_class = _reflection.GeneratedProtocolMessageType(

EdenCoder commented 10 months ago

Make sure you follow all of the steps. Believe me bro, nothing worked before. Now, it's working like butter. Make sure you uninstall onxx and it's two brothers. Then make sure you have the latest visual studio and have install all of the C++ components. Then make sure you uninstall insightface. Delete all remnants of it from your files. Then you're going to create that bat file with the whl files. Run the bat. Install the 14.0 onnx dependencies. Pip install Insightface. Make sure ComfyUI is up to date through the update bat file. Make sure you're running with Cudas.

I followd every step exactly as you said, several times. Did not work for me. Maybe of some other custom nodes I run, I don't know. What helped for me, was editing the file 'IPAdapterPlus.py' as follows: Disable line 457-461 like this:

 #       try:
 #           from insightface.app import FaceAnalysis
 #           except ImportError:
 #           raise Exception('IPAdapter: InsightFace is not installed! Install the missing dependencies if you wish to use FaceID models.')

And place from insightface.app import FaceAnalysis to line 17

It runs with CPU and CUDA perfectly fine now. This was the only workaround that actually worked for me.

This works great if the model load order is correct, if not you'll need to change:

https://github.com/comfyanonymous/ComfyUI/blob/master/nodes.py#L1837

to be:

base_node_names = sorted(set(NODE_CLASS_MAPPINGS.keys()))
yuturiy commented 10 months ago

Commands to install Insightface on fresh runpod/stable-diffusion:comfy-ui image

apt update
apt-get install -y build-essential
pip install onnxruntime onnxruntime-gpu insightface
cubiq commented 10 months ago

don't forget to update protobuf

yuturiy commented 10 months ago

don't forget to update protobuf

Thank's. Update my comment that this is related for runpod comfyui image There is no need to update protobuf

Missno-wu commented 10 months ago

Screenshot 2023-12-24 at 19 27 54

I have followed in the installation guide lines. Installed all the appropriate files in ComfyUI environment, updated Comfy and still get the same error.

Running Comfy on Mac Studio M2 Ultra.

I’ve encountered the same problem as you. Have you found a solution yet?

kiljos commented 10 months ago

don't forget to update protobuf

Thank's. Update my comment that this is related for runpod comfyui image There is no need to update protobuf

can t replicate that... error log: error: command 'x86_64-linux-gnu-gcc' failed: No such file or directory [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for insightface Building wheel for easydict (setup.py) ... done Created wheel for easydict: filename=easydict-1.11-py3-none-any.whl size=6660 sha256=b4eeb391038786457b37ed21ae479b89485410149aa1c959cf3c0589967f72c8e Stored in directory: /root/.cache/pip/wheels/58/05/80/2adaebf497dacf51a0267ec07b3451ce91a847c2b9502d67d6 Successfully built easydict Failed to build insightface ERROR: Could not build wheels for insightface, which is required to install pyproject.toml-based projects

EDIT: was able to solve it --> apt-get install build-essential autoconf libtool pkg-config python-opengl python-pil python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev libssl-dev apt-get update apt-get install python3.10-dev apt-get install libgmp-dev portaudio19-dev libssl-dev python3-dev apt-get install -y build-essential pip install onnxruntime onnxruntime-gpu insightface

dataleveling commented 10 months ago

After trying out many methods, I think this method is the most straightforward way where you dont have to install C++ build tools. I have created a video for those who have faced this Insightface not found issue for users that are using windows here.

rslosch commented 10 months ago

Commands to install Insightface on fresh runpod/stable-diffusion:comfy-ui image

apt-get install -y build-essential
pip install onnxruntime onnxruntime-gpu insightface

So I need to

Commands to install Insightface on fresh runpod/stable-diffusion:comfy-ui image

apt-get install -y build-essential
pip install onnxruntime onnxruntime-gpu insightface

Thank you! S/o runpod. For those who try running apt-get install -y build-essential and get "E: Unable to locate package build-essential"

first run apt-get update

yuturiy commented 10 months ago

first run apt-get update

for sure. Added to my comment

Arcitec commented 10 months ago

Easy installation guide for Linux here.

It doesn't require any native host packages. Everything required for insightface and CUDA will be self-contained inside the Python venv.

https://github.com/cubiq/ComfyUI_IPAdapter_plus/issues/238

ogdendigital commented 10 months ago

Thanks so much guys! @cubiq you are an absolute legend! This tool really is incredible!

I didn't have any issues getting everything running on Linux with the standard installations of the required components. I didn't have to do any reinstalling of any of the dependencies, nor did I have to change any versions etc. I just installed insightface, onnxruntime and onnxruntime-gpu.

With that said, for anyone who might stumble upon this thread, don't forget to install the dependencies into the virtual environment (venv) if you are using one! I forgot to do this and it left me scratching my head for a while 😅

Screenshot 2024-01-27 at 12 11 45
yc892892 commented 10 months ago

有没有人可以总结一下目前sdwebui 安装Insightface的流程,小白很懵逼

MNeMoNiCuZ commented 9 months ago

Commands to install Insightface on fresh runpod/stable-diffusion:comfy-ui image

apt update
apt-get install -y build-essential
pip install onnxruntime onnxruntime-gpu insightface

This fixed the missing dependency for me as well. Could we not add this as a requirements.txt in the extension?

ronaldomirandah commented 9 months ago

after hours of suffering and almost giving up, i found this method that worked for me, i hope it helps someone too. Really simply and worked; https://www.youtube.com/watch?v=vCCVxGtCyho&ab_channel=DataLeveling

Peco-Jam commented 9 months ago

I followed all the steps to install Insightface, but when I try to run it, I still get this error, what can I do about this problem? ![Uploading Error.png…]()

JorgeR81 commented 9 months ago

Before FaceID came out, I was using the Reactor node, which also needs Insightface.

After installing the Reactor node, via Comfy UI Manager, I also had an error.

So I followed the Reactor node developer's instructions, and it worked for me. I didn't even need to install Visual Studio. I'm on Windows 10.

https://github.com/Gourieff/comfyui-reactor-node?tab=readme-ov-file#troubleshooting

When FaceID came out, I just updated the IPAdapter, with the Manager, and it also worked.

ViniciusFXavier commented 9 months ago

Solution https://www.youtube.com/watch?v=vCCVxGtCyho

Neowteown commented 9 months ago

die Installation mit der Hand aus dem Download hat geholfen:

Alternativ können Sie die vorkompilierte Version hier herunterladen. Wählen Sie die Datei basierend auf Ihrer Python-Version cp310für Python 3.10 aus, cp311wenn für Python 3.11. Um herauszufinden, welche Python-Version Sie verwenden:python_embeded\python.exe -V

Dann können Sie es mit python_embeded\python.exe -m pip install insightface-0.7.3-cp310-cp310-win_amd64.whloder cp311für Python 3.11 installieren.

moon47usaco commented 9 months ago

Solution https://www.youtube.com/watch?v=vCCVxGtCyho

This works for me. Thank you... =]

Sp4Rx commented 9 months ago

Solution https://www.youtube.com/watch?v=vCCVxGtCyho

Mann,,, You are a savior. Anyways here is the gist from the video

Download prebuilt Insightface package for Python 3.10 or for Python 3.11

 C:\\pathToPythonRuntime\\python.exe -m pip install pathToInsightFaceWheel\insightface-0.7.3-cp310-cp310-win_amd64.whl onnxruntime

The main thing we all missed is to add onnxruntime at the end 😞

ellyoun13 commented 9 months ago

I followed all steps and I followed the this youtube(https://www.youtube.com/watch?v=vCCVxGtCyho) method too, but I couldn't avoid the error

''' Error occurred when executing InsightFaceLoader:

No module named 'insightface.app'

File "E:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 627, in load_insight_face raise Exception(e) '''

what can i do to solve this error?

2PeteShakur commented 9 months ago

Before FaceID came out, I was using the Reactor node, which also needs Insightface.

After installing the Reactor node, via Comfy UI Manager, I also had an error.

So I followed the Reactor node developer's instructions, and it worked for me. I didn't even need to install Visual Studio. I'm on Windows 10.

https://github.com/Gourieff/comfyui-reactor-node?tab=readme-ov-file#troubleshooting

When FaceID came out, I just updated the IPAdapter, with the Manager, and it also worked.

yes, if you have issues with faceid after installing reactor node, which i did, my temp solution was to remove the reactor nodes folder, but now i have found that by removing /uninstalling reactor and getting the newest update of reactor, faceid now works! :)

nb: i also updated comfyui and python dependencies via the .bat file

ArvineKwok commented 9 months ago

Thanks so much guys! @cubiq you are an absolute legend! This tool really is incredible!

I didn't have any issues getting everything running on Linux with the standard installations of the required components. I didn't have to do any reinstalling of any of the dependencies, nor did I have to change any versions etc. I just installed insightface, onnxruntime and onnxruntime-gpu.

With that said, for anyone who might stumble upon this thread, don't forget to install the dependencies into the virtual environment (venv) if you are using one! I forgot to do this and it left me scratching my head for a while 😅

Screenshot 2024-01-27 at 12 11 45

Hi there, could you tell me which plugin do you install to use IPAdapterLoader node? I can't find it....

crapthings commented 9 months ago

windows ->

comfy ui portable

cd python_embeded
./python.exe -m pip install cython
Zakutu commented 8 months ago

https://github.com/Gourieff/comfyui-reactor-node

All went well by performing the reactor troubleshooting.

Troubleshooting I. (For Windows users) If you still cannot build Insightface for some reasons or just don't want to install Visual Studio or VS C++ Build Tools - do the following: (ComfyUI Portable) From the root folder check the version of Python: run CMD and type python_embeded\python.exe -V Download prebuilt Insightface package for Python 3.10 or for Python 3.11 (if in the previous step you see 3.11) or for Python 3.12 (if in the previous step you see 3.12) and put into the stable-diffusion-webui (A1111 or SD.Next) root folder (where you have "webui-user.bat" file) or into ComfyUI root folder if you use ComfyUI Portable From the root folder run:

(SD WebUI) CMD and .\venv\Scripts\activate
(ComfyUI Portable) run CMD

Then update your PIP:

(SD WebUI) python -m pip install -U pip
(ComfyUI Portable) python_embeded\python.exe -m pip install -U pip

Then install Insightface:

(SD WebUI) pip install insightface-0.7.3-cp310-cp310-win_amd64.whl (for 3.10) or pip install insightface-0.7.3-cp311-cp311-win_amd64.whl (for 3.11) or pip install insightface-0.7.3-cp312-cp312-win_amd64.whl (for 3.12)

(ComfyUI Portable) python_embeded\python.exe -m pip install insightface-0.7.3-cp310-cp310-win_amd64.whl (for 3.10) or python_embeded\python.exe -m pip install insightface-0.7.3-cp311-cp311-win_amd64.whl (for 3.11) or python_embeded\python.exe -m pip install insightface-0.7.3-cp312-cp312-win_amd64.whl (for 3.12)
phluffhead26 commented 8 months ago

I tried this on a JarvisLabs instance using a Colab file. At first, I always got the error message that InsightFace was not installed. I thought if I downloaded the Insightface models, it might work. Then I downloaded the buffalo_l models listed by @bihailantian655 above, and then I downloaded the Inswapper model which I downloaded from Inswapper download link (though I'm not sure if it fixed the problem). I uninstalled and then reinstalled insightface, too.

And it just worked. I have created a new instance on JarvisLabs, and the problem has gone. I haven't tried it on my Mac M1, so I don't know if it will also work on my Mac.

Below is the snippet of Colab code I have added (here ~/ComfyUI is the base directory).

%pip install onnxruntime-gpu
%pip uninstall insightface
%pip install insightface
%mkdir ~/ComfyUI/models/ipadapter
%cd ~/ComfyUI/models/ipadapter
!wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plus_sd15.bin
!wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sd15.bin

%cd ~/ComfyUI/models/clip_vision/
!wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/image_encoder/model.safetensors && mv model.safetensors CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors
!wget https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/image_encoder/model.safetensors && mv model.safetensors CLIP-ViT-bigG-14-laion2B-39B-b160k.safetensors

%cd ~/ComfyUI/models/loras/
!wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plus_sd15_lora.safetensors
!wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sd15_lora.safetensors

%mkdir -p ~/ComfyUI/models/insightface/models/buffalo_l
%cd ~/ComfyUI/models/insightface/models/buffalo_l
!wget https://github.com/deepinsight/insightface/releases/download/v0.7/buffalo_l.zip
!unzip buffalo_l.zip
%cd ~/ComfyUI/models/insightface/models
!wget https://huggingface.co/AIBrainBox/inswapper_128.onnx/resolve/main/inswapper_128.onnx

Besides that, I also modified the IPAdapterPlus.py

# INSIGHTFACE_DIR = os.path.join(folder_paths.models_dir, "insightface")
INSIGHTFACE_DIR = os.path.join(os.path.expanduser('~/ComfyUI/models/'), "insightface") # Modified code

After all, I'm still not sure what really happens and what may have fixed this issue in my case.

Thanks for this. If anyone is struggling with the InsightFace dependencies on a colab notebook, this fixed it for me.

kanicell commented 8 months ago

.\python\python.exe -m pip install --user insightface-0.7.3-cp310-cp310-win_amd64.whl

it worked because of adding “--user” S_240318035248

thezveroboy commented 8 months ago

''' Error occurred when executing InsightFaceLoader: No module named 'insightface.app'

i got the same problem i'm using comfyui portable via forge on win10 is there any simple and easy solution?

Koira-Pupu commented 8 months ago

after hours of suffering and almost giving up, i found this method that worked for me, i hope it helps someone too. Really simply and worked; https://www.youtube.com/watch?v=vCCVxGtCyho&ab_channel=DataLeveling

Same for me. This is working for me too. https://www.youtube.com/watch?v=vCCVxGtCyho

Thanks a trillion :)