stable-diffusion-webui-wd14-tagger icon indicating copy to clipboard operation
stable-diffusion-webui-wd14-tagger copied to clipboard

Still halt the page when fail on loading mode,even the Model exsit in local path.

Open gamert opened this issue 2 years ago • 5 comments

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()

gamert avatar Aug 10 '23 06:08 gamert

May use "get_file_from_repo" directly? Or may let Buttom can be click again when exception raise.

gamert avatar Aug 10 '23 07:08 gamert

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.

RoelKluin avatar Aug 10 '23 13:08 RoelKluin

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?

picobyte avatar Aug 10 '23 17:08 picobyte

"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)

gamert avatar Aug 11 '23 10:08 gamert

So this indeed solved it for you? otherwise let me know.

picobyte avatar Aug 11 '23 16:08 picobyte