-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[BUG][MEMORY LIMIT] Upscayl fails when upscaling large image #493
Comments
You can disable post processing for large images in the settings tab. As for the image not being processed, I'd have to test it myself to debug it. |
you can cut the big image with smaller tiles, upcale tiles and rebuild the final picture |
It probably wouldn’t be continuous |
Yes I know !
You can modify this as you want and optimize it, but this is one of my ideas 😉 |
I'm not sure what you mean, what are A and B tiles? Also, regular upscayling still works properly, it's just that post-processing (adding original image metadata) doesn't work. |
Are you sure that this problem is caused by a large image or low memory? During the running of Upscayl on this image, my machine doesn't appear to exceed 60% capacity. What's for sure is that a 51 Mb image shouldn't be considered large anymore. The latest iPhone, iPhone 15, images are about this size. |
The issue you linked about memory is different. That one has |
The image is available on Google Drive:
|
I am also having this problem. I run into it either by manually running upscayl on a file that I've already run upscayl on, and also when trying to do a double upscayl at one time. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still happening, please reply to indicate so. |
This problem reproduces with version 2.9.5. |
Ok. And it can still be reproduced with post-processing disabled? |
When processing with post-processing disabled, no error occurs. Unfortunately, no output is generated. The split-screen previewer is displayed with the original input photo on the left side of the viewer. There is no image on the right side. The XXX_upscayl_4x_ultrasharp.png image is not generated in the directory. There is no error in the LOGS. |
That’s very weird. We’ll try to reproduce it |
Reproduction successful. Mine stopped at 90.55% instead of 76.25% though. @NayamAmarshe Any ideas? |
Could it be an issue with the ncnn binary? @TGS963 |
I'll need to test it out to know for sure |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still happening, please reply to indicate so. |
The nature of this problem has changed. With the latest update, image processing completes. There is no output file, however. |
Yeah we're looking into it. It seems to be an issue that needs to be fixed in ncnn repository. |
This problem still reproduces with 2.9.9. Processing completes, but no output is produced. |
I suppose we'll have to put a limit on the images that you can Upscayl. 61 Mb is quite a large picture already. I'm not sure if Upscayl's processing adds too much to it when you can just scale using the regular algorithms. I guess the only real way is to put it in JPG or WebP, reduce the size, and then process it. |
Is there a technical reason why larger pictures cannot be scaled larger? For example, upscaly doesn't appear to be running out of resources such as memory or disk. It doesn't appear to be timing out. What is the underlying source of the failure? Is there a function that is failing based on the large size? If so, what is the cause, and how can it be fixed? Could the upscale operation be successful but the output write operation be failing? Without knowing the technical reason that upscaling is failing, it is difficult to come to the conclusion that 50 M images cannot be scaled. 50 M pictures are no longer particularly large. The Apple iPhone produces pictures that are that large. The new Hasselblad 100C camera produces 100 M pictures that are twice that size. I will note that processing has become considerably slower following the update to 2.9.9. |
I am having same issue, small images are fine but upscaling a 8000x6000 pixel photo doesnt work. GPU acceleration enabled, high preformance setting for upscayl and it still fails. Logs: 🐞 BACKEND REPORTED: 💾 Updating Save Output Folder: false
⚙️ Getting saveImageAs from localStorage: jpg
⚙️ Getting model from localStorage: {"label":"Digital Art","value":"realesrgan-x4plus-anime"}
⚙️ Setting gpuId to empty string
🔀 Setting model to
🔀 Setting model to realesrgan-x4plus-anime
🔄 Resetting image paths
⤵️ Dropped file: {"type":"image/png","filePath":"C:\\Users\\Jeremy2024\\Desktop\\mat 1\\default-cloudy-dark-purple-alcohol-water-color-ink-wallpaper-1-zvt6m0ut_XU8MM54E.png","extension":"png"}
🖼 Setting image path: C:\Users\Jeremy2024\Desktop\mat 1\default-cloudy-dark-purple-alcohol-water-color-ink-wallpaper-1-zvt6m0ut_XU8MM54E.png
🗂 Setting output path: C:\Users\Jeremy2024\Desktop\mat 1
🖼 imagePath: C:\Users\Jeremy2024\Desktop\mat 1\default-cloudy-dark-purple-alcohol-water-color-ink-wallpaper-1-zvt6m0ut_XU8MM54E.png
🔤 Extension: png
⚙️ Getting saveImageAs from localStorage: jpg
⚙️ Getting model from localStorage: {"label":"Digital Art","value":"realesrgan-x4plus-anime"}
⚙️ Setting gpuId to empty string
⚙️ Getting rememberOutputFolder from localStorage: false
⚙️ Getting saveImageAs from localStorage: jpg
⚙️ Getting model from localStorage: {"label":"Digital Art","value":"realesrgan-x4plus-anime"}
⚙️ Setting gpuId to empty string
🔀 Setting model to
🔀 Setting model to realesrgan-x4plus-anime
🔄 Resetting Upscaled Image Path
🏁 UPSCAYL
🐞 BACKEND REPORTED: 🖼️ Updating No Image Processing: false
🐞 BACKEND REPORTED: 📐 Updating Compression: 0
🐞 BACKEND REPORTED: Is Default Model? : true
🐞 BACKEND REPORTED: ✅ Upscayl Variables: {"model":"realesrgan-x4plus-anime","gpuId":null,"saveImageAs":"jpg","inputDir":"C:\\Users\\Jeremy2024\\Desktop\\mat 1","outputDir":"C:\\Users\\Jeremy2024\\Desktop\\mat 1","fullfileName":"default-cloudy-dark-purple-alcohol-water-color-ink-wallpaper-1-zvt6m0ut_XU8MM54E.png","fileName":"default-cloudy-dark-purple-alcohol-water-color-ink-wallpaper-1-zvt6m0ut_XU8MM54E","initialScale":"4","desiredScale":"2","outFile":"C:\\Users\\Jeremy2024\\Desktop\\mat 1\\default-cloudy-dark-purple-alcohol-water-color-ink-wallpaper-1-zvt6m0ut_XU8MM54E_upscayl_2x_realesrgan-x4plus-anime.jpg","compression":0}
🐞 BACKEND REPORTED: 📢 Upscayl Command: -i,C:\Users\Jeremy2024\Desktop\mat 1\default-cloudy-dark-purple-alcohol-water-color-ink-wallpaper-1-zvt6m0ut_XU8MM54E.png,-o,C:\Users\Jeremy2024\Desktop\mat 1\default-cloudy-dark-purple-alcohol-water-color-ink-wallpaper-1-zvt6m0ut_XU8MM54E_upscayl_2x_realesrgan-x4plus-anime.jpg,-s,4,-m,D:\SecondaryProgramFolder\Upscayl\resources\models,-n,realesrgan-x4plus-anime,-f,jpg
🐞 BACKEND REPORTED: 👶 Updating Child Processes: {"binary":"D:\\SecondaryProgramFolder\\Upscayl\\resources\\bin\\upscayl-bin","args":["D:\\SecondaryProgramFolder\\Upscayl\\resources\\bin\\upscayl-bin","-i","C:\\Users\\Jeremy2024\\Desktop\\mat 1\\default-cloudy-dark-purple-alcohol-water-color-ink-wallpaper-1-zvt6m0ut_XU8MM54E.png","-o","C:\\Users\\Jeremy2024\\Desktop\\mat 1\\default-cloudy-dark-purple-alcohol-water-color-ink-wallpaper-1-zvt6m0ut_XU8MM54E_upscayl_2x_realesrgan-x4plus-anime.jpg","-s","4","-m","D:\\SecondaryProgramFolder\\Upscayl\\resources\\models","-n","realesrgan-x4plus-anime","-f","jpg"]}
🐞 BACKEND REPORTED: 🛑 Updating Stopped: false
🐞 BACKEND REPORTED: image upscayl: [0 NVIDIA GeForce RTX 3070] queueC=2[8] queueG=0[16] queueT=1[2]
[0 NVIDIA GeForce RTX 3070] bugsbn1=0 bugbilz=0 bugcopc=0 bugihfa=0
[0 NVIDIA GeForce RTX 3070] fp16-p/s/a=1/1/1 int8-p/s/a=1/1/1
[0 NVIDIA GeForce RTX 3070] subgroup=32 basic=1 vote=1 ballot=1 shuffle=1
🚧 UPSCAYL_PROGRESS: [0 NVIDIA GeForce RTX 3070] queueC=2[8] queueG=0[16] queueT=1[2]
[0 NVIDIA GeForce RTX 3070] bugsbn1=0 bugbilz=0 bugcopc=0 bugihfa=0
[0 NVIDIA GeForce RTX 3070] fp16-p/s/a=1/1/1 int8-p/s/a=1/1/1
[0 NVIDIA GeForce RTX 3070] subgroup=32 basic=1 vote=1 ballot=1 shuffle=1 |
This problem reproduces with version 2.10.0. Processing begins normally, but at about 90% complete, processing stops. There is no error message, and no output has been created. |
I'm facing this issue with relatively small input images (10-15MB JPG): Upscale takes a long time and when finally reaches 100%, no output file is produced. It works fine for smaller inputs like 3-7MB JPG, and 3-7MB PNG. Tested on a MacBook Air M1 (2020), macOS Sonoma 14.4.1. |
The official limit is around 6500x6500. Anything above that could potentially cause the binary to crash. |
If the original reproduction image is cropped to 6500x6500, Upscayl succeeds. There is no split screen display, however. The crop loses about 20% of the image when cropped. Is the 6500x6500 limit built in, and can the limit be increased allowing larger images to be processed? |
It varies according to the hardware sometimes but I found that 6500x6500 is the usual limit. You could try downsizing to 6500 pixels in width. |
This problem reproduces with version 2.11.0. |
Checklist
Paste the logs
Describe the Bug
When attempting to run Upscayl on the image "C:\Projects\Greece2023\Aphrodite statue on Milos.jpg" an error occurs and no upscaled image is produced. Upscayl displays a popup message that indicates that there is an error:
Error processing (scaling and converting) the image. Please report this error on Upscayl GitHub issues page.
The percentage completion counter is just above 90% when the dialog is displayed.
I am using Upscayl 2.8.6.
Attempts to upscale the same image in earlier versions lead to the filing of issue #439. That issue was closed as a memory allocation problem. The image in question is a 51M byte image. The image is too large to upload to github, but could be transferred in other ways if need be.
My GPU seems to operate at about the 58% level, It has 11Gb of memory of which only about 4.3 Gb is used. My machine has 64Gb of memory an memory usage is about 59%
To Reproduce
From the GUI, select the image to be upscaled followed by clicking on the purple UPSCAYL button.
Version/Commit Hash
2.8.6
OS Specifics
Windows 10, Version2H2 (OS Build 19045.3324)
Expected Behavior
The image should have upscaled and a new upscaled image written to the source directory.
Screenshots
No response
The text was updated successfully, but these errors were encountered: