From 026ac36b0631e2f665333de0f3112d0b11388ee9 Mon Sep 17 00:00:00 2001 From: chainchompa Date: Wed, 28 Aug 2024 09:44:08 -0400 Subject: [PATCH] Revert "added selectedStylePreset to preload presets when app loads" This reverts commit e97fd85904e32ebe0a35cc66e75f010970e7dc63. --- invokeai/frontend/web/src/app/components/App.tsx | 16 +--------------- .../web/src/app/components/InvokeAIUI.tsx | 3 --- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/invokeai/frontend/web/src/app/components/App.tsx b/invokeai/frontend/web/src/app/components/App.tsx index c7c623488e..41f3d97051 100644 --- a/invokeai/frontend/web/src/app/components/App.tsx +++ b/invokeai/frontend/web/src/app/components/App.tsx @@ -14,7 +14,6 @@ import DeleteImageModal from 'features/deleteImageModal/components/DeleteImageMo import { DynamicPromptsModal } from 'features/dynamicPrompts/components/DynamicPromptsPreviewModal'; import { useStarterModelsToast } from 'features/modelManagerV2/hooks/useStarterModelsToast'; import { StylePresetModal } from 'features/stylePresets/components/StylePresetForm/StylePresetModal'; -import { activeStylePresetIdChanged } from 'features/stylePresets/store/stylePresetSlice'; import { configChanged } from 'features/system/store/configSlice'; import { languageSelector } from 'features/system/store/systemSelectors'; import InvokeTabs from 'features/ui/components/InvokeTabs'; @@ -40,17 +39,10 @@ interface Props { action: 'sendToImg2Img' | 'sendToCanvas' | 'useAllParameters'; }; selectedWorkflowId?: string; - selectedStylePresetId?: string; destination?: InvokeTabName | undefined; } -const App = ({ - config = DEFAULT_CONFIG, - selectedImage, - selectedWorkflowId, - selectedStylePresetId, - destination, -}: Props) => { +const App = ({ config = DEFAULT_CONFIG, selectedImage, selectedWorkflowId, destination }: Props) => { const language = useAppSelector(languageSelector); const logger = useLogger('system'); const dispatch = useAppDispatch(); @@ -89,12 +81,6 @@ const App = ({ } }, [selectedWorkflowId, getAndLoadWorkflow]); - useEffect(() => { - if (selectedStylePresetId) { - dispatch(activeStylePresetIdChanged(selectedStylePresetId)); - } - }, [dispatch, selectedStylePresetId]); - useEffect(() => { if (destination) { dispatch(setActiveTab(destination)); diff --git a/invokeai/frontend/web/src/app/components/InvokeAIUI.tsx b/invokeai/frontend/web/src/app/components/InvokeAIUI.tsx index a17620cae4..5804902408 100644 --- a/invokeai/frontend/web/src/app/components/InvokeAIUI.tsx +++ b/invokeai/frontend/web/src/app/components/InvokeAIUI.tsx @@ -45,7 +45,6 @@ interface Props extends PropsWithChildren { action: 'sendToImg2Img' | 'sendToCanvas' | 'useAllParameters'; }; selectedWorkflowId?: string; - selectedStylePresetId?: string; destination?: InvokeTabName; customStarUi?: CustomStarUi; socketOptions?: Partial; @@ -67,7 +66,6 @@ const InvokeAIUI = ({ queueId, selectedImage, selectedWorkflowId, - selectedStylePresetId, destination, customStarUi, socketOptions, @@ -229,7 +227,6 @@ const InvokeAIUI = ({ config={config} selectedImage={selectedImage} selectedWorkflowId={selectedWorkflowId} - selectedStylePresetId={selectedStylePresetId} destination={destination} />