diff --git a/electron/commands/image-upscayl.ts b/electron/commands/image-upscayl.ts index f479572..12ba4c3 100644 --- a/electron/commands/image-upscayl.ts +++ b/electron/commands/image-upscayl.ts @@ -67,7 +67,7 @@ const imageUpscayl = async (event, payload) => { slash + fileName + "_upscayl_" + - desiredScale + + (noImageProcessing ? initialScale : desiredScale) + "x_" + model + "." + diff --git a/renderer/components/upscayl-tab/config/LeftPaneImageSteps.tsx b/renderer/components/upscayl-tab/config/LeftPaneImageSteps.tsx index a08c6fa..2a3d179 100644 --- a/renderer/components/upscayl-tab/config/LeftPaneImageSteps.tsx +++ b/renderer/components/upscayl-tab/config/LeftPaneImageSteps.tsx @@ -5,7 +5,10 @@ import { Tooltip } from "react-tooltip"; import { themeChange } from "theme-change"; import { modelsListAtom } from "../../../atoms/modelsListAtom"; import useLog from "../../hooks/useLog"; -import { scaleAtom } from "../../../atoms/userSettingsAtom"; +import { + noImageProcessingAtom, + scaleAtom, +} from "../../../atoms/userSettingsAtom"; interface IProps { progress: string; @@ -57,6 +60,7 @@ function LeftPaneImageSteps({ const modelOptions = useAtomValue(modelsListAtom); const scale = useAtomValue(scaleAtom); + const noImageProcessing = useAtomValue(noImageProcessingAtom); const { logit } = useLog(); @@ -112,8 +116,21 @@ function LeftPaneImageSteps({ height: dimensions.height, }; - const doubleScale = parseInt(scale) * parseInt(scale); - const singleScale = parseInt(scale); + let doubleScale = parseInt(scale) * parseInt(scale); + let singleScale = parseInt(scale); + + if (noImageProcessing) { + let initialScale = 4; + if (currentModel.value.includes("x2")) { + initialScale = 2; + } else if (currentModel.value.includes("x3")) { + initialScale = 3; + } else { + initialScale = 4; + } + doubleScale = initialScale * initialScale; + singleScale = initialScale; + } if (doubleUpscayl) { const newWidth = dimensions.width * doubleScale;