kijai / ComfyUI-LivePortraitKJ

ComfyUI nodes for LivePortrait
MIT License
1.5k stars 113 forks source link

Error Installing insight face with the provided method #4

Closed zahdab closed 3 months ago

zahdab commented 3 months ago

I get the below error

Building wheels for collected packages: insightface Building wheel for insightface (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for insightface (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [233 lines of output] WARNING: pandoc not enabled running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-311 creating build\lib.win-amd64-cpython-311\insightface copying insightface__init.py -> build\lib.win-amd64-cpython-311\insightface creating build\lib.win-amd64-cpython-311\insightface\app copying insightface\app\common.py -> build\lib.win-amd64-cpython-311\insightface\app copying insightface\app\face_analysis.py -> build\lib.win-amd64-cpython-311\insightface\app copying insightface\app\mask_renderer.py -> build\lib.win-amd64-cpython-311\insightface\app copying insightface\app__init.py -> build\lib.win-amd64-cpython-311\insightface\app creating build\lib.win-amd64-cpython-311\insightface\commands copying insightface\commands\insightface_cli.py -> build\lib.win-amd64-cpython-311\insightface\commands copying insightface\commands\model_download.py -> build\lib.win-amd64-cpython-311\insightface\commands copying insightface\commands\rec_add_mask_param.py -> build\lib.win-amd64-cpython-311\insightface\commands copying insightface\commands__init.py -> build\lib.win-amd64-cpython-311\insightface\commands creating build\lib.win-amd64-cpython-311\insightface\data copying insightface\data\image.py -> build\lib.win-amd64-cpython-311\insightface\data copying insightface\data\pickle_object.py -> build\lib.win-amd64-cpython-311\insightface\data copying insightface\data\rec_builder.py -> build\lib.win-amd64-cpython-311\insightface\data copying insightface\data__init__.py -> build\lib.win-amd64-cpython-311\insightface\data creating build\lib.win-amd64-cpython-311\insightface\model_zoo copying insightface\model_zoo\arcface_onnx.py -> build\lib.win-amd64-cpython-311\insightface\model_zoo copying insightface\model_zoo\attribute.py -> build\lib.win-amd64-cpython-311\insightface\model_zoo copying insightface\model_zoo\inswapper.py -> build\lib.win-amd64-cpython-311\insightface\model_zoo copying insightface\model_zoo\landmark.py -> build\lib.win-amd64-cpython-311\insightface\model_zoo copying insightface\model_zoo\model_store.py -> build\lib.win-amd64-cpython-311\insightface\model_zoo copying insightface\model_zoo\model_zoo.py -> build\lib.win-amd64-cpython-311\insightface\model_zoo copying insightface\model_zoo\retinaface.py -> build\lib.win-amd64-cpython-311\insightface\model_zoo copying insightface\model_zoo\scrfd.py -> build\lib.win-amd64-cpython-311\insightface\model_zoo copying insightface\model_zoo\init__.py -> build\lib.win-amd64-cpython-311\insightface\model_zoo creating build\lib.win-amd64-cpython-311\insightface\thirdparty copying insightface\thirdparty\init__.py -> build\lib.win-amd64-cpython-311\insightface\thirdparty creating build\lib.win-amd64-cpython-311\insightface\utils copying insightface\utils\constant.py -> build\lib.win-amd64-cpython-311\insightface\utils copying insightface\utils\download.py -> build\lib.win-amd64-cpython-311\insightface\utils copying insightface\utils\face_align.py -> build\lib.win-amd64-cpython-311\insightface\utils copying insightface\utils\filesystem.py -> build\lib.win-amd64-cpython-311\insightface\utils copying insightface\utils\storage.py -> build\lib.win-amd64-cpython-311\insightface\utils copying insightface\utils\transform.py -> build\lib.win-amd64-cpython-311\insightface\utils copying insightface\utils\init.py -> build\lib.win-amd64-cpython-311\insightface\utils creating build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d copying insightface\thirdparty\face3d\init.py -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d creating build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh copying insightface\thirdparty\face3d\mesh\io.py -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh copying insightface\thirdparty\face3d\mesh\light.py -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh copying insightface\thirdparty\face3d\mesh\render.py -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh copying insightface\thirdparty\face3d\mesh\transform.py -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh copying insightface\thirdparty\face3d\mesh\vis.py -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh copying insightface\thirdparty\face3d\mesh\init.py -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh creating build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh_numpy copying insightface\thirdparty\face3d\mesh_numpy\io.py -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh_numpy copying insightface\thirdparty\face3d\mesh_numpy\light.py -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh_numpy copying insightface\thirdparty\face3d\mesh_numpy\render.py -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh_numpy copying insightface\thirdparty\face3d\mesh_numpy\transform.py -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh_numpy copying insightface\thirdparty\face3d\mesh_numpy\vis.py -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh_numpy copying insightface\thirdparty\face3d\mesh_numpy\init.py -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh_numpy creating build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\morphable_model copying insightface\thirdparty\face3d\morphable_model\fit.py -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\morphable_model copying insightface\thirdparty\face3d\morphable_model\load.py -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\morphable_model copying insightface\thirdparty\face3d\morphable_model\morphabel_model.py -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\morphable_model copying insightface\thirdparty\face3d\morphable_model\init__.py -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\morphable_model running egg_info writing insightface.egg-info\PKG-INFO writing dependency_links to insightface.egg-info\dependency_links.txt writing entry points to insightface.egg-info\entry_points.txt writing requirements to insightface.egg-info\requires.txt writing top-level names to insightface.egg-info\top_level.txt reading manifest file 'insightface.egg-info\SOURCES.txt' writing manifest file 'insightface.egg-info\SOURCES.txt' D:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\setuptools\command\build_py.py:207: _Warning: Package 'insightface.thirdparty.face3d.mesh.cython' is absent from the packages configuration. !!

          ********************************************************************************
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'insightface.thirdparty.face3d.mesh.cython' as an importable package[^1],
          but it is absent from setuptools' `packages` configuration.

          This leads to an ambiguous overall configuration. If you want to distribute this
          package, please make sure that 'insightface.thirdparty.face3d.mesh.cython' is explicitly added
          to the `packages` configuration field.

          Alternatively, you can also rely on setuptools' discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).

          You can read more about "package discovery" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

          If you don't want 'insightface.thirdparty.face3d.mesh.cython' to be distributed and are
          already explicitly excluding 'insightface.thirdparty.face3d.mesh.cython' via
          `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
          you can try to use `exclude_package_data`, or `include-package-data=False` in
          combination with a more fine grained `package-data` configuration.

          You can read more about "package data files" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/datafiles.html

          [^1]: For Python, any directory (with suitable naming) can be imported,
                even if it does not contain any `.py` files.
                On the other hand, currently there is no concept of package data
                directory, all directories are treated like packages.
          ********************************************************************************

  !!
    check.warn(importable)
  D:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\setuptools\command\build_py.py:207: _Warning: Package 'insightface.data.images' is absent from the `packages` configuration.
  !!

          ********************************************************************************
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'insightface.data.images' as an importable package[^1],
          but it is absent from setuptools' `packages` configuration.

          This leads to an ambiguous overall configuration. If you want to distribute this
          package, please make sure that 'insightface.data.images' is explicitly added
          to the `packages` configuration field.

          Alternatively, you can also rely on setuptools' discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).

          You can read more about "package discovery" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

          If you don't want 'insightface.data.images' to be distributed and are
          already explicitly excluding 'insightface.data.images' via
          `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
          you can try to use `exclude_package_data`, or `include-package-data=False` in
          combination with a more fine grained `package-data` configuration.

          You can read more about "package data files" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/datafiles.html

          [^1]: For Python, any directory (with suitable naming) can be imported,
                even if it does not contain any `.py` files.
                On the other hand, currently there is no concept of package data
                directory, all directories are treated like packages.
          ********************************************************************************

  !!
    check.warn(importable)
  D:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\setuptools\command\build_py.py:207: _Warning: Package 'insightface.data.objects' is absent from the `packages` configuration.
  !!

          ********************************************************************************
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'insightface.data.objects' as an importable package[^1],
          but it is absent from setuptools' `packages` configuration.

          This leads to an ambiguous overall configuration. If you want to distribute this
          package, please make sure that 'insightface.data.objects' is explicitly added
          to the `packages` configuration field.

          Alternatively, you can also rely on setuptools' discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).

          You can read more about "package discovery" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

          If you don't want 'insightface.data.objects' to be distributed and are
          already explicitly excluding 'insightface.data.objects' via
          `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
          you can try to use `exclude_package_data`, or `include-package-data=False` in
          combination with a more fine grained `package-data` configuration.

          You can read more about "package data files" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/datafiles.html

          [^1]: For Python, any directory (with suitable naming) can be imported,
                even if it does not contain any `.py` files.
                On the other hand, currently there is no concept of package data
                directory, all directories are treated like packages.
          ********************************************************************************

  !!
    check.warn(importable)
  creating build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh\cython
  copying insightface\thirdparty\face3d\mesh\cython\mesh_core.cpp -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh\cython
  copying insightface\thirdparty\face3d\mesh\cython\mesh_core.h -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh\cython
  copying insightface\thirdparty\face3d\mesh\cython\mesh_core_cython.cpp -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh\cython
  creating build\lib.win-amd64-cpython-311\insightface\data\images
  copying insightface\data\images\Tom_Hanks_54745.png -> build\lib.win-amd64-cpython-311\insightface\data\images
  copying insightface\data\images\mask_black.jpg -> build\lib.win-amd64-cpython-311\insightface\data\images
  copying insightface\data\images\mask_blue.jpg -> build\lib.win-amd64-cpython-311\insightface\data\images
  copying insightface\data\images\mask_green.jpg -> build\lib.win-amd64-cpython-311\insightface\data\images
  copying insightface\data\images\mask_white.jpg -> build\lib.win-amd64-cpython-311\insightface\data\images
  copying insightface\data\images\t1.jpg -> build\lib.win-amd64-cpython-311\insightface\data\images
  creating build\lib.win-amd64-cpython-311\insightface\data\objects
  copying insightface\data\objects\meanshape_68.pkl -> build\lib.win-amd64-cpython-311\insightface\data\objects
  copying insightface\thirdparty\face3d\mesh\cython\mesh_core_cython.c -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh\cython
  copying insightface\thirdparty\face3d\mesh\cython\mesh_core_cython.cpp -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh\cython
  copying insightface\thirdparty\face3d\mesh\cython\mesh_core_cython.pyx -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh\cython
  copying insightface\thirdparty\face3d\mesh\cython\setup.py -> build\lib.win-amd64-cpython-311\insightface\thirdparty\face3d\mesh\cython
  running build_ext
  building 'insightface.thirdparty.face3d.mesh.cython.mesh_core_cython' extension
  creating build\temp.win-amd64-cpython-311
  creating build\temp.win-amd64-cpython-311\Release
  creating build\temp.win-amd64-cpython-311\Release\insightface
  creating build\temp.win-amd64-cpython-311\Release\insightface\thirdparty
  creating build\temp.win-amd64-cpython-311\Release\insightface\thirdparty\face3d
  creating build\temp.win-amd64-cpython-311\Release\insightface\thirdparty\face3d\mesh
  creating build\temp.win-amd64-cpython-311\Release\insightface\thirdparty\face3d\mesh\cython
  "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Iinsightface/thirdparty/face3d/mesh/cython -ID:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\numpy\core\include -ID:\ComfyUI\ComfyUI_windows_portable\python_embeded\include -ID:\ComfyUI\ComfyUI_windows_portable\python_embeded\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpinsightface/thirdparty/face3d/mesh/cython/mesh_core.cpp /Fobuild\temp.win-amd64-cpython-311\Release\insightface/thirdparty/face3d/mesh/cython/mesh_core.obj
  mesh_core.cpp
  insightface/thirdparty/face3d/mesh/cython/mesh_core.cpp(147): warning C4244: '=': conversion from 'int' to 'float', possible loss of data
  insightface/thirdparty/face3d/mesh/cython/mesh_core.cpp(147): warning C4244: '=': conversion from 'int' to 'float', possible loss of data
  insightface/thirdparty/face3d/mesh/cython/mesh_core.cpp(210): warning C4244: '=': conversion from 'int' to 'float', possible loss of data
  insightface/thirdparty/face3d/mesh/cython/mesh_core.cpp(210): warning C4244: '=': conversion from 'int' to 'float', possible loss of data
  insightface/thirdparty/face3d/mesh/cython/mesh_core.cpp(294): warning C4244: '=': conversion from 'int' to 'float', possible loss of data
  insightface/thirdparty/face3d/mesh/cython/mesh_core.cpp(294): warning C4244: '=': conversion from 'int' to 'float', possible loss of data
  "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Iinsightface/thirdparty/face3d/mesh/cython -ID:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\numpy\core\include -ID:\ComfyUI\ComfyUI_windows_portable\python_embeded\include -ID:\ComfyUI\ComfyUI_windows_portable\python_embeded\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tpinsightface/thirdparty/face3d/mesh/cython/mesh_core_cython.cpp /Fobuild\temp.win-amd64-cpython-311\Release\insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.obj
  mesh_core_cython.cpp
  insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.cpp(36): fatal error C1083: Cannot open include file: 'Python.h': No such file or directory
  error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.40.33807\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for insightface Failed to build insightface ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (insightface)

dancemanUK commented 3 months ago

insightface-0.7.3-cp310-cp310-win_amd64.whl

dancemanUK commented 3 months ago

https://github.com/Gourieff/comfyui-reactor-node

Troubleshooting I. (For Windows users) If you still cannot build Insightface for some reasons 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) or for Python 3.12 (if in the previous step you see 3.12) 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) or pip install insightface-0.7.3-cp312-cp312-win_amd64.whl (for 3.12) (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) or python_embeded\python.exe -m pip install insightface-0.7.3-cp312-cp312-win_amd64.whl (for 3.12) Enjoy!

magekinnarus commented 3 months ago

I am getting this error. Any idea? ERROR: insightface-0.7.3-cp310-cp310-win_amd64.whl is not a supported wheel on this platform.

P.S. Never mind, it was the wrong version I was trying to install. It all worked fine. Thank you for the detailed instruction.

https://github.com/Gourieff/comfyui-reactor-node

Troubleshooting I. (For Windows users) If you still cannot build Insightface for some reasons 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) or for Python 3.12 (if in the previous step you see 3.12) 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) or pip install insightface-0.7.3-cp312-cp312-win_amd64.whl (for 3.12) (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) or python_embeded\python.exe -m pip install insightface-0.7.3-cp312-cp312-win_amd64.whl (for 3.12) Enjoy!

zahdab commented 3 months ago

i managed to get insightface installed by installing reactor, which solved some of the issues.... will post the other issues via another post