diff --git a/app/src/components/Generation/FloatingGenerateBox.tsx b/app/src/components/Generation/FloatingGenerateBox.tsx index bd024859..31b4d8ae 100644 --- a/app/src/components/Generation/FloatingGenerateBox.tsx +++ b/app/src/components/Generation/FloatingGenerateBox.tsx @@ -404,11 +404,19 @@ export function FloatingGenerateBox({ { - const [engine, modelSize] = value.split(':'); - form.setValue('engine', engine as 'qwen' | 'luxtts'); - if (modelSize) form.setValue('modelSize', modelSize as '1.7B' | '0.6B'); + if (value === 'luxtts') { + form.setValue('engine', 'luxtts'); + } else { + const [, modelSize] = value.split(':'); + form.setValue('engine', 'qwen'); + form.setValue('modelSize', modelSize as '1.7B' | '0.6B'); + } }} > @@ -119,7 +127,7 @@ export function GenerationForm() { Qwen3-TTS 1.7B Qwen3-TTS 0.6B - LuxTTS + LuxTTS diff --git a/app/src/lib/hooks/useGenerationForm.ts b/app/src/lib/hooks/useGenerationForm.ts index aff34754..1a44b24f 100644 --- a/app/src/lib/hooks/useGenerationForm.ts +++ b/app/src/lib/hooks/useGenerationForm.ts @@ -108,7 +108,14 @@ export function useGenerationForm(options: UseGenerationFormOptions = {}) { const audioUrl = apiClient.getAudioUrl(result.id); setAudioWithAutoPlay(audioUrl, result.id, selectedProfileId, data.text.substring(0, 50)); - form.reset(); + form.reset({ + text: '', + language: data.language, + seed: undefined, + modelSize: data.modelSize, + instruct: '', + engine: data.engine, + }); options.onSuccess?.(result.id); } catch (error) { toast({