Skip to content

add phantom to libraries #1411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
May 7, 2025
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