diff --git a/invokeai/frontend/web/src/features/controlAdapters/store/controlAdaptersSlice.ts b/invokeai/frontend/web/src/features/controlAdapters/store/controlAdaptersSlice.ts index 0c1ac20200..f8afde677c 100644 --- a/invokeai/frontend/web/src/features/controlAdapters/store/controlAdaptersSlice.ts +++ b/invokeai/frontend/web/src/features/controlAdapters/store/controlAdaptersSlice.ts @@ -1,5 +1,5 @@ import type { PayloadAction, Update } from '@reduxjs/toolkit'; -import { createEntityAdapter, createSlice, isAnyOf } from '@reduxjs/toolkit'; +import { createEntityAdapter, createSlice } from '@reduxjs/toolkit'; import { getSelectorsOptions } from 'app/store/createMemoizedSelector'; import type { PersistConfig, RootState } from 'app/store/store'; import { deepClone } from 'common/util/deepClone'; @@ -481,8 +481,6 @@ export const { t2iAdaptersReset, } = controlAdaptersSlice.actions; -export const isAnyControlAdapterAdded = isAnyOf(controlAdapterAdded, controlAdapterRecalled); - export const selectControlAdaptersSlice = (state: RootState) => state.controlAdapters; /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ diff --git a/invokeai/frontend/web/src/features/controlLayers/store/controlLayersSlice.ts b/invokeai/frontend/web/src/features/controlLayers/store/controlLayersSlice.ts index 13b6188692..5ab7b87ba0 100644 --- a/invokeai/frontend/web/src/features/controlLayers/store/controlLayersSlice.ts +++ b/invokeai/frontend/web/src/features/controlLayers/store/controlLayersSlice.ts @@ -88,7 +88,7 @@ export const selectIPALayerOrThrow = (state: ControlLayersState, layerId: string assert(isIPAdapterLayer(layer)); return layer; }; -export const selectCAOrIPALayerOrThrow = ( +const selectCAOrIPALayerOrThrow = ( state: ControlLayersState, layerId: string ): ControlAdapterLayer | IPAdapterLayer => { @@ -96,7 +96,7 @@ export const selectCAOrIPALayerOrThrow = ( assert(isControlAdapterLayer(layer) || isIPAdapterLayer(layer)); return layer; }; -export const selectRGLayerOrThrow = (state: ControlLayersState, layerId: string): RegionalGuidanceLayer => { +const selectRGLayerOrThrow = (state: ControlLayersState, layerId: string): RegionalGuidanceLayer => { const layer = state.layers.find((l) => l.id === layerId); assert(isRegionalGuidanceLayer(layer)); return layer; @@ -348,19 +348,6 @@ export const controlLayersSlice = createSlice({ const layer = selectIPALayerOrThrow(state, layerId); layer.ipAdapter.image = imageDTO ? imageDTOToImageWithDims(imageDTO) : null; }, - ipaLayerWeightChanged: (state, action: PayloadAction<{ layerId: string; weight: number }>) => { - const { layerId, weight } = action.payload; - const layer = selectIPALayerOrThrow(state, layerId); - layer.ipAdapter.weight = weight; - }, - ipaLayerBeginEndStepPctChanged: ( - state, - action: PayloadAction<{ layerId: string; beginEndStepPct: [number, number] }> - ) => { - const { layerId, beginEndStepPct } = action.payload; - const layer = selectIPALayerOrThrow(state, layerId); - layer.ipAdapter.beginEndStepPct = beginEndStepPct; - }, ipaLayerMethodChanged: (state, action: PayloadAction<{ layerId: string; method: IPMethod }>) => { const { layerId, method } = action.payload; const layer = selectIPALayerOrThrow(state, layerId); @@ -744,8 +731,6 @@ export const { // IPA Layers ipaLayerAdded, ipaLayerImageChanged, - ipaLayerWeightChanged, - ipaLayerBeginEndStepPctChanged, ipaLayerMethodChanged, ipaLayerModelChanged, ipaLayerCLIPVisionModelChanged, diff --git a/invokeai/frontend/web/src/features/controlLayers/store/types.ts b/invokeai/frontend/web/src/features/controlLayers/store/types.ts index 241c8f2f84..a4d88f3a0a 100644 --- a/invokeai/frontend/web/src/features/controlLayers/store/types.ts +++ b/invokeai/frontend/web/src/features/controlLayers/store/types.ts @@ -1,4 +1,4 @@ -import type { ControlNetConfig, IPAdapterConfig,T2IAdapterConfig } from 'features/controlLayers/util/controlAdapters'; +import type { ControlNetConfig, IPAdapterConfig, T2IAdapterConfig } from 'features/controlLayers/util/controlAdapters'; import type { AspectRatioState } from 'features/parameters/components/ImageSize/types'; import type { ParameterAutoNegative, diff --git a/invokeai/frontend/web/src/features/controlLayers/util/controlAdapters.ts b/invokeai/frontend/web/src/features/controlLayers/util/controlAdapters.ts index ba10510ba7..4b756b33e7 100644 --- a/invokeai/frontend/web/src/features/controlLayers/util/controlAdapters.ts +++ b/invokeai/frontend/web/src/features/controlLayers/util/controlAdapters.ts @@ -46,7 +46,7 @@ export type DepthAnythingProcessorConfig = Required< Pick >; export type HedProcessorConfig = Required>; -export type LineartAnimeProcessorConfig = Required>; +type LineartAnimeProcessorConfig = Required>; export type LineartProcessorConfig = Required>; export type MediapipeFaceProcessorConfig = Required< Pick @@ -55,12 +55,12 @@ export type MidasDepthProcessorConfig = Required< Pick >; export type MlsdProcessorConfig = Required>; -export type NormalbaeProcessorConfig = Required>; +type NormalbaeProcessorConfig = Required>; export type DWOpenposeProcessorConfig = Required< Pick >; export type PidiProcessorConfig = Required>; -export type ZoeDepthProcessorConfig = Required>; +type ZoeDepthProcessorConfig = Required>; export type ProcessorConfig = | CannyProcessorConfig @@ -132,7 +132,7 @@ export type IPAdapterConfig = { beginEndStepPct: [number, number]; }; -export const zProcessorType = z.enum([ +const zProcessorType = z.enum([ 'canny_image_processor', 'color_map_image_processor', 'content_shuffle_image_processor', @@ -405,7 +405,7 @@ export const CONTROLNET_PROCESSORS: CAProcessorsData = { }, }; -export const initialControlNet: Omit = { +const initialControlNet: Omit = { type: 'controlnet', model: null, weight: 1, @@ -417,7 +417,7 @@ export const initialControlNet: Omit = { processorConfig: CONTROLNET_PROCESSORS.canny_image_processor.buildDefaults(), }; -export const initialT2IAdapter: Omit = { +const initialT2IAdapter: Omit = { type: 't2i_adapter', model: null, weight: 1, @@ -428,7 +428,7 @@ export const initialT2IAdapter: Omit = { processorConfig: CONTROLNET_PROCESSORS.canny_image_processor.buildDefaults(), }; -export const initialIPAdapter: Omit = { +const initialIPAdapter: Omit = { type: 'ip_adapter', image: null, model: null,