I tried to run large model and then base model, but they both only return "cuda ouf of memory" error. On top of that they are not freeing taken memory and not resetting segmentation process, so I have to restart both server and interface to recover from error.
How to make it work without error?
I've added code that prints an error message, clears the cache, and returns from the function if a CUDA out-of-memory error occurs during SAM generation.
I tried to run large model and then base model, but they both only return "cuda ouf of memory" error. On top of that they are not freeing taken memory and not resetting segmentation process, so I have to restart both server and interface to recover from error. How to make it work without error?