CyberAgentAILab / layout-dm

LayoutDM: Discrete Diffusion Model for Controllable Layout Generation [Inoue+, CVPR2023]
https://cyberagentailab.github.io/layout-dm
Apache License 2.0
225 stars 24 forks source link

error due to run train.sh #14

Closed kietbg0079 closed 1 year ago

kietbg0079 commented 1 year ago

I got this error when run the demo command in Readme file (train.sh and test). Please help me to fix it. Thank you a lot

File "/home/acworks/anaconda3/envs/layoutdm/lib/python3.7/site-packages/torch_geometric/data/data.py", line 20, in from torch_sparse import SparseTensor File "/home/acworks/anaconda3/envs/layoutdm/lib/python3.7/site-packages/torch_sparse/init.py", line 19, in torch.ops.load_library(spec.origin) File "/home/acworks/anaconda3/envs/layoutdm/lib/python3.7/site-packages/torch/_ops.py", line 110, in load_library ctypes.CDLL(path) File "/home/acworks/anaconda3/envs/layoutdm/lib/python3.7/ctypes/init.py", line 364, in init self._handle = _dlopen(self._name, mode) OSError: libcusparse.so.11: cannot open shared object file: No such file or directory

naoto0804 commented 1 year ago

Hi, thank you for visiting our repo! Did you fix the problem?

kietbg0079 commented 1 year ago

I fix by using export LD_LIBRARY_PATH='path-to-anacoda/envs/your-conda-env/lib' But it only works when I run file (e.g train.sh, test.py, main.py) in the terminal. When I run notebook (demo.ipynb) it failed with the same problem.

I follow the solution from the same issue in here: [pyg-team/pytorch_geometric/issues/2040]

I try to set the path to lib by adding the following code to notebook:

import os import sys os.environ['LD_LIBRARY_PATH'] = 'path-to-anacoda/envs/your-conda-env/lib' sys.path.append('path-to-anacoda/envs/your-conda-env/lib')

And: Add export LD_LIBRARY_PATH='path-to-anacoda/envs/your-conda-env/lib' to .bashrc file

Finally, I restart the session then it work