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.

arlechinu commented 8 months ago

All fine until the last step: PS D:\ComfyUI01> .\python_embeded\python.exe -m pip install "D:\ComfyUI01\insightface-0.7.3-cp311-cp311-win_amd64.whl" onnxruntime Processing d:\comfyui01\insightface-0.7.3-cp311-cp311-win_amd64.whl ERROR: Wheel 'insightface' located at D:\ComfyUI01\insightface-0.7.3-cp311-cp311-win_amd64.whl is invalid.

What does that mean? Is invalid? Downloaded the right file... Any ideas?

later edit: fresh install comfyui and installed insightface first, before even installing comfymanager, following the instructions, all works!

juandiLiza commented 8 months ago

hey guys, Im trying hard but Im stuck with this:

I followed cubiq post steps

  1. 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
  2. be sure to have the latest version of ipadapter extension installed
  3. delete the pycache directories from inside ipadapter extension and reactor if you have it... just in case
  4. upgrade pip python_embeded\python.exe -m pip install -U pip
  5. install insightface python_embeded\python.exe -m pip install insightface

install

Any help please?

Thanks a lot

juandiLiza commented 8 months ago

I did it guys :)

I downloaded the file like cubiq said and installed.

I feel bless for having such a kind and intelligent people around this AI environment,. Im a 3d animator with +15 years in the industry and Im starting to play around with all this.

Best, thanks

hulk

juandiLiza commented 8 months ago

Hello again,

Im following the video tutorial: https://www.youtube.com/watch?v=_JzDcgKgghY

Its working with 1.5 checkpoint but not with SDXL, I cant find what is the mistake Im doing, can u guys see why I cant use SDXL checkpoint like in the tutorial?

The Angelina Jolie image is because I used an SD1.5 model before and works, problem is when I siwtch to SDXL

I dont get it :´(

Thanks a lot

err1 err2 sdxl

cubiq commented 8 months ago

try to run comfy with --force-fp16 option @juandiLiza

juandiLiza commented 8 months ago

hey cubiq thanks a lot for the quick response, Im quite noob, where do I add that flag?

Thanks

juandiLiza commented 8 months ago

this this?

cubiq commented 8 months ago

no, in the .bat file that you use to run comfy

juandiLiza commented 8 months ago

its working! 1080 GTX a bit old for AI I guess.

Thanks a lot for your patience🥇

TheWingAg90 commented 8 months ago

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 commented 7 months ago

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 commented 7 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?

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

juandiLiza commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

这个是哪里有问题,[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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 7 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

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

telamonian commented 7 months ago

@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 commented 7 months ago

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 commented 7 months ago

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 commented 6 months ago

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 commented 6 months ago

@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 commented 6 months ago

@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 commented 6 months ago

help, how can I install it in forge?

AdvertiserM commented 6 months ago

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 commented 6 months ago

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 commented 5 months ago

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.

37OMKAR commented 4 months ago

ok i have the same issue as diverted by the admin, i am totally new, so some easy lag will help , thanks

supereth commented 4 months ago

I have done all steps mentioned by cubiq plus installed onnxruntime and onnxruntime-gpu and now comfy moans about invoking this last.

Error occurred when executing IPAdapterUnifiedLoaderFaceID:

Unable to import dependency onnxruntime.

File "D:\ComfyUI\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "D:\ComfyUI\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 "D:\ComfyUI\ComfyUI\execution.py", line 75, 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 580, in load_models self.insightface['model'] = insightface_loader(provider) File "D:\ComfyUI\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\utils.py", line 157, in insightface_loader raise Exception(e)

on insightface installation i also get an error

WARNING: Error parsing dependencies of torchsde: . suffix can only be used with == or != operators numpy (>=1.19.) ; python_version >= "3.7"

37OMKAR commented 4 months ago

i copy pasted the logs into chat gpt and to be honest , i got it working

supereth commented 4 months ago

Solved the issue by ... installing Visual Studio to compile the insightface... which did not work but God knows what other stuff did cos retrying to install the precompiled wheel it went ahead (didn't before), then reinstalled onnxruntime and... voila!

/shrug

37OMKAR commented 4 months ago

Solved the issue by ... installing Visual Studio to compile the insightface... which did not work but God knows what other stuff did cos retrying to install the precompiled wheel it went ahead (didn't before), then reinstalled onnxruntime and... voila!

/shrug

yes and same chat gpt helped me, the author must now some how integrate the consle of to chatgpt sowhere as we can solve the error that are poped into the consel

Raineyly commented 4 months ago

执行 IPAdapterAdvanced 时发生错误:

加载 ImageProjModel 的 state_dict 时出现错误: proj.weight 的大小不匹配:从检查点复制形状为 torch.Size([8192, 1024]) 的参数,当前模型中的形状为 torch.Size([8192, 768])。

文件“D:\ComfyUI-aki-v1.1\execution.py”,第 151 行,在 recursive_execute output_data 中,output_ui = get_output_data(obj, input_data_all) 文件“D:\ComfyUI-aki-v1.1\execution.py”,第 81 行,在 get_output_data 中 return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) 文件“D:\ComfyUI-aki-v1.1\execution.py”,第 74 行,在 map_node_over_list 中 results.append(getattr(obj, func)(slice_dict(input_data_all, i))) 文件“D:\ComfyUI-aki-v1.1\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py”,第 592 行,在 apply_ipadapter 中 返回(ipadapter_execute(model.clone(),ipadapter_model,clip_vision,ipa_args),) 文件“D:\ ComfyUI-aki-v1.1 \ custom_nodes \ ComfyUI_IPAdapter_plus \ IPAdapterPlus.py”,第 279 行,在 ipadapter_execute ipa = IPAdapter( 文件“D:\ ComfyUI-aki-v1.1 \ custom_nodes \ ComfyUI_IPAdapter_plus \ IPAdapterPlus.py”,第 70 行,在init self.image_proj_model.load_state_dict(ipadapter_model [“image_proj”]) 文件“D:\ ComfyUI-aki-v1.1 \ python \ lib \ site-packages \ torch \ nn \ modules \ module.py”,第 2152 行,在 load_state_dict 中 引发 RuntimeError('在加载 state_dict 时出错{}:\n\t{}'.格式(

和你一样的情况,但是办公室电脑里面没有装plus V2,就可以正常运行,晚上回去,把V2的插件卸载了再试一下

lior007 commented 3 months ago

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

no work for me

revaraver commented 3 months ago

For those who have correctly installed insightface but encounter the error "insightface model is required for FaceID models," I spent over 5 hours resolving this frustrating issue, and I hope this can help others.

The problem occurs because the IPAdapter FaceID node encounters an error during operation, but the actual error originates from its preceding loader. However, the plugin misleadingly attributes the error to the IPAdapter FaceID node, which caused significant confusion and wasted at least 4.5 hours in troubleshooting.

The loader first reports an error during its operation, and this error occurs only once. The error message was something like "DLL load failed" (I don’t remember the exact wording). Subsequent errors appear in the IPAdapter FaceID and the misleading "insightface model is required for FaceID models" message. What is the "insightface model"? The "insightface model" only appears after the loader processes correctly!

The root cause of the issue was that onnx was recently updated to version 1.16.2, which caused FaceID to fail. To resolve this, you need to downgrade to version 1.16.1 (by running pip install onnx==1.16.1 in the appropriate environment/directory) and also set onnxruntime to version 1.18.1 (by running pip install onnxruntime==1.18.1).

I found that many people encounter various issues with this plugin, and it is notorious for being difficult to install on forums like ComfyUI_IPAdapter_plus. This plugin, which is highly sensitive to dependencies, oddly does not have a requirements.txt. Perhaps creating a "requirements.txt" file in the custom_nodes\ComfyUI_IPAdapter_plus folder with the following content could serve as a temporary workaround: onnxruntime==1.18.1 onnx==1.16.1 requirements.txt

cubiq commented 3 months ago

glad you solved, that might help others on windows but I have the latest versions installed and it works just fine so the root of the problem is somewhere else. Maybe the python version

pip list |grep onnx
onnx                               1.16.2
onnxruntime                        1.18.1
onnxruntime-gpu                    1.18.1
revaraver commented 3 months ago

I tried to update and install onnx1.16.2 again, and the error reappeared:

Traceback (most recent call last): File "D:\git\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "D:\git\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 "D:\git\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "D:\git\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 610, in load_models self.insightface['model'] = insightface_loader(provider) File "D:\git\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\utils.py", line 161, in insightface_loader raise Exception(e) Exception: DLL load failed while importing onnx_cpp2py_export: A dynamic link library (DLL) initialization routine failed

Then downgrading onnx to 1.16.1 solved the problem. It's strange. I tested and encountered this problem in both venv (python 3.10) and embedded (python 3.11). It's strange, but I don't plan to study it further. I just put what I encountered here:( It may be that my CPU is too old (e5 2680 v4)

Alezipa commented 3 months ago

I followed the instructions on this video and it worked, after already trying everything else. https://www.youtube.com/watch?v=vCCVxGtCyho

HollyChoui commented 3 months ago

我找到了一个新的解决办法,跟上面很多人一样,我也是不停地卸载、安装insightface,都没办法正常使用instantid,一直报错,最后我去到C:\Program Files\ComfyUI-aki-v1.3\models\insightface\models\antelopev2 这个文件夹内,发现“1k3d68.onnx”等5个模型文件,被包多了一层文件夹(即放在了C:\Program Files\ComfyUI-aki-v1.3\models\insightface\models\antelopev2\antelopev2 文件夹内),所以导致一直报错,我把5个模型文件放在了C:\Program Files\ComfyUI-aki-v1.3\models\insightface\models\antelopev2 这个文件夹内,就能正常使用instantid了,哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈,解决问题的感觉好爽

Lanzrong commented 3 months ago

Error occurred when executing IPAdapterInsightFaceLoader:

cannot import name 'builder' from 'google.protobuf.internal' (D:\PR\ComfyUI-aki-v1.3\python\lib\site-packages\google\protobuf\internal__init__.py)

File "D:\PR\ComfyUI-aki-v1.3\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "D:\PR\ComfyUI-aki-v1.3\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "D:\PR\ComfyUI-aki-v1.3\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "D:\PR\ComfyUI-aki-v1.3\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 674, in load_insightface return (insightface_loader(provider, model_name=model_name),) File "D:\PR\ComfyUI-aki-v1.3\custom_nodes\ComfyUI_IPAdapter_plus\utils.py", line 161, in insightface_loader raise Exception(e)


Problem with "protobuf"?

Checked, "D:\PR\ComfyUI-aki-v1.3\python\lib\site-packages\google\protobuf\internal__init__.py" is an empty file. There's another folder: D:\PR\ComfyUI-aki-v1.3\python\Lib\site-packages\protobuf-3.19.6.dist-info


Has anyone experienced this problem? How to solve it?

tzktok commented 2 months ago

python_embeded\python.exe -m pip install insightface-0.7.3-cp311-cp311-win_amd64.whl

i have installed insightface successfully..but still InsightFaceLoader and IPAdapterApplyFaceID nodes are misssing.. @MMoneer

zengxianyang001 commented 2 months ago

For those who have correctly installed insightface but encounter the error "insightface model is required for FaceID models," I spent over 5 hours resolving this frustrating issue, and I hope this can help others.

The problem occurs because the IPAdapter FaceID node encounters an error during operation, but the actual error originates from its preceding loader. However, the plugin misleadingly attributes the error to the IPAdapter FaceID node, which caused significant confusion and wasted at least 4.5 hours in troubleshooting.

The loader first reports an error during its operation, and this error occurs only once. The error message was something like "DLL load failed" (I don’t remember the exact wording). Subsequent errors appear in the IPAdapter FaceID and the misleading "insightface model is required for FaceID models" message. What is the "insightface model"? The "insightface model" only appears after the loader processes correctly!

The root cause of the issue was that onnx was recently updated to version 1.16.2, which caused FaceID to fail. To resolve this, you need to downgrade to version 1.16.1 (by running pip install onnx==1.16.1 in the appropriate environment/directory) and also set onnxruntime to version 1.18.1 (by running pip install onnxruntime==1.18.1).

I found that many people encounter various issues with this plugin, and it is notorious for being difficult to install on forums like ComfyUI_IPAdapter_plus. This plugin, which is highly sensitive to dependencies, oddly does not have a requirements.txt. Perhaps creating a "requirements.txt" file in the custom_nodes\ComfyUI_IPAdapter_plus folder with the following content could serve as a temporary workaround: onnxruntime==1.18.1 onnx==1.16.1 requirements.txt

This is the reason why my insightface cannot be loaded. Thank you very much for your help. requirements.txt is very useful. Thank you.

scofano commented 2 months ago

File "D:\ComfyUI_windows_portable - Copia\ComfyUI\custom_nodes\comfyui-reactor-node__init.py", line 23, in from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS File "D:\ComfyUI_windows_portable - Copia\ComfyUI\custom_nodes\comfyui-reactor-node\nodes.py", line 15, in from insightface.app.common import Face File "C:\Users\Admin\AppData\Roaming\Python\Python311\site-packages\insightface\init.py", line 16, in from . import model_zoo File "C:\Users\Admin\AppData\Roaming\Python\Python311\site-packages\insightface\model_zoo\init.py", line 1, in from .model_zoo import get_model File "C:\Users\Admin\AppData\Roaming\Python\Python311\site-packages\insightface\model_zoo\model_zoo.py", line 11, in from .arcface_onnx import * File "C:\Users\Admin\AppData\Roaming\Python\Python311\site-packages\insightface\model_zoo\arcface_onnx.py", line 10, in import onnx File "D:\ComfyUI_windows_portable - Copia\python_embeded\Lib\site-packages\onnx\init__.py", line 77, in from onnx.onnx_cpp2py_export import ONNX_ML ImportError: DLL load failed while importing onnx_cpp2py_export: Uma rotina de inicialização da biblioteca de vínculo dinâmico (DLL) falhou.

papanoyang commented 2 months ago

I managed to solve the problem with your comments. Thank you all.

I installed a new ComfyUI to clarify what the problem is. (I correctly unzipped the new ComfyUI and used it)

  1. Unzip ComfyUI

  2. Install ComfyUI Manager.

  3. Install ComfyUI_IPAdapter_pluse from Manager (do not restart ComfyUI, but quit ComfyUI)

  4. Execute the following command.

    .\python_embeded\python.exe -m pip install .\insightface-0.7.3-cp311-cp311-win_amd64.whl onnxruntime
  5. at this stage I tried to use FaceID with the required models and got an error. I checked the onnx version and found the following.

onnx==1.16.2
onnxruntime==1.19.2
  1. uninstalling onnx Uninstall onnx with the following command.
.\python_embeded\python.exe -m pip uninstall onnx onnxruntime
  1. reinstall onnx with the following command
.\python_embeded\python.exe -m pip install onnx==1.16.1 onnxruntime==1.18.1