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.
*/
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('faces', String(upscale.faces));
url.searchParams.append('scale', upscale.scale.toFixed(FIXED_INTEGER));

View File

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