From d5cda1ba4236dc26485ef99896978009da30fa70 Mon Sep 17 00:00:00 2001 From: Dave Schumaker Date: Sun, 1 Sep 2024 09:11:48 -0700 Subject: [PATCH] fix: Update samplers to use type and rename 'k_euler_ancestral' to 'k_euler_a'. (#50) --- .../AdvancedOptions/SamplerSelect.tsx | 18 +---- .../ImageParamsForHordeApi.test.ts | 70 +++++++++---------- app/_data-models/ImageParamsForHordeApi.ts | 3 +- app/_data-models/PromptInput.test.ts | 2 +- app/_data-models/PromptInput.ts | 3 +- app/_types/HordeTypes.ts | 15 ++++ 6 files changed, 57 insertions(+), 54 deletions(-) diff --git a/app/_components/AdvancedOptions/SamplerSelect.tsx b/app/_components/AdvancedOptions/SamplerSelect.tsx index 1abd34b..6a3c15b 100644 --- a/app/_components/AdvancedOptions/SamplerSelect.tsx +++ b/app/_components/AdvancedOptions/SamplerSelect.tsx @@ -3,21 +3,7 @@ import { useInput } from '@/app/_providers/PromptInputProvider' import Select, { SelectOption } from '../Select' import OptionLabel from './OptionLabel' - -export type SamplerOption = - | 'DDIM' - | 'k_dpm_2_a' - | 'k_dpm_2' - | 'k_dpm_adaptive' - | 'k_dpm_fast' - | 'k_dpmpp_2m' - | 'k_dpmpp_2s_a' - | 'k_dpmpp_sde' - | 'k_euler_a' - | 'k_euler' - | 'k_heun' - | 'k_lms' - | 'lcm' +import { SamplerOption } from '@/app/_types/HordeTypes' const samplers: Array<{ value: SamplerOption; label: SamplerOption }> = [ { value: 'DDIM', label: 'DDIM' }, @@ -47,7 +33,7 @@ export default function SamplerSelect() {