ZPdesu / Barbershop

Barbershop: GAN-based Image Compositing using Segmentation Masks (SIGGRAPH Asia 2021)
https://zpdesu.github.io/Barbershop/
MIT License
1.35k stars 268 forks source link

Did anyone get this working? #68

Open angeloaderans opened 1 year ago

angeloaderans commented 1 year ago

Some time ago I found this awesome package called Barbershop. Unfortunately I am unable to get it working, or find anyone who actually got this thing working.

I am interested in how you got it to work and what versions you use for i.e. Python, PyTorch and things like that.

I have been a developer for 20+ years, but I don't know any python unfortunately. So it is hard to figure out how to get it to work properly unless one knows the versions that should be used.

Looked on Google, YouTube and other sources, but I am unable to find a tutorial.

Hope someone can help me out

The error:

No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3'
C:\Users\Angelo\anaconda3\envs\Brshop\lib\site-packages\torch\utils\cpp_extension.py:358: UserWarning: Error checking compiler version for cl: [WinError 2] Het systeem kan het opgegeven bestand niet vinden
  warnings.warn(f'Error checking compiler version for {compiler}: {error}')
Traceback (most recent call last):
  File "main.py", line 13, in <module>
    from models.Embedding import Embedding
  File "C:\Users\Angelo\Desktop\Barbershop\Python-Code-Cool-Stuff\barbaaaah\Barbershop\models\Embedding.py", line 3, in <module>
    from models.Net import Net
  File "C:\Users\Angelo\Desktop\Barbershop\Python-Code-Cool-Stuff\barbaaaah\Barbershop\models\Net.py", line 3, in <module>
    from models.stylegan2.model import Generator
  File "C:\Users\Angelo\Desktop\Barbershop\Python-Code-Cool-Stuff\barbaaaah\Barbershop\models\stylegan2\model.py", line 11, in <module>
    from models.stylegan2.op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d
  File "C:\Users\Angelo\Desktop\Barbershop\Python-Code-Cool-Stuff\barbaaaah\Barbershop\models\stylegan2\op\__init__.py", line 1, in <module>
    from .fused_act import FusedLeakyReLU, fused_leaky_relu
  File "C:\Users\Angelo\Desktop\Barbershop\Python-Code-Cool-Stuff\barbaaaah\Barbershop\models\stylegan2\op\fused_act.py", line 14, in <module>
    os.path.join(module_path, "fused_bias_act_kernel.cu"),
  File "C:\Users\Angelo\anaconda3\envs\Brshop\lib\site-packages\torch\utils\cpp_extension.py", line 1296, in load
    keep_intermediates=keep_intermediates)
  File "C:\Users\Angelo\anaconda3\envs\Brshop\lib\site-packages\torch\utils\cpp_extension.py", line 1518, in _jit_compile
    is_standalone=is_standalone)
  File "C:\Users\Angelo\anaconda3\envs\Brshop\lib\site-packages\torch\utils\cpp_extension.py", line 1619, in _write_ninja_file_and_build_library
    is_standalone=is_standalone)
  File "C:\Users\Angelo\anaconda3\envs\Brshop\lib\site-packages\torch\utils\cpp_extension.py", line 2014, in _write_ninja_file_to_build_library
    cuda_flags = common_cflags + COMMON_NVCC_FLAGS + _get_cuda_arch_flags()
  File "C:\Users\Angelo\anaconda3\envs\Brshop\lib\site-packages\torch\utils\cpp_extension.py", line 1780, in _get_cuda_arch_flags
    arch_list[-1] += '+PTX'
IndexError: list index out of range
(Brshop)

I followed the guidelines 1:1.

I have a laptop with a Geforce 3080 RTX in it.

shartoo commented 4 months ago

The error seems nothing to do with current repo,your cuda enviornoment is not ready yet.