From c1f9a129fa47b1e1800ef178c4f059322bed482e Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 16 Jun 2024 11:44:56 +1000 Subject: [PATCH] refactor(ui): fix misc types --- invokeai/frontend/web/src/app/types/invokeai.ts | 2 +- .../src/features/queue/components/QueueButtonTooltip.tsx | 7 ++----- .../system/components/SettingsModal/SettingsModal.tsx | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/invokeai/frontend/web/src/app/types/invokeai.ts b/invokeai/frontend/web/src/app/types/invokeai.ts index 4d54485f61..4268bc5411 100644 --- a/invokeai/frontend/web/src/app/types/invokeai.ts +++ b/invokeai/frontend/web/src/app/types/invokeai.ts @@ -83,7 +83,7 @@ export type AppConfig = { sd: { defaultModel?: string; disabledControlNetModels: string[]; - disabledControlNetProcessors: ProcessorTypeV2; + disabledControlNetProcessors: ProcessorTypeV2[]; // Core parameters iterations: NumericalParameterConfig; width: NumericalParameterConfig; // initial value comes from model diff --git a/invokeai/frontend/web/src/features/queue/components/QueueButtonTooltip.tsx b/invokeai/frontend/web/src/features/queue/components/QueueButtonTooltip.tsx index 5d6badaefd..fe44e55025 100644 --- a/invokeai/frontend/web/src/features/queue/components/QueueButtonTooltip.tsx +++ b/invokeai/frontend/web/src/features/queue/components/QueueButtonTooltip.tsx @@ -11,11 +11,8 @@ import { useTranslation } from 'react-i18next'; import { useEnqueueBatchMutation } from 'services/api/endpoints/queue'; import { useBoardName } from 'services/api/hooks/useBoardName'; -const selectPromptsCount = createSelector( - selectCanvasV2Slice, - selectDynamicPromptsSlice, - (controlLayers, dynamicPrompts) => - getShouldProcessPrompt(canvasV2.positivePrompt) ? dynamicPrompts.prompts.length : 1 +const selectPromptsCount = createSelector(selectCanvasV2Slice, selectDynamicPromptsSlice, (canvasV2, dynamicPrompts) => + getShouldProcessPrompt(canvasV2.params.positivePrompt) ? dynamicPrompts.prompts.length : 1 ); type Props = { diff --git a/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsModal.tsx b/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsModal.tsx index 60269ad64b..1853183c9b 100644 --- a/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsModal.tsx +++ b/invokeai/frontend/web/src/features/system/components/SettingsModal/SettingsModal.tsx @@ -19,7 +19,7 @@ import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { InformationalPopover } from 'common/components/InformationalPopover/InformationalPopover'; import ScrollableContent from 'common/components/OverlayScrollbars/ScrollableContent'; import { useClearStorage } from 'common/hooks/useClearStorage'; -import { shouldUseCpuNoiseChanged } from 'features/canvas/store/canvasSlice'; +import { shouldUseCpuNoiseChanged } from 'features/controlLayers/store/canvasV2Slice'; import { useClearIntermediates } from 'features/system/components/SettingsModal/useClearIntermediates'; import { StickyScrollable } from 'features/system/components/StickyScrollable'; import {