mirror of
https://github.com/upscayl/upscayl.git
synced 2025-02-20 20:51:49 +01:00
Fix compression
This commit is contained in:
parent
f034381a92
commit
21cfd29d2e
@ -24,3 +24,5 @@ export const noImageProcessingAtom = atomWithStorage<boolean>(
|
||||
"noImageProcessing",
|
||||
false
|
||||
);
|
||||
|
||||
export const compressionAtom = atomWithStorage<number>("compression", 0);
|
||||
|
@ -15,9 +15,6 @@ export function CompressionInput({
|
||||
EXPERIMENTAL
|
||||
</p>
|
||||
</div>
|
||||
<p className="text-xs text-base-content/80">
|
||||
Please restart the app after changing this setting.
|
||||
</p>
|
||||
<input
|
||||
type="range"
|
||||
placeholder="Type here"
|
||||
|
@ -143,17 +143,6 @@ function SettingsTab({
|
||||
currentlySavedRememberOutputFolder === "true" ? true : false
|
||||
);
|
||||
}
|
||||
|
||||
if (!localStorage.getItem("compression")) {
|
||||
logit("⚙️ Setting compression to 100%");
|
||||
localStorage.setItem("compression", JSON.stringify(compression));
|
||||
} else {
|
||||
const currentlySavedCompression = localStorage.getItem("compression");
|
||||
logit("⚙️ Getting compression from localStorage", compression);
|
||||
if (currentlySavedCompression) {
|
||||
setCompression(JSON.parse(currentlySavedCompression));
|
||||
}
|
||||
}
|
||||
}, []);
|
||||
|
||||
// HANDLERS
|
||||
@ -164,7 +153,6 @@ function SettingsTab({
|
||||
|
||||
const handleCompressionChange = (e) => {
|
||||
setCompression(e.target.value);
|
||||
localStorage.setItem("compression", e.target.value);
|
||||
};
|
||||
|
||||
const handleGpuIdChange = (e) => {
|
||||
|
@ -15,6 +15,7 @@ import { logAtom } from "../atoms/logAtom";
|
||||
import { modelsListAtom } from "../atoms/modelsListAtom";
|
||||
import {
|
||||
batchModeAtom,
|
||||
compressionAtom,
|
||||
dontShowCloudModalAtom,
|
||||
noImageProcessingAtom,
|
||||
outputPathAtom,
|
||||
@ -42,7 +43,6 @@ const Home = () => {
|
||||
const [overwrite, setOverwrite] = useState(false);
|
||||
const [upscaledBatchFolderPath, setUpscaledBatchFolderPath] = useState("");
|
||||
const [doubleUpscaylCounter, setDoubleUpscaylCounter] = useState(0);
|
||||
const [compression, setCompression] = useState(0);
|
||||
const [gpuId, setGpuId] = useState("");
|
||||
const [saveImageAs, setSaveImageAs] = useState("png");
|
||||
const [zoomAmount, setZoomAmount] = useState("100%");
|
||||
@ -57,6 +57,7 @@ const Home = () => {
|
||||
|
||||
// ATOMIC STATES
|
||||
const [outputPath, setOutputPath] = useAtom(outputPathAtom);
|
||||
const [compression, setCompression] = useAtom(compressionAtom);
|
||||
const [progress, setProgress] = useAtom(progressAtom);
|
||||
const [batchMode, setBatchMode] = useAtom(batchModeAtom);
|
||||
const [logData, setLogData] = useAtom(logAtom);
|
||||
|
Loading…
x
Reference in New Issue
Block a user