tianrun-chen / SAM-Adapter-PyTorch

Adapting Meta AI's Segment Anything to Downstream Tasks with Adapters and Prompts
MIT License
1k stars 89 forks source link

RuntimeError:CUDA out of memory. #64

Closed biyuefeng closed 8 months ago

biyuefeng commented 8 months ago

Hello. I am using a 4-card V100 for training, but there is not enough graphics memory. Is there any solution to this? The batch size has been set to 1, and the error is as follows:

![Uploading IMG20240118-101403146.jpeg…]()

biyuefeng commented 8 months ago

![Uploading 图片.png…]()

tianrun-chen commented 8 months ago

Hello, in our experience, at least 60Gb of memory is required for batch size =2. For example, NVIDIA A100 graphics card will meet the demand.

biyuefeng commented 8 months ago

I used a 4-card V100 for training, with a total of 128GB of graphics memory. After one iteration, the following error occurred: I'm not sure what the problem is, I look forward to your answer. Thank you!

人生海海海布里 @.***

 

------------------ 原始邮件 ------------------ 发件人: "tianrun-chen/SAM-Adapter-PyTorch" @.>; 发送时间: 2024年1月18日(星期四) 晚上7:01 @.>; @.**@.>; 主题: Re: [tianrun-chen/SAM-Adapter-PyTorch] RuntimeError:CUDA out of memory. (Issue #64)

Hello, in our experience, at least 60Gb of memory is required for batch size =2. For example, NVIDIA A100 graphics card will meet the demand.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>