1
0
Fork 0

fix(gui): split upscaling and face correction controls

This commit is contained in:
Sean Sube 2023-02-05 16:15:15 -06:00
parent 7c5f9baeb7
commit b8ffe3ffa8
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
2 changed files with 3 additions and 4 deletions

View File

@ -291,7 +291,7 @@ export function appendModelToURL(url: URL, params: ModelParams) {
* Append the upscale parameters to an existing URL. * Append the upscale parameters to an existing URL.
*/ */
export function appendUpscaleToURL(url: URL, upscale: UpscaleParams) { export function appendUpscaleToURL(url: URL, upscale: UpscaleParams) {
if (upscale.enabled) { if (upscale.enabled || upscale.faces) {
url.searchParams.append('denoise', upscale.denoise.toFixed(FIXED_FLOAT)); url.searchParams.append('denoise', upscale.denoise.toFixed(FIXED_FLOAT));
url.searchParams.append('faces', String(upscale.faces)); url.searchParams.append('faces', String(upscale.faces));
url.searchParams.append('scale', upscale.scale.toFixed(FIXED_INTEGER)); url.searchParams.append('scale', upscale.scale.toFixed(FIXED_INTEGER));

View File

@ -70,8 +70,7 @@ export function UpscaleControl() {
<FormControlLabel <FormControlLabel
label='Face Correction' label='Face Correction'
control={<Checkbox control={<Checkbox
disabled={upscale.enabled === false} checked={upscale.faces}
checked={upscale.enabled && upscale.faces}
value='check' value='check'
onChange={(event) => { onChange={(event) => {
setUpscale({ setUpscale({
@ -83,7 +82,7 @@ export function UpscaleControl() {
<NumericField <NumericField
label='Strength' label='Strength'
decimal decimal
disabled={upscale.enabled === false || upscale.faces === false} disabled={upscale.faces === false}
min={params.faceStrength.min} min={params.faceStrength.min}
max={params.faceStrength.max} max={params.faceStrength.max}
step={params.faceStrength.step} step={params.faceStrength.step}