cubiq / comfyui_faceanalysis Goto Github PK
View Code? Open in Web Editor NEWExtension for ComfyUI to evaluate the similarity between two faces
License: Apache License 2.0
Extension for ComfyUI to evaluate the similarity between two faces
License: Apache License 2.0
Using the Face Embeds Distance
node as a filter to get the best rated generation out of a batch to then further process it requires two Face Embeds Distance
nodes. One for the output image with the rating overlay and another for the one without to be passed on.
Another output connector for the image without overlay would be a much appreciated convenience. Obsoleting the generate_image_overlay
setting in the bottom as well.
A little illustration of the powerful effects this simple and subtle yet stylish aesthetic change would have.
Just look at this horrendous workaround, the space it takes and how messy it is!
0/10. ...Who would even want to use a workflow like that? That's right! No one! Not a single one! 100% of all people asked shared this exact sentiment! Downright outrageous :'(
Buuuut, you sir, can make a difference! Yes, you and only you could make this beautiful, visually pleasing pipe-dream of good taste and thoughtful UI-engineering come true!
So simple! So sleek! So smooth!
Thank you for your time and amazing efforts!
It would be more convenient if the pictures and ECU values could be displayed separately.
Hello Matteo,
one remark on face comparison - if one uses e.g. the "zombie genre" (which is typically characterized by different flesh wounds, blood, strange or even empty eyes, and other distortions of the face) the "face distance" results in a high value which assumes more dissimilarity as actually is present. Assumed is that those additional "art features" of the face prevent the model to find high similarities, because the newly generated image (compared to the original one) with high prob won't show the same marks on the face. The zombie genre is just an extreme example, it may be the same with people who have traditional paintings/ piercings/ tattoos/ etc. on their faces that are not maintained in exactly that way after being processed by the model.
I need more examples to try out whether this is a constant effect, but wouldn't it make sense to implement something that can distinguish between facial features and "surface features"? Assumed is that would require a unique trained model that is able to learn the distinction between such underlying and surface located facial features. Is that a correct understanding of the situation - OR - does this not play a role and I just did not try out enough examples to find that out?
best
Hi,
When using the “FaceAnalysis” plugin with "insightface" enabled and either the “CPU” or “CUDA” option, it works as expected but causes slowing down requests on my Replicate server.
Could you please help me to avoid the issue?
Truncated Log:
Executing node 273, title: Face Analysis Models, class type: FaceAnalysisModels
�[1;31m2024-04-08 08:26:07.167015003 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1129, index: 0, mask: {48, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.167027853 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1130, index: 1, mask: {1, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.168290961 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1144, index: 15, mask: {8, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.171273786 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1149, index: 20, mask: {58, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.175260040 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1150, index: 21, mask: {11, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.175309290 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1167, index: 38, mask: {67, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.195268628 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1133, index: 4, mask: {50, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.195283138 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1134, index: 5, mask: {3, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.195297628 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1135, index: 6, mask: {51, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.203268294 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1131, index: 2, mask: {49, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.203284825 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1132, index: 3, mask: {2, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.203297534 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1138, index: 9, mask: {5, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.203312674 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1139, index: 10, mask: {53, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.211261712 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1159, index: 30, mask: {63, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.211276511 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1160, index: 31, mask: {16, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.211289461 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1161, index: 32, mask: {64, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.211301131 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1162, index: 33, mask: {17, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.179316923 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1190, index: 61, mask: {31, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.215268935 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1148, index: 19, mask: {10, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.215282275 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1164, index: 35, mask: {18, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.215293915 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1165, index: 36, mask: {66, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.215305405 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1166, index: 37, mask: {19, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.219268638 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1147, index: 18, mask: {57, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.219296478 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1146, index: 17, mask: {9, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.219322168 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1142, index: 13, mask: {7, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.227264346 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1136, index: 7, mask: {4, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.227289416 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1137, index: 8, mask: {52, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.235263442 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1141, index: 12, mask: {54, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
Applied providers: ['CUDAExecutionProvider', 'CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}, 'CUDAExecutionProvider': {'prefer_nhwc': '0', 'enable_skip_layer_norm_strict_mode': '0', 'tunable_op_max_tuning_duration_ms': '0', 'use_ep_level_unified_stream': '0', 'tunable_op_enable': '0', 'enable_cuda_graph': '0', 'cudnn_conv_use_max_workspace': '1', 'do_copy_in_default_stream': '1', 'cudnn_conv_algo_search': 'EXHAUSTIVE', 'gpu_external_empty_cache': '0', 'gpu_external_free': '0', 'tunable_op_tuning_enable': '0', 'cudnn_conv1d_pad_to_nc1d': '0', 'gpu_external_alloc': '0', 'arena_extend_strategy': 'kNextPowerOfTwo', 'has_user_compute_stream': '0', 'gpu_mem_limit': '18446744073709551615', 'device_id': '0'}}
find model: /src/ComfyUI/models/insightface/models/buffalo_l/1k3d68.onnx landmark_3d_68 ['None', 3, 192, 192] 0.0 1.0
�[1;31m2024-04-08 08:26:07.996536316 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1230, index: 0, mask: {48, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.996556206 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1231, index: 1, mask: {1, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:07.998036734 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1233, index: 3, mask: {2, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:08.003269245 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1234, index: 4, mask: {50, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:08.007265028 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1238, index: 8, mask: {52, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:08.011262752 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1239, index: 9, mask: {5, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:08.011345141 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1243, index: 13, mask: {7, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:08.015265935 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1241, index: 11, mask: {6, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:08.011262762 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1235, index: 5, mask: {3, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:08.011261012 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1232, index: 2, mask: {49, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:08.023267162 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1257, index: 27, mask: {14, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:08.023272832 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1244, index: 14, mask: {55, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:08.023295642 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1258, index: 28, mask: {62, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:08.027259196 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1245, index: 15, mask: {8, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:08.027270116 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1259, index: 29, mask: {15, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
Applied providers: ['CUDAExecutionProvider', 'CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}, 'CUDAExecutionProvider': {'prefer_nhwc': '0', 'enable_skip_layer_norm_strict_mode': '0', 'tunable_op_max_tuning_duration_ms': '0', 'use_ep_level_unified_stream': '0', 'tunable_op_enable': '0', 'enable_cuda_graph': '0', 'cudnn_conv_use_max_workspace': '1', 'do_copy_in_default_stream': '1', 'cudnn_conv_algo_search': 'EXHAUSTIVE', 'gpu_external_empty_cache': '0', 'gpu_external_free': '0', 'tunable_op_tuning_enable': '0', 'cudnn_conv1d_pad_to_nc1d': '0', 'gpu_external_alloc': '0', 'arena_extend_strategy': 'kNextPowerOfTwo', 'has_user_compute_stream': '0', 'gpu_mem_limit': '18446744073709551615', 'device_id': '0'}}
�[1;31m2024-04-08 08:26:08.031260749 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1260, index: 30, mask: {63, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
find model: /src/ComfyUI/models/insightface/models/buffalo_l/2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0
�[1;31m2024-04-08 08:26:08.011286862 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1236, index: 6, mask: {51, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:08.011310542 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1237, index: 7, mask: {4, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:08.011328701 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1240, index: 10, mask: {53, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:08.019269769 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1242, index: 12, mask: {54, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:08.019299209 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1246, index: 16, mask: {56, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:08.019320099 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1247, index: 17, mask: {9, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:08.019338359 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1248, index: 18, mask: {57, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:08.019364519 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1249, index: 19, mask: {10, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�...
�[1;31m2024-04-08 08:26:09.891309828 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1616, index: 89, mask: {45, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:09.891323088 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1617, index: 90, mask: {93, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
�[1;31m2024-04-08 08:26:09.907248342 [E:onnxruntime:Default, env.cc:254 ThreadMain] pthread_setaffinity_np failed for thread: 1619, index: 92, mask: {94, }, error code: 22 error msg: Invalid argument. Specify the number of threads explicitly so the affinity is not set.�[m
Applied providers: ['CUDAExecutionProvider', 'CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}, 'CUDAExecutionProvider': {'prefer_nhwc': '0', 'enable_skip_layer_norm_strict_mode': '0', 'tunable_op_max_tuning_duration_ms': '0', 'use_ep_level_unified_stream': '0', 'tunable_op_enable': '0', 'enable_cuda_graph': '0', 'cudnn_conv_use_max_workspace': '1', 'do_copy_in_default_stream': '1', 'cudnn_conv_algo_search': 'EXHAUSTIVE', 'gpu_external_empty_cache': '0', 'gpu_external_free': '0', 'tunable_op_tuning_enable': '0', 'cudnn_conv1d_pad_to_nc1d': '0', 'gpu_external_alloc': '0', 'arena_extend_strategy': 'kNextPowerOfTwo', 'has_user_compute_stream': '0', 'gpu_mem_limit': '18446744073709551615', 'device_id': '0'}}
find model: /src/ComfyUI/models/insightface/models/buffalo_l/w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5
set det-size: (640, 640)
Hey all,
I'm attempting to use FaceAnalysis along with IC-Light to experiment with some of my work as a commercial photographer, but I've run into issues when attempting to install FaceAnalysis.
I have installed (to my knowledge) Visual Studio with CMake support, CMake, and DLib. However, despite tinkering with this for a few hours now, I cannot get this script to load correctly in ComfyUI. Does anyone know what the problem might be?
Here is my ComfyUI startup code -
Prestartup times for custom nodes:
0.0 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\rgthree-comfy
0.9 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager
Total VRAM 10240 MB, total RAM 65437 MB
pytorch version: 2.3.1+cu121
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3080 : cudaMallocAsync
Using pytorch cross attention
Web extensions folder found at G:\AI\ComfyUI_windows_portable\ComfyUI\web\extensions\ComfyLiterals
[AnimateDiffEvo] - ERROR - No motion models found. Please download one and place in: ['G:\\AI\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes\\ComfyUI-AnimateDiff-Evolved\\models', 'G:\\AI\\ComfyUI_windows_portable\\ComfyUI\\models\\animatediff_models']
Total VRAM 10240 MB, total RAM 65437 MB
pytorch version: 2.3.1+cu121
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3080 : cudaMallocAsync
### Loading: ComfyUI-Impact-Pack (V5.18.5)
### Loading: ComfyUI-Impact-Pack (Subpack: V0.6)
[Impact Pack] Wildcards loading done.
### Loading: ComfyUI-Manager (V2.43)
### ComfyUI Revision: 2309 [dbb7dd3b] | Released on '2024-06-30'
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/github-stats.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/model-list.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/alter-list.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/extension-node-map.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
[comfyui_controlnet_aux] | INFO -> Using ckpts path: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux\ckpts
[comfyui_controlnet_aux] | INFO -> Using symlinks: False
[comfyui_controlnet_aux] | INFO -> Using ort providers: ['CUDAExecutionProvider', 'DirectMLExecutionProvider', 'OpenVINOExecutionProvider', 'ROCMExecutionProvider', 'CPUExecutionProvider', 'CoreMLExecutionProvider']
G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux\node_wrappers\dwpose.py:26: UserWarning: DWPose: Onnxruntime not found or doesn't come with acceleration providers, switch to OpenCV with CPU device. DWPose might run very slowly
warnings.warn("DWPose: Onnxruntime not found or doesn't come with acceleration providers, switch to OpenCV with CPU device. DWPose might run very slowly")
Traceback (most recent call last):
File "G:\AI\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1906, in load_custom_node
module_spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_FaceAnalysis\__init__.py", line 1, in <module>
from .faceanalysis import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
File "G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_FaceAnalysis\faceanalysis.py", line 16, in <module>
raise Exception("Please install either dlib or insightface to use this node.")
Exception: Please install either dlib or insightface to use this node.
Cannot import G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_FaceAnalysis module for custom nodes: Please install either dlib or insightface to use this node.
Traceback (most recent call last):
File "G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\IC-Light-ComfyUI-Node\nodes.py", line 19, in <module>
from diffusers.loaders.single_file_utils import (
ImportError: cannot import name 'create_vae_diffusers_config' from 'diffusers.loaders.single_file_utils' (G:\AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diffusers\loaders\single_file_utils.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "G:\AI\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1906, in load_custom_node
module_spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\IC-Light-ComfyUI-Node\__init__.py", line 1, in <module>
from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
File "G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\IC-Light-ComfyUI-Node\nodes.py", line 27, in <module>
raise ImportError("Diffusers version too old. Please update to 0.26.0 minimum.")
ImportError: Diffusers version too old. Please update to 0.26.0 minimum.
Cannot import G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\IC-Light-ComfyUI-Node module for custom nodes: Diffusers version too old. Please update to 0.26.0 minimum.
[rgthree] Loaded 40 fantastic nodes.
[rgthree] Will use rgthree's optimized recursive execution.
WAS Node Suite: OpenCV Python FFMPEG support is enabled
WAS Node Suite Warning: `ffmpeg_bin_path` is not set in `G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\was-node-suite-comfyui\was_suite_config.json` config file. Will attempt to use system ffmpeg binaries if available.
WAS Node Suite: Finished. Loaded 216 nodes successfully.
"Art is the lie that enables us to recognize the truth." - Friedrich Nietzsche
Import times for custom nodes:
0.0 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\websocket_image_save.py
0.0 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Logic
0.0 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\masquerade-nodes-comfyui
0.0 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyUI_FrequencySeparation_RGB-HSV
0.0 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyLiterals
0.0 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-post-processing-nodes
0.0 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus
0.0 seconds (IMPORT FAILED): G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_FaceAnalysis
0.0 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-KJNodes
0.0 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-IC-Light
0.0 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-various
0.0 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\rgthree-comfy
0.0 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved
0.0 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_essentials
0.0 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux
0.1 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-VideoHelperSuite
0.1 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager
0.2 seconds (IMPORT FAILED): G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\IC-Light-ComfyUI-Node
0.5 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Impact-Pack
0.6 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Image-Filters
1.3 seconds: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\was-node-suite-comfyui
Starting server
To see the GUI go to: http://127.0.0.1:8188
FETCH DATA from: G:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager\extension-node-map.json [DONE]
These are the models in my FaceAnalysis dlib folder -
I cannot find the problem in my install, and am worried I won't find a solution to the problem. Anyone encounter this and know of a solution?
Thanks!
Hi, I'm currently building a workflow for detailing faces, and I've been experimenting with various nodes. I came across your pack, and the Face Segmentation node does exactly what I want, except it only works with a single face. This is no good for images that have multiple subjects. The Face Bounding box gives me the option to select whichever subject I want via the index feature. Would it be possible to implement the same feature in the Face Segmentation node?
This would be an incredibly useful addition, as I have yet to discover a node that does exactly what I want. Basically, I need a node that allows me to segment faces (either individually, or all at once) and output an accurate mask instead of a bounding box. With an index option your Face Segmentation node will give me exactly what I need.
Cheers.
Error occurred when executing FaceEmbedDistance:
No image matches the filter criteria.
File "/Users/andu/ComfyUI/execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/andu/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 "/Users/andu/ComfyUI/execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/andu/ComfyUI/custom_nodes/ComfyUI_FaceAnalysis/faceanalysis.py", line 449, in analize
raise Exception('No image matches the filter criteria.')
Thanks!
HiI I downloaded every dlib model and I placed in /custom_nodes/ComfyUI_FaceAnalysis/dlib but In the Face Analysis Models node in Library I see only Insightface. Am I missing some steps to have dlib working? I'm on a M1 mac. Thank you
https://github.com/ali-vilab/FlashFace If you are interested, you can take a look.
Requested to load SDXL
Loading 1 new model
loading in lowvram mode 803.7325925827026
100%|████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:26<00:00, 5.29s/it]
Requested to load AutoencoderKL
Loading 1 new model
D:+AI\myComfyUI\ComfyUI\venv\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py:69: UserWarning: Specified provider 'CUDAExecutionProvider' is not in available provider names.Available providers: 'AzureExecutionProvider, CPUExecutionProvider'
warnings.warn(
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: D:+AI\myComfyUI\ComfyUI\models\insightface\models\buffalo_l\1k3d68.onnx landmark_3d_68 ['None', 3, 192, 192] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: D:+AI\myComfyUI\ComfyUI\models\insightface\models\buffalo_l\2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: D:+AI\myComfyUI\ComfyUI\models\insightface\models\buffalo_l\det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: D:+AI\myComfyUI\ComfyUI\models\insightface\models\buffalo_l\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: D:+AI\myComfyUI\ComfyUI\models\insightface\models\buffalo_l\w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5
set det-size: (640, 640)
!!! Exception during processing!!! 'NoneType' object is not subscriptable
Traceback (most recent call last):
File "D:+AI\myComfyUI\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:+AI\myComfyUI\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\myComfyUI\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:+AI\myComfyUI\ComfyUI\custom_nodes\ComfyUI_FaceAnalysis\faceanalysis.py", line 382, in analize
txt_height = font.getmask("Q").getbbox()[3] + font.getmetrics()[1]
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
TypeError: 'NoneType' object is not subscriptable
Prompt executed in 137.20 seconds
When processing, I get the following error message:
!!! Exception during processing!!! setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (4,) + inhomogeneous part.
I can provide further details if required, I would greatly appreciate any assistance in resolving this issue.
By using FaceAnalysis, I can get a image with Value & DIST on it, and also there is a string "Distance". Now I try to convert the string to a float type data that I can use a compare node to compare it with another float which I defined as a passing grade(e.g. 0.25), then if the float converted from "Distance" is large than the passing grade, that trigger the next same ksampler to excute or add a new queue.
Hi, I keep getting an error "TypeError: 'NoneType' object is not subscriptable" when I try to run face embed distance on the nightly version of ComfyUI. The stable version works fine, but I wanted to know if you could do something to help me fix this error. BTW: I need it to work on nightly because of WD14 tagger. It stopped working on my stable version. (doesn't like my CUDA for some reason)
Loading 1 new model.txt
the log in txt file
cubiq/ComfyUI_IPAdapter_plus#574
So, i have tried using basic workflow, the texture still appeared.
Here is my workflow
workflow (1)-issue.json
picture used :
*i seek a way to solve this using vae decode and encode after facewarp nodes and before entering face bounding box nodes. this can fix the issue at the moment.
Hi @cubiq,
I just wonder, would it be possible to add a "similarity percentage" value to the node?
Euclidean and Cosine are not really intuitive, because you have to remember each time the meaning of those numbers, and it's not easy if you don't use the node on a daily basis (like you did when testing Checkpoints and FaceIDs 😵)
Is it possible to convert them into a percentage to have a more user-friendly value?
Maybe by only converting one of EUC or COS, or averaging and converting both together... I don't know, you are the expert!
Obviously it would be as relative as EUC and COS, but easier to understand (and maybe with averaging would be more accurate?)
I don't know, what do you think?
When I use filter_best, the following error occurs,
thank you everyone
Error occurred when executing FaceEmbedDistance:
setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
File "F:\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\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 "F:\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 "F:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_FaceAnalysis\faceanalysis.py", line 244, in analize
out = np.array(out)
^^^^^^^^^^^^^
Error occurred when executing FaceEmbedDistance:
No image matches the filter criteria.
File "E: \ComfyUI_portable\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "E: \ComfyUI_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_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_portable\ComfyUI\custom_nodes \ComfyUI_FaceAnalysis\faceanalysis.py", line 239, in analize
raise Exception('No image matches the filter criteria. ')
Got the above error when attempting usage
Hello Matteo,
have you ever thought about adding Mahalanobis distance additional to Euclidean/ Cosine as it gives attention to correlations of the data set? Calculation with python doesn't look difficult (just know it from R).
Problem may be that it requires an inverse of the cov matrix (such a calculation can fail...), but on the other hand it is quite an interesting value that under special circumstances equals the Euclidean distance. And the math people have better ways to calculate inversees like QR decomposition.
Then - the distance measures of face analyses - just a note that you surely know: the Euclidean distance is a special case of the Minkowski metric and the general formula of the Minkowski metric covers Manhattan/ Mannheim, Euclidean, and Chebyshev distance if one parameter of the formula is changed. Would be interesting whether different dist measures bring out the same results to your existent research on face comparisons (see also Bregman divergence and squared Euclidean distance if you shift from metric to mere statistical distance).
Example https://cran.r-project.org/web/packages/cmahalanobis/vignettes/my-vignette3.html (sorry, R not python, but easy to understand and applied also on the well-known iris dataset.
Note - what most of those dist measures show is that the arithmetic average as being part of the formula itself is sensitive to outliers which aturally limits the robustness of the statistic. Pls see a python example here on robust covar estimation: https://scikit-learn.org/stable/auto_examples/covariance/plot_mahalanobis_distances.html
If ome thinks this further one could also use the Kullback–Leibler divergence as a measurement of relative entropy (shifting the whole thing to information theory) which compares two prob dists but probably could be applied here as well to compare a reference vs. empirical example.
How did you decide which distance measure you use? I am just curious because there are so many present.
best
Error occurred when executing easy showAnything:
list index out of range
File "C:\ComfyUI Manual\execution.py", line 142, in recursive_execute
input_data_all = get_input_data(inputs, class_def, unique_id, outputs, prompt, extra_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI Manual\execution.py", line 27, in get_input_data
obj = outputs[input_unique_id][output_index]
Everything works just fine until the last comfyUI update. I cannot connect the Float output into any kind of nodes, which return the same error showing above.
nentations->insightface->-r c: ai\comfyuI-aki-v1.3\ComfyuI-aki-v1.3\custom nodesicomfyuI FaceAnalysis\requirements.txt (line 3))(4.8.0)3uilding wheels for collected packages: dlib
Building wheel for dlib(pyproject.toml)error:subprocess-exited-with-error:Building wheel for dlib(pyproject.toml)did not run successfully.exit code: 1>See above for outputa subprocess, and is likely not a problem with pipnote:This error originates from
Could not build wheels for dlib, which is required to install pyproject.toml-based projects
Keep getting import failed
Ive installed dlib and followed instructions for all the dll files too:
as you can see all dlib files in here:
When i open up ComfyUI i get the following messages in cmd prompt:
`Traceback (most recent call last):
File "C:\Users\myname\Downloads\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1881, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 940, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Users\myname\Downloads\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_FaceAnalysis_init.py", line 1, in
from .faceanalysis import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
File "C:\Users\myname\Downloads\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_FaceAnalysis\faceanalysis.py", line 16, in
raise Exception("Please install either dlib or insightface to use this node.")
Exception: Please install either dlib or insightface to use this node.
Cannot import C:\Users\myname\Downloads\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_FaceAnalysis module for custom nodes: Please install either dlib or insightface to use this node.`
Not sure what im doing wrong its probably something really obvious any help would be appreciated.
I am trying to set up the dlib directory. Whats the process for that?
Hey, big thanks for all your work! I think a node like this could be super useful, especially when filtering a large quantity of generated images when building datasets for characters. Unfortunately the quality of results appears to be bad at the moment. As an experiment, I took 4 high quality images of Charlize Theron, cropped them into squares, and used your FaceAnalysis node to compute the similarity between the faces. I was hoping to see low EUC values - low as in way lower than 0.3 - when comparing images of the same persons' face. But the EUC values I see are like 0.4 and 0.5. I also noticed that comparing the exact same photo to itself yields EUC values like 0.04 or 0.06 depending on the image. I would have expected that to be at 0.00 or like 0.01 at most.
If you have ideas on how to improve, it would be really cool to get this working correctly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.