From 9a77bd9140e9f4d3d8f032f59c39599020434dd9 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Tue, 13 Jun 2023 00:11:30 +1200 Subject: [PATCH] feat: Port IAISelect's to IAIMantineSelect's Ported everything except Model Manager selects and the Canvas Layer Select (this needs tooltip support) --- invokeai/frontend/web/src/app/constants.ts | 6 +-- .../common/components/IAIMantineSelect.tsx | 1 - .../src/features/canvas/store/canvasTypes.ts | 6 +-- .../parameters/ParamControlNetModel.tsx | 34 +++++--------- .../ParamControlNetProcessorSelect.tsx | 46 +++++++++---------- .../InfillAndScaling/ParamInfillMethod.tsx | 12 ++--- .../ParamScaleBeforeProcessing.tsx | 16 +++---- .../FaceRestore/FaceRestoreType.tsx | 11 ++--- .../Parameters/Upscale/UpscaleScale.tsx | 17 ++++--- .../SettingsModal/SettingsModal.tsx | 22 ++++----- 10 files changed, 75 insertions(+), 96 deletions(-) diff --git a/invokeai/frontend/web/src/app/constants.ts b/invokeai/frontend/web/src/app/constants.ts index 6700a732b3..c2e525ad7d 100644 --- a/invokeai/frontend/web/src/app/constants.ts +++ b/invokeai/frontend/web/src/app/constants.ts @@ -22,9 +22,9 @@ export const SCHEDULERS = [ export type Scheduler = (typeof SCHEDULERS)[number]; // Valid upscaling levels -export const UPSCALING_LEVELS: Array<{ key: string; value: number }> = [ - { key: '2x', value: 2 }, - { key: '4x', value: 4 }, +export const UPSCALING_LEVELS: Array<{ label: string; value: string }> = [ + { label: '2x', value: '2' }, + { label: '4x', value: '4' }, ]; export const NUMPY_RAND_MIN = 0; diff --git a/invokeai/frontend/web/src/common/components/IAIMantineSelect.tsx b/invokeai/frontend/web/src/common/components/IAIMantineSelect.tsx index 82b1042029..5b5659080e 100644 --- a/invokeai/frontend/web/src/common/components/IAIMantineSelect.tsx +++ b/invokeai/frontend/web/src/common/components/IAIMantineSelect.tsx @@ -9,7 +9,6 @@ const IAIMantineSelect = (props: IAISelectProps) => {