ai-tube / src /app /server /actions /utils /parseVideoModelName.ts
jbilcke-hf's picture
jbilcke-hf HF staff
update
0f35d4c
raw
history blame
No virus
565 Bytes
import { VideoGenerationModel } from "@/types"
export function parseVideoModelName(text: any, defaultToUse: VideoGenerationModel): VideoGenerationModel {
const rawModelString = `${text || ""}`.trim().toLowerCase()
let model: VideoGenerationModel = defaultToUse || "SVD"
if (
rawModelString === "stable video diffusion" ||
rawModelString === "stablevideodiffusion" ||
rawModelString === "svd"
) {
model = "SVD"
}
if (
rawModelString === "la vie" ||
rawModelString === "lavie"
) {
model = "LaVie"
}
return model
}