Yuqifan1117 / Labal-Anything-Pipeline

Baby-DALL3: Annotation anything in visual tasks and Generate anything just all in one-pipeline with GPT-4 (a small baby of DALL·E 3).
82 stars 3 forks source link

RuntimeError: No CUDA GPUs are available when annotations executed #5

Closed burgosmad closed 1 year ago

burgosmad commented 1 year ago

Hi, Im trying to run the code but, when running bash annotation.sh it is showing RuntimeError: No CUDA GPUs are available. However, when I check if thats true it doesnt seem to coincide. Any idea?

`Python 3.10.11 (main, Apr 20 2023, 19:02:41) [GCC 11.2.0] on linux Type "help", "copyright", "credits" or "license" for more information.

import torch print(torch.cuda.is_available()) True print(torch.cuda.get_device_name()) Quadro RTX 4000 print(torch.version) 1.13.0 print(torch.version.cuda) 11.7 x=torch.rand(1).cuda() print(x) tensor([0.9740], device='cuda:0') x=torch.rand(1).to("cuda") print(x) tensor([0.5562], device='cuda:0') torch._C._cuda_init() `

The RunTime Error is: (LAP) a0621@a0621:/media/a0621/HDD1T/Labal-Anything-Pipeline$ bash annotation.sh /home/a0621/anaconda3/envs/LAP/lib/python3.10/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at /opt/conda/conda-bld/pytorch_1666642969563/work/aten/src/ATen/native/TensorShape.cpp:3190.) return _VF.meshgrid(tensors, kwargs) # type: ignore[attr-defined] final text_encoder_type: bert-base-uncased Some weights of the model checkpoint at bert-base-uncased were not used when initializing BertModel: ['cls.predictions.bias', 'cls.predictions.transform.dense.bias', 'cls.seq_relationship.bias', 'cls.predictions.transform.LayerNorm.weight', 'cls.predictions.transform.dense.weight', 'cls.seq_relationship.weight', 'cls.predictions.transform.LayerNorm.bias']

Yuqifan1117 commented 1 year ago

Because you only have one cuda in your environment, however I use export CUDA_VISIBLE_DEVICES=1 in the bash. You can set the export CUDA_VISIBLE_DEVICES=0 instead of export CUDA_VISIBLE_DEVICES=1.

burgosmad commented 1 year ago

Thank you very much!