cubiq / ComfyUI_InstantID

Apache License 2.0
944 stars 50 forks source link

Error occurred when executing InstantIDFaceAnalysis: #45

Open wangyanmeego opened 4 months ago

wangyanmeego commented 4 months ago

I using ComfyUIManager to install this custom node, and put all requred files in folder, when i click Queue Prompt, it shows following messages:

File "F:\Workshop\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "F:\Workshop\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 "F:\Workshop\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 "F:\Workshop\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_InstantID\InstantID.py", line 360, in load_insight_face model = FaceAnalysis(name="antelopev2", root=INSIGHTFACE_DIR, providers=[provider + 'ExecutionProvider',]) # buffalo_l File "F:\Workshop\ComfyUI_windows_portable.venv\lib\site-packages\insightface\app\face_analysis.py", line 43, in init assert 'detection' in self.models

drewp commented 4 months ago

Do you have these files?

-rw-r--r-- 1 drewp drewp 143607619 Jan 27  2022 models/insightface/models/antelopev2/1k3d68.onnx
-rw-r--r-- 1 drewp drewp   5030888 Jan 27  2022 models/insightface/models/antelopev2/2d106det.onnx
-rw-r--r-- 1 drewp drewp   1322532 Jan 27  2022 models/insightface/models/antelopev2/genderage.onnx
-rw-r--r-- 1 drewp drewp 260665334 Jan 27  2022 models/insightface/models/antelopev2/glintr100.onnx
-rw-r--r-- 1 drewp drewp  16923827 Jan 27  2022 models/insightface/models/antelopev2/scrfd_10g_bnkps.onnx
thinkingjimmy commented 4 months ago

you need to check this folder: models/insightface/models/antelopev2/

and make sure you have file like 1k3d68.onnx in this folder. In my case, I founded that all of this files were in models/insightface/models/antelopev2/antelopev2

so i deleted second antelopev2 folder, and move all files in the first floder

wangyanmeego commented 4 months ago

@drewp @thinkingjimmy thank you for replay, i forget to unzip InsightFace model files. It works when unzip .onnx files in models/antelopev2 folder.

SirDoran92 commented 1 month ago

@thinkingjimmy - You have saved me some major headaches, thank you kind sir :')

vesper8 commented 2 weeks ago

In my case, running pip install insightface was always installing insightface===0.2.1

I then ran pip install insightface==0.7.3 and that installed the latest version and then the problem went away