-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Min Memory requirement? #93
Comments
maybe you can try smaller model_type such as 'vit_l' |
What batch size did you use? |
I haved encountered the same problem. |
@realVegetable - What batch size and model do you use? |
@cpuhrsch - all models run well including "vit_h" "vit_l" "vit_b" . I just use the "SamAutomaticMaskGenerator" , and I don't change any params except the model, so the batch size is default. |
@realVegetable - Can you give the following snippet a shot
In particular you can adjust Thank you |
@cpuhrsch - It didn't work. Using vit_h model and vit_b model, I set process_batch_size=8, but still failed with OutOfMemoryError.
|
Hm, can you try |
Hello,
I am unable to run the code on GTX 4070 with 12GB memory. I get the following error:
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 1024.00 MiB. GPU 0 has a total capacity of 11.73 GiB of which 285.94 MiB is free. Process 4646 has 298.61 MiB memory in use. Including non-PyTorch memory, this process has 10.81 GiB memory in use. Of the allocated memory 8.91 GiB is allocated by PyTorch, and 1.67 GiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
Is there a way to reduce the memory requirement?
Thanks.
The text was updated successfully, but these errors were encountered: