Comments (6)
Hello, @zhilinli1! I'm here to help you with any bugs, questions, or contributions you have regarding Upscayl. Let's work together to resolve this issue!
The app says upscaling is done before the logs show 100% because the onClose
event is triggered when the upscaling process closes, not necessarily when the progress reaches 100%. This can result in the process being marked as complete and the notification being shown even if the progress bar hasn't reached 100%, leading to a broken image and the file not being saved correctly.
Here is the relevant code snippet:
const onClose = () => {
if (!mainWindow) return;
if (!failed && !stopped) {
logit("💯 Done upscaling");
upscayl.kill();
mainWindow.webContents.send(
COMMAND.FOLDER_UPSCAYL_DONE,
outputFolderPath,
);
if (!encounteredError) {
showNotification("Upscayled", "Images upscayled successfully!");
} else {
showNotification(
"Upscayled",
"Images were upscayled but encountered some errors!",
);
}
} else {
upscayl.kill();
}
};
The onClose
event handler is executed when the upscaling process closes, which might happen before the progress reaches 100%. Additionally, the window.electron.on(COMMAND.UPSCAYL_PROGRESS, ...)
event listener updates the progress state, but if the process closes prematurely, the progress might not reach 100%, causing the issue.
Here is the relevant part of the event listener:
window.electron.on(COMMAND.UPSCAYL_PROGRESS, (_, data: string) => {
if (data.length > 0 && data.length < 10) {
setProgress(data);
} else if (data includes "converting") {
setProgress("Scaling and converting image...");
} else if (data includes "Successful") {
setProgress("Upscayl Successful!");
}
handleErrors(data);
logit(`🚧 UPSCAYL_PROGRESS: `, data);
});
The progress state is updated based on the data received, but if the process closes before reaching 100%, the progress bar will not reflect the actual completion status [1][2][3].
To continue talking to Dosu, mention @dosu.
from upscayl.
To address the issue where Upscayl version 2.11.5 on Linux, running Windows 11 Pro for Workstations, 23H2, with an AMD Radeon 760M GPU, indicates that upscaling is done before the logs show 100%, resulting in a broken image and the file not being saved correctly, you can try the following fixes:
-
Set the app to performance mode: Follow the instructions here to set the app to performance mode.
-
DirectX repair: Try repairing DirectX by following the guide here.
-
Disable switchable graphics: If applicable, disable switchable graphics by following the instructions here.
-
Enable hardware-accelerated GPU scheduling: Enable hardware-accelerated GPU scheduling by following the guide here.
-
Reinstall graphics drivers: Before reinstalling, run VulkanCapsViewer to check for Vulkan support. If Vulkan support is confirmed, you might not need to reinstall the drivers.
-
Check Upscayl's internal logging and process handling: Ensure that the upscaling process is not prematurely terminated. The
imageUpscayl
function in Upscayl's codebase handles the upscaling process and logs progress. Make sure theonData
,onError
, andonClose
event handlers are correctly implemented to handle the process lifecycle and log progress accurately. Specifically, theonClose
event should only be triggered once the process is fully complete to avoid premature termination.
Additionally, you can monitor the progress and handle errors more effectively by leveraging the event listeners in Upscayl's codebase. For instance, the COMMAND.UPSCAYL_PROGRESS
event updates the progress and handles errors, ensuring that the process is accurately tracked. If the issue persists, consider checking the logs for any specific errors related to GPU or file read/write permissions, as these are common culprits [1][2][3].
To continue talking to Dosu, mention @dosu.
from upscayl.
@dosu is there a hack/fix for this?
from upscayl.
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.
from upscayl.
from upscayl.
I think it might be due to how the 780M is a mobile GPU. Try the workaround in the README.
from upscayl.
Related Issues (20)
- [BUG] Random UI Flickering HOT 7
- Add denoise setting HOT 1
- Install in Google Colab HOT 2
- [VULKAN] vkCreateInstance failed -9 HOT 3
- [BUG] File not saved HOT 2
- Denoise again ... HOT 1
- [VULKAN] vkEnumeratePhysicalDevices failed 5 HOT 4
- GPU is high on pc but Invalid GPU Device HOT 2
- The GPU NVIDIA Geforce GT730 seams not to work HOT 2
- [BUG] UTF-8 / Umlaut problem HOT 2
- [REQUEST] Option for default output folder HOT 1
- (Problem) The Flatpak version doesn't save the settings HOT 2
- (Bug) Crash on the second run of the Flatpak version HOT 2
- [FEATURE REQUEST][UI] Show active setting with green button HOT 1
- [FEATURE REQUEST] Support for AuraSR upscaling model. HOT 2
- Batch Select Folder Doesn't Show png files HOT 1
- GPU error or copy error HOT 2
- batch upscale HOT 6
- Batch Upscayle does not respect the JPEG setting HOT 3
- My upscayl just suddenly stopped working (INVALID GPU) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from upscayl.