-
Notifications
You must be signed in to change notification settings - Fork 453
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
module 'torchmcubes_module' has no attribute 'mcubes_cuda' #3
Comments
#1 could be related. |
tried that, no dice
|
could this help? |
I think the current |
i hope the tripo team can fix it :( |
I found a tricky way.. You can turn to Modify the code in models/isosurface.py
|
@Daniel9D @chrisbward @yuhuangyue Are you using a virtual environment? Which kind of virtual environment are you using (virtualenv / venv)? |
Could you please try setting up the environment with |
i create venv in pycharm, how to do that? |
Try to clone except RuntimeError as e:
print(e) Then try |
where is the setup.py |
hhhh, that works indeed |
In torchmcubes that you cloned locally in the first step. |
I managed to make it work, basically you need to use the same version of CUDA with pytorch because So, to make it all work you need:
Otherwise |
Thanks mate this works as well for me to pass trought that error! |
Can u give a detailed step by step tutorial with commands?! |
No, it's probably quite different between distros and setting GCC version isn't trivial due to the way it's packaged. If you don't know how to do all that you better use the hack above to run the library on CPU. |
-> conda what @rkfg did has solved for me, using pytorch 2 with CUDA 11.8 on conda and machine |
I was just able to build torchmcubes on windows 11 through torch 2.2.1+cu121. I have MSVC2019 installed, and used their x64 Native Tools Command Prompt. Clone torchmcubes somewhere else, then from that dir while in your venv do the following. If you don't get a message about CUDA environment not found, check that 'set CUDA_PATH' is pointing to your local install. pip uninstall torchmcubes The problem I ran into was that it kept falling back to CPU so the build failed. My problem was that I didn't have the CUDNN binaries installed, though I thought I had done that a while back. So I simply unpacked the cudnn files into my local cuda install dir. |
Indeed, it works with CUDA 12.1. My problem was with GCC, it's a long-standing issue in pybind:
This is what happens with GCC/G++ 12. After downgrading to v11 I can build |
@rkfg I don't know whose idea at ubuntu it was to change the gcc version just a month back - new ubuntu 24.04 drop in a few weeks. |
@johndpope yes, it's pretty painful because it's not easy to switch between GCC versions by default and every build system has a different way to detect/override it. Worse, no one even cared enough to register these using |
Yes- I use timeshift to recover from cuda breaking. It will recover just your system leaving files / docs intact. has saved me countless days - (when they make this change - video driver breaks - cuda breaks etc) it was only when I compared the file changes that I cottened on to this gcc change under the hood. just throw in a spare drive and point the backups to it. https://github.com/linuxmint/timeshift |
Hi everyone. This problem is due to that torchmcubes is compiled without CUDA support. To fix this issue, please first make sure that
Then re-install pip uninstall torchmcubes
pip install git+https://github.com/tatsy/torchmcubes.git I've updated this information in the README. Have fun playing with TripoSR! |
It is also possible to use https://github.com/pmneila/PyMCubes Simply change
to
in |
Great! it`s working...
|
Traceback (most recent call last):
File "D:\3d\TripoSR\run.py", line 154, in
meshes = model.extract_mesh(scene_codes)
File "D:\3d\TripoSR\tsr\system.py", line 185, in extract_mesh
v_pos, t_pos_idx = self.isosurface_helper(-(density - threshold))
File "D:\3d\TripoSR\env\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\3d\TripoSR\env\lib\site-packages\torch\nn\modules\module.py", line 1520, in call_impl
return forward_call(*args, **kwargs)
File "D:\3d\TripoSR\tsr\models\isosurface.py", line 45, in forward
v_pos, t_pos_idx = self.mc_func(level.detach(), 0.0)
File "D:\3d\TripoSR\env\lib\site-packages\torchmcubes_init.py", line 12, in marching_cubes
return mc.mcubes_cuda(vol, thresh)
AttributeError: module 'torchmcubes_module' has no attribute 'mcubes_cuda'. Did you mean: 'mcubes_cpu'?
tried to re-install and still getting error,using windows
The text was updated successfully, but these errors were encountered: