Gourieff / comfyui-reactor-node

Fast and Simple Face Swap Extension Node for ComfyUI
GNU General Public License v3.0
1.65k stars 163 forks source link

Lacking main model of comfyui-reactor-node #244

Open mashiye opened 8 months ago

mashiye commented 8 months ago

First, confirm

What happened?

微信图片_20240315134245

reactor-node lost.

Steps to reproduce the problem

the main model choice in "Reactor" is missing as can be seen in the pic.

Sysinfo

Windows、Chrome、Comfyui、RTX 4070,ComfyUI-Manager,WAS Node Suite:

Relevant console log

[ReActor] - STATUS - Running v0.4.1-b12 in ComfyUI
Traceback (most recent call last):
  File "D:\ComfyUI-aki-v1.2\nodes.py", line 1888, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "D:\ComfyUI-aki-v1.2\custom_nodes\comfyui-reactor-node\__init__.py", line 23, in <module>
    from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
  File "D:\ComfyUI-aki-v1.2\custom_nodes\comfyui-reactor-node\nodes.py", line 15, in <module>
    from scripts.reactor_faceswap import (
  File "D:\ComfyUI-aki-v1.2\custom_nodes\comfyui-reactor-node\scripts\reactor_faceswap.py", line 14, in <module>
    from scripts.reactor_swapper import swap_face, get_current_faces_model, analyze_faces, half_det_size
  File "D:\ComfyUI-aki-v1.2\custom_nodes\comfyui-reactor-node\scripts\reactor_swapper.py", line 11, in <module>
    import insightface
  File "D:\ComfyUI-aki-v1.2\python\lib\site-packages\insightface\__init__.py", line 18, in <module>
    from . import app
  File "D:\ComfyUI-aki-v1.2\python\lib\site-packages\insightface\app\__init__.py", line 2, in <module>
    from .mask_renderer import *
  File "D:\ComfyUI-aki-v1.2\python\lib\site-packages\insightface\app\mask_renderer.py", line 4, in <module>
    import albumentations as A
  File "D:\ComfyUI-aki-v1.2\python\lib\site-packages\albumentations\__init__.py", line 5, in <module>
    from .augmentations import *
  File "D:\ComfyUI-aki-v1.2\python\lib\site-packages\albumentations\augmentations\__init__.py", line 8, in <module>
    from .domain_adaptation import *
  File "D:\ComfyUI-aki-v1.2\python\lib\site-packages\albumentations\augmentations\domain_adaptation.py", line 6, in <module>
    from qudida import DomainAdapter
  File "D:\ComfyUI-aki-v1.2\python\lib\site-packages\qudida\__init__.py", line 6, in <module>
    from sklearn.decomposition import PCA
  File "D:\ComfyUI-aki-v1.2\python\lib\site-packages\sklearn\decomposition\__init__.py", line 9, in <module>
    from ._dict_learning import (
  File "D:\ComfyUI-aki-v1.2\python\lib\site-packages\sklearn\decomposition\_dict_learning.py", line 23, in <module>
    from ..linear_model import Lars, Lasso, LassoLars, orthogonal_mp_gram
  File "D:\ComfyUI-aki-v1.2\python\lib\site-packages\sklearn\linear_model\__init__.py", line 34, in <module>
    from ._logistic import LogisticRegression, LogisticRegressionCV
  File "D:\ComfyUI-aki-v1.2\python\lib\site-packages\sklearn\linear_model\_logistic.py", line 28, in <module>
    from ..svm._base import _fit_liblinear
  File "D:\ComfyUI-aki-v1.2\python\lib\site-packages\sklearn\svm\__init__.py", line 14, in <module>
    from ._classes import SVC, SVR, LinearSVC, LinearSVR, NuSVC, NuSVR, OneClassSVM
  File "D:\ComfyUI-aki-v1.2\python\lib\site-packages\sklearn\svm\_classes.py", line 12, in <module>
    from ._base import BaseLibSVM, BaseSVC, _fit_liblinear, _get_liblinear_solver_type
  File "D:\ComfyUI-aki-v1.2\python\lib\site-packages\sklearn\svm\_base.py", line 28, in <module>
    from . import _libsvm_sparse as libsvm_sparse  # type: ignore
ImportError: cannot import name '_libsvm_sparse' from partially initialized module 'sklearn.svm' (most likely due to a circular import) (D:\ComfyUI-aki-v1.2\python\lib\site-packages\sklearn\svm\__init__.py)

Cannot import D:\ComfyUI-aki-v1.2\custom_nodes\comfyui-reactor-node module for custom nodes: cannot import name '_libsvm_sparse' from partially initialized module 'sklearn.svm' (most likely due to a circular import) (D:\ComfyUI-aki-v1.2\python\lib\site-packages\sklearn\svm\__init__.py)

Additional information

ComfyUI-VideoHelperSuite,ComfyUI-Marigold,rgthree-comfy?

irongourd commented 8 months ago

same question on Linux

mashiye commented 8 months ago

"reactor" breaks [UltimateSDUpscale] (https://github.com/ssitu/ComfyUI_UltimateSDUpscale)

It is working after uninstalling Reactor

Gourieff commented 8 months ago

"reactor" breaks [UltimateSDUpscale] (https://github.com/ssitu/ComfyUI_UltimateSDUpscale)

It is working after uninstalling Reactor

I've just test it - both extensions work perfectly together If you have an issue - please open new one with all the fields filled out

Gourieff commented 8 months ago

@mashiye @irongourd try to reinstall "scikit-learn" lib

  1. python_embeded\python.exe -m pip uninstall scikit-learn
  2. python_embeded\python.exe -m pip install scikit-learn==1.3.0
irongourd commented 8 months ago

image @Gourieff I have reinstalled scikit-learn==1.3.0,but still not work

Gourieff commented 8 months ago

@irongourd what version of onnxruntime do you use? And what GPU do you have?

 python_embeded\python.exe -m pip list
mashiye commented 8 months ago

absl-py 2.0.0 accelerate 0.23.0 addict 2.4.0 aiohttp 3.8.5 aiosignal 1.3.1 albumentations 1.3.1 annotated-types 0.6.0 antlr4-python3-runtime 4.9.3 anyio 4.2.0 argostranslate 1.9.1 async-timeout 4.0.3 attrs 23.1.0 beautifulsoup4 4.12.2 boltons 23.0.0 cachetools 5.3.2 certifi 2023.7.22 cffi 1.16.0 chardet 5.2.0 charset-normalizer 3.2.0 click 8.1.7 clip-interrogator 0.6.0 cmake 3.27.7 colorama 0.4.6 coloredlogs 15.0.1 colorlog 6.8.0 colour-science 0.4.4 contourpy 1.1.1 cryptography 42.0.5 cssselect2 0.7.0 cstr 0.1.0 ctranslate2 3.20.0 cupy-cuda11x 13.0.0 cycler 0.12.1 Cython 3.0.8 deep-translator 1.11.4 deepdiff 6.7.1 diffusers 0.25.0 distro 1.9.0 easydict 1.11 einops 0.6.1 embreex 2.17.7.post4 exceptiongroup 1.2.0 fairscale 0.4.13 fastrlock 0.8.2 ffmpy 0.3.0 filelock 3.12.4 fire 0.5.0 flatbuffers 23.5.26 fonttools 4.43.1 frozenlist 1.4.0 fsspec 2023.9.1 ftfy 6.1.1 future 0.18.3 fvcore 0.1.5.post20221221 gdown 5.1.0 gitdb 4.0.11 GitPython 3.1.40 google-auth 2.28.0 google-auth-oauthlib 0.4.6 googletrans-py 4.0.0 grpcio 1.60.1 h11 0.14.0 h2 4.1.0 hpack 4.0.0 httpcore 1.0.2 httpx 0.26.0 huggingface-hub 0.20.2 humanfriendly 10.0 hyperframe 6.0.1 idna 3.4 imageio 2.31.5 imageio-ffmpeg 0.4.9 img2texture 1.0.6 importlib-metadata 6.8.0 insightface 0.7.3 iopath 0.1.10 Jinja2 3.1.2 joblib 1.3.2 jsonschema 4.20.0 jsonschema-specifications 2023.7.1 kiwisolver 1.4.5 kornia 0.7.1 lazy_loader 0.3 lightning-utilities 0.10.1 llvmlite 0.41.1 lmdb 1.4.1 lpips 0.1.4 lxml 4.9.3 mapbox-earcut 1.0.1 Markdown 3.5.2 MarkupSafe 2.1.3 matplotlib 3.8.0 matrix-client 0.4.0 mediapipe 0.10.7 mpmath 1.3.0 multidict 6.0.4 networkx 3.1 numba 0.58.1 numexpr 2.8.8 numpy 1.26.4 oauthlib 3.2.2 omegaconf 2.3.0 onnx 1.14.0 onnxruntime 1.15.0 onnxruntime-gpu 1.17.0 open-clip-torch 2.24.0 openai 1.12.0 opencv-contrib-python 4.8.1.78 opencv-python 4.8.1.78 opencv-python-headless 4.7.0.72 ordered-set 4.1.0 packaging 23.1 pandas 2.1.3 piexif 1.1.3 pilgram 1.2.1 Pillow 9.5.0 pip 23.0.1 platformdirs 3.11.0 pooch 1.8.0 portalocker 2.8.2 prettytable 3.9.0 protobuf 4.25.3 psutil 5.9.5 py-cpuinfo 9.0.0 pyasn1 0.5.1 pyasn1-modules 0.3.0 pycocoevalcap 1.2 pycocotools 2.0.7 pycollada 0.8 pycparser 2.21 pydantic 2.6.2 pydantic_core 2.16.3 PyJWT 2.8.0 PyMatting 1.1.12 pynvml 11.5.0 pyOpenSSL 24.0.0 pyparsing 3.1.1 pypng 0.20220715.0 pyreadline3 3.4.1 PySocks 1.7.1 python-dateutil 2.8.2 pytorch-lightning 2.2.0.post0 pytz 2023.3.post1 PyWavelets 1.5.0 pywin32 306 PyYAML 6.0.1 qrcode 7.4.2 qudida 0.0.4 referencing 0.30.2 regex 2023.8.8 rembg 2.0.52 reportlab 4.0.6 requests 2.31.0 requests-oauthlib 1.3.1 rpds-py 0.12.0 rsa 4.9 Rtree 1.1.0 sacremoses 0.0.53 safetensors 0.4.2 scikit-image 0.20.0 scikit-learn 1.3.2 scipy 1.12.0 seaborn 0.13.0 segment-anything 1.0 sentencepiece 0.1.99 setuptools 65.5.0 shapely 2.0.2 simple-lama-inpainting 0.1.2 simpleeval 0.9.13 six 1.16.0 smmap 5.0.1 sniffio 1.3.0 sounddevice 0.4.6 soupsieve 2.5 stanza 1.1.1 svg.path 6.3 svglib 1.5.1 sympy 1.12 tabulate 0.9.0 tb-nightly 2.11.0a20220906 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.1 termcolor 2.3.0 thop 0.1.1.post2209072238 threadpoolctl 3.2.0 tifffile 2023.9.26 timm 0.6.13 tinycss2 1.2.1 tokenizers 0.15.2 tomli 2.0.1 torch 2.1.2+cu118 torchmetrics 1.3.1 torchsde 0.2.5 torchvision 0.16.2+cu118 tqdm 4.66.1 trampoline 0.1.2 transformers 4.38.1 trimesh 4.0.9 typing_extensions 4.8.0 tzdata 2023.3 ultralytics 8.0.223 urllib3 1.26.18 vhacdx 0.0.5 watchdog 4.0.0 wcwidth 0.2.8 webencodings 0.5.1 Werkzeug 3.0.1 wheel 0.42.0 xformers 0.0.23.post1+cu118 xxhash 3.4.1 yacs 0.1.8 yapf 0.40.2 yarl 1.9.2 zhipuai 2.0.1 zipp 3.17.0

[notice] A new release of pip is available: 23.0.1 -> 24.0

Gourieff commented 8 months ago

onnxruntime 1.15.0 onnxruntime-gpu 1.17.0

Only one ORT should be installed If you have NVIDIA GPU you need "onnxruntime-gpu" - otherwise "onnxruntime"

max140x commented 8 months ago

onnxruntime 1.15.0 onnxruntime-gpu 1.17.0

Only one ORT should be installed If you have NVIDIA GPU you need "onnxruntime-gpu" - otherwise "onnxruntime"

  • python_embeded\python.exe -m pip uninstall -y onnxruntime onnxruntime-gpu
  • python_embeded\python.exe -m pip install -y onnxruntime-gpu

or if AMD/Intel GPU:

  • python_embeded\python.exe -m pip install -y onnxruntime

i do it its working but but i get this error with a bad results:

[ReActor] 02:33:09 - STATUS - Working: source face index [0], target face index [0] [ReActor] 02:33:09 - STATUS - Analyzing Source Image... 2024-03-18 02:33:09.5029330 [E:onnxruntime:Default, provider_bridge_ort.cc:1548 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1209 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\AI\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

2024-03-18 02:33:10.2548738 [E:onnxruntime:Default, provider_bridge_ort.cc:1548 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1209 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\AI\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

2024-03-18 02:33:10.3553113 [E:onnxruntime:Default, provider_bridge_ort.cc:1548 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1209 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\AI\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

2024-03-18 02:33:10.4989905 [E:onnxruntime:Default, provider_bridge_ort.cc:1548 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1209 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\AI\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

2024-03-18 02:33:10.6803321 [E:onnxruntime:Default, provider_bridge_ort.cc:1548 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1209 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\AI\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

[ReActor] 02:33:13 - STATUS - Analyzing Target Image... 2024-03-18 02:33:15.7170464 [E:onnxruntime:Default, provider_bridge_ort.cc:1548 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1209 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\AI\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

[ReActor] 02:33:17 - STATUS - Swapping... [ReActor] 02:33:19 - STATUS - --Done!-- [ReActor] 02:33:19 - STATUS - Restoring with GFPGANv1.4.pth Prompt executed in 15.85 seconds

here is my workflow as PNG: ComfyUI_temp_hfcuq_00001_

and this was happened:

Screenshot 2024-03-18 024119

Gourieff commented 8 months ago

@max140x what ComfyUI build do you use? (Python and CUDA versions)

To avoid any pixelization you need to build your workflow with masking E.g. https://boosty.to/artgourieff/posts/e3e5be09-69f4-4c4f-acf8-1fab18929d76

irongourd commented 8 months ago

@Gourieff Thanks for the reply, I've uninstalled onnxruntime and reinstalled onnxruntime-gpu, but the error is still there