diff --git a/packages/tasks/src/model-libraries-snippets.ts b/packages/tasks/src/model-libraries-snippets.ts index 991e2962dc..07d2d7d2df 100644 --- a/packages/tasks/src/model-libraries-snippets.ts +++ b/packages/tasks/src/model-libraries-snippets.ts @@ -1183,10 +1183,17 @@ from models.birefnet import BiRefNet model = BiRefNet.from_pretrained("${model.id}")`, ]; +export const swarmformer = (model: ModelData): string[] => [ + `from swarmformer import SwarmFormerModel + +model = SwarmFormerModel.from_pretrained("${model.id}", trust_remote_code=True) +`, +]; + export const mlx = (model: ModelData): string[] => [ `pip install huggingface_hub hf_transfer -export HF_HUB_ENABLE_HF_TRANS: string[]FER=1 +export HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download --local-dir ${nameWithoutNamespace(model.id)} ${model.id}`, ]; diff --git a/packages/tasks/src/model-libraries.ts b/packages/tasks/src/model-libraries.ts index cef51ecf36..43a2091497 100644 --- a/packages/tasks/src/model-libraries.ts +++ b/packages/tasks/src/model-libraries.ts @@ -752,6 +752,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = { filter: true, countDownloads: `path:"models/default.zip"`, }, + swarmformer: { + prettyLabel: "SwarmFormer", + repoName: "SwarmFormer", + repoUrl: "https://github.com/takara-ai/SwarmFormer", + snippets: snippets.swarmformer, + filter: false, + }, "f5-tts": { prettyLabel: "F5-TTS", repoName: "F5-TTS",