feat: infer tts model type from backend is_audio flag
This commit is contained in:
parent
1b34293a53
commit
faf8351825
2 changed files with 2 additions and 1 deletions
|
|
@ -62,6 +62,7 @@ export interface ModelConfigResponse {
|
|||
config?: BackendModelConfig | null;
|
||||
is_vision: boolean;
|
||||
is_lora: boolean;
|
||||
is_audio?: boolean;
|
||||
base_model?: string | null;
|
||||
model_type?: "text" | "vision" | "tts" | "embeddings" | null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ export const useTrainingConfigStore = create<TrainingConfigStore>()(
|
|||
// Use backend-provided model_type when available, otherwise
|
||||
// infer from is_vision (temporary until backend ships model_type).
|
||||
const inferredModelType: ModelType = modelDetails.model_type
|
||||
?? (modelDetails.is_vision ? "vision" : "text");
|
||||
?? (modelDetails.is_vision ? "vision" : modelDetails.is_audio ? "tts" : "text");
|
||||
|
||||
set({
|
||||
...patch,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue