You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful if there was a way to alias a huggingface repo such that all references to it for models or custom blocks are short-cut and replaced before usage by a local path.
Assumes you are using the huggingface cache and have not already downloaded the model / custom blocks in the past to a --local-dir. Whilst it's possible to replace the repo name above with an absolute path to the local download, this would become quite tedious to do if you have downloaded a lot of custom blocks as these can reference each other.
It also makes sharing a custom block harder since if I have made edits to reference my local blocks by path I would have to un-edit everything to refer to my actual shared repo for it to be useful to others.
Whilst I could use the huggingface cache for downloads, I do like to keep a local backup of models/workflows and it can be easier to share across machines using a single local-dir based directory structure.
If the huggingface library provided a way to specify a config file of repo / path mappings, stored in a well-known path in HF_HOME with path override available via an ENV such as LOCAL_REPO_MAPPING=/some/path/local_repo_mapping.json, this could enable any reference to "diffusers-internal-dev/canny-filtering" to be replaced at runtime before a download is needed with the mapped absolute path "/some/local/dir/canny-filtering"
Perhaps my usage is a niche case and everyone is happy with the hf cache handling this. I do use it too in some cases, but I really value the flexibility to also have a local-dir downloaded version (either via hf download --local-dir ... or copying a given snapshot out of the hf cache folder) as a backup without having to modify a lot of repo paths to absolute and back again if I wish to share with the community.
Would something like this be feasible? Hopefully there would be a single point where a hook could be placed to short circuit checking the cache and performing a download to instead use the mapped dir.
Any strong reasons against this, or perhaps a better way to support local-dir downloads alongside hf cache ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
It would be useful if there was a way to alias a huggingface repo such that all references to it for models or custom blocks are short-cut and replaced before usage by a local path.
For example
Assumes you are using the huggingface cache and have not already downloaded the model / custom blocks in the past to a --local-dir. Whilst it's possible to replace the repo name above with an absolute path to the local download, this would become quite tedious to do if you have downloaded a lot of custom blocks as these can reference each other.
It also makes sharing a custom block harder since if I have made edits to reference my local blocks by path I would have to un-edit everything to refer to my actual shared repo for it to be useful to others.
Whilst I could use the huggingface cache for downloads, I do like to keep a local backup of models/workflows and it can be easier to share across machines using a single local-dir based directory structure.
If the huggingface library provided a way to specify a config file of repo / path mappings, stored in a well-known path in HF_HOME with path override available via an ENV such as LOCAL_REPO_MAPPING=/some/path/local_repo_mapping.json, this could enable any reference to "diffusers-internal-dev/canny-filtering" to be replaced at runtime before a download is needed with the mapped absolute path "/some/local/dir/canny-filtering"
Perhaps my usage is a niche case and everyone is happy with the hf cache handling this. I do use it too in some cases, but I really value the flexibility to also have a local-dir downloaded version (either via hf download --local-dir ... or copying a given snapshot out of the hf cache folder) as a backup without having to modify a lot of repo paths to absolute and back again if I wish to share with the community.
Would something like this be feasible? Hopefully there would be a single point where a hook could be placed to short circuit checking the cache and performing a download to instead use the mapped dir.
Any strong reasons against this, or perhaps a better way to support local-dir downloads alongside hf cache ?
All reactions