mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Merge branch 'main' into feat/ui/consistent-param-layout
This commit is contained in:
@ -1,8 +1,12 @@
|
||||
import { DIFFUSERS_SCHEDULERS } from 'app/constants';
|
||||
import {
|
||||
DIFFUSERS_SCHEDULERS,
|
||||
IMG2IMG_DIFFUSERS_SCHEDULERS,
|
||||
} from 'app/constants';
|
||||
import { RootState } from 'app/store/store';
|
||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||
import IAISelect from 'common/components/IAISelect';
|
||||
import { setSampler } from 'features/parameters/store/generationSlice';
|
||||
import { activeTabNameSelector } from 'features/ui/store/uiSelectors';
|
||||
import { ChangeEvent, memo, useCallback } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@ -10,6 +14,9 @@ const ParamSampler = () => {
|
||||
const sampler = useAppSelector(
|
||||
(state: RootState) => state.generation.sampler
|
||||
);
|
||||
|
||||
const activeTabName = useAppSelector(activeTabNameSelector);
|
||||
|
||||
const dispatch = useAppDispatch();
|
||||
const { t } = useTranslation();
|
||||
|
||||
@ -23,7 +30,11 @@ const ParamSampler = () => {
|
||||
label={t('parameters.sampler')}
|
||||
value={sampler}
|
||||
onChange={handleChange}
|
||||
validValues={DIFFUSERS_SCHEDULERS}
|
||||
validValues={
|
||||
activeTabName === 'img2img' || activeTabName == 'unifiedCanvas'
|
||||
? IMG2IMG_DIFFUSERS_SCHEDULERS
|
||||
: DIFFUSERS_SCHEDULERS
|
||||
}
|
||||
minWidth={36}
|
||||
/>
|
||||
);
|
||||
|
@ -51,7 +51,7 @@ export const initialGenerationState: GenerationState = {
|
||||
perlin: 0,
|
||||
prompt: '',
|
||||
negativePrompt: '',
|
||||
sampler: 'k_lms',
|
||||
sampler: 'lms',
|
||||
seamBlur: 16,
|
||||
seamSize: 96,
|
||||
seamSteps: 30,
|
||||
|
Reference in New Issue
Block a user