threedle / text2mesh

3D mesh stylization driven by a text input in PyTorch
https://threedle.github.io/text2mesh/
MIT License
925 stars 129 forks source link

Error in Cell # 5 of Colab notebook #7

Open metaphorz opened 2 years ago

metaphorz commented 2 years ago

I took the jupyter notebook from a Kaggle notebook and it ran fine until cell 5. Here is the error:

Screen Shot 2022-01-06 at 11 56 38 AM
spalman commented 2 years ago

What is your PyTorch version? Try using 1.9.0 pip install torch==1.9.0

metaphorz commented 2 years ago

The default for Google Colab is: torch-1.10.0+cu111 so I installed 1.9.0 as suggested. I seem to get the same error: Traceback (most recent call last): File "main.py", line 3, in import kaolin.ops.mesh File "/usr/local/lib/python3.7/dist-packages/kaolin/init.py", line 1, in from . import io File "/usr/local/lib/python3.7/dist-packages/kaolin/io/init.py", line 5, in from . import render File "/usr/local/lib/python3.7/dist-packages/kaolin/io/render.py", line 8, in from ..render.camera import generate_perspective_projection File "/usr/local/lib/python3.7/dist-packages/kaolin/render/init.py", line 2, in from . import mesh File "/usr/local/lib/python3.7/dist-packages/kaolin/render/mesh/init.py", line 1, in from .utils import * File "/usr/local/lib/python3.7/dist-packages/kaolin/render/mesh/utils.py", line 21, in from ... import ops File "/usr/local/lib/python3.7/dist-packages/kaolin/ops/init.py", line 1, in from . import batch File "/usr/local/lib/python3.7/dist-packages/kaolin/ops/batch.py", line 16, in from kaolin import _C ImportError: /usr/local/lib/python3.7/dist-packages/kaolin/_C.so: undefined symbol: _ZNK2at10TensorBase8dataptrIdEEPT

rawwerks commented 2 years ago

I got the exact same error when trying to port from Kaggle to Colab.

For what it's worth, I also tried installing conda on the Colab instance and using "conda activate text2mesh" as instructed in the GitHub repo readme, which did not appear to load CLIP correctly:


Traceback (most recent call last):
  File "main.py", line 1, in <module>
    import clip
ModuleNotFoundError: No module named 'clip'
Chauban commented 2 years ago

I got the exact same error when trying to port from Kaggle to Colab.

For what it's worth, I also tried installing conda on the Colab instance and using "conda activate text2mesh" as instructed in the GitHub repo readme, which did not appear to load CLIP correctly:


Traceback (most recent call last):
  File "main.py", line 1, in <module>
    import clip
ModuleNotFoundError: No module named 'clip'

Did you solve this error please?

mfrashad commented 2 years ago

Hi I faced the same issue and managed to fix it by following the Kaolin docs on its installation. You can see my fix on #17 and here is my notebook .

First install a compatible pytorch, and cython version and other dependencies.

!pip install trimesh==3.9.33 einops==0.3.2 scipy==1.5.2 \
             siren-pytorch==0.1.5 usd-core==21.8 \
             torch==1.9.0 torchtext==0.10.0 torchvision==0.10.0 cython==0.29.20 \
             git+https://github.com/openai/CLIP.git@04f4dc2ca1ed0acc9893bd1a3b526a7e02c4bb10 \

Then install kaolin by doing this.

!git clone --recursive https://github.com/NVIDIAGameWorks/kaolin
%cd kaolin
!git checkout v0.10.0
!python setup.py develop
%cd ..
mothormothormothor commented 1 year ago

I have a Colab error with the first codeblock. The error only says

ERROR: Invalid requirement: '\'

no further information is given. I continued with the notebook and at somepoint CLIP is missing. Any suggestion on how to solve this ?