Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High memory usage when upscaling a lot of images #832

Open
2 tasks done
ToniLipponen opened this issue May 17, 2024 · 8 comments
Open
2 tasks done

High memory usage when upscaling a lot of images #832

ToniLipponen opened this issue May 17, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@ToniLipponen
Copy link

Checklist

Describe the Bug

When upscaling many images, the memory usage keeps climbing higher and higher until the OS runs out of memory.

To Reproduce

Batch upscale a lot of images and watch the memory usage.

Upscayl Version (or commit hash)

2.11.0

Platform

Linux

OS Version

Arch Linux

GPU Name

Nvidia RTX 2070

Expected Behavior

I think memory should be freed at some point during batch upscaling.

Screenshots

No response

Logs

-
@ToniLipponen ToniLipponen added the bug Something isn't working label May 17, 2024
@NayamAmarshe
Copy link
Member

How high is it? You didn't mention.

@jasonsansone
Copy link

Depends on size of source image, whether jpg or png, etc. I found I have to work on batches of less than 150 images to avoid OOM kills. This is on LXC containers with 4-6GB memory. Regardless of the amount of memory, the usage just steadily climbs until OOM unless you cap the batch size. Memory is never freed until the entire process completes.

@ToniLipponen
Copy link
Author

How high is it? You didn't mention.

If I'm upscaling a lot of images, say a thousand, the memory usage can go as high as 10Gb or higher.

@ToniLipponen
Copy link
Author

Depends on size of source image, whether jpg or png, etc. I found I have to work on batches of less than 150 images to avoid OOM kills. This is on LXC containers with 4-6GB memory. Regardless of the amount of memory, the usage just steadily climbs until OOM unless you cap the batch size. Memory is never freed until the entire process completes.

So is this by design? I would have thought once an image in the batch is upscaled, the memory should be freed.

@jasonsansone
Copy link

I don’t know. I am not a developer. I was sharing my experiences, similar to yours. I agree that this seems to be a memory leak.

@TGS963
Copy link
Member

TGS963 commented May 23, 2024

Thanks for reporting this, we'll investigate this

@EZaplata
Copy link

Same here on version 2.11 using RX 7900 xt on Endevour OS with Mesa drivers.

I have hit 28gb of RAM usage after processing 4900 images (1920x1080 PNG, no up scaling just re processing using realesr-animveviodev3-x4).

With such a high number another thing that can happen is the progress count goes out of sync as it will freeze up. Minor thing but I though I will bring that up as well.

@vakarian92
Copy link

I'm having the same issue, trying to convert more than 1000 images. I'm on Windows with version 2.11.0. I see usage reaching almost 30GB and then crashing (I've got 32). Interesting enough, it happens with both GUI and CLI version upscayl-ncnn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants