feat(ui): sampler --> scheduler

This commit is contained in:
psychedelicious
2023-05-16 10:40:26 +10:00
parent da87378713
commit 6fe62a2705
11 changed files with 70 additions and 60 deletions

View File

@@ -1,6 +1,6 @@
// TODO: use Enums?
export const SCHEDULERS: Array<string> = [
export const SCHEDULERS = [
'ddim',
'lms',
'euler',
@@ -17,7 +17,12 @@ export const SCHEDULERS: Array<string> = [
'heun',
'heun_k',
'unipc',
];
] as const;
export type Scheduler = (typeof SCHEDULERS)[number];
export const isScheduler = (x: string): x is Scheduler =>
SCHEDULERS.includes(x as Scheduler);
// Valid image widths
export const WIDTHS: Array<number> = Array.from(Array(64)).map(