-
Notifications
You must be signed in to change notification settings - Fork 372
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
base: main
Are you sure you want to change the base?
add phantom to libraries #1411
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! If possible, a code snippet would be 🔥
@pcuenca just added, thanks for review ❤️ |
@@ -727,6 +727,16 @@ model = pe.VisionTransformer.from_config("${model.id}", pretrained=True)`; | |||
return [vision_encoder]; | |||
} | |||
}; | |||
export const phantom = (model: ModelData): string[] => [ | |||
`huggingface-cli download --local-dir ${nameWithoutNamespace(model.id)} --local-dir ./${model.id} # in cli |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend making it full pythonic w/ hfh lib + snapshot_download
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
export const phantom = (model: ModelData): string[] => [ | ||
`huggingface-cli download --local-dir ${nameWithoutNamespace(model.id)} --local-dir ./${model.id} # in cli | ||
from phantom_wan import WANI2V, configs | ||
wan_i2v = WanI2V( | ||
config=configs.WAN_CONFIGS['i2v-14B'], | ||
checkpoint_dir=./${model.id} | ||
) | ||
video = wan_i2v.generate(text_prompt, image_prompt) | ||
`, | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with @Vaibhavs10 re: using snapshot_download
directly. Also, no need to download to a local dir IMO (usually better to showcase the shared cache and if user wants to use a local dir, they can always do it themselves)
export const phantom = (model: ModelData): string[] => [ | |
`huggingface-cli download --local-dir ${nameWithoutNamespace(model.id)} --local-dir ./${model.id} # in cli | |
from phantom_wan import WANI2V, configs | |
wan_i2v = WanI2V( | |
config=configs.WAN_CONFIGS['i2v-14B'], | |
checkpoint_dir=./${model.id} | |
) | |
video = wan_i2v.generate(text_prompt, image_prompt) | |
`, | |
]; | |
export const phantom = (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)` | |
]; |
prettyLabel: "phantom", | ||
repoName: "phantom", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prettyLabel: "phantom", | |
repoName: "phantom", | |
prettyLabel: "Phantom", | |
repoName: "Phantom", |
@@ -662,6 +662,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = { | |||
snippets: snippets.perception_encoder, | |||
countDownloads: `path_extension:"pt"`, | |||
}, | |||
phantom: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately phantom
is already used by some repos (https://huggingface.co/models?other=phantom) depending on https://github.com/ByungKwanLee/Phantom which is a totally different project.
Would it be possible to define it as phantom-video
for instance? In any case, it will require to update the model card metadata in https://huggingface.co/bytedance-research/Phantom before getting this PR merged (with library_name: phantom-video
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or phantom-wan
to match the library name in Python?
No description provided.