jhc13 / taggui

Tag manager and captioner for image datasets
GNU General Public License v3.0
692 stars 32 forks source link

PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True #188

Open geroldmeisinger opened 3 months ago

geroldmeisinger commented 3 months ago

if I don't set it I get OOM:

torch.cuda.OutOfMemoryError: CUDA out of memory.
Tried to allocate 20.00 MiB. GPU 0 has a total capacity of 4.00 GiB of which 2.35 GiB is free.
Of the allocated memory 825.15 MiB is allocated by PyTorch, and 24.85 MiB 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

shouldn't it be activated by default?