Closed ZZ250-zZ closed 1 year ago
This is not fixing anything. Just use the environment variable as specified in the huggingface load api docs, if you don't want to load from huggingface.
This is not fixing anything. Just use the environment variable as specified in the huggingface load api docs, if you don't want to load from huggingface.
sd-webui\models\TaggerOnnx
in advance. But, when running WD14, it loads the local model but still tries to download from huggingface.
sd-webui\models\TaggerOnnx
├── wd14-vit.v2
│ ├── model.onnx
│ └── selected_tags.csv
└── wd-v1-4-moat-tagger.v2
├── model.onnx
└── selected_tags.csv
interrogator.py
is used to distinguish whether the model is scanned locally or downloaded from huggingface, but self.is_hf
is always true
for local models. def download(self) -> None:
mdir = Path(shared.models_path, 'interrogators')
if self.is_hf:
cache = getattr(shared.opts, 'tagger_hf_cache_dir', Its.hf_cache)
print(f"Loading {self.name} model file from {self.repo_id}, "
f"{self.model_path}")
model_path = hf_hub_download(
repo_id=self.repo_id,
filename=self.model_path,
cache_dir=cache)
tags_path = hf_hub_download(
repo_id=self.repo_id,
filename=self.tags_path,
cache_dir=cache)
else:
model_path = self.local_model
tags_path = self.local_tags
return sorted(interrogators.keys())
HF_HUB_OFFLINE=1 disables the download. so export HF_HUB_OFFLINE=1
if on Linux, mac or os/x, or something like HF_HUB_OFFLINE=1 ./webui
, not sure exactly how this is done in windows, but you can also in python do this:
import os
os.environ["HF_HUB_OFFLINE"] = "1"
There is already a long open issue about this, btw.
HF_HUB_OFFLINE=1 disables the download. so
export HF_HUB_OFFLINE=1
if on Linux, mac or os/x, or something likeHF_HUB_OFFLINE=1 ./webui
, not sure exactly how this is done in windows, but you can also in python do this:import os os.environ["HF_HUB_OFFLINE"] = "1"
There is already a long open issue about this, btw.
I misunderstood. Thank you very much for your patient answer.
Prioritize loading models from directory 'models/TaggerOnnx'