mirror of
https://github.com/upscayl/upscayl.git
synced 2024-11-24 07:30:19 +01:00
Fix upscale above 32k
This commit is contained in:
parent
0a62f8a5df
commit
e729a2bea7
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "upscayl",
|
"name": "upscayl",
|
||||||
"version": "2.5.0",
|
"version": "2.5.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "upscayl",
|
"name": "upscayl",
|
||||||
"version": "2.5.0",
|
"version": "2.5.1",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"app-root-dir": "^1.0.2",
|
"app-root-dir": "^1.0.2",
|
||||||
|
@ -104,6 +104,31 @@ function LeftPaneImageSteps({
|
|||||||
logit("🔀 Setting model to", currentModel.value);
|
logit("🔀 Setting model to", currentModel.value);
|
||||||
}, [currentModel]);
|
}, [currentModel]);
|
||||||
|
|
||||||
|
const getUpscaleResolution = () => {
|
||||||
|
const newDimensions = {
|
||||||
|
width: dimensions.width,
|
||||||
|
height: dimensions.height,
|
||||||
|
};
|
||||||
|
if (doubleUpscayl) {
|
||||||
|
newDimensions.width = dimensions.width * 16;
|
||||||
|
newDimensions.height = dimensions.height * 16;
|
||||||
|
} else {
|
||||||
|
newDimensions.width = dimensions.width * 4;
|
||||||
|
newDimensions.height = dimensions.height * 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newDimensions.width > 32768) {
|
||||||
|
logit("🚫 Upscale width is too large, setting to a maximum of 32768px");
|
||||||
|
newDimensions.width = 32384;
|
||||||
|
}
|
||||||
|
if (newDimensions.height > 32768) {
|
||||||
|
logit("🚫 Upscale height is too large, setting to a maximum of 32768px");
|
||||||
|
newDimensions.height = 32384;
|
||||||
|
}
|
||||||
|
|
||||||
|
return newDimensions;
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="animate-step-in animate flex h-screen flex-col gap-7 overflow-y-auto p-5 overflow-x-hidden">
|
<div className="animate-step-in animate flex h-screen flex-col gap-7 overflow-y-auto p-5 overflow-x-hidden">
|
||||||
{/* BATCH OPTION */}
|
{/* BATCH OPTION */}
|
||||||
|
Loading…
Reference in New Issue
Block a user