marieai / marie-ai

Integrate AI-powered Document Analysis Pipelines
MIT License
57 stars 3 forks source link

Unable to segment document : CUDA out of memory. Tried to allocate 70.24 GiB #98

Closed gregbugaj closed 8 months ago

gregbugaj commented 8 months ago

Describe the bug Unable to segment document : CUDA out of memory. Tried to allocate 70.24 GiB

During image segmentation we are running out of memory due to images being very large ex (7000x9000) we need to limit this to a reasonable max page size like 8.5x11 or 11x8.5 (landscape)

Unable to segment document : CUDA out of memory. Tried to allocate 70.24 GiB. GPU 0 has a total capacity of 23.68 GiB of which 2.55 GiB is free. [12/20/23 17:50:53]
       Process 1932079 has 21.12 GiB memory in use. Of the allocated memory 19.20 GiB is allocated by PyTorch, and 390.95 MiB is reserved by PyTorch but                            
       unallocated. If reserved but unallocated memory is large try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management                      
       and PYTORCH_CUDA_ALLOC_CONF                                                                                                                            

refid : 192875933 192967096