Skip to content

Error running main.py #70

@kehangu

Description

@kehangu

python main.py --im_path1 90.png --im_path2 15.png --im_path3 117.png --sign realistic
--smooth 5
Traceback (most recent call last):
File "D:\testpython\hair\barbershop\main.py", line 13, in
from models.Embedding import Embedding
File "D:\testpython\hair\barbershop\models\Embedding.py", line 3, in
from models.Net import Net
File "D:\testpython\hair\barbershop\models\Net.py", line 3, in
from models.stylegan2.model import Generator
File "D:\testpython\hair\barbershop\models\stylegan2\model.py", line 11, in
from models.stylegan2.op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d
File "D:\testpython\hair\barbershop\models\stylegan2\op_init_.py", line 1, in
from .fused_act import FusedLeakyReLU, fused_leaky_relu
File "D:\testpython\hair\barbershop\models\stylegan2\op\fused_act.py", line 10, in
fused = load(
^^^^^
File "C:\Users\anetl\AppData\Roaming\Python\Python312\site-packages\torch\utils\cpp_extension.py", line 1314, in load
return _jit_compile(
^^^^^^^^^^^^^
File "C:\Users\anetl\AppData\Roaming\Python\Python312\site-packages\torch\utils\cpp_extension.py", line 1721, in _jit_compile
_write_ninja_file_and_build_library(
File "C:\Users\anetl\AppData\Roaming\Python\Python312\site-packages\torch\utils\cpp_extension.py", line 1803, in write_ninja_file_and_build_library
verify_ninja_availability()
File "C:\Users\anetl\AppData\Roaming\Python\Python312\site-packages\torch\utils\cpp_extension.py", line 1852, in verify_ninja_availability
raise RuntimeError("Ninja is required to load C++ extensions")
RuntimeError: Ninja is required to load C++ extensions
PS D:\testpython\hair\barbershop> python main.py --im_path1 90.png --im_path2 15.png --im_path3 117.png --sign realistic --smooth 5
Traceback (most recent call last):
File "D:\testpython\hair\barbershop\main.py", line 13, in
from models.Embedding import Embedding
File "D:\testpython\hair\barbershop\models\Embedding.py", line 3, in
from models.Net import Net
File "D:\testpython\hair\barbershop\models\Net.py", line 3, in
from models.stylegan2.model import Generator
File "D:\testpython\hair\barbershop\models\stylegan2\model.py", line 11, in
from models.stylegan2.op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d
File "D:\testpython\hair\barbershop\models\stylegan2\op_init
.py", line 1, in
from .fused_act import FusedLeakyReLU, fused_leaky_relu
File "D:\testpython\hair\barbershop\models\stylegan2\op\fused_act.py", line 10, in
fused = load(
^^^^^
File "C:\Users\anetl\AppData\Roaming\Python\Python312\site-packages\torch\utils\cpp_extension.py", line 1314, in load
return _jit_compile(
^^^^^^^^^^^^^
File "C:\Users\anetl\AppData\Roaming\Python\Python312\site-packages\torch\utils\cpp_extension.py", line 1721, in _jit_compile
_write_ninja_file_and_build_library(
File "C:\Users\anetl\AppData\Roaming\Python\Python312\site-packages\torch\utils\cpp_extension.py", line 1803, in _write_ninja_file_and_build_library
verify_ninja_availability()
File "C:\Users\anetl\AppData\Roaming\Python\Python312\site-packages\torch\utils\cpp_extension.py", line 1852, in verify_ninja_availability
raise RuntimeError("Ninja is required to load C++ extensions")
RuntimeError: Ninja is required to load C++ extensions

pip install models Collecting models Using cached models-0.9.3.tar.gz (16 kB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [22 lines of output] Traceback (most recent call last): File "D:\TESTPYTHON\hair\Barbershop.venv\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main() File "D:\TESTPYTHON\hair\Barbershop.venv\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\TESTPYTHON\hair\Barbershop.venv\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\anetl\AppData\Local\Temp\pip-build-env-09bn7ptd\overlay\Lib\site-packages\setuptools\build_meta.py", line 334, in get_requires_for_build_wheel return self.get_build_requires(config_settings, requirements=[]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\anetl\AppData\Local\Temp\pip-build-env-09bn7ptd\overlay\Lib\site-packages\setuptools\build_meta.py", line 304, in get_build_requires self.run_setup() File "C:\Users\anetl\AppData\Local\Temp\pip-build-env-09bn7ptd\overlay\Lib\site-packages\setuptools\build_meta.py", line 522, in run_setup super().run_setup(setup_script=setup_script) File "C:\Users\anetl\AppData\Local\Temp\pip-build-env-09bn7ptd\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in run_setup exec(code, locals()) File "", line 25, in File "C:\Users\anetl\AppData\Local\Temp\pip-install-h5ufyme\models_e1d4c0e69ea74eedae89c22300e41309\models_init.py", line 23, in from base import * ModuleNotFoundError: No module named 'base' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions