mirror of
https://github.com/upscayl/upscayl.git
synced 2025-01-31 04:03:51 +01:00
Fix #488
This commit is contained in:
parent
22df2a1908
commit
c3b124cba1
@ -47,7 +47,7 @@ const batchUpscayl = async (event, payload) => {
|
||||
scale = "4";
|
||||
}
|
||||
|
||||
outputDir += `_${model}_x${payload.scale}`;
|
||||
outputDir += slash + `upscayl_${model}_x${payload.scale}`;
|
||||
if (!fs.existsSync(outputDir)) {
|
||||
fs.mkdirSync(outputDir, { recursive: true });
|
||||
}
|
||||
|
@ -98,9 +98,18 @@ function SettingsTab({
|
||||
localStorage.setItem("model", JSON.stringify(modelOptions[0]));
|
||||
logit("🔀 Setting model to", modelOptions[0].value);
|
||||
} else {
|
||||
const currentlySavedModel = JSON.parse(
|
||||
let currentlySavedModel = JSON.parse(
|
||||
localStorage.getItem("model")
|
||||
) as (typeof modelOptions)[0];
|
||||
if (
|
||||
modelOptions.find(
|
||||
(model) => model.value === currentlySavedModel.value
|
||||
) === undefined
|
||||
) {
|
||||
localStorage.setItem("model", JSON.stringify(modelOptions[0]));
|
||||
logit("🔀 Setting model to", modelOptions[0].value);
|
||||
currentlySavedModel = modelOptions[0];
|
||||
}
|
||||
setCurrentModel(currentlySavedModel);
|
||||
setModel(currentlySavedModel.value);
|
||||
logit(
|
||||
|
@ -10,7 +10,9 @@ function ProgressBar({
|
||||
const [batchProgress, setBatchProgress] = React.useState(0);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (progress.includes("0.00%")) {
|
||||
const progressString = progress.replace(/\n/g, "");
|
||||
console.log({ progressString });
|
||||
if (progressString.length === 5 && progressString === "0.00%") {
|
||||
setBatchProgress((prev) => prev + 1);
|
||||
}
|
||||
}, [progress]);
|
||||
|
@ -293,7 +293,7 @@ const Home = () => {
|
||||
if (path !== null) {
|
||||
logit("🖼 Selected Folder Path: ", path);
|
||||
setBatchFolderPath(path);
|
||||
setOutputPath(path + "_upscayled");
|
||||
setOutputPath(path);
|
||||
} else {
|
||||
logit("🚫 Folder selection cancelled");
|
||||
setBatchFolderPath("");
|
||||
|
Loading…
x
Reference in New Issue
Block a user