Spaces:
Running
Running
File size: 765 Bytes
1185ec1 4c34e70 0f35d4c 4c34e70 1f1caeb 0f35d4c 4c34e70 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
import { VideoGenerationModel } from "@/types/general"
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"
}
if (
rawModelString === "hotshot" ||
rawModelString === "hotshotxl" ||
rawModelString === "hotshot xl" ||
rawModelString === "hotshot-xl"
) {
model = "HotshotXL"
}
return model
} |