Cuda Out of Memory with Esrgan

Hey guys!
I’m quite new with Python and Pytorch but installed it all through tutorials.
I use Esrgan in combination with image ImageEnhancingUtility.
Because I want to upscale my old cartoons!
Every worked fine but since a few days ago I got the Runtime Error

I’m really a noob in Python that’s why I ask you guys to help!

Your current code is trying to allocate too much memory and is thus raising this error.
Did you change anything in the model, such as the spatial size of the input or the batch size?

A workaround is to reduce the memory usage so that the workload can fit in your 6GB GPU e.g. by reducing the batch size or by using torch.utils.checkpoint to trade compute for memory.