Open gamert opened 11 months ago
May use "get_file_from_repo" directly? Or may let Buttom can be click again when exception raise.
I agree this is a mess. I was trying to fix it in a branch but it's a lot of work to automate this. I kind of think it would be best if the wd14 tagger would not attempt to download itself but would require the user to do this, but then for people for which it does currently work, this would be a regression.
Huggingface supports some environment variables.
so if you know you cannot download, if you run export HF_HUB_OFFLINE=1
before you start the webui, does that resolve the issue for you?
"HF_HUB_OFFLINE=1" will affect global downing? So I add “, local_files_only=True” in hf_hub_download(interrogator.py) to bypass the exception。This is ok for me because I have downed the models :)
model_path = hf_hub_download( repo_id=self.repo_id, filename=self.model_path, cache_dir=cache, local_files_only=True)
So this indeed solved it for you? otherwise let me know.
Please change the load method . We all know "hf_hub_download" will be blocked At Random.
Ln 430: def load(self) -> None: model_path, tags_path = self.download()