Closed silicongarage closed 3 months ago
Hello, @silicongarage! I'm here to help you with any bugs, questions, or contributions you have for the Upscayl repository. Let me know how I can assist you!
Upscayl is retaining the previous cached version of an input image because the imagePath
and upscaledImagePath
states are not being reset properly. The resetImagePaths
function, which is responsible for resetting these paths, might not be called in the right places or at the right times.
Here is the relevant code snippet for the resetImagePaths
function:
const resetImagePaths = () => {
logit("🔄 Resetting image paths");
setDimensions({
width: null,
height: null,
});
setProgress("");
setImagePath("");
setUpscaledImagePath("");
setBatchFolderPath("");
setUpscaledBatchFolderPath("");
};
To ensure that the paths are reset when an image is reloaded, you should call resetImagePaths
in the appropriate place in your code where the image reload logic is handled [1].
To continue talking to Dosu, mention @dosu.
We do not delete original images, ever. It's better to be safe than sorry.
Maybe add a user option that allows re-use of the same file name?
I'm using Upscayl in a photo-editing workflow. I will make image changes in the photo-editor, export a .png
, Upscayl that file and look at results. Then back into the editor with more changes to the original file, exporting it again and then going through the same Upscayl process. My work flow would create dozens and dozens of intermediate export files if I have to change the name every time I want to Upscayl.
You should be using output folders and enable overwrite option in settings.
As said above, this is intentional behavior that you can ignore by enabling the overwrite option.
Checklist
Describe the Bug
Upscayl is retaining the previous cached version of an input image. When the input image has been edited after an upscale, trying to load the new version (same file name) retains the older image. Same behavior if I reset image or not.
To Reproduce
Create an image
Select image
Upscayl
Edit the original image
Reset Upscayl
Select edited image
Previous image retained
Upscayl Version (or commit hash)
2.11.5
Platform
Mac DMG / Homebrew
OS Version
macOS 14.6.1
GPU Name
macbook M2 pro
Expected Behavior
Correct version of input file should be loaded.
Screenshots
No response
Logs