Skip to content

Commit 361a0fa

Browse files
merveenoyanWauplin
andauthored
add phantom to libraries (#1411)
Co-authored-by: Lucain <[email protected]>
1 parent 0013ee4 commit 361a0fa

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

packages/tasks/src/model-libraries-snippets.ts

+11
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,17 @@ model = pe.VisionTransformer.from_config("${model.id}", pretrained=True)`;
727727
return [vision_encoder];
728728
}
729729
};
730+
export const phantom_wan = (model: ModelData): string[] => [
731+
`from huggingface_hub import snapshot_download
732+
from phantom_wan import WANI2V, configs
733+
734+
checkpoint_dir = snapshot_download("${model.id}")
735+
wan_i2v = WanI2V(
736+
config=configs.WAN_CONFIGS['i2v-14B'],
737+
checkpoint_dir=checkpoint_dir,
738+
)
739+
video = wan_i2v.generate(text_prompt, image_prompt)`,
740+
];
730741

731742
export const pyannote_audio_pipeline = (model: ModelData): string[] => [
732743
`from pyannote.audio import Pipeline

packages/tasks/src/model-libraries.ts

+8
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
662662
snippets: snippets.perception_encoder,
663663
countDownloads: `path_extension:"pt"`,
664664
},
665+
"phantom-wan": {
666+
prettyLabel: "Phantom",
667+
repoName: "Phantom",
668+
repoUrl: "https://github.com/Phantom-video/Phantom",
669+
snippets: snippets.phantom_wan,
670+
filter: false,
671+
countDownloads: `path_extension:"pth"`,
672+
},
665673
pxia: {
666674
prettyLabel: "pxia",
667675
repoName: "pxia",

0 commit comments

Comments
 (0)