I'm on WSL, RTX 5090, my nvcc --version says:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Mon_Apr__3_17:16:06_PDT_2023
Cuda compilation tools, release 12.1, V12.1.105
Build cuda_12.1.r12.1/compiler.32688072_0
Tried to follow the installation, as well as #5 , but still getting this same error:
(up2you) gun@DEKSTOP-gun:~/UP2You$ bash run.sh
Warp 1.10.0 initialized:
CUDA Toolkit 12.8, Driver 13.0
Devices:
"cpu" : "x86_64"
"cuda:0" : "NVIDIA GeForce RTX 5090" (32 GiB, sm_120, mempool enabled)
Kernel cache:
/home/gun/.cache/warp/1.10.0
/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/timm/models/layers/init.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers
warnings.warn(f"Importing from {name} is deprecated, please import via timm.layers", FutureWarning)
/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/timm/models/registry.py:4: FutureWarning: Importing from timm.models.registry is deprecated, please import via timm.models
warnings.warn(f"Importing from {name} is deprecated, please import via timm.models", FutureWarning)
/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/cuda/init.py:230: UserWarning:
NVIDIA GeForce RTX 5090 with CUDA capability sm_120 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_50 sm_60 sm_70 sm_75 sm_80 sm_86 sm_90.
If you want to use the NVIDIA GeForce RTX 5090 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/
warnings.warn(
Traceback (most recent call last):
File "/home/gun/UP2You/inference_low_gpu.py", line 496, in
main(
File "/home/gun/UP2You/inference_low_gpu.py", line 455, in main
infer_in_the_wild_low_gpu(
File "/home/gun/UP2You/inference_low_gpu.py", line 355, in infer_in_the_wild_low_gpu
ref_rgbs, ref_alphas = preprocess_ref_imgs(ref_img_dir, seg_model, device, output_ref_imgs_dir)
File "/home/gun/UP2You/inference_low_gpu.py", line 77, in preprocess_ref_imgs
ref_rgbas = segment_rgbs(ref_pils, seg_model, device)
File "/home/gun/UP2You/inference_low_gpu.py", line 55, in segment_rgbs
preds = seg_model(input_image)[-1].sigmoid().cpu()
File "/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/gun/.cache/huggingface/modules/transformers_modules/ZhengPeng7/BiRefNet/1c48c2d9c666dcb8faf8634ebb37d94b6071a4ba/birefnet.py", line 2092, in forward
scaled_preds, class_preds = self.forward_ori(x)
File "/home/gun/.cache/huggingface/modules/transformers_modules/ZhengPeng7/BiRefNet/1c48c2d9c666dcb8faf8634ebb37d94b6071a4ba/birefnet.py", line 2081, in forward_ori
(x1, x2, x3, x4), class_preds = self.forward_enc(x)
File "/home/gun/.cache/huggingface/modules/transformers_modules/ZhengPeng7/BiRefNet/1c48c2d9c666dcb8faf8634ebb37d94b6071a4ba/birefnet.py", line 2049, in forward_enc
x1, x2, x3, x4 = self.bb(x)
File "/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/gun/.cache/huggingface/modules/transformers_modules/ZhengPeng7/BiRefNet/1c48c2d9c666dcb8faf8634ebb37d94b6071a4ba/birefnet.py", line 1189, in forward
x = self.patch_embed(x)
File "/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/gun/.cache/huggingface/modules/transformers_modules/ZhengPeng7/BiRefNet/1c48c2d9c666dcb8faf8634ebb37d94b6071a4ba/birefnet.py", line 1051, in forward
x = self.proj(x) # B C Wh Ww
File "/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 458, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 454, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.
I'm on WSL, RTX 5090, my nvcc --version says:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Mon_Apr__3_17:16:06_PDT_2023
Cuda compilation tools, release 12.1, V12.1.105
Build cuda_12.1.r12.1/compiler.32688072_0
Tried to follow the installation, as well as #5 , but still getting this same error:
(up2you) gun@DEKSTOP-gun:~/UP2You$ bash run.sh
Warp 1.10.0 initialized:
CUDA Toolkit 12.8, Driver 13.0
Devices:
"cpu" : "x86_64"
"cuda:0" : "NVIDIA GeForce RTX 5090" (32 GiB, sm_120, mempool enabled)
Kernel cache:
/home/gun/.cache/warp/1.10.0
/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/timm/models/layers/init.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers
warnings.warn(f"Importing from {name} is deprecated, please import via timm.layers", FutureWarning)
/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/timm/models/registry.py:4: FutureWarning: Importing from timm.models.registry is deprecated, please import via timm.models
warnings.warn(f"Importing from {name} is deprecated, please import via timm.models", FutureWarning)
/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/cuda/init.py:230: UserWarning:
NVIDIA GeForce RTX 5090 with CUDA capability sm_120 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_50 sm_60 sm_70 sm_75 sm_80 sm_86 sm_90.
If you want to use the NVIDIA GeForce RTX 5090 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/
warnings.warn(
Traceback (most recent call last):
File "/home/gun/UP2You/inference_low_gpu.py", line 496, in
main(
File "/home/gun/UP2You/inference_low_gpu.py", line 455, in main
infer_in_the_wild_low_gpu(
File "/home/gun/UP2You/inference_low_gpu.py", line 355, in infer_in_the_wild_low_gpu
ref_rgbs, ref_alphas = preprocess_ref_imgs(ref_img_dir, seg_model, device, output_ref_imgs_dir)
File "/home/gun/UP2You/inference_low_gpu.py", line 77, in preprocess_ref_imgs
ref_rgbas = segment_rgbs(ref_pils, seg_model, device)
File "/home/gun/UP2You/inference_low_gpu.py", line 55, in segment_rgbs
preds = seg_model(input_image)[-1].sigmoid().cpu()
File "/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/gun/.cache/huggingface/modules/transformers_modules/ZhengPeng7/BiRefNet/1c48c2d9c666dcb8faf8634ebb37d94b6071a4ba/birefnet.py", line 2092, in forward
scaled_preds, class_preds = self.forward_ori(x)
File "/home/gun/.cache/huggingface/modules/transformers_modules/ZhengPeng7/BiRefNet/1c48c2d9c666dcb8faf8634ebb37d94b6071a4ba/birefnet.py", line 2081, in forward_ori
(x1, x2, x3, x4), class_preds = self.forward_enc(x)
File "/home/gun/.cache/huggingface/modules/transformers_modules/ZhengPeng7/BiRefNet/1c48c2d9c666dcb8faf8634ebb37d94b6071a4ba/birefnet.py", line 2049, in forward_enc
x1, x2, x3, x4 = self.bb(x)
File "/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/gun/.cache/huggingface/modules/transformers_modules/ZhengPeng7/BiRefNet/1c48c2d9c666dcb8faf8634ebb37d94b6071a4ba/birefnet.py", line 1189, in forward
x = self.patch_embed(x)
File "/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/gun/.cache/huggingface/modules/transformers_modules/ZhengPeng7/BiRefNet/1c48c2d9c666dcb8faf8634ebb37d94b6071a4ba/birefnet.py", line 1051, in forward
x = self.proj(x) # B C Wh Ww
File "/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 458, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/home/gun/miniconda3/envs/up2you/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 454, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with
TORCH_USE_CUDA_DSAto enable device-side assertions.