fix(gui): split upscaling and face correction controls
This commit is contained in:
parent
7c5f9baeb7
commit
b8ffe3ffa8
|
@ -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));
|
||||||
|
|
|
@ -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}
|
||||||
|
|
Loading…
Reference in New Issue