diff --git a/packages/tasks/src/model-libraries-snippets.ts b/packages/tasks/src/model-libraries-snippets.ts index 15e1774fe7..da5116b44f 100644 --- a/packages/tasks/src/model-libraries-snippets.ts +++ b/packages/tasks/src/model-libraries-snippets.ts @@ -1703,6 +1703,15 @@ export const vfimamba = (model: ModelData): string[] => [ model = Model.from_pretrained("${model.id}")`, ]; +export const lvface = (model: ModelData): string[] => [ + `from huggingface_hub import hf_hub_download + from inference_onnx import LVFaceONNXInferencer + +model_path = hf_hub_download("${model.id}", "LVFace-L_Glint360K.onnx") +inferencer = LVFaceONNXInferencer(model_path, use_gpu=True, timeout=300) +embedding = inferencer.infer_from_image(img_path)`, +]; + export const voicecraft = (model: ModelData): string[] => [ `from voicecraft import VoiceCraft diff --git a/packages/tasks/src/model-libraries.ts b/packages/tasks/src/model-libraries.ts index d267b199dd..bf1c6c7a33 100644 --- a/packages/tasks/src/model-libraries.ts +++ b/packages/tasks/src/model-libraries.ts @@ -1156,6 +1156,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = { countDownloads: `path_extension:"pkl"`, snippets: snippets.vfimamba, }, + lvface: { + prettyLabel: "LVFace", + repoName: "LVFace", + repoUrl: "https://github.com/bytedance/LVFace", + countDownloads: `path_extension:"pt" OR path_extension:"onnx"`, + snippets: snippets.lvface, + }, voicecraft: { prettyLabel: "VoiceCraft", repoName: "VoiceCraft",