Skip to content

Commit

Permalink
fix(gui): split upscaling and face correction controls
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Feb 5, 2023
1 parent 7c5f9ba commit b8ffe3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gui/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
5 changes: 2 additions & 3 deletions gui/src/components/control/UpscaleControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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}
Expand Down

0 comments on commit b8ffe3f

Please sign in to comment.