Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: The size of tensor a (814) must match the size of tensor b (815) at non-singleton dimension 3 #112

Open
abhishek7467 opened this issue Apr 3, 2024 · 3 comments

Comments

@abhishek7467
Copy link

python generate_image.py --network "E:\MAT Image Inpainting\MAT\pretrained\CelebA-HQ_512.pkl" --dpath "C:\Users\spx016\Downloads\data\img" --outdir "C:\Users\spx016\Downloads\" --mpath "C:\Users\spx016\Downloads\data\mask"
torch.cuda.is_available() True
Loading data from: C:\Users\spx016\Downloads\data\img
['C:\\Users\\spx016\\Downloads\\data\\img\Image.png']
Loading mask from: C:\Users\spx016\Downloads\data\mask
Loading networks from: E:\MAT Image Inpainting\MAT\pretrained\CelebA-HQ_512.pkl
['C:\\Users\\spx016\\Downloads\\data\\img\Image.png']
Prcessing: Image.png
image.shape (3, 1227, 1629)
mask shape (1227, 1629)
Setting up PyTorch plugin "bias_act_plugin"... Failed!
E:\MAT Image Inpainting\MAT\torch_utils\ops\bias_act.py:50: UserWarning: Failed to build CUDA kernels for bias_act. Falling back to slow reference implementation. Details:

Traceback (most recent call last):
File "E:\MAT Image Inpainting\MAT\torch_utils\ops\bias_act.py", line 48, in _init
_plugin = custom_ops.get_plugin('bias_act_plugin', sources=sources, extra_cuda_cflags=['--use_fast_math'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MAT\torch_utils\custom_ops.py", line 110, in get_plugin
torch.utils.cpp_extension.load(name=module_name, verbose=verbose_build, sources=sources, **build_kwargs)
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load
return _jit_compile(
^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\torch\utils\cpp_extension.py", line 1710, in _jit_compile
_write_ninja_file_and_build_library(
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\torch\utils\cpp_extension.py", line 1800, in _write_ninja_file_and_build_library
extra_ldflags = _prepare_ldflags(
^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\torch\utils\cpp_extension.py", line 1887, in _prepare_ldflags
extra_ldflags.append(f'/LIBPATH:{_join_cuda_home("lib", "x64")}')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\torch\utils\cpp_extension.py", line 2407, in _join_cuda_home
raise OSError('CUDA_HOME environment variable is not set. '
OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.

warnings.warn('Failed to build CUDA kernels for bias_act. Falling back to slow reference implementation. Details:\n\n' + traceback.format_exc())
Setting up PyTorch plugin "upfirdn2d_plugin"... Failed!
E:\MAT Image Inpainting\MAT\torch_utils\ops\upfirdn2d.py:34: UserWarning: Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:

Traceback (most recent call last):
File "E:\MAT Image Inpainting\MAT\torch_utils\ops\upfirdn2d.py", line 32, in _init
_plugin = custom_ops.get_plugin('upfirdn2d_plugin', sources=sources, extra_cuda_cflags=['--use_fast_math'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MAT\torch_utils\custom_ops.py", line 110, in get_plugin
torch.utils.cpp_extension.load(name=module_name, verbose=verbose_build, sources=sources, **build_kwargs)
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load
return _jit_compile(
^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\torch\utils\cpp_extension.py", line 1710, in _jit_compile
_write_ninja_file_and_build_library(
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\torch\utils\cpp_extension.py", line 1800, in _write_ninja_file_and_build_library
extra_ldflags = _prepare_ldflags(
^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\torch\utils\cpp_extension.py", line 1887, in _prepare_ldflags
extra_ldflags.append(f'/LIBPATH:{_join_cuda_home("lib", "x64")}')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\torch\utils\cpp_extension.py", line 2407, in _join_cuda_home
raise OSError('CUDA_HOME environment variable is not set. '
OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.

warnings.warn('Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:\n\n' + traceback.format_exc())
Traceback (most recent call last):
File "E:\MAT Image Inpainting\MAT\generate_image.py", line 163, in
generate_images() # pylint: disable=no-value-for-parameter
^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\click\decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MAT\generate_image.py", line 155, in generate_images
output = G(image, mask, z, label, truncation_psi=truncation_psi, noise_mode=noise_mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MAT\networks\mat.py", line 895, in forward
img = self.synthesis(images_in, masks_in, ws, noise_mode=noise_mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MAT\networks\mat.py", line 831, in forward
out_stg1 = self.first_stage(images_in, masks_in, ws, noise_mode=noise_mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MAT\networks\mat.py", line 760, in forward
x, mask = block(x, mask)
^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MatVenv\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\MAT Image Inpainting\MAT\networks\mat.py", line 103, in forward
x = torch.mul(x, mask_ratio)
^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: The size of tensor a (814) must match the size of tensor b (815) at non-singleton dimension 3

@abhishek7467
Copy link
Author

I am using Windows 11

@abhishek7467
Copy link
Author

please also update your code with latest version of packages

@abhishek7467
Copy link
Author

(Project_Image_Inpainting_3_7) PS E:\MAT Image Inpainting\MAT> python --version
Python 3.7.16
(Project_Image_Inpainting_3_7) PS E:\MAT Image Inpainting\MAT> python generate_image.py --network "E:\MAT Image Inpainting\MAT\pretrained\CelebA-HQ_512.pkl" --dpath "C:\Users\spx016\Downloads\data\img" --outdir "C:\Users\spx016\Downloads\" --mpath "C:\Users\spx016\Downloads\data\mask"
CUDA PATH : C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0
torch.version : 1.7.1+cu110
torch.cuda.is_available() True
Loading data from: C:\Users\spx016\Downloads\data\img
['C:\\Users\\spx016\\Downloads\\data\\img\Image.jpg']
Loading mask from: C:\Users\spx016\Downloads\data\mask
Loading networks from: E:\MAT Image Inpainting\MAT\pretrained\CelebA-HQ_512.pkl
['C:\\Users\\spx016\\Downloads\\data\\img\Image.jpg']
Prcessing: Image.png
image.shape (3, 1227, 1629)
mask shape (1227, 1629)
Setting up PyTorch plugin "bias_act_plugin"... Failed!
E:\MAT Image Inpainting\MAT\torch_utils\ops\bias_act.py:50: UserWarning: Failed to build CUDA kernels for bias_act. Falling back to slow reference implementation. Details:

Traceback (most recent call last):
File "C:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\utils\cpp_extension.py", line 1539, in _run_ninja_build
env=env)
File "C:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\subprocess.py", line 512, in run
output=stdout, stderr=stderr)
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 "E:\MAT Image Inpainting\MAT\torch_utils\ops\bias_act.py", line 48, in init
plugin = custom_ops.get_plugin('bias_act_plugin', sources=sources, extra_cuda_cflags=['--use_fast_math'])
File "E:\MAT Image Inpainting\MAT\torch_utils\custom_ops.py", line 110, in get_plugin
torch.utils.cpp_extension.load(name=module_name, verbose=verbose_build, sources=sources, **build_kwargs)
File "C:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\utils\cpp_extension.py", line 997, in load
keep_intermediates=keep_intermediates)
File "C:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\utils\cpp_extension.py", line 1202, in jit_compile
with_cuda=with_cuda)
File "C:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\utils\cpp_extension.py", line 1300, in write_ninja_file_and_build_library
error_prefix="Error building extension '{}'".format(name))
File "C:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\utils\cpp_extension.py", line 1555, in run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error building extension 'bias_act_plugin': [1/2] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\bin\nvcc -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 /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=bias_act_plugin -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\include -IC:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\include\TH -IC:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\include" -IC:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_HALF2_OPERATORS
_ --expt-relaxed-constexpr -gencode=arch=compute_86,code=sm_86 --use_fast_math -c "E:\MAT Image Inpainting\MAT\torch_utils\ops\bias_act.cu" -o bias_act.cuda.o
FAILED: bias_act.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\bin\nvcc -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 /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=bias_act_plugin -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\include -IC:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\include\TH -IC:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\include" -IC:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_86,code=sm_86 --use_fast_math -c "E:\MAT Image Inpainting\MAT\torch_utils\ops\bias_act.cu" -o bias_act.cuda.o
nvcc fatal : Unsupported gpu architecture 'compute_86'
ninja: build stopped: subcommand failed.

warnings.warn('Failed to build CUDA kernels for bias_act. Falling back to slow reference implementation. Details:\n\n' + traceback.format_exc())
Setting up PyTorch plugin "upfirdn2d_plugin"... Failed!
E:\MAT Image Inpainting\MAT\torch_utils\ops\upfirdn2d.py:34: UserWarning: Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:

Traceback (most recent call last):
File "C:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\utils\cpp_extension.py", line 1539, in _run_ninja_build
env=env)
File "C:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\subprocess.py", line 512, in run
output=stdout, stderr=stderr)
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 "E:\MAT Image Inpainting\MAT\torch_utils\ops\upfirdn2d.py", line 32, in init
plugin = custom_ops.get_plugin('upfirdn2d_plugin', sources=sources, extra_cuda_cflags=['--use_fast_math'])
File "E:\MAT Image Inpainting\MAT\torch_utils\custom_ops.py", line 110, in get_plugin
torch.utils.cpp_extension.load(name=module_name, verbose=verbose_build, sources=sources, **build_kwargs)
File "C:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\utils\cpp_extension.py", line 997, in load
keep_intermediates=keep_intermediates)
File "C:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\utils\cpp_extension.py", line 1202, in jit_compile
with_cuda=with_cuda)
File "C:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\utils\cpp_extension.py", line 1300, in write_ninja_file_and_build_library
error_prefix="Error building extension '{}'".format(name))
File "C:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\utils\cpp_extension.py", line 1555, in run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error building extension 'upfirdn2d_plugin': [1/2] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\bin\nvcc -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 /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=upfirdn2d_plugin -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\include -IC:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\include\TH -IC:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\include" -IC:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_HALF2_OPERATORS
_ --expt-relaxed-constexpr -gencode=arch=compute_86,code=sm_86 --use_fast_math -c "E:\MAT Image Inpainting\MAT\torch_utils\ops\upfirdn2d.cu" -o upfirdn2d.cuda.o
FAILED: upfirdn2d.cuda.o
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\bin\nvcc -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 /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -DTORCH_EXTENSION_NAME=upfirdn2d_plugin -DTORCH_API_INCLUDE_EXTENSION_H -IC:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\include -IC:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\include\TH -IC:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\include" -IC:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\Include -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_86,code=sm_86 --use_fast_math -c "E:\MAT Image Inpainting\MAT\torch_utils\ops\upfirdn2d.cu" -o upfirdn2d.cuda.o
nvcc fatal : Unsupported gpu architecture 'compute_86'
ninja: build stopped: subcommand failed.

warnings.warn('Failed to build CUDA kernels for upfirdn2d. Falling back to slow reference implementation. Details:\n\n' + traceback.format_exc())
Traceback (most recent call last):
File "generate_image.py", line 164, in
generate_images() # pylint: disable=no-value-for-parameter
File "C:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
File "C:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "C:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "C:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\click\decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "generate_image.py", line 156, in generate_images
output = G(image, mask, z, label, truncation_psi=truncation_psi, noise_mode=noise_mode)
File "C:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "E:\MAT Image Inpainting\MAT\networks\mat.py", line 895, in forward
img = self.synthesis(images_in, masks_in, ws, noise_mode=noise_mode)
File "C:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "E:\MAT Image Inpainting\MAT\networks\mat.py", line 831, in forward
out_stg1 = self.first_stage(images_in, masks_in, ws, noise_mode=noise_mode)
File "C:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "E:\MAT Image Inpainting\MAT\networks\mat.py", line 760, in forward
x, mask = block(x, mask)
File "C:\Users\spx016\anaconda3\envs\Project_Image_Inpainting_3_7\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "E:\MAT Image Inpainting\MAT\networks\mat.py", line 103, in forward
x = torch.mul(x, mask_ratio)
RuntimeError: The size of tensor a (814) must match the size of tensor b (815) at non-singleton dimension 3
(Project_Image_Inpainting_3_7) PS E:\MAT Image Inpainting\MAT>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant