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

Dependencies missing for Insightface #162

Open
pphoto808 opened this issue Dec 25, 2023 · 133 comments
Open

Dependencies missing for Insightface #162

pphoto808 opened this issue Dec 25, 2023 · 133 comments

Comments

@pphoto808
Copy link

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.

@Winnougan
Copy link

I'm getting the exact same problem @pphoto808! Running on an i9, RTX 4080. Very weird. I followed all of Matteo's/Cubiq's instructions. Pip installed all of the dependencies and models. Everything is placed where it should be. And still on ComfyUI I get this:

Error occurred when executing InsightFaceLoader:

IPAdapter: InsightFace is not installed! Install the missing dependencies if you wish to use FaceID models.

File "D:\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_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_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_windows_portable\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 459, in load_insight_face
raise Exception('IPAdapter: InsightFace is not installed! Install the missing dependencies if you wish to use FaceID models.')

@DavidGdsn
Copy link

Same problem here. I guess we'll need a new tutorial: "How to properly install InsightFace to make it work with IPAdapter", apparently many of us couldn't make it.

@ultimatech-cn
Copy link

ultimatech-cn commented Dec 25, 2023

It is the same problem with issue #156.
There is a workaround I am using.
But I still hope someone can find better solution.

@MMoneer
Copy link

MMoneer commented Dec 25, 2023

This solution From Reactor Trubleshoot:
I. (For Windows users) If you still cannot build Insightface for some reason 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) 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)
(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)
Enjoy!

I suggest uninstalling InsightFace first if exists then follow the above instructions.
Good luck

@DavidGdsn
Copy link

Thanks MMoneer, I've tried that, but no luck. Comfy still complains that InsightFace is not installed.

@MMoneer
Copy link

MMoneer commented Dec 25, 2023

do you have any errors in the consol log?

@DavidGdsn
Copy link

"Error occurred when executing InsightFaceLoader:

IPAdapter: InsightFace is not installed! Install the missing dependencies if you wish to use FaceID models.

File "F:\ConfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "F:\ConfyUI\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 "F:\ConfyUI\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 "F:\ConfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 459, in load_insight_face
raise Exception('IPAdapter: InsightFace is not installed! Install the missing dependencies if you wish to use FaceID models.')"

@MMoneer
Copy link

MMoneer commented Dec 25, 2023

I mean while InsightFace installation prosses.

@DavidGdsn
Copy link

Not really, if I run the install command again, I get this:
Processing f:\confyui\comfyui_windows_portable\python_embeded\insightface-0.7.3-cp310-cp310-win_amd64.whl
Requirement already satisfied: numpy in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from insightface==0.7.3) (1.23.5)
Requirement already satisfied: onnx in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from insightface==0.7.3) (1.14.0)
Requirement already satisfied: tqdm in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from insightface==0.7.3) (4.66.1)
Requirement already satisfied: requests in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from insightface==0.7.3) (2.31.0)
Requirement already satisfied: matplotlib in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from insightface==0.7.3) (3.7.2)
Requirement already satisfied: Pillow in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from insightface==0.7.3) (9.5.0)
Requirement already satisfied: scipy in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from insightface==0.7.3) (1.11.2)
Requirement already satisfied: scikit-learn in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from insightface==0.7.3) (1.3.0)
Requirement already satisfied: scikit-image in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from insightface==0.7.3) (0.20.0)
Requirement already satisfied: easydict in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from insightface==0.7.3) (1.10)
Requirement already satisfied: cython in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from insightface==0.7.3) (3.0.2)
Requirement already satisfied: albumentations in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from insightface==0.7.3) (1.3.1)
Requirement already satisfied: prettytable in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from insightface==0.7.3) (3.8.0)
Requirement already satisfied: PyYAML in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from albumentations->insightface==0.7.3) (6.0.1)
Requirement already satisfied: qudida>=0.0.4 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from albumentations->insightface==0.7.3) (0.0.4)
Requirement already satisfied: opencv-python-headless>=4.1.1 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from albumentations->insightface==0.7.3) (4.7.0.72)
Requirement already satisfied: networkx>=2.8 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from scikit-image->insightface==0.7.3) (3.1)
Requirement already satisfied: imageio>=2.4.1 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from scikit-image->insightface==0.7.3) (2.31.3)
Requirement already satisfied: tifffile>=2019.7.26 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from scikit-image->insightface==0.7.3) (2023.8.30)
Requirement already satisfied: PyWavelets>=1.1.1 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from scikit-image->insightface==0.7.3) (1.4.1)
Requirement already satisfied: packaging>=20.0 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from scikit-image->insightface==0.7.3) (23.1)
Requirement already satisfied: lazy_loader>=0.1 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from scikit-image->insightface==0.7.3) (0.3)
Requirement already satisfied: contourpy>=1.0.1 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from matplotlib->insightface==0.7.3) (1.1.0)
Requirement already satisfied: cycler>=0.10 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from matplotlib->insightface==0.7.3) (0.11.0)
Requirement already satisfied: fonttools>=4.22.0 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from matplotlib->insightface==0.7.3) (4.42.1)
Requirement already satisfied: kiwisolver>=1.0.1 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from matplotlib->insightface==0.7.3) (1.4.5)
Requirement already satisfied: pyparsing<3.1,>=2.3.1 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from matplotlib->insightface==0.7.3) (3.0.9)
Requirement already satisfied: python-dateutil>=2.7 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from matplotlib->insightface==0.7.3) (2.8.2)
Requirement already satisfied: protobuf>=3.20.2 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from onnx->insightface==0.7.3) (3.20.3)
Requirement already satisfied: typing-extensions>=3.6.2.1 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from onnx->insightface==0.7.3) (4.7.1)
Requirement already satisfied: wcwidth in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from prettytable->insightface==0.7.3) (0.2.6)
Requirement already satisfied: charset-normalizer<4,>=2 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from requests->insightface==0.7.3) (3.2.0)
Requirement already satisfied: idna<4,>=2.5 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from requests->insightface==0.7.3) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from requests->insightface==0.7.3) (1.26.18)
Requirement already satisfied: certifi>=2017.4.17 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from requests->insightface==0.7.3) (2023.7.22)
Requirement already satisfied: joblib>=1.1.1 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from scikit-learn->insightface==0.7.3) (1.3.2)
Requirement already satisfied: threadpoolctl>=2.0.0 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from scikit-learn->insightface==0.7.3) (3.2.0)
Requirement already satisfied: colorama in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from tqdm->insightface==0.7.3) (0.4.6)
Requirement already satisfied: six>=1.5 in f:\confyui\comfyui_windows_portable\python_embeded\lib\site-packages (from python-dateutil>=2.7->matplotlib->insightface==0.7.3) (1.16.0)
insightface is already installed with the same version as the provided wheel. Use --force-reinstall to force an installation of the wheel.
DEPRECATION: torchsde 0.2.5 has a non-standard dependency specifier numpy>=1.19.*; python_version >= "3.7". pip 24.0 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of torchsde or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at pypa/pip#12063

@Winnougan
Copy link

Winnougan commented Dec 25, 2023

This solution From Reactor Trubleshoot: I. (For Windows users) If you still cannot build Insightface for some reason 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) 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) (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) Enjoy!

I suggest uninstalling InsightFace first if exists then follow the above instructions. Good luck

I've tried that troubleshooting option too! Doesn't resolve the issue for me.
I even downloaded and updated the entire Visual Studio Installer from Microsoft (as recommended on stackoverflow thread). Re-downloaded. Re-installed. Triple checked all the names of files. Nothing. Can anyone show us how to get this working? Thx

@MMoneer
Copy link

MMoneer commented Dec 25, 2023

Please uninstall Insightface first, as the above Requirement already satisfied , it has to be a fresh installation

@Winnougan
Copy link

Please uninstall Insightface first, as the above Requirement already satisfied , it has to be a fresh installation

Doesn't work. Does it work for you? Can you share some screenshots of how you got it running?

@PiakDev
Copy link

PiakDev commented Dec 25, 2023

Please uninstall Insightface first, as the above Requirement already satisfied , it has to be a fresh installation

How to uninstall Insightface? I success install Insightface but also got an error from ComfyUI like @Winnougan

@Winnougan
Copy link

Please uninstall Insightface first, as the above Requirement already satisfied , it has to be a fresh installation

How to uninstall Insightface? I success install Insightface but also got an error from ComfyUI like @Winnougan

To uninstall anything using pip you type:
pip uninstall insightface

However, it's not working for me. I suspect there's something with a missing model? Or perhaps the name of the folder. I'm hoping @cubiq can share a fix for us.

@PiakDev
Copy link

PiakDev commented Dec 25, 2023

23_comfyUI_04

Is it right? @Winnougan

@PiakDev
Copy link

PiakDev commented Dec 25, 2023

23_comfyUI_05

After uninstalled. Now, I reinstall Insightface.

@PiakDev
Copy link

PiakDev commented Dec 25, 2023

23_comfyUI_06

Error occurred when executing InsightFaceLoader:

IPAdapter: InsightFace is not installed! Install the missing dependencies if you wish to use FaceID models.

File "D:\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_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_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_windows_portable\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 459, in load_insight_face
raise Exception('IPAdapter: InsightFace is not installed! Install the missing dependencies if you wish to use FaceID models.')

@Winnougan
Copy link

23_comfyUI_04

Is it right? @Winnougan

Yes, it's correct. But, just like you, I'm continuing to run into errors. There seems to be no fix until @cubiq can resolve this for us.

@cubiq
Copy link
Owner

cubiq commented Dec 25, 2023

  • run the update bat scripts from the update directory to ensure that the latest version of comfy is installed, do not rely on the manager even if it says that everything's updated it might not be true
  • be sure to have the latest version of ipadapter extension installed
  • delete the __pycache__ directories from inside ipadapter extension and reactor if you have it... just in case
  • upgrade pip python_embeded\python.exe -m pip install -U pip
  • install insightface python_embeded\python.exe -m pip install insightface

On windows to compile insightface you need Visual Studio installed or the "Desktop Development with C++" from VS C++ Build Tools.

Alternatively you can download the pre-compiled version from here. Select the file based on your python version cp310 is for python 3.10, cp311 if for python 3.11. To know what version of python you have use: python_embeded\python.exe -V

Then you can install it with python_embeded\python.exe -m pip install insightface-0.7.3-cp310-cp310-win_amd64.whl or cp311 for python 3.11.

If you have inisghtface already installed remove it with python_embeded\python.exe -m pip uninstall insightface and repeat the process.

It's not my fault that Tencent Labs chose inisghtface as provider and Insightface is such a pain.

I honestly don't remember if onnx is automatically installed, just in case you can try to also manually install onnxruntime and onnxruntime-gpu (if you want),

On a Mac I have no idea, if it's any close to linux you just have to install it with pip, be sure to activate the comfyui environment first. Note the I'm not sure it will work on a Mac anyway. Software support is not great on anything that is not Cuda.

@MMoneer
Copy link

MMoneer commented Dec 25, 2023

brave_25122023_014

I faced this problem with reactor, I did these steps:
1- uninstall numpy 1.26 and install 1.24
1- uninstall InsightFace then reinstall as reactor troubleshoot (it didn't work without the other steps) "Also you can use pip install --upgrade --force-reinstall"
3- uninstall onnx 1.15.0 onnxruntime 1.16.3 onnxruntime-gpu 1.16.3 and instal version 1.14 for all (this step helps me for reactor)
Now reactor and face-id work for me, I hope that works for you

@renzorosso
Copy link

running the update_comfyui_and_python_dependencies.bat in the update folder fixed it for me.

@nyukers
Copy link

nyukers commented Dec 25, 2023

brave_25122023_014

I faced this problem with reactor, I did these steps: 1- uninstall numpy 1.26 and install 1.24 1- uninstall InsightFace then reinstall as reactor troubleshoot (it didn't work without the other steps) "Also you can use pip install --upgrade --force-reinstall" 3- uninstall onnx 1.15.0 onnxruntime 1.16.3 onnxruntime-gpu 1.16.3 and instal version 1.14 for all (this step helps me for reactor) Now reactor and face-id work for me, I hope that works for you

I don't know, my Reactor is well done, but FaceID is failed. The new will break the good.)

@MMoneer
Copy link

MMoneer commented Dec 25, 2023

brave_25122023_014
I faced this problem with reactor, I did these steps: 1- uninstall numpy 1.26 and install 1.24 1- uninstall InsightFace then reinstall as reactor troubleshoot (it didn't work without the other steps) "Also you can use pip install --upgrade --force-reinstall" 3- uninstall onnx 1.15.0 onnxruntime 1.16.3 onnxruntime-gpu 1.16.3 and instal version 1.14 for all (this step helps me for reactor) Now reactor and face-id work for me, I hope that works for you

I don't know, my Reactor is well done, but FaceID is failed. The new will break the good.)

That is weird if the InsightFace is the issue Reactor will not work!

@2PeteShakur
Copy link

as renzorosso stated: try running the update_comfyui_and_python_dependencies.bat - it worked for them.

@DavidGdsn
Copy link

Great! Thanks to everyone who has participated in the search for a solution, and a special thanks to Matteo, who is making all of this possible, and trying to help us even a 25th of December.
For me, running the update_comfyui_and_python_dependencies.bat from the Update folder was enough to solve the problem.

@WinstonWoof
Copy link

The only way I've managed (despite following all the good advice above) to get faceID to work without ComfyUI moaning about Insight face not being installed was too.

Extract a fresh copy of ComfyUI Portable to a new folder (from a n older zip file)
carry out upgrade
Add Ipadaptors
Install InsightFace using pre compiled wheel as per above advice
Install onnxruntime using "python_embeded\python.exe -m pip install onnxruntime"

Now to put all my usual custom nodes back in and see what if anything else breaks.

This is the joy of bleeding edge, this is open source, this is the way ;o)

@Ahmet0691
Copy link

The only way I've managed (despite following all the good advice above) to get faceID to work without ComfyUI moaning about Insight face not being installed was too.

Extract a fresh copy of ComfyUI Portable to a new folder (from a n older zip file) carry out upgrade Add Ipadaptors Install InsightFace using pre compiled wheel as per above advice Install onnxruntime using "python_embeded\python.exe -m pip install onnxruntime"

Now to put all my usual custom nodes back in and see what if anything else breaks.

This is the joy of bleeding edge, this is open source, this is the way ;o)

Solved.

@pphoto808
Copy link
Author

You guys are the best Christmas present ever lol. Nice to see so many responses! Sneaked away from my wife to say thanks for the comments and suggestions. Since I'm on Mac, don't have the batch update file or folder. Is it possible for someone to attach the file (update_comfyui_and_python_dependencies.bat)? I want to maybe rewrite as a python script and try that. IF that doesn't work, then I'll try the other recommendation. Again, thanks to all!

@renzorosso
Copy link

Heres the contents of the file:

@echo off
..\python_embeded\python.exe .\update.py ..\ComfyUI
echo
echo This will try to update pytorch and all python dependencies, if you get an error wait for pytorch/xformers to fix their stuff
echo You should not be running this anyways unless you really have to
echo
echo If you just want to update normally, close this and run update_comfyui.bat instead.
echo
pause
..\python_embeded\python.exe -s -m pip install --upgrade torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118 xformers -r ../ComfyUI/requirements.txt pygit2
pause

@Winnougan
Copy link

brave_25122023_014

I faced this problem with reactor, I did these steps: 1- uninstall numpy 1.26 and install 1.24 1- uninstall InsightFace then reinstall as reactor troubleshoot (it didn't work without the other steps) "Also you can use pip install --upgrade --force-reinstall" 3- uninstall onnx 1.15.0 onnxruntime 1.16.3 onnxruntime-gpu 1.16.3 and instal version 1.14 for all (this step helps me for reactor) Now reactor and face-id work for me, I hope that works for you

How do you install 1.14 with pip? I was having problems. Still can't get it to load. Tried every suggestion so far. Running on i9, RTX 4080 (so I have cudas).

Updated ComfyUI, followed every instruction. But I'd like to download onnx and the onnx runtime to 1.14 but can't figure it out.

@TheWingAg90
Copy link

This solution From Reactor Trubleshoot: I. (For Windows users) If you still cannot build Insightface for some reason 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) 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) (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) Enjoy!

I suggest uninstalling InsightFace first if exists then follow the above instructions. Good luck

hjx, i use comfyui in Matrix. it't dont folder "python_embeded". can i install insightface where is it? thanks.

@r8200
Copy link

r8200 commented Apr 2, 2024

Problem when using FACEID PLUS SD1.5ONLY, no problem when using FACEID PLUS V2

Error occurred when executing IPAdapterUnifiedLoaderFaceID:

IPAdapter model not found.

File "D:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 393, in load_models
raise Exception("IPAdapter model not found.")

@AIBASE150
Copy link

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?

@cubiq Is there any solution available for this issue? Thanks for help! :)

@juandiLiza
Copy link

Hi,

Must be something I dont understand, I watched your video from yesterday when you explain everything qubic (thanks a lot). Im triying to practice all you teach us in the video and I having problems with SDXL, with 1.5 the workflow is working.

Attached images, thanks a lot.

err3
ipadaptererr3

@juandiLiza
Copy link

adapterpipeline
If Im loading SDXL model, shouldn't I use sdlx ipadapter like showing in the previous workflow?

If I put 1.5 model and small clip vision is working.

Im confuse cause I thought if I use sdxl checkpoint then I have to use sdxl ipadater model?

@TrickleDownClown
Copy link

I am getting the same issue as many here. InsightFace is missing . It's installed for sure. Did clean install and all other suggestions but nothing is working. Any ideas?

Error occurred when executing IPAdapterAdvanced:

insightface model is required for FaceID models

File "D:\ComfyUI\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 637, in apply_ipadapter
return (ipadapter_execute(model.clone(), ipadapter_model, clip_vision, **ipa_args), )
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 181, in ipadapter_execute
raise Exception("insightface model is required for FaceID models")

@brotherlei
Copy link

Error occurred when executing IPAdapterAdvanced:

Error(s) in loading state_dict for ImageProjModel:
size mismatch for proj.weight: copying a param with shape torch.Size([8192, 1024]) from checkpoint, the shape in current model is torch.Size([8192, 768]).

File "D:\ComfyUI-aki-v1.1\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "D:\ComfyUI-aki-v1.1\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "D:\ComfyUI-aki-v1.1\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "D:\ComfyUI-aki-v1.1\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 592, in apply_ipadapter
return (ipadapter_execute(model.clone(), ipadapter_model, clip_vision, **ipa_args), )
File "D:\ComfyUI-aki-v1.1\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 279, in ipadapter_execute
ipa = IPAdapter(
File "D:\ComfyUI-aki-v1.1\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 70, in init
self.image_proj_model.load_state_dict(ipadapter_model["image_proj"])
File "D:\ComfyUI-aki-v1.1\python\lib\site-packages\torch\nn\modules\module.py", line 2152, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(

@Noctropolitan
Copy link

I am getting the same issue as many here. InsightFace is missing . It's installed for sure. Did clean install and all other suggestions but nothing is working. Any ideas?

Error occurred when executing IPAdapterAdvanced:

insightface model is required for FaceID models

File "D:\ComfyUI\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\ComfyUI\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\ComfyUI\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\ComfyUI\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 637, in apply_ipadapter return (ipadapter_execute(model.clone(), ipadapter_model, clip_vision, **ipa_args), ) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\ComfyUI\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 181, in ipadapter_execute raise Exception("insightface model is required for FaceID models")

Is happening for me too. I think the "problem" for me is that I don't have an embeded_python folder, because I installed python back when I had A1111. i tried to make the -m pip install "pathtofiley\insightface-0.7.3-cp310-cp310-win_amd64.whl" onnxruntime and Python says it is already installed. I Forced a reinstall and nothing. I tried to make the install from the python root folder (where python.exe is) too, and nothing. Please, help.

@brotherlei
Copy link

这个是哪里有问题,[rgthree] Using rgthree's optimized recursive execution.

!!! Exception during processing !!!

Traceback (most recent call last):

File "D:\workspace\ComfyUI\execution.py", line 151, in recursive_execute

output_data, output_ui = get_output_data(obj, input_data_all)

File "D:\workspace\ComfyUI\execution.py", line 81, in get_output_data

return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)

File "D:\workspace\ComfyUI\execution.py", line 74, in map_node_over_list

results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))

File "D:\workspace\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 597, in apply_ipadapter

raise Exception("Missing CLIPVision model.")

Exception: Missing CLIPVision model.

Prompt executed in 0.33 seconds

@pythiantech
Copy link

Has anyone been able to install insightface on macos Sonoma 14.4.1 using the Apple M2 Pro chip? If so, can you please share how to do it?

@pythiantech
Copy link

Sometimes, setting the CFLAGS environment variable to include the NumPy headers can help:
export CFLAGS="-I$(python -c 'import numpy; print(numpy.get_include())')"

The above worked for me

@pphoto808
Copy link
Author

Has anyone been able to install insightface on macos Sonoma 14.4.1 using the Apple M2 Pro chip? If so, can you please share how to do it?

I on Mac Studio M2 Ultra, MacOs 14.4.1. I have found the absolute BEST way to run Comfy is via Pinokio. I have been using all the IPAdapter FaceID nodes with ReActor enabled for quite sometime now. The key to getting the unified loaders to work is install clip vision models thru Manger's Install Models. Pinokio will load all your dependencies (Homebrew, Python, MiniConda) in a virtual environment. I can't remember which .json file it's in, but i modified the start up to launch without fp-16. MacOS 14.4 broke all the non SDE samplers and some other stuff. Gave up on running Comfy thru Warp/terminal.

@dcollaoa
Copy link

dcollaoa commented Apr 24, 2024

insightface-0.7.3-cp310-cp310-linux_x86_64.whl in mi case :)

Here is my path in runpod.io machine (0 to Hero)

cd /workspace
python -m venv venv
source venv/bin/activate
cd ComfyUI/
ls
git pull
cd custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Manager.git

/ComfyUI/models/clip_vision
wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/image_encoder/model.safetensors --output-document=CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors
wget https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/image_encoder/model.safetensors --output-document=CLIP-ViT-bigG-14-laion2B-39B-b160k.safetensors

/ComfyUI/models/ipadapter
wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15.safetensors --output-document=ip-adapter_sd15.safetensors
wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15_light_v11.bin --output-document=ip-adapter_sd15_light_v11.bin
wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter-plus_sd15.safetensors --output-document=ip-adapter-plus_sd15.safetensors
wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter-plus-face_sd15.safetensors --output-document=ip-adapter-plus-face_sd15.safetensors
wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter-full-face_sd15.safetensors --output-document=ip-adapter-full-face_sd15.safetensors
wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15_vit-G.safetensors --output-document=ip-adapter_sd15_vit-G.safetensors
wget https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter_sdxl_vit-h.safetensors --output-document=ip-adapter_sdxl_vit-h.safetensors
wget https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter-plus_sdxl_vit-h.safetensors --output-document=ip-adapter-plus_sdxl_vit-h.safetensors
wget https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter-plus-face_sdxl_vit-h.safetensors --output-document=ip-adapter-plus-face_sdxl_vit-h.safetensors
wget https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter_sdxl.safetensors --output-document=ip-adapter_sdxl.safetensors
wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15_light.safetensors --output-document=ip-adapter_sd15_light.safetensors

/ComfyUI/models/ipadapter
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid_sd15.bin --output-document=ip-adapter-faceid_sd15.bin
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sd15.bin --output-document=ip-adapter-faceid-plusv2_sd15.bin
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-portrait-v11_sd15.bin --output-document=ip-adapter-faceid-portrait-v11_sd15.bin
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid_sdxl.bin --output-document=ip-adapter-faceid_sdxl.bin
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sdxl.bin --output-document=ip-adapter-faceid-plusv2_sdxl.bin
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-portrait_sdxl.bin --output-document=ip-adapter-faceid-portrait_sdxl.bin
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-portrait_sdxl_unnorm.bin --output-document=ip-adapter-faceid-portrait_sdxl_unnorm.bin
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plus_sd15.bin --output-document= ip-adapter-faceid-plus_sd15.bin
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-portrait_sd15.bin --output-document=ip-adapter-faceid-portrait_sd15.bin
wget https://huggingface.co/ostris/ip-composition-adapter/resolve/main/ip_plus_composition_sd15.safetensors --output-document=ip_plus_composition_sd15.safetensors
wget https://huggingface.co/ostris/ip-composition-adapter/resolve/main/ip_plus_composition_sdxl.safetensors --output-document=ip_plus_composition_sdxl.safetensors

/ComfyUI/models/loras
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid_sd15_lora.safetensors --output-document=ip-adapter-faceid_sd15_lora.safetensors
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sd15_lora.safetensors --output-document=ip-adapter-faceid-plusv2_sd15_lora.safetensors
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid_sdxl_lora.safetensors --output-document=ip-adapter-faceid_sdxl_lora.safetensors
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sdxl_lora.safetensors --output-document=ip-adapter-faceid-plusv2_sdxl_lora.safetensors
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plus_sd15_lora.safetensors --output-document=ip-adapter-faceid-plus_sd15_lora.safetensors

/ComfyUI/
python -m pip install -U pip
pip install insghtface

/ComfyUI/models/checkpoints
wget https://huggingface.co/Eata/SD1.5/resolve/main/020.realisticVisionV51_v51VAE.safetensors --output-document=020.realisticVisionV51_v51VAE.safetensors
wget https://huggingface.co/JCTN/fav_models/resolve/b6734996c5ee586fa4d7cae9a5bab1406df0521a/juggernautXL_v8Rundiffusion.safetensors --output-document=juggernautXL_v8Rundiffusion.safetensors

@haohaocreates
Copy link
Contributor

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

I spent a while on this (on Runpod) but this one worked for me!

@telamonian
Copy link

@dcollaoa

Thanks for writing out all of the wget commands! Saved me a lot of clicking. One problem tho:

/ComfyUI/models/loras
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid_sd15_lora.safetensors --output-document=ip-adapter-faceid_sd15_lora.safetensors
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sd15_lora.safetensors --output-document=ip-adapter-faceid-plusv2_sd15_lora.safetensors
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid_sdxl_lora.safetensors --output-document=ip-adapter-faceid_sdxl_lora.safetensors
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sdxl_lora.safetensors --output-document=ip-adapter-faceid-plusv2_sdxl_lora.safetensors
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plus_sd15_lora.safetensors --output-document= ip-adapter-faceid-plus_sd15_lora.safetensors

There's an extra space after --output-document= in the last wget cmd above that causes an error.

@MrsHorrid
Copy link

MrsHorrid commented Apr 30, 2024

okay so i solved it... heres what i did .
install comfy manually its easier than it looks first clone the comfyui git repo
then in the comfyui folder make sure you create a venv with python 3.10 like so : C:\Users\youruser\AppData\Local\Programs\Python\Python310\python.exe -m venv venv

then you activate the venv with this command : venv\Scripts\activate.ps1

then install torch nightly : pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu121

then install onnxruntime : pip install onnxruntime

after that install the requirements : pip install -r requirements.txt

then install the python 3.10 wheel of insight face

after that launch comfyui by writing python.exe main.py and pressing enter

you can also make a webui.bat file . to do so make a text file and call it webui

paste this in it :
@echo off
REM Activate the virtual environment
call venv\Scripts\activate.bat

REM Run the Python script
python main.py

REM Keep the command window open after running the script (useful for seeing output or errors)
pause

then save and exit. change the text file extention to .bat and click yes

test comfyui is working well

after that install the ipadpater plus repo manually by git cloning it to the custom nodes folder

everything should work from here hope this helps

@dcollaoa
Copy link

dcollaoa commented May 1, 2024

Well this is the last Runpod.io config what I'm using:
REMEMBER TO PUT YOUR TOKEN FOR CIVITAI DOWNLOADING 👍

#!/bin/bash
mkdir /workspace/ComfyUI/models/ipadapter/

DEST_DIR_CLIP_VISION="/workspace/ComfyUI/models/clip_vision/"
DEST_DIR_VAE="/workspace/ComfyUI/models/vae"
DEST_DIR_IP_ADAPTER="/workspace/ComfyUI/models/ipadapter/"
DEST_DIR_LORAS="/workspace/ComfyUI/models/loras/"
DEST_DIR_UPSCALE="/workspace/ComfyUI/models/upscale_models/"
DEST_DIR_CHECKPOINTS="/workspace/ComfyUI/models/checkpoints/"
DEST_DIR_CONTROLNET="/workspace/ComfyUI/models/controlnet/"

#CLIP_VISION
wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/image_encoder/model.safetensors --output-document=CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors && mv CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors "$DEST_DIR_CLIP_VISION"
wget https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/image_encoder/model.safetensors --output-document=CLIP-ViT-bigG-14-laion2B-39B-b160k.safetensors && mv CLIP-ViT-bigG-14-laion2B-39B-b160k.safetensors "$DEST_DIR_CLIP_VISION"
wget https://huggingface.co/comfyanonymous/clip_vision_g/resolve/main/clip_vision_g.safetensors --output-document=clip_vision_g.safetensors && mv clip_vision_g.safetensors "$DEST_DIR_CLIP_VISION"

#IPADAPTER
wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15.safetensors --output-document=ip-adapter_sd15.safetensors && mv ip-adapter_sd15.safetensors "$DEST_DIR_IP_ADAPTER"
wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15_light_v11.bin --output-document=ip-adapter_sd15_light_v11.bin && mv ip-adapter_sd15_light_v11.bin "$DEST_DIR_IP_ADAPTER"
wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter-plus_sd15.safetensors --output-document=ip-adapter-plus_sd15.safetensors && mv ip-adapter-plus_sd15.safetensors "$DEST_DIR_IP_ADAPTER"
wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter-plus-face_sd15.safetensors --output-document=ip-adapter-plus-face_sd15.safetensors && mv ip-adapter-plus-face_sd15.safetensors "$DEST_DIR_IP_ADAPTER"
wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter-full-face_sd15.safetensors --output-document=ip-adapter-full-face_sd15.safetensors && mv ip-adapter-full-face_sd15.safetensors "$DEST_DIR_IP_ADAPTER"
wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15_vit-G.safetensors --output-document=ip-adapter_sd15_vit-G.safetensors && mv ip-adapter_sd15_vit-G.safetensors "$DEST_DIR_IP_ADAPTER"
wget https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter_sdxl_vit-h.safetensors --output-document=ip-adapter_sdxl_vit-h.safetensors && mv ip-adapter_sdxl_vit-h.safetensors "$DEST_DIR_IP_ADAPTER"
wget https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter-plus_sdxl_vit-h.safetensors --output-document=ip-adapter-plus_sdxl_vit-h.safetensors && mv ip-adapter-plus_sdxl_vit-h.safetensors "$DEST_DIR_IP_ADAPTER"
wget https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter-plus-face_sdxl_vit-h.safetensors --output-document=ip-adapter-plus-face_sdxl_vit-h.safetensors && mv ip-adapter-plus-face_sdxl_vit-h.safetensors "$DEST_DIR_IP_ADAPTER"
wget https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter_sdxl.safetensors --output-document=ip-adapter_sdxl.safetensors && mv ip-adapter_sdxl.safetensors "$DEST_DIR_IP_ADAPTER"
wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15_light.safetensors --output-document=ip-adapter_sd15_light.safetensors && mv ip-adapter_sd15_light.safetensors "$DEST_DIR_IP_ADAPTER"
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid_sd15.bin --output-document=ip-adapter-faceid_sd15.bin && mv ip-adapter-faceid_sd15.bin "$DEST_DIR_IP_ADAPTER"
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sd15.bin --output-document=ip-adapter-faceid-plusv2_sd15.bin && mv ip-adapter-faceid-plusv2_sd15.bin "$DEST_DIR_IP_ADAPTER"
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-portrait-v11_sd15.bin --output-document=ip-adapter-faceid-portrait-v11_sd15.bin && mv ip-adapter-faceid-portrait-v11_sd15.bin "$DEST_DIR_IP_ADAPTER"
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid_sdxl.bin --output-document=ip-adapter-faceid_sdxl.bin && mv ip-adapter-faceid_sdxl.bin "$DEST_DIR_IP_ADAPTER"
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sdxl.bin --output-document=ip-adapter-faceid-plusv2_sdxl.bin && mv ip-adapter-faceid-plusv2_sdxl.bin "$DEST_DIR_IP_ADAPTER"
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-portrait_sdxl.bin --output-document=ip-adapter-faceid-portrait_sdxl.bin && mv ip-adapter-faceid-portrait_sdxl.bin "$DEST_DIR_IP_ADAPTER"
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-portrait_sdxl_unnorm.bin --output-document=ip-adapter-faceid-portrait_sdxl_unnorm.bin && mv ip-adapter-faceid-portrait_sdxl_unnorm.bin "$DEST_DIR_IP_ADAPTER"
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plus_sd15.bin --output-document=ip-adapter-faceid-plus_sd15.bin && mv ip-adapter-faceid-plus_sd15.bin "$DEST_DIR_IP_ADAPTER"
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-portrait_sd15.bin --output-document=ip-adapter-faceid-portrait_sd15.bin && mv ip-adapter-faceid-portrait_sd15.bin "$DEST_DIR_IP_ADAPTER"
wget https://huggingface.co/ostris/ip-composition-adapter/resolve/main/ip_plus_composition_sd15.safetensors --output-document=ip_plus_composition_sd15.safetensors && mv ip_plus_composition_sd15.safetensors "$DEST_DIR_IP_ADAPTER"
wget https://huggingface.co/ostris/ip-composition-adapter/resolve/main/ip_plus_composition_sdxl.safetensors --output-document=ip_plus_composition_sdxl.safetensors && mv ip_plus_composition_sdxl.safetensors "$DEST_DIR_IP_ADAPTER"

#LORAS
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid_sd15_lora.safetensors --output-document=ip-adapter-faceid_sd15_lora.safetensors && mv ip-adapter-faceid_sd15_lora.safetensors "$DEST_DIR_LORAS"
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sd15_lora.safetensors --output-document=ip-adapter-faceid-plusv2_sd15_lora.safetensors && mv ip-adapter-faceid-plusv2_sd15_lora.safetensors "$DEST_DIR_LORAS"
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid_sdxl_lora.safetensors --output-document=ip-adapter-faceid_sdxl_lora.safetensors && mv ip-adapter-faceid_sdxl_lora.safetensors "$DEST_DIR_LORAS"
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sdxl_lora.safetensors --output-document=ip-adapter-faceid-plusv2_sdxl_lora.safetensors && mv ip-adapter-faceid-plusv2_sdxl_lora.safetensors "$DEST_DIR_LORAS"
wget https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plus_sd15_lora.safetensors --output-document=ip-adapter-faceid-plus_sd15_lora.safetensors && mv ip-adapter-faceid-plus_sd15_lora.safetensors "$DEST_DIR_LORAS"
wget https://huggingface.co/wangfuyun/AnimateLCM/resolve/main/AnimateLCM_sd15_t2v_lora.safetensors --output-document=AnimateLCM_sd15_t2v_lora.safetensors && mv AnimateLCM_sd15_t2v_lora.safetensors "$DEST_DIR_LORAS"
wget https://huggingface.co/guoyww/animatediff/resolve/cd71ae134a27ec6008b968d6419952b0c0494cf2/v3_sd15_adapter.ckpt --output-document=v3_sd15_adapter.ckpt && mv v3_sd15_adapter.ckpt "$DEST_DIR_LORAS"
wget "https://civitai.com/api/download/models/110428?token=ed96a7914YOURTOKEN65d6de1b7" --content-disposition
wget "https://civitai.com/api/download/models/6244?token=ed96a7914YOURTOKEN65d6de1b7" --content-disposition

#UPSCALE_METHODS
wget "https://civitai.com/api/download/models/156841?token=ed96a7914YOURTOKEN65d6de1b7" --content-disposition
wget "https://civitai.com/api/download/models/357054?token=ed96a7914YOURTOKEN65d6de1b7" --content-disposition
wget https://huggingface.co/Akumetsu971/SD_Anime_Futuristic_Armor/resolve/main/4x_NMKD-Siax_200k.pth --output-document=4x_NMKD-Siax_200k.pth && mv 4x_NMKD-Siax_200k.pth "$DEST_DIR_UPSCALE"

#CHECKPOINTS
wget https://huggingface.co/Eata/SD1.5/resolve/main/020.realisticVisionV51_v51VAE.safetensors --output-document=020.realisticVisionV51_v51VAE.safetensors && mv 020.realisticVisionV51_v51VAE.safetensors "$DEST_DIR_CHECKPOINTS"
wget https://huggingface.co/JCTN/fav_models/resolve/b6734996c5ee586fa4d7cae9a5bab1406df0521a/juggernautXL_v8Rundiffusion.safetensors --output-document=juggernautXL_v8Rundiffusion.safetensors && mv juggernautXL_v8Rundiffusion.safetensors "$DEST_DIR_CHECKPOINTS"
wget https://huggingface.co/JCTN/fav_models/resolve/main/AOM3A1B_orangemixs.safetensors --output-document=AOM3A1B_orangemixs.safetensors && mv AOM3A1B_orangemixs.safetensors "$DEST_DIR_CHECKPOINTS"
wget https://huggingface.co/JCTN/fav_models/resolve/main/DreamShaper_8_pruned.safetensors --output-document=DreamShaper_8_pruned.safetensors && mv DreamShaper_8_pruned.safetensors "$DEST_DIR_CHECKPOINTS"
wget https://huggingface.co/JCTN/fav_models/resolve/main/SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors --output-document=SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors && mv SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors "$DEST_DIR_CHECKPOINTS"
wget https://huggingface.co/JCTN/fav_models/resolve/main/animaPencilXL_v100.safetensors --output-document=animaPencilXL_v100.safetensors && mv animaPencilXL_v100.safetensors "$DEST_DIR_CHECKPOINTS"
wget https://huggingface.co/JCTN/fav_models/resolve/main/animaPencilXL_v200.safetensors --output-document=animaPencilXL_v200.safetensors && mv animaPencilXL_v200.safetensors "$DEST_DIR_CHECKPOINTS"
wget https://huggingface.co/JCTN/fav_models/resolve/main/bluePencilXL_v050.safetensors --output-document=bluePencilXL_v050.safetensors && mv bluePencilXL_v050.safetensors "$DEST_DIR_CHECKPOINTS"
wget https://huggingface.co/JCTN/fav_models/resolve/main/control_v11p_sd15_canny_fp16.safetensors --output-document=control_v11p_sd15_canny_fp16.safetensors && mv control_v11p_sd15_canny_fp16.safetensors "$DEST_DIR_CHECKPOINTS"
wget https://huggingface.co/JCTN/fav_models/resolve/main/juggernautXL_version6Rundiffusion.safetensors --output-document=juggernautXL_version6Rundiffusion.safetensors && mv juggernautXL_version6Rundiffusion.safetensors "$DEST_DIR_CHECKPOINTS"
wget https://huggingface.co/JCTN/fav_models/resolve/main/realisticStockPhoto_v10.safetensors --output-document=realisticStockPhoto_v10.safetensors && mv realisticStockPhoto_v10.safetensors "$DEST_DIR_CHECKPOINTS"
wget https://huggingface.co/JCTN/fav_models/resolve/main/realisticStockPhoto_v20.safetensors --output-document=realisticStockPhoto_v20.safetensors && mv realisticStockPhoto_v20.safetensors "$DEST_DIR_CHECKPOINTS"
wget "https://civitai.com/api/download/models/178879?token=ed96a7914YOURTOKEN65d6de1b7" --content-disposition
wget "https://civitai.com/api/download/models/159987?token=ed96a7914YOURTOKEN65d6de1b7" --content-disposition
wget "https://civitai.com/api/download/models/461550?token=ed96a7914YOURTOKEN65d6de1b7" --content-disposition
wget "https://civitai.com/api/download/models/158155?token=ed96a7914YOURTOKEN65d6de1b7" --content-disposition
wget "https://civitai.com/api/download/models/405367?token=ed96a7914YOURTOKEN65d6de1b7" --content-disposition
wget "https://civitai.com/api/download/models/370565?token=ed96a7914YOURTOKEN65d6de1b7" --content-disposition
wget "https://civitai.com/api/download/models/64563?token=ed96a7914YOURTOKEN65d6de1b7" --content-disposition
wget "https://civitai.com/api/download/models/272376?token=ed96a7914YOURTOKEN65d6de1b7" --content-disposition

#CONTROLNET
wget https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11p_sd15_openpose.pth --output-document=control_v11p_sd15_openpose.pth && mv control_v11p_sd15_openpose.pth "$DEST_DIR_CONTROLNET"
wget https://huggingface.co/crishhh/animatediff_controlnet/resolve/main/controlnet_checkpoint.ckpt --output-document=controlnet_checkpoint.ckpt && mv controlnet_checkpoint.ckpt "$DEST_DIR_CONTROLNET"
wget https://huggingface.co/crishhh/animatediff_controlnet/resolve/main/motion_checkpoint_less_motion.ckpt --output-document=motion_checkpoint_less_motion.ckpt && mv motion_checkpoint_less_motion.ckpt "$DEST_DIR_CONTROLNET"
wget https://huggingface.co/crishhh/animatediff_controlnet/resolve/main/motion_checkpoint_more_motion.ckpt --output-document=motion_checkpoint_more_motion.ckpt && mv motion_checkpoint_more_motion.ckpt "$DEST_DIR_CONTROLNET"
wget https://huggingface.co/lllyasviel/control_v11f1p_sd15_depth/resolve/main/diffusion_pytorch_model.safetensors --output-document=control_v11f1p_sd15_depth.safetensors && mv control_v11f1p_sd15_depth.safetensors "$DEST_DIR_CONTROLNET"
wget https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_openpose_fp16.safetensors --output-document=control_v11p_sd15_openpose_fp16.safetensors && mv control_v11p_sd15_openpose_fp16.safetensors "$DEST_DIR_CONTROLNET"
wget https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11f1p_sd15_depth_fp16.safetensors --output-document=control_v11f1p_sd15_depth_fp16.safetensors && mv control_v11f1p_sd15_depth_fp16.safetensors "$DEST_DIR_CONTROLNET"
wget https://huggingface.co/ioclab/LooseControl_WebUICombine/resolve/main/control_boxdepth_LooseControlfp16.safetensors --output-document=control_boxdepth_LooseControlfp16.safetensors && mv control_boxdepth_LooseControlfp16.safetensors "$DEST_DIR_CONTROLNET"
wget https://huggingface.co/monster-labs/control_v1p_sd15_qrcode_monster/resolve/main/control_v1p_sd15_qrcode_monster.safetensors --output-document=control_v1p_sd15_qrcode_monster.safetensors && mv control_v1p_sd15_qrcode_monster.safetensors "$DEST_DIR_CONTROLNET"

#VAE
wget https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.ckpt --output-document=vae-ft-mse-840000-ema-pruned.ckpt && mv vae-ft-mse-840000-ema-pruned.ckpt "$DEST_DIR_VAE"

#CUSTOM_NODES
cd /workspace
python -m venv venv
source venv/bin/activate
cd ComfyUI/
ls
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121
pip install -r requirements.txt
git pull
cd custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Manager.git
git clone https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved.git
git clone https://github.com/dezi-ai/ComfyUI-AnimateLCM.git
git clone https://github.com/cubiq/ComfyUI_IPAdapter_plus.git
git clone https://github.com/rgthree/rgthree-comfy.git

cd /workspace/ComfyUI/custom_nodes/ComfyUI-AnimateLCM/models/
wget https://huggingface.co/wangfuyun/AnimateLCM/resolve/main/AnimateLCM_sd15_t2v.ckpt --output-document=AnimateLCM_sd15_t2v.ckpt
wget https://huggingface.co/guoyww/animatediff/resolve/cd71ae134a27ec6008b968d6419952b0c0494cf2/v3_sd15_mm.ckpt --output-document=v3_sd15_mm.ckpt
wget https://huggingface.co/guoyww/animatediff/resolve/cd71ae134a27ec6008b968d6419952b0c0494cf2/mm_sd_v14.ckpt --output-document=mm_sd_v14.ckpt
wget https://huggingface.co/guoyww/animatediff/resolve/cd71ae134a27ec6008b968d6419952b0c0494cf2/mm_sd_v15.ckpt --output-document=mm_sd_v15.ckpt
wget https://huggingface.co/guoyww/animatediff/resolve/cd71ae134a27ec6008b968d6419952b0c0494cf2/mm_sd_v15_v2.ckpt --output-document=mm_sd_v15_v2.ckpt
wget https://huggingface.co/guoyww/animatediff/resolve/cd71ae134a27ec6008b968d6419952b0c0494cf2/mm_sdxl_v10_beta.ckpt --output-document=mm_sdxl_v10_beta.ckpt
wget https://huggingface.co/manshoety/AD_Stabilized_Motion/resolve/main/mm-Stabilized_high.pth --output-document=mm-Stabilized_high.pth
wget https://huggingface.co/manshoety/AD_Stabilized_Motion/resolve/main/mm-Stabilized_mid.pth --output-document=mm-Stabilized_mid.pth
wget https://huggingface.co/manshoety/beta_testing_models/resolve/main/mm-p_0.5.pth --output-document=mm-p_0.5.pth
wget https://huggingface.co/manshoety/beta_testing_models/resolve/main/mm-p_0.75.pth --output-document=mm-p_0.75.pth
wget https://huggingface.co/CiaraRowles/TemporalDiff/resolve/main/temporaldiff-v1-animatediff.ckpt --output-document=temporaldiff-v1-animatediff.ckpt
wget https://huggingface.co/CiaraRowles/TemporalDiff/resolve/main/temporaldiff-v1-animatediff.safetensors --output-document=temporaldiff-v1-animatediff.safetensors

cd /workspace/ComfyUI/custom_nodes/ComfyUI-AnimateLCM/motion_lora/
wget https://huggingface.co/guoyww/animatediff/resolve/cd71ae134a27ec6008b968d6419952b0c0494cf2/v2_lora_PanLeft.ckpt --output-document=v2_lora_PanLeft.ckpt
wget https://huggingface.co/guoyww/animatediff/resolve/cd71ae134a27ec6008b968d6419952b0c0494cf2/v2_lora_PanRight.ckpt --output-document=v2_lora_PanRight.ckpt
wget https://huggingface.co/guoyww/animatediff/resolve/cd71ae134a27ec6008b968d6419952b0c0494cf2/v2_lora_RollingAnticlockwise.ckpt --output-document=v2_lora_RollingAnticlockwise.ckpt
wget https://huggingface.co/guoyww/animatediff/resolve/cd71ae134a27ec6008b968d6419952b0c0494cf2/v2_lora_RollingClockwise.ckpt --output-document=v2_lora_RollingClockwise.ckpt
wget https://huggingface.co/guoyww/animatediff/resolve/cd71ae134a27ec6008b968d6419952b0c0494cf2/v2_lora_TiltDown.ckpt --output-document=v2_lora_TiltDown.ckpt
wget https://huggingface.co/guoyww/animatediff/resolve/cd71ae134a27ec6008b968d6419952b0c0494cf2/v2_lora_TiltUp.ckpt --output-document=v2_lora_TiltUp.ckpt
wget https://huggingface.co/guoyww/animatediff/resolve/cd71ae134a27ec6008b968d6419952b0c0494cf2/v2_lora_ZoomIn.ckpt --output-document=v2_lora_ZoomIn.ckpt
wget https://huggingface.co/guoyww/animatediff/resolve/cd71ae134a27ec6008b968d6419952b0c0494cf2/v2_lora_ZoomOut.ckpt --output-document=v2_lora_ZoomOut.ckpt

python -m pip install -U pip
apt-get install -y build-essential
pip install onnxruntime onnxruntime-gpu insightface
pip install diffusers==0.26.3
pip install transformers==4.38.1
pip install accelerate==0.27.2

Works very well... :) I hope help you guys... it take a lot of time to download all this resources X_O

@DarqueLilly
Copy link

chrome_kYFwzud4iv

I'm getting this error message every time I run this simple jason file
FaceidSimpleFlow.json

I have tried EVERYTHING LISTED UNDER THIS ISSUE THREAD INCLUDING CLEAN INSTALL!!!!! all im asking is if someone fixed this EXACT error issue. Please help me!!!

@Dheeraj2002
Copy link

Dheeraj2002 commented May 8, 2024

@DarqueLilly, Getting the same. Tried the following code
from insighface import FaceAnalysis
insightface = FaceAnalysis(....)

on 182nd line. Didn't work?
Did you found any?

@DarqueLilly
Copy link

@Dheeraj2002 can you explain what ( .py file in what folder ) to edit that line on, Ill try it later today and see if it fixes the issue. I haven't came across that solution.

@sando23
Copy link

sando23 commented May 13, 2024

help, how can I install it in forge?

@AdvertiserM
Copy link

Can someone help me with this issue?
image
I swear it works sometimes then suddenly I reopen comfy and it's reset like I erased all memories of fixing it

@corintho
Copy link

hjx, i use comfyui in Matrix. it't dont folder "python_embeded". can i install insightface where is it? thanks.

For those who are using Matrix, download the pre-compiled wheel linked in the first few comments (at the time of writing, you needed the python 3.10 version).
Go to your "packages", and click on the 3 dots on the top right corner of the package you want to install it. I did it for ComfyUI, but it should also work for A1111.
Click on the "Python packages" option.
Click on the "+" icon on the top left
As the parameter for the install, fill in the full path of the wheel file that was downloaded earlier between quotes, and add "onnxruntime".
Restart your installation and it should be working.

Tested on Windows, Python 3.10 and ComfyUI

@RustieDev
Copy link

Hi guys, sorry i know im beating a dead horse here in this conversion but ive tried everything listed in this thread but still have this error message.

image

I tried using the wheel, ive uninstalled onnxruntime/insightface. Re-installed onnxruntime gpu. I've tried downloading it in the manager. I have visual studio etc. I have python 3.11 and running on windows 10. Ive also done a fresh install of comfyui and done all of the above all over again. I'm super lost. I managed to get it running fine on stable diffusion forge a long time ago.

I feel like the issue must be something about how insightface is called in comfyui's ipadater faceid but i'm not that technically literate enough to understand.

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