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.
This commit is contained in:
psychedelicious 2023-05-31 21:07:36 +10:00
parent 6571e4c2fd
commit e06ba40795

View File

@ -5,21 +5,18 @@ import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
import IAICustomSelect from 'common/components/IAICustomSelect'; import IAICustomSelect from 'common/components/IAICustomSelect';
import { generationSelector } from 'features/parameters/store/generationSelectors'; import { generationSelector } from 'features/parameters/store/generationSelectors';
import { setScheduler } from 'features/parameters/store/generationSlice'; import { setScheduler } from 'features/parameters/store/generationSlice';
import { import { uiSelector } from 'features/ui/store/uiSelectors';
activeTabNameSelector,
uiSelector,
} from 'features/ui/store/uiSelectors';
import { memo, useCallback } from 'react'; import { memo, useCallback } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
const selector = createSelector( const selector = createSelector(
[uiSelector, generationSelector, activeTabNameSelector], [uiSelector, generationSelector],
(ui, generation, activeTabName) => { (ui, generation) => {
const allSchedulers = ['img2img', 'unifiedCanvas'].includes(activeTabName) // TODO: DPMSolverSinglestepScheduler is fixed in https://github.com/huggingface/diffusers/pull/3413
? ui.schedulers.filter((scheduler) => { // but we need to wait for the next release before removing this special handling.
return !['dpmpp_2s'].includes(scheduler); const allSchedulers = ui.schedulers.filter((scheduler) => {
}) return !['dpmpp_2s'].includes(scheduler);
: ui.schedulers; });
return { return {
scheduler: generation.scheduler, scheduler: generation.scheduler,