1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-23 23:21:05 +01:00

updated ultrasharp model

This commit is contained in:
TGS963 2023-04-29 23:30:39 +05:30
parent c7ec54fb5b
commit 5f1579327f
3 changed files with 1007 additions and 1393 deletions

View File

@ -82,12 +82,12 @@ const Home = () => {
data.includes("encode")
? "ENCODING ERROR => "
: "DECODING ERROR => " +
"This image is possibly corrupt or not supported by Upscayl, or your GPU drivers are acting funny (Did you check if your GPU is compatible and drivers are alright?). You could try converting the image into another format and upscaling again. Also make sure that the output path is correct and you have the proper write permissions for the directory. If not, then unfortuantely there's not much we can do to help, sorry."
"This image is possibly corrupt or not supported by Upscayl. You could try converting the image into another format and upscaling again. Otherwise, make sure that the output path is correct and you have the proper write permissions for the directory. If not, then unfortuantely this image is not supported by Upscayl, sorry."
);
resetImagePaths();
} else if (data.includes("uncaughtException")) {
alert(
"Upscayl encountered an error. Possibly, the upscayl binary failed to execute the commands properly. Try checking the logs to see if you get any information. You can post an issue on Upscayl's GitHub repository for more help."
"Upscayl encountered an error. Possibly, the upscayl binary failed to execute the commands properly. Try launching Upscayl using commandline through Terminal and see if you get any information. You can post an issue on Upscayl's GitHub repository for more help."
);
resetImagePaths();
}
@ -139,16 +139,14 @@ const Home = () => {
// UPSCAYL DONE
window.electron.on(commands.UPSCAYL_DONE, (_, data: string) => {
if (progress === "") return;
setProgress("");
setUpscaledImagePath(data);
console.log("upscaledImagePath: ", upscaledImagePath);
console.log("upscaledImagePath: ", upscaledImagePath)
addToLog(data);
});
// FOLDER UPSCAYL DONE
window.electron.on(commands.FOLDER_UPSCAYL_DONE, (_, data: string) => {
if (progress === "") return;
setProgress("");
setUpscaledBatchFolderPath(data);
addToLog(data);
@ -156,7 +154,6 @@ const Home = () => {
// DOUBLE UPSCAYL DONE
window.electron.on(commands.DOUBLE_UPSCAYL_DONE, (_, data: string) => {
if (progress === "") return;
setProgress("");
setDoubleUpscaylCounter(0);
setUpscaledImagePath(data);
@ -479,15 +476,7 @@ const Home = () => {
const stopHandler = () => {
window.electron.send(commands.STOP);
resetImagePaths();
};
const formatPath = (path) => {
//USE REGEX TO GET THE FILENAME AND ENCODE IT INTO PROPER FORM IN ORDER TO AVOID ERRORS DUE TO SPECIAL CHARACTERS
return path.replace(
/([^/\\]+)$/i,
encodeURIComponent(path.match(/[^/\\]+$/i)[0])
);
};
}
const allowedFileTypes = ["png", "jpg", "jpeg", "webp"];
const allowedVideoFileTypes = ["webm", "mp4", "mkv"];
@ -628,11 +617,7 @@ const Home = () => {
<img
src={
"file://" +
`${
upscaledImagePath
? formatPath(upscaledImagePath)
: formatPath(imagePath)
}`
`${upscaledImagePath ? upscaledImagePath : imagePath}`
}
onLoad={(e: any) => {
setDimensions({
@ -689,7 +674,7 @@ const Home = () => {
</p>
<img
src={"file:///" + formatPath(imagePath)}
src={"file://" + imagePath}
alt="Original"
onMouseMove={handleMouseMove}
style={{
@ -707,7 +692,7 @@ const Home = () => {
Upscayled
</p>
<img
src={"file://" + formatPath(upscaledImagePath)}
src={"file://" + upscaledImagePath}
alt="Upscayl"
style={{
objectFit: "contain",

Binary file not shown.

File diff suppressed because it is too large Load Diff