MedARC-AI / fMRI-reconstruction-NSD

fMRI-to-image reconstruction on the NSD dataset.
MIT License
294 stars 39 forks source link

CUDA out of memory. #25

Closed zhibotian closed 11 months ago

zhibotian commented 1 year ago

Hello, I met the torch. Cuda. OutOfMemoryError: cuda out of memory. For this problem, my GPU is RTX 3090 with 24G memory, but the above error still occurs when I try to reduce the batchsize to 2. May I ask how to solve this problem and run the code normally.

PaulScotti commented 12 months ago

One possibility would be to lower h=4096 to a lower number to reduce the total parameter count and get things to fit on your gpu. Another would be to train solely the retrieval pipeline and not the full retrieval + diffusion prior. We haven't tried adapting the code at all to work on lower specs than 1 A100 40GB gpu.

mkmohangb commented 11 months ago

To run the Reconstruction notebook needed around 28GB of GPU RAM.

zhibotian commented 11 months ago

Thanks.