[Feature Request] Filter by filetypes?
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.
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.
to properly implement this, we need to add new filter type by extension I'll think about it
This could be nice as there's multiple versions of the same model which you may never run. like onnx o1 o2 o3 o4 variants, then the pytorch, safetensors, etc.