From e06ba40795d97dcbfe40465ad4a65a59670a7d79 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 31 May 2023 21:07:36 +1000 Subject: [PATCH] fix(ui): do not allow `dpmpp_2s` to be used ever it doesn't work for the img2img pipelines, but the implemented conditional display could break the scheduler selection dropdown. simple fix until diffusers merges the fix - never use this scheduler. --- .../Parameters/Core/ParamScheduler.tsx | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/invokeai/frontend/web/src/features/parameters/components/Parameters/Core/ParamScheduler.tsx b/invokeai/frontend/web/src/features/parameters/components/Parameters/Core/ParamScheduler.tsx index 5b6b07803a..f4413c4cf6 100644 --- a/invokeai/frontend/web/src/features/parameters/components/Parameters/Core/ParamScheduler.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/Parameters/Core/ParamScheduler.tsx @@ -5,21 +5,18 @@ import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions'; import IAICustomSelect from 'common/components/IAICustomSelect'; import { generationSelector } from 'features/parameters/store/generationSelectors'; import { setScheduler } from 'features/parameters/store/generationSlice'; -import { - activeTabNameSelector, - uiSelector, -} from 'features/ui/store/uiSelectors'; +import { uiSelector } from 'features/ui/store/uiSelectors'; import { memo, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; const selector = createSelector( - [uiSelector, generationSelector, activeTabNameSelector], - (ui, generation, activeTabName) => { - const allSchedulers = ['img2img', 'unifiedCanvas'].includes(activeTabName) - ? ui.schedulers.filter((scheduler) => { - return !['dpmpp_2s'].includes(scheduler); - }) - : ui.schedulers; + [uiSelector, generationSelector], + (ui, generation) => { + // TODO: DPMSolverSinglestepScheduler is fixed in https://github.com/huggingface/diffusers/pull/3413 + // but we need to wait for the next release before removing this special handling. + const allSchedulers = ui.schedulers.filter((scheduler) => { + return !['dpmpp_2s'].includes(scheduler); + }); return { scheduler: generation.scheduler,