light-and-ray / sd-webui-face-manipulation-extras

zerodim-ffhq-x256 model in sd-webui
11 stars 1 forks source link

Doesnt work on 1111 or webforge v1.10.1 #2

Open vixenius opened 3 months ago

vixenius commented 3 months ago

I have everything installed as suggested, CUDA tools and there was no need to edit the webui.bat since line 51 was already as suggested. This is the log from both 1111 and webforge

** Error loading script: face_manipulation_extras.py Traceback (most recent call last): File "D:\AINOVO\stable-diffusion-webui\modules\scripts.py", line 515, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "D:\AINOVO\stable-diffusion-webui\modules\script_loading.py", line 13, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "D:\AINOVO\stable-diffusion-webui\extensions\sd-webui-face-manipulation-extras\scripts\face_manipulation_extras.py", line 4, in from face_manipulation.main import process, alignImage File "D:\AINOVO\stable-diffusion-webui\extensions\sd-webui-face-manipulation-extras\face_manipulation\main.py", line 6, in from face_manipulation.zerodim.network.training import Model File "D:\AINOVO\stable-diffusion-webui\extensions\sd-webui-face-manipulation-extras\face_manipulation\zerodim\network\training.py", line 18, in from face_manipulation.zerodim.network.modules import BetaVAEGenerator, BetaVAEEncoder File "D:\AINOVO\stable-diffusion-webui\extensions\sd-webui-face-manipulation-extras\face_manipulation\zerodim\network\modules.py", line 10, in from face_manipulation.zerodim.stylegan2_pytorch.model import ConstantInput, ToRGB, ModulatedConv2d, FusedLeakyReLU File "D:\AINOVO\stable-diffusion-webui\extensions\sd-webui-face-manipulation-extras\face_manipulation\zerodim\stylegan2_pytorch\model.py", line 11, in from face_manipulation.zerodim.stylegan2_pytorch.op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d, conv2d_gradfix File "D:\AINOVO\stable-diffusion-webui\extensions\sd-webui-face-manipulation-extras\face_manipulation\zerodim\stylegan2_pytorch\op__init__.py", line 1, in from .fused_act import FusedLeakyReLU, fused_leaky_relu File "D:\AINOVO\stable-diffusion-webui\extensions\sd-webui-face-manipulation-extras\face_manipulation\zerodim\stylegan2_pytorch\op\fused_act.py", line 19, in fused = load( File "D:\AINOVO\stable-diffusion-webui\venv\lib\site-packages\torch\utils\cpp_extension.py", line 1308, in load return _jit_compile( File "D:\AINOVO\stable-diffusion-webui\venv\lib\site-packages\torch\utils\cpp_extension.py", line 1710, in _jit_compile _write_ninja_file_and_build_library( File "D:\AINOVO\stable-diffusion-webui\venv\lib\site-packages\torch\utils\cpp_extension.py", line 1810, in _write_ninja_file_and_build_library _write_ninja_file_to_build_library( File "D:\AINOVO\stable-diffusion-webui\venv\lib\site-packages\torch\utils\cpp_extension.py", line 2242, in _write_ninja_file_to_build_library _write_ninja_file( File "D:\AINOVO\stable-diffusion-webui\venv\lib\site-packages\torch\utils\cpp_extension.py", line 2382, in _write_ninja_file cl_paths = subprocess.check_output(['where', File "C:\Users\Vixenius\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 420, in check_output return run(popenargs, stdout=PIPE, timeout=timeout, check=True, File "C:\Users\Vixenius\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 524, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1.

light-and-ray commented 3 months ago

I have no idea what is cl. Maybe clang. I have seen other problems, like ninja and cuda_home not found, but I don't know what is cl

vixenius commented 3 months ago

Hello again sir, would you be so kind to share the following info with me:

Version of Microsoft build tolls you have installed ( I have 2019 and 2022 fully updated) Version of Nvidia Cuda development and Runtime (I have 11.2 Installed) Pip list (ran from the command prompt)

Also, after updating my Build tools, i get different error:

*** Error loading script: face_manipulation_extras.py Traceback (most recent call last): File "D:\AINOVO\stable-diffusion-webui\venv\lib\site-packages\torch\utils\cpp_extension.py", line 2100, in _run_ninja_build subprocess.run( File "C:\Users\Vixenius\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 524, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "D:\AINOVO\stable-diffusion-webui\modules\scripts.py", line 515, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "D:\AINOVO\stable-diffusion-webui\modules\script_loading.py", line 13, in load_module
    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:\AINOVO\stable-diffusion-webui\extensions\sd-webui-face-manipulation-extras\scripts\face_manipulation_extras.py", line 4, in <module>
    from face_manipulation.main import process, alignImage
  File "D:\AINOVO\stable-diffusion-webui\extensions\sd-webui-face-manipulation-extras\face_manipulation\main.py", line 6, in <module>
    from face_manipulation.zerodim.network.training import Model
  File "D:\AINOVO\stable-diffusion-webui\extensions\sd-webui-face-manipulation-extras\face_manipulation\zerodim\network\training.py", line 18, in <module>
    from face_manipulation.zerodim.network.modules import BetaVAEGenerator, BetaVAEEncoder
  File "D:\AINOVO\stable-diffusion-webui\extensions\sd-webui-face-manipulation-extras\face_manipulation\zerodim\network\modules.py", line 10, in <module>
    from face_manipulation.zerodim.stylegan2_pytorch.model import ConstantInput, ToRGB, ModulatedConv2d, FusedLeakyReLU
  File "D:\AINOVO\stable-diffusion-webui\extensions\sd-webui-face-manipulation-extras\face_manipulation\zerodim\stylegan2_pytorch\model.py", line 11, in <module>
    from face_manipulation.zerodim.stylegan2_pytorch.op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d, conv2d_gradfix
  File "D:\AINOVO\stable-diffusion-webui\extensions\sd-webui-face-manipulation-extras\face_manipulation\zerodim\stylegan2_pytorch\op\__init__.py", line 1, in <module>
    from .fused_act import FusedLeakyReLU, fused_leaky_relu
  File "D:\AINOVO\stable-diffusion-webui\extensions\sd-webui-face-manipulation-extras\face_manipulation\zerodim\stylegan2_pytorch\op\fused_act.py", line 19, in <module>
    fused = load(
  File "D:\AINOVO\stable-diffusion-webui\venv\lib\site-packages\torch\utils\cpp_extension.py", line 1308, in load
    return _jit_compile(
  File "D:\AINOVO\stable-diffusion-webui\venv\lib\site-packages\torch\utils\cpp_extension.py", line 1710, in _jit_compile
    _write_ninja_file_and_build_library(
  File "D:\AINOVO\stable-diffusion-webui\venv\lib\site-packages\torch\utils\cpp_extension.py", line 1823, in _write_ninja_file_and_build_library
    _run_ninja_build(
  File "D:\AINOVO\stable-diffusion-webui\venv\lib\site-packages\torch\utils\cpp_extension.py", line 2116, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error building extension 'fused': [1/2] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\bin\nvcc --generate-dependencies-with-compile --dependency-output fused_bias_act_kernel.cuda.o.d -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -ID:\AINOVO\stable-diffusion-webui\venv\lib\site-packages\torch\include -ID:\AINOVO\stable-diffusion-webui\venv\lib\site-packages\torch\include\torch\csrc\api\include -ID:\AINOVO\stable-diffusion-webui\venv\lib\site-packages\torch\include\TH -ID:\AINOVO\stable-diffusion-webui\venv\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\include" -IC:\Users\Vixenius\AppData\Local\Programs\Python\Python310\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++17 -c D:\AINOVO\stable-diffusion-webui\extensions\sd-webui-face-manipulation-extras\face_manipulation\zerodim\stylegan2_pytorch\op\fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o
FAILED: fused_bias_act_kernel.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\bin\nvcc --generate-dependencies-with-compile --dependency-output fused_bias_act_kernel.cuda.o.d -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -ID:\AINOVO\stable-diffusion-webui\venv\lib\site-packages\torch\include -ID:\AINOVO\stable-diffusion-webui\venv\lib\site-packages\torch\include\torch\csrc\api\include -ID:\AINOVO\stable-diffusion-webui\venv\lib\site-packages\torch\include\TH -ID:\AINOVO\stable-diffusion-webui\venv\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\include" -IC:\Users\Vixenius\AppData\Local\Programs\Python\Python310\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++17 -c D:\AINOVO\stable-diffusion-webui\extensions\sd-webui-face-manipulation-extras\face_manipulation\zerodim\stylegan2_pytorch\op\fused_bias_act_kernel.cu -o fused_bias_act_kernel.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\include\crt/host_config.h(160): fatal error C1189: #error:  -- unsupported Microsoft Visual Studio version! Only the versions between 2017 and 2019 (inclusive) are supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
fused_bias_act_kernel.cu
ninja: build stopped: subcommand failed.
light-and-ray commented 3 months ago

I use linux

dongxiat commented 3 months ago

yep I cant install on webui-forge too

got this error

*** Error loading script: face_manipulation_extras.py
    Traceback (most recent call last):
      File "D:\SOFTWARE\AI\StableDiffusion\Webui_forge_cu121_torch21_old\webui\modules\scripts.py", line 525, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "D:\SOFTWARE\AI\StableDiffusion\Webui_forge_cu121_torch21_old\webui\modules\script_loading.py", line 13, in load_module
        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:\SOFTWARE\AI\StableDiffusion\Webui_forge_cu121_torch21_old\webui\extensions\sd-webui-face-manipulation-extras\scripts\face_manipulation_extras.py", line 4, in <module>
        from face_manipulation.main import process, alignImage
      File "D:\SOFTWARE\AI\StableDiffusion\Webui_forge_cu121_torch21_old\webui\extensions\sd-webui-face-manipulation-extras\face_manipulation\main.py", line 6, in <module>
        from face_manipulation.zerodim.network.training import Model
      File "D:\SOFTWARE\AI\StableDiffusion\Webui_forge_cu121_torch21_old\webui\extensions\sd-webui-face-manipulation-extras\face_manipulation\zerodim\network\training.py", line 18, in <module>
        from face_manipulation.zerodim.network.modules import BetaVAEGenerator, BetaVAEEncoder
      File "D:\SOFTWARE\AI\StableDiffusion\Webui_forge_cu121_torch21_old\webui\extensions\sd-webui-face-manipulation-extras\face_manipulation\zerodim\network\modules.py", line 10, in <module>
        from face_manipulation.zerodim.stylegan2_pytorch.model import ConstantInput, ToRGB, ModulatedConv2d, FusedLeakyReLU
      File "D:\SOFTWARE\AI\StableDiffusion\Webui_forge_cu121_torch21_old\webui\extensions\sd-webui-face-manipulation-extras\face_manipulation\zerodim\stylegan2_pytorch\model.py", line 11, in <module>
        from face_manipulation.zerodim.stylegan2_pytorch.op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d, conv2d_gradfix
      File "D:\SOFTWARE\AI\StableDiffusion\Webui_forge_cu121_torch21_old\webui\extensions\sd-webui-face-manipulation-extras\face_manipulation\zerodim\stylegan2_pytorch\op\__init__.py", line 1, in <module>
        from .fused_act import FusedLeakyReLU, fused_leaky_relu
      File "D:\SOFTWARE\AI\StableDiffusion\Webui_forge_cu121_torch21_old\webui\extensions\sd-webui-face-manipulation-extras\face_manipulation\zerodim\stylegan2_pytorch\op\fused_act.py", line 19, in <module>
        fused = load(
      File "D:\SOFTWARE\AI\StableDiffusion\Webui_forge_cu121_torch21_old\system\python\lib\site-packages\torch\utils\cpp_extension.py", line 1308, in load
        return _jit_compile(
      File "D:\SOFTWARE\AI\StableDiffusion\Webui_forge_cu121_torch21_old\system\python\lib\site-packages\torch\utils\cpp_extension.py", line 1736, in _jit_compile
        return _import_module_from_library(name, build_directory, is_python_module)
      File "D:\SOFTWARE\AI\StableDiffusion\Webui_forge_cu121_torch21_old\system\python\lib\site-packages\torch\utils\cpp_extension.py", line 2136, in _import_module_from_library
        module = importlib.util.module_from_spec(spec)
    ImportError: DLL load failed while importing fused: The specified module could not be found.

---

already add C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe to PATH

===update=== above error is cant find fused is a part of stylegan2_pytorch module but stylegan2_pytorch not support on Windows yet

The error message indicates that the package aimrocks==0.5.* is not found. This package is a dependency for the aim package, which in turn is a dependency for stylegan2_pytorch.

The aimrocks package is a Python wrapper for the RocksDB library and is used by the aim package for storing experiment data. However, aimrocks is not compatible with Windows, which is why you're seeing this error.
light-and-ray commented 3 months ago

Very complicated problem, thanks for finding this answer