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