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

addressed GPU selection bug as mentioned in issue #302

This commit is contained in:
TGS963 2023-05-12 19:24:35 +05:30
parent 0573b6e8a0
commit 9432be1cc8
2 changed files with 24 additions and 6 deletions

View File

@ -461,6 +461,8 @@ ipcMain.on(commands.DOUBLE_UPSCAYL, async (event, payload) => {
logit
);
childProcesses.push(upscayl2);
upscayl2.process.stderr.on("data", onData2);
@ -522,6 +524,16 @@ ipcMain.on(commands.UPSCAYL, async (event, payload) => {
logit
);
console.log("BRUH: " + getSingleImageArguments(
inputDir,
fullfileName,
outFile,
isDefaultModel ? modelsPath : customModelsFolderPath ?? modelsPath,
model,
scale,
gpuId,
saveImageAs
))
childProcesses.push(upscayl);
stopped = false;

View File

@ -22,7 +22,8 @@ export const getSingleImageArguments = (
modelsPath,
"-n",
model,
gpuId ? `-g ${gpuId}` : "",
gpuId ? "-g" : "",
gpuId ? gpuId : "",
"-f",
saveImageAs,
];
@ -48,7 +49,8 @@ export const getSingleImageSharpenArguments = (
"-x",
"-m",
modelsPath + slash + model,
gpuId ? `-g ${gpuId}` : "",
gpuId ? "-g" : "",
gpuId ? gpuId : "",
"-f",
saveImageAs,
];
@ -75,7 +77,8 @@ export const getDoubleUpscaleArguments = (
modelsPath,
"-n",
model,
gpuId ? `-g ${gpuId}` : "",
gpuId ? "-g" : "",
gpuId ? gpuId : "",
"-f",
saveImageAs,
];
@ -101,7 +104,8 @@ export const getDoubleUpscaleSecondPassArguments = (
modelsPath,
"-n",
model,
gpuId ? `-g ${gpuId}` : "",
gpuId ? "-g" : "",
gpuId ? gpuId : "",
"-f",
isAlpha ? "" : saveImageAs,
];
@ -127,7 +131,8 @@ export const getBatchArguments = (
modelsPath,
"-n",
model,
gpuId ? `-g ${gpuId}` : "",
gpuId ? "-g" : "",
gpuId ? gpuId : "",
"-f",
saveImageAs,
];
@ -153,7 +158,8 @@ export const getBatchSharpenArguments = (
"-x",
"-m",
modelsPath + slash + model,
gpuId ? `-g ${gpuId}` : "",
gpuId ? "-g" : "",
gpuId ? gpuId : "",
"-f",
saveImageAs,
];