-
Notifications
You must be signed in to change notification settings - Fork 118
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
Could not run 'texture_baker_cpp::rasterize' with arguments from the 'CUDA' backend. #39
Comments
It appears as if the CUDA extension wasn't compiled. It could be the case that conda environment didn't use the CUDA enabled PyTorch, causing Perhaps you can reinstalling after setting the environment variable |
`import torch, os print(torch.cuda.is_available()) `import torch, os os.environ["USE_CUDA"] = "1"` i ran this code and did the reinstallationof texture_baker and requirements.txt, which seems to be not working too. |
Can you try setting USE_CUDA by running the command |
Since I'm using window(maybe i should have mentioned this first. Sorry), I used set instead of export. So I ran
but issue persists. maybe this is window related problem? |
hmm. Can you try completely deleting the Once that's done, share the full output logs of that pip install command here. |
here is the full log. thks for your help |
Ok, I see this error log now.
but i installed and unintalled visual code redist 2022 like 5times, but didn't fix the issue. I downloaded the vs redist from here. is there option i need to bare upon or is there other version that i don't know? |
Thanks for posting the logs! The issue is likely that you need to install visual studio, not just the redist. Note that this was mentioned in the README under installation https://github.com/Stability-AI/stable-fast-3d?tab=readme-ov-file#installation |
actually, visual studio 2022 community version is already installed in my computer. (yes i read readme. no offense). is there some hidden option that i should turn on? |
Ah okay, my bad! |
Okay new kind of error pops up when using maybe tomorrow I will try setting this with resetting conda environment one more time, but when it does not work I will try setting this up in Colab. Thank you sincerely for your help. |
Sounds good. It could be conda related, not sure. I've tested it to be working fine without Conda. Perhaps in the future you can try using normal python+pytorch (CUDA 12.1/12.4) with VS2022 installation with a venv if needed. |
Hello! I also have this same issue:
I tried the same steps above and get the following error when building TextureBaker: `Building wheels for collected packages: texture_baker × python setup.py bdist_wheel did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. Please let me know how to continue! Thanks! I am on a windows machine with a 2080 and VS2022 installed. I did this inside of the |
@sinaiyuc can you try after setting |
Quick update, I set DISTUTILS_USE_SDK=1 and now I get the following error: Building wheels for collected packages: texture_baker × python setup.py bdist_wheel did not run successfully.
note: This error originates from a subprocess, and is likely not a problem with pip. |
Ubuntu user here.
Yes I recompiled also the texture_baker:
Texture baker install:
|
@priamai try |
@sinaiyuc try using make sure to |
That's exactly what I did. |
@priamai okay. Can you delete the |
Progress! Still not fixed though. Update below:It looks like texture_baker was successfully installed. pip install -v ./texture_baker
!! BUT! I am still getting the same error. Here is my output:`Loaded ViT-B-32 model config. CPU: registered at F:\ComfyFresh\ComfyUI\custom_nodes\stable-fast-3d\texture_baker\texture_baker\csrc\baker.cpp:561 [kernel] Traceback (most recent call last): CPU: registered at F:\ComfyFresh\ComfyUI\custom_nodes\stable-fast-3d\texture_baker\texture_baker\csrc\baker.cpp:561 [kernel] |
This is what I used btw to get texture_baker to install. |
My logs here
|
@sinaiyuc it doesn't seem like nvcc was invoked while compiling texture baker. Can you delete the |
@priamai for some reason CUDA isn't being detected by How about trying |
I deleted the /build folder and re-installed the texture baker. Here are the logs: pip install -v ./texture_baker
!! |
Although it still failed :( python run.py demo_files/examples/chair1.png --output-dir output/ *************** EP Error *************** 2024-09-06 12:21:32.4575931 [E:onnxruntime:Default, provider_bridge_ort.cc:1992 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1637 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\Users\Teh1P\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll" 0%| | 0/1 [00:00<?, ?it/s]F:\ComfyFresh\ComfyUI\custom_nodes\stable-fast-3d\sf3d\models\tokenizers\dinov2.py:266: UserWarning: 1Torch was not compiled with flash attention. (Triggered internally at ..\aten\src\ATen\native\transformers\cuda\sdp_utils.cpp:455.) CPU: registered at F:\ComfyFresh\ComfyUI\custom_nodes\stable-fast-3d\texture_baker\texture_baker\csrc\baker.cpp:561 [kernel] |
@sinaiyuc did you set |
Yeah, I set both things before installing ./texture_baker |
@sinaiyuc in that case, it should have executed this code |
@priamai interesting. I don't think it's pyenv related as CUDA SDK is generally installed outside of pyenv. Is CUDA_HOME set? |
@jammm hello good finding, indeed CUDA_HOME is not set, what shall I do to fix it? |
@priamai check if CUDA_PATH is set as well. And if not, set CUDA_HOME/CUDA_PATH to the CUDA installation on your machine. For example, in my machine with CUDA 12.3 installed, CUDA_PATH has been set to |
im back on problem and there seems to be another error happening. i reinstalled vs code and set cuda_home and cuda_path, and ran with x64 native tools command. any quick guess for the problem are welcomed |
Okay I figured it is happening because there is some indents inside path by this link (its kind of frustrating that i took so long finding out the cause). seams like damn window suck so much |
maybe try deleting the build folder and share the build logs with |
I got the same issue, please help to check the log. Thanks! PS C:\Users\ZCHAWAN4\Downloads> pip install ./texture_baker/ --user -v
Using pip 24.2 from C:\Users\ZCHAWAN4\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip (python 3.11)
Processing c:\users\zchawan4\downloads\texture_baker
Running command python setup.py egg_info
[<setuptools.extension.Extension('texture_baker._C') at 0x37d19d0>]
running egg_info
creating C:\Users\ZCHAWAN4\AppData\Local\Temp\pip-pip-egg-info-_qs8oub1\texture_baker.egg-info
writing C:\Users\ZCHAWAN4\AppData\Local\Temp\pip-pip-egg-info-_qs8oub1\texture_baker.egg-info\PKG-INFO
writing dependency_links to C:\Users\ZCHAWAN4\AppData\Local\Temp\pip-pip-egg-info-_qs8oub1\texture_baker.egg-info\dependency_links.txt
writing top-level names to C:\Users\ZCHAWAN4\AppData\Local\Temp\pip-pip-egg-info-_qs8oub1\texture_baker.egg-info\top_level.txt
writing manifest file 'C:\Users\ZCHAWAN4\AppData\Local\Temp\pip-pip-egg-info-_qs8oub1\texture_baker.egg-info\SOURCES.txt'
reading manifest file 'C:\Users\ZCHAWAN4\AppData\Local\Temp\pip-pip-egg-info-_qs8oub1\texture_baker.egg-info\SOURCES.txt'
writing manifest file 'C:\Users\ZCHAWAN4\AppData\Local\Temp\pip-pip-egg-info-_qs8oub1\texture_baker.egg-info\SOURCES.txt'
Preparing metadata (setup.py) ... done
Building wheels for collected packages: texture_baker
Running command python setup.py bdist_wheel
[<setuptools.extension.Extension('texture_baker._C') at 0x3821a90>]
running bdist_wheel
running build
running build_py
creating build\lib.win-amd64-cpython-311\texture_baker
copying .\texture_baker\baker.py -> build\lib.win-amd64-cpython-311\texture_baker
copying .\texture_baker\__init__.py -> build\lib.win-amd64-cpython-311\texture_baker
creating build\lib.win-amd64-cpython-311\texture_baker\csrc
copying .\texture_baker\csrc\baker.h -> build\lib.win-amd64-cpython-311\texture_baker\csrc
copying .\texture_baker\csrc\baker_kernel.metal -> build\lib.win-amd64-cpython-311\texture_baker\csrc
running build_ext
C:\Users\ZCHAWAN4\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\utils\cpp_extension.py:414: UserWarning: The detected CUDA version (12.4) has a minor version mismatch with the version that was used to compile PyTorch (12.1). Most likely this shouldn't be a problem.
warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
building 'texture_baker._C' extension
creating C:\Users\ZCHAWAN4\Downloads\texture_baker\build\temp.win-amd64-cpython-311\Release\texture_baker\csrc
C:\Users\ZCHAWAN4\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\utils\cpp_extension.py:1965: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation.
If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'].
warnings.warn(
Emitting ninja build file C:\Users\ZCHAWAN4\Downloads\texture_baker\build\temp.win-amd64-cpython-311\Release\build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
1.11.1.git.kitware.jobserver-1
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\ZCHAWAN4\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\lib "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\lib\x64" /LIBPATH:C:\Users\ZCHAWAN4\AppData\Local\Programs\Python\Python311\libs /LIBPATH:C:\Users\ZCHAWAN4\AppData\Local\Programs\Python\Python311 /LIBPATH:C:\Users\ZCHAWAN4\AppData\Local\Programs\Python\Python311\PCbuild\amd64 "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22000.0\\um\x64" cudart_static.lib c10_cuda.lib c10.lib torch.lib torch_cpu.lib torch_python.lib c10.lib torch.lib torch_cpu.lib torch_python.lib cudart_static.lib c10_cuda.lib torch_cuda.lib /EXPORT:PyInit__C C:\Users\ZCHAWAN4\Downloads\texture_baker\build\temp.win-amd64-cpython-311\Release\texture_baker\csrc\baker.obj C:\Users\ZCHAWAN4\Downloads\texture_baker\build\temp.win-amd64-cpython-311\Release\texture_baker\csrc\baker_kernel.obj /OUT:build\lib.win-amd64-cpython-311\texture_baker\_C.cp311-win_amd64.pyd /IMPLIB:C:\Users\ZCHAWAN4\Downloads\texture_baker\build\temp.win-amd64-cpython-311\Release\texture_baker\csrc\_C.cp311-win_amd64.lib
LINK : fatal error LNK1181: 无法打开输入文件“C:\Users\ZCHAWAN4\Downloads\texture_baker\build\temp.win-amd64-cpython-311\Release\texture_baker\csrc\baker.obj”
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x64\\link.exe' failed with exit code 1181
error: subprocess-exited-with-error
× python setup.py bdist_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.
full command: 'C:\Users\ZCHAWAN4\AppData\Local\Programs\Python\Python311\python.exe' -u -c '
exec(compile('"'"''"'"''"'"'
# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
#
# - It imports setuptools before invoking setup.py, to enable projects that directly
# import from `distutils.core` to work with newer packaging standards.
# - It provides a clear error message when setuptools is not installed.
# - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
# setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
# manifest_maker: standard file '"'"'-c'"'"' not found".
# - It generates a shim setup.py, for handling setup.cfg-only projects.
import os, sys, tokenize
try:
import setuptools
except ImportError as error:
print(
"ERROR: Can not execute `setup.py` since setuptools is not available in "
"the build environment.",
file=sys.stderr,
)
sys.exit(1)
__file__ = %r
sys.argv[0] = __file__
if os.path.exists(__file__):
filename = __file__
with tokenize.open(__file__) as f:
setup_py_code = f.read()
else:
filename = "<auto-generated setuptools caller>"
setup_py_code = "from setuptools import setup; setup()"
exec(compile(setup_py_code, filename, "exec"))
'"'"''"'"''"'"' % ('"'"'C:\\Users\\ZCHAWAN4\\Downloads\\texture_baker\\setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' bdist_wheel -d 'C:\Users\ZCHAWAN4\AppData\Local\Temp\pip-wheel-2so762q_'
cwd: C:\Users\ZCHAWAN4\Downloads\texture_baker\\
Building wheel for texture_baker (setup.py) ... error
ERROR: Failed building wheel for texture_baker
Running setup.py clean for texture_baker
Running command python setup.py clean
[<setuptools.extension.Extension('texture_baker._C') at 0x3ed8dc50>]
running clean
removing 'build\temp.win-amd64-cpython-311' (and everything under it)
removing 'build\lib.win-amd64-cpython-311' (and everything under it)
'build\bdist.win-amd64' does not exist -- can't clean it
'build\scripts-3.11' does not exist -- can't clean it
removing 'build'
Failed to build texture_baker
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (texture_baker) |
@CurrenWong can you try deleting the |
Hi @jammm , I didn't find texture_baker/build from my folder. PS C:\Users\ZCHAWAN4\Downloads\texture_baker> pip install .
Processing c:\users\zchawan4\downloads\texture_baker
Preparing metadata (setup.py) ... done
Building wheels for collected packages: texture_baker
Building wheel for texture_baker (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
[<setuptools.extension.Extension('texture_baker._C') at 0x37dac50>]
running bdist_wheel
running build
running build_py
creating build\lib.win-amd64-cpython-311\texture_baker
copying .\texture_baker\baker.py -> build\lib.win-amd64-cpython-311\texture_baker
copying .\texture_baker\__init__.py -> build\lib.win-amd64-cpython-311\texture_baker
creating build\lib.win-amd64-cpython-311\texture_baker\csrc
copying .\texture_baker\csrc\baker.h -> build\lib.win-amd64-cpython-311\texture_baker\csrc
copying .\texture_baker\csrc\baker_kernel.metal -> build\lib.win-amd64-cpython-311\texture_baker\csrc
running build_ext
C:\Users\ZCHAWAN4\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\utils\cpp_extension.py:414: UserWarning: The detected CUDA version (12.4) has a minor version mismatch with the version that was used to compile PyTorch (12.1). Most likely this shouldn't be a problem.
warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
building 'texture_baker._C' extension
creating C:\Users\ZCHAWAN4\Downloads\texture_baker\build\temp.win-amd64-cpython-311\Release\texture_baker\csrc
C:\Users\ZCHAWAN4\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\utils\cpp_extension.py:1965: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation.
If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'].
warnings.warn(
Emitting ninja build file C:\Users\ZCHAWAN4\Downloads\texture_baker\build\temp.win-amd64-cpython-311\Release\build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
1.11.1.git.kitware.jobserver-1
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\ZCHAWAN4\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\lib "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\lib\x64" /LIBPATH:C:\Users\ZCHAWAN4\AppData\Local\Programs\Python\Python311\libs /LIBPATH:C:\Users\ZCHAWAN4\AppData\Local\Programs\Python\Python311 /LIBPATH:C:\Users\ZCHAWAN4\AppData\Local\Programs\Python\Python311\PCbuild\amd64 "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22000.0\\um\x64" cudart_static.lib c10_cuda.lib c10.lib torch.lib torch_cpu.lib torch_python.lib c10.lib torch.lib torch_cpu.lib torch_python.lib cudart_static.lib c10_cuda.lib torch_cuda.lib /EXPORT:PyInit__C C:\Users\ZCHAWAN4\Downloads\texture_baker\build\temp.win-amd64-cpython-311\Release\texture_baker\csrc\baker.obj C:\Users\ZCHAWAN4\Downloads\texture_baker\build\temp.win-amd64-cpython-311\Release\texture_baker\csrc\baker_kernel.obj /OUT:build\lib.win-amd64-cpython-311\texture_baker\_C.cp311-win_amd64.pyd /IMPLIB:C:\Users\ZCHAWAN4\Downloads\texture_baker\build\temp.win-amd64-cpython-311\Release\texture_baker\csrc\_C.cp311-win_amd64.lib
LINK : fatal error LNK1181: 无法打开输入文件“C:\Users\ZCHAWAN4\Downloads\texture_baker\build\temp.win-amd64-cpython-311\Release\texture_baker\csrc\baker.obj”
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\bin\\HostX86\\x64\\link.exe' failed with exit code 1181
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for texture_baker
Running setup.py clean for texture_baker
Failed to build texture_baker
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (texture_baker)
PS C:\Users\ZCHAWAN4\Downloads\texture_baker> tree /f
Folder PATH listing for volume ZC05N0020J
Volume serial number is B066-73D2
C:.
│ README.md
│ requirements.txt
│ setup.py
│
└───texture_baker
│ baker.py
│ __init__.py
│
└───csrc
baker.cpp
baker.h
baker_kernel.cu
baker_kernel.metal
baker_kernel.mm
|
That's weird. I wonder if it's a Windows permission issue. Can you try manually creating the Also try powershell/command prompt with admin permissions |
I serched the problem and someone says reinstall the torch can solve this issue. It works now. Thanks! PS C:\Users\ZCHAWAN4\Downloads\texture_baker> pip install .
Processing c:\users\zchawan4\downloads\texture_baker
Preparing metadata (setup.py) ... done
Building wheels for collected packages: texture_baker
Building wheel for texture_baker (setup.py) ... done
Created wheel for texture_baker: filename=texture_baker-0.0.1-cp311-cp311-win_amd64.whl size=158989 sha256=15f16f7c303a03e8cf06ef10818a46ad1af0ddf3c1db0cc21304ef46584d5565
Stored in directory: C:\Users\ZCHAWAN4\AppData\Local\Temp\pip-ephem-wheel-cache-khdbay10\wheels\bd\0b\06\5b540aed35424846661f32c4f6812d5b0a7b81998d3ae4c565
Successfully built texture_baker
Installing collected packages: texture_baker
Successfully installed texture_baker-0.0.1 PS C:\Users\ZCHAWAN4\Downloads> pip install torch-2.4.1+cu124-cp311-cp311-win_amd64.whl
WARNING: Ignoring invalid distribution ~orch (C:\Users\ZCHAWAN4\AppData\Local\Programs\Python\Python311\Lib\site-packages)
Processing c:\users\zchawan4\downloads\torch-2.4.1+cu124-cp311-cp311-win_amd64.whl
Requirement already satisfied: filelock in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torch==2.4.1+cu124) (3.10.7)
Requirement already satisfied: typing-extensions>=4.8.0 in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torch==2.4.1+cu124) (4.11.0)
Requirement already satisfied: sympy in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torch==2.4.1+cu124) (1.13.2)
Requirement already satisfied: networkx in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torch==2.4.1+cu124) (3.0)
Requirement already satisfied: jinja2 in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torch==2.4.1+cu124) (3.1.2)
Requirement already satisfied: fsspec in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torch==2.4.1+cu124) (2024.9.0)
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from jinja2->torch==2.4.1+cu124) (2.1.2)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from sympy->torch==2.4.1+cu124) (1.3.0)
WARNING: Ignoring invalid distribution ~orch (C:\Users\ZCHAWAN4\AppData\Local\Programs\Python\Python311\Lib\site-packages)
Installing collected packages: torch
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
clip-interrogator 0.6.0 requires torchvision, which is not installed.
open-clip-torch 2.26.1 requires torchvision, which is not installed.
pretrainedmodels 0.7.4 requires torchvision, which is not installed.
segmentation-models-pytorch 0.3.4 requires torchvision>=0.5.0, which is not installed.
spandrel 0.3.4 requires torchvision, which is not installed.
timm 1.0.9 requires torchvision, which is not installed.
ultralytics 8.2.96 requires torchvision>=0.9.0, which is not installed.
segmentation-models-pytorch 0.3.4 requires timm==0.9.7, but you have timm 1.0.9 which is incompatible.
torchaudio 2.4.1+cu121 requires torch==2.4.1+cu121, but you have torch 2.4.1+cu124 which is incompatible.
Successfully installed torch-2.4.1+cu124
PS C:\Users\ZCHAWAN4\Downloads> pip install .\torchvision-0.19.1+cu124-cp311-cp311-win_amd64.whl
Processing c:\users\zchawan4\downloads\torchvision-0.19.1+cu124-cp311-cp311-win_amd64.whl
Requirement already satisfied: numpy in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torchvision==0.19.1+cu124) (1.26.4)
Requirement already satisfied: torch==2.4.1+cu124 in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torchvision==0.19.1+cu124) (2.4.1+cu124)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torchvision==0.19.1+cu124) (9.4.0)
Requirement already satisfied: filelock in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torch==2.4.1+cu124->torchvision==0.19.1+cu124) (3.10.7)
Requirement already satisfied: typing-extensions>=4.8.0 in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torch==2.4.1+cu124->torchvision==0.19.1+cu124) (4.11.0)
Requirement already satisfied: sympy in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torch==2.4.1+cu124->torchvision==0.19.1+cu124) (1.13.2)
Requirement already satisfied: networkx in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torch==2.4.1+cu124->torchvision==0.19.1+cu124) (3.0)
Requirement already satisfied: jinja2 in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torch==2.4.1+cu124->torchvision==0.19.1+cu124) (3.1.2)
Requirement already satisfied: fsspec in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torch==2.4.1+cu124->torchvision==0.19.1+cu124) (2024.9.0)
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from jinja2->torch==2.4.1+cu124->torchvision==0.19.1+cu124) (2.1.2)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from sympy->torch==2.4.1+cu124->torchvision==0.19.1+cu124) (1.3.0)
Installing collected packages: torchvision
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
segmentation-models-pytorch 0.3.4 requires timm==0.9.7, but you have timm 1.0.9 which is incompatible.
Successfully installed torchvision-0.19.1+cu124
PS C:\Users\ZCHAWAN4\Downloads> pip uninstall torchaudio
Found existing installation: torchaudio 2.4.1+cu121
Uninstalling torchaudio-2.4.1+cu121:
Would remove:
c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages\torchaudio-2.4.1+cu121.dist-info\*
c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages\torchaudio\*
c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages\torio\*
Proceed (Y/n)? y
Successfully uninstalled torchaudio-2.4.1+cu121
PS C:\Users\ZCHAWAN4\Downloads> pip install .\torchaudio-2.4.1+cu124-cp311-cp311-win_amd64.whl
Processing c:\users\zchawan4\downloads\torchaudio-2.4.1+cu124-cp311-cp311-win_amd64.whl
Requirement already satisfied: torch==2.4.1+cu124 in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torchaudio==2.4.1+cu124) (2.4.1+cu124)
Requirement already satisfied: filelock in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torch==2.4.1+cu124->torchaudio==2.4.1+cu124) (3.10.7)
Requirement already satisfied: typing-extensions>=4.8.0 in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torch==2.4.1+cu124->torchaudio==2.4.1+cu124) (4.11.0)
Requirement already satisfied: sympy in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torch==2.4.1+cu124->torchaudio==2.4.1+cu124) (1.13.2)
Requirement already satisfied: networkx in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torch==2.4.1+cu124->torchaudio==2.4.1+cu124) (3.0)
Requirement already satisfied: jinja2 in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torch==2.4.1+cu124->torchaudio==2.4.1+cu124) (3.1.2)
Requirement already satisfied: fsspec in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from torch==2.4.1+cu124->torchaudio==2.4.1+cu124) (2024.9.0)
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from jinja2->torch==2.4.1+cu124->torchaudio==2.4.1+cu124) (2.1.2)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in c:\users\zchawan4\appdata\local\programs\python\python311\lib\site-packages (from sympy->torch==2.4.1+cu124->torchaudio==2.4.1+cu124) (1.3.0)
Installing collected packages: torchaudio
Successfully installed torchaudio-2.4.1+cu124
PS C:\Users\ZCHAWAN4\Downloads> cd .\texture_baker\
PS C:\Users\ZCHAWAN4\Downloads\texture_baker> pip install .
Processing c:\users\zchawan4\downloads\texture_baker
Preparing metadata (setup.py) ... done
Building wheels for collected packages: texture_baker
Building wheel for texture_baker (setup.py) ... done
Created wheel for texture_baker: filename=texture_baker-0.0.1-cp311-cp311-win_amd64.whl size=158989 sha256=15f16f7c303a03e8cf06ef10818a46ad1af0ddf3c1db0cc21304ef46584d5565
Stored in directory: C:\Users\ZCHAWAN4\AppData\Local\Temp\pip-ephem-wheel-cache-khdbay10\wheels\bd\0b\06\5b540aed35424846661f32c4f6812d5b0a7b81998d3ae4c565
Successfully built texture_baker
Installing collected packages: texture_baker
Successfully installed texture_baker-0.0.1 |
Thanks for your reply! The same error though... |
Can you share your build logs? |
Sure. Device used: cuda CPU: registered at texture_baker/csrc/baker.cpp:543 [kernel] |
Can you share the logs when running |
Great! That works. Didn't try this out at the beginning as I thought it didn't work for the other linux user. |
Windows user here. I'm getting the same error installing texture baker. I've ensured that the CUDA path is set in the environment variables. I've set use_cuda=1. I've deleted the build folder. I've manually created the build folder. I've tried powershell with admin rights. I've disabled my antivirus. I just can't get texture baker to install. Any ideas? Here's the log from the command prompt. D:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\stable-fast-3d>pip install -v ./texture_baker baker_kernel.cu [2/2] cl /showIncludes /nologo /O2 /W3 /GL /DNDEBUG /MD /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /wd4624 /wd4067 /wd4068 /EHsc -DTHRUST_IGNORE_CUB_VERSION_CHECK -IC:\Users\steve\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\include -IC:\Users\steve\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\steve\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\include\TH -IC:\Users\steve\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include" -IC:\Users\steve\AppData\Local\Programs\Python\Python311\include -IC:\Users\steve\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.41.34120\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" -c D:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\stable-fast-3d\texture_baker\texture_baker\csrc\baker.cpp /FoD:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\stable-fast-3d\texture_baker\build\temp.win-amd64-cpython-311\Release\texture_baker\csrc\baker.obj -O3 -fdiagnostics-color=always -fopenmp -march=native -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 /std:c++17 The above exception was the direct cause of the following exception: Traceback (most recent call last): × python setup.py bdist_wheel did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. This is -- a caller that pip uses to run setup.py- It imports setuptools before invoking setup.py, to enable projects that directlyimport from
|
@realstevewarner the logs you shared indicate an incompatible VS installation: You should install VS 2022. |
I have Visual Studio Community 2022 with the C++ option installed as well as Visual Studio Build Tools 2022. Is this not the correct version? |
It should be. |
It still fails when trying to build the wheel for texture_baker, but at least it gives me a different error than PowerShell. Here's the log. Seems to be a problem with torch? d:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\stable-fast-3d>pip install -r requirements.txt × python setup.py bdist_wheel did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. |
Hmm are you on python 3.11? Maybe try python 3.10 ? That's the python version I'm using. |
I have both 3.11 and 3.10 installed, but 3.11 was my default. I switched my environment variable over to 3.10 and confirmed in the x64 Native Tools Com Prompt for VS 2022 that it sees 3.10 as the default python. I then installed PyTorch, upgraded setuptools and installed wheel. It's still failing. Building wheels for collected packages: pynim, texture_baker, uv_unwrapper × python setup.py bdist_wheel did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. × Running setup.py install for texture_baker did not run successfully.
note: This error originates from a subprocess, and is likely not a problem with pip. × Encountered error while trying to install package. note: This is an issue with the package mentioned above, not pip. |
It looks like an issue with cl. I tried pip install cl but that gave me an error saying that python setup.py egg_info didn't run successfully. I looked that up and it said that it's probably an issue with setuptools or ez_setup. LOL. |
Hmm I'm stumped. It could be multiple environments conflicting. Perhaps you could try creating a fresh new venv Other than that, I don't know. Ideally it should detect the cl.exe installed on your system. Check to make sure |
Perhaps try running the x64 command line tools as admin just in case? |
I'll give those suggestions a try. Greatly appreciate your time and assistance. |
So I been trying so hard with this cuda backend problem, I intalled cuda 12.1, python 3.10, pytorch 2.4.0 and installed all the requirement without error, but when ever i run run.py this error popup
I was installing all the requirements in conda environment, can this be problem?
NotImplementedError: Could not run 'texture_baker_cpp::rasterize' with arguments from the 'CUDA' backend. This could be because the operator doesn't exist for this backend, or was omitted during the selective/custom build process (if using custom build). If you are a Facebook employee using PyTorch on mobile, please visit https://fburl.com/ptmfixes for possible resolutions. 'texture_baker_cpp::rasterize' is only available for these backends: [CPU, Meta, BackendSelect, Python, FuncTorchDynamicLayerBackMode, Functionalize, Named, Conjugate, Negative, ZeroTensor, ADInplaceOrView, AutogradOther, AutogradCPU, AutogradCUDA, AutogradXLA, AutogradMPS, AutogradXPU, AutogradHPU, AutogradLazy, AutogradMeta, Tracer, AutocastCPU, AutocastXPU, AutocastCUDA, FuncTorchBatched, BatchedNestedTensor, FuncTorchVmapMode, Batched, VmapMode, FuncTorchGradWrapper, PythonTLSSnapshot, FuncTorchDynamicLayerFrontMode, PreDispatch, PythonDispatcher].
The text was updated successfully, but these errors were encountered: