Skip to content
11 changes: 11 additions & 0 deletions packages/tasks/src/model-libraries-snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,17 @@ model = pe.VisionTransformer.from_config("${model.id}", pretrained=True)`;
return [vision_encoder];
}
};
export const phantom_wan = (model: ModelData): string[] => [
`from huggingface_hub import snapshot_download
from phantom_wan import WANI2V, configs

checkpoint_dir = snapshot_download("${model.id}")
wan_i2v = WanI2V(
config=configs.WAN_CONFIGS['i2v-14B'],
checkpoint_dir=checkpoint_dir,
)
video = wan_i2v.generate(text_prompt, image_prompt)`,
];

export const pyannote_audio_pipeline = (model: ModelData): string[] => [
`from pyannote.audio import Pipeline
Expand Down
8 changes: 8 additions & 0 deletions packages/tasks/src/model-libraries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
snippets: snippets.perception_encoder,
countDownloads: `path_extension:"pt"`,
},
"phantom-wan": {
prettyLabel: "Phantom",
repoName: "Phantom",
repoUrl: "https://github.com/Phantom-video/Phantom",
snippets: snippets.phantom_wan,
filter: false,
countDownloads: `path_extension:"pth"`,
},
pxia: {
prettyLabel: "pxia",
repoName: "pxia",
Expand Down