Skip to content

Commit

Permalink
fix(gui): only send outscale when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Feb 6, 2023
1 parent 9f9736c commit 35445ff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gui/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,6 @@ export function appendModelToURL(url: URL, params: ModelParams) {
* Append the upscale parameters to an existing URL.
*/
export function appendUpscaleToURL(url: URL, upscale: UpscaleParams) {
url.searchParams.append('outscale', upscale.outscale.toFixed(FIXED_INTEGER));

if (upscale.enabled) {
url.searchParams.append('denoise', upscale.denoise.toFixed(FIXED_FLOAT));
url.searchParams.append('scale', upscale.scale.toFixed(FIXED_INTEGER));
Expand All @@ -308,6 +306,10 @@ export function appendUpscaleToURL(url: URL, upscale: UpscaleParams) {
url.searchParams.append('faces', String(upscale.faces));
url.searchParams.append('faceStrength', upscale.faceStrength.toFixed(FIXED_FLOAT));
}

if (upscale.enabled || upscale.faces) {
url.searchParams.append('outscale', upscale.outscale.toFixed(FIXED_INTEGER));
}
}

/**
Expand Down

0 comments on commit 35445ff

Please sign in to comment.