mbzuai-oryx / XrayGPT

[BIONLP@ACL 2024] XrayGPT: Chest Radiographs Summarization using Medical Vision-Language Models.
469 stars 56 forks source link

try it on local machine #22

Open self-deceiver opened 7 months ago

self-deceiver commented 7 months ago

When I run the demo.py following the README,I met the problem as below: Traceback (most recent call last): File "E:\XrayGPT-main\demo.py", line 60, in model = model_cls.from_config(model_config).to('cuda:{}'.format(args.gpu_id)) File "E:\envs\xraygpt\lib\site-packages\torch\nn\modules\module.py", line 1160, in to return self._apply(convert) File "E:\envs\xraygpt\lib\site-packages\torch\nn\modules\module.py", line 810, in _apply module._apply(fn) File "E:\envs\xraygpt\lib\site-packages\torch\nn\modules\module.py", line 810, in _apply module._apply(fn) File "E:\envs\xraygpt\lib\site-packages\torch\nn\modules\module.py", line 810, in _apply module._apply(fn) [Previous line repeated 3 more times] File "E:\envs\xraygpt\lib\site-packages\torch\nn\modules\module.py", line 833, in _apply param_applied = fn(param) File "E:\envs\xraygpt\lib\site-packages\torch\nn\modules\module.py", line 1158, in convert return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking) NotImplementedError: Cannot copy out of meta tensor; no data!

My GPU is RTX2060, I hope to know if the reason I meet the problem is the memory of gpu is not enough. I would be appreciated if any help is given.

Dubhe-forever commented 2 weeks ago

Have you solved this problem?My GPU is RTX4070, I also met the same Error!

self-deceiver commented 2 weeks ago

Have you solved this problem?My GPU is RTX4070, I also met the same Error!

I changed to RTX4090, and it works. I'm not sure if 4070'memory is enough, but I'm sure my problem is caused by lack of memory.