Skip to content
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

[Feature Request] Filter by filetypes? #21

Open
d8ahazard opened this issue Dec 30, 2023 · 2 comments
Open

[Feature Request] Filter by filetypes? #21

d8ahazard opened this issue Dec 30, 2023 · 2 comments

Comments

@d8ahazard
Copy link

Hey there! Great utility! It's so nice not having to code something up in python to get similar behavior to the hf_hub_download function.

One request I have, however, would be the ability to filter by model filetype.

Or, heck, maybe this already exists, and I'm mis-understanding how the filtering works.

For example:

If downloading from stabilityai/stable-diffusion-xl-base-1.0, they have a myriad of different model types/weights/etc.

But, for my purposes, I really only care about the .json and .safetensors files - and even then, only the ones in subdirectories.

While I know the latter part would probably make things get super-complicated, I feel like being able to only pull down .safetensors and .json files would be a bit easier to implement?

Or, if the functionality is already there...could you kindly let me know how to filter this way?

Much appreciated.

@nylocx
Copy link

nylocx commented Jan 12, 2024

Hi, for me this is already working (at least partially) by using

/hfdownloader -m "model-name:-of-00008.safetensors,tokenizer.model"

this skipps all .bin .act and .model files
But a more capable filtering would be nice.
something like
--include "*.safetensors,tokenizer.model,*.json"
and an exclude maybe mutually exclusive would be nice. Or even --include-regex but that might go a bit far.

@bodaay
Copy link
Owner

bodaay commented Mar 7, 2024

to properly implement this, we need to add new filter type by extension
I'll think about it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants