1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-12-01 02:27:16 +01:00
upscayl/electron/utils.ts

24 lines
447 B
TypeScript
Raw Normal View History

2022-11-11 21:39:28 +01:00
import { spawn } from "child_process";
import { execPath } from "./binaries";
function upscaylImage(
inputFile: string,
outFile: string,
modelsPath: string,
model: string
) {
// UPSCALE
let upscayl = spawn(
execPath("realesrgan"),
["-i", inputFile, "-o", outFile, "-s", "4", "-m", modelsPath, "-n", model],
{
cwd: undefined,
detached: false,
}
);
return upscayl;
}
module.exports = { upscaylImage };