kijai / ComfyUI-SUPIR

SUPIR upscaling wrapper for ComfyUI
Other
1.2k stars 66 forks source link

Allocation on device 0 would exceed allowed memory. (out of memory) #102

Open liuzhao6322 opened 2 months ago

liuzhao6322 commented 2 months ago

Allocation on device 0 would exceed allowed memory. (out of memory) Currently allocated : 23.05 GiB Requested : 25.00 MiB Device limit : 23.99 GiB Free (according to CUDA): 0 bytes PyTorch limit (set by user-supplied memory fraction) : 17179869184.00 GiB

input image 1024 * 1024, scale_by 4

liuzhao6322 commented 2 months ago

rtx4090D

kijai commented 2 months ago

That's just too big, you'd need to use the Tiled samplers.

kakui008 commented 1 month ago

I encountered the same problem, probably due to the upscaling algorithm used in high-resolution restoration. The larger the image, the more memory usage you will have. When I don't use these functions everything goes back to normal, at least this is what I can currently way of solving the problem. I don't recommend you use a resolution higher than 1024.