mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat: Use Labels for Schedulers
This commit is contained in:
parent
dae5b9b259
commit
be8c0bb952
@ -2,24 +2,24 @@ import { SelectItem } from '@mantine/core';
|
||||
|
||||
// TODO: use Enums?
|
||||
export const SCHEDULERS: SelectItem[] = [
|
||||
{ label: 'euler', value: 'euler', group: 'Standard' },
|
||||
{ label: 'deis', value: 'deis', group: 'Standard' },
|
||||
{ label: 'ddim', value: 'ddim', group: 'Standard' },
|
||||
{ label: 'ddpm', value: 'ddpm', group: 'Standard' },
|
||||
{ label: 'dpmpp_2s', value: 'dpmpp_2s', group: 'Standard' },
|
||||
{ label: 'dpmpp_2m', value: 'dpmpp_2m', group: 'Standard' },
|
||||
{ label: 'heun', value: 'heun', group: 'Standard' },
|
||||
{ label: 'kdpm_2', value: 'kdpm_2', group: 'Standard' },
|
||||
{ label: 'lms', value: 'lms', group: 'Standard' },
|
||||
{ label: 'pndm', value: 'pndm', group: 'Standard' },
|
||||
{ label: 'unipc', value: 'unipc', group: 'Standard' },
|
||||
{ label: 'euler_k', value: 'euler_k', group: 'Karras' },
|
||||
{ label: 'dpmpp_2s_k', value: 'dpmpp_2s_k', group: 'Karras' },
|
||||
{ label: 'dpmpp_2m_k', value: 'dpmpp_2m_k', group: 'Karras' },
|
||||
{ label: 'heun_k', value: 'heun_k', group: 'Karras' },
|
||||
{ label: 'lms_k', value: 'lms_k', group: 'Karras' },
|
||||
{ label: 'euler_a', value: 'euler_a', group: 'Ancestral' },
|
||||
{ label: 'kdpm_2_a', value: 'kdpm_2_a', group: 'Ancestral' },
|
||||
{ label: 'Euler', value: 'euler', group: 'Standard' },
|
||||
{ label: 'DEIS', value: 'deis', group: 'Standard' },
|
||||
{ label: 'DDIM', value: 'ddim', group: 'Standard' },
|
||||
{ label: 'DDPM', value: 'ddpm', group: 'Standard' },
|
||||
{ label: 'DPM++ 2S', value: 'dpmpp_2s', group: 'Standard' },
|
||||
{ label: 'DPM++ 2M', value: 'dpmpp_2m', group: 'Standard' },
|
||||
{ label: 'Heun', value: 'heun', group: 'Standard' },
|
||||
{ label: 'KDPM 2', value: 'kdpm_2', group: 'Standard' },
|
||||
{ label: 'LMS', value: 'lms', group: 'Standard' },
|
||||
{ label: 'PNDM', value: 'pndm', group: 'Standard' },
|
||||
{ label: 'UniPC', value: 'unipc', group: 'Standard' },
|
||||
{ label: 'Euler Karras', value: 'euler_k', group: 'Karras' },
|
||||
{ label: 'DPM++ 2S Karras', value: 'dpmpp_2s_k', group: 'Karras' },
|
||||
{ label: 'DPM++ 2M Karras', value: 'dpmpp_2m_k', group: 'Karras' },
|
||||
{ label: 'Heun Karras', value: 'heun_k', group: 'Karras' },
|
||||
{ label: 'LMS Karras', value: 'lms_k', group: 'Karras' },
|
||||
{ label: 'Euler Ancestral', value: 'euler_a', group: 'Ancestral' },
|
||||
{ label: 'KDPM 2 Ancestral', value: 'kdpm_2_a', group: 'Ancestral' },
|
||||
];
|
||||
|
||||
export const SCHEDULER_ITEMS = [
|
||||
|
@ -28,7 +28,7 @@ const ParamScheduler = () => {
|
||||
dispatch(setSelectedSchedulers([...SCHEDULER_ITEMS]));
|
||||
|
||||
const schedulerFound = activeSchedulers.find(
|
||||
(activeSchedulers) => activeSchedulers.label === scheduler
|
||||
(activeSchedulers) => activeSchedulers.value === scheduler
|
||||
);
|
||||
if (!schedulerFound)
|
||||
dispatch(setScheduler(activeSchedulers[0].value as Scheduler));
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { Box, Flex } from '@chakra-ui/react';
|
||||
import { memo } from 'react';
|
||||
import ModelSelect from 'features/system/components/ModelSelect';
|
||||
import { memo } from 'react';
|
||||
import ParamScheduler from './ParamScheduler';
|
||||
|
||||
const ParamSchedulerAndModel = () => {
|
||||
return (
|
||||
<Flex gap={3} w="full">
|
||||
<Box w="16rem">
|
||||
<Box w="20rem">
|
||||
<ParamScheduler />
|
||||
</Box>
|
||||
<Box w="full">
|
||||
|
Loading…
Reference in New Issue
Block a user