After running for a long time, due to the loading problem of the model, the GPU memory and memory footprint will continue to increase, which will lead to the emergence of OOM. Add manual release logic while avoiding repeated loading of the model as much as possible.
After running for a long time, due to the loading problem of the model, the GPU memory and memory footprint will continue to increase, which will lead to the emergence of OOM. Add manual release logic while avoiding repeated loading of the model as much as possible.
thanks for @PeakLee and his code: https://github.com/mrhan1993/Fooocus-API/issues/245#issuecomment-2007381687