1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-27 17:00:52 +01:00

added real-sr models and a working executable

This commit is contained in:
TGS963 2022-09-01 08:34:33 +05:30
parent 6244b03888
commit cee6639332
13 changed files with 2030 additions and 3 deletions

View File

@ -125,11 +125,13 @@ ipcMain.on(commands.UPSCAYL, async (event, payload) => {
// UPSCALE
console.log("PRODUCTION? :", isDev);
console.log("EXEC: ", execPath);
console.log("MODEL: ", modelsPath + "/" + model)
if (fs.existsSync(outFile)) {
mainWindow.webContents.send(commands.UPSCAYL_DONE, outFile);
} else {
let upscayl = spawn(
execPath,
let upscayl = model.includes("realesrgan") ?
spawn(
execPath + '-realesrgan',
[
"-i",
inputDir + "/" + fullfileName,
@ -146,7 +148,26 @@ ipcMain.on(commands.UPSCAYL, async (event, payload) => {
cwd: null,
detached: false,
}
);
)
:
spawn(
execPath + '-realsr',
[
"-i",
inputDir + "/" + fullfileName,
"-o",
outFile,
"-s",
scale === 2 ? 4 : scale,
"-m",
modelsPath+ "/" + model,
],
{
cwd: null,
detached: false,
}
)
;
let failed = false;
upscayl.stderr.on("data", (stderr) => {

View File

@ -25,6 +25,8 @@ function LeftPaneSteps(props) {
>
<option value="realesrgan-x4plus">General Photo</option>
<option value="realesrgan-x4plus-anime">Digital Art</option>
<option value="models-DF2K">DF2K</option>
<option value="models-DF2K_JPEG">DF2K_JPEG</option>
</select>
</div>

View File

@ -1,4 +1,6 @@
import React from "react";
import Animated from "../public/loading.svg";
import Image from "next/image";
function ProgressBar(props) {
return (

View File

Binary file not shown.

View File

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.