stable-diffusion-webui-wd14-tagger
stable-diffusion-webui-wd14-tagger copied to clipboard
Interrogators, i can manually download the wd-14-vit-v2....but where to put it????
Interrogator, there are options, i can manually download the wd-14-vit-v2....but where to put it????
also, this wd-14-vit-v2.git is selected by default, but my country has censored internet, so i got to manually download these files, but WHERE DO I PUT THEM????
i know before it has downloaded into temp folder cause i search for it......but
can you make it off line???
it is so hard to use in our country..
I met the same problem as you, I solved the problem by modifying the script to add a proxy.
Edit "/extensions/stable-diffusion-webui-wd14-tagger/tagger/interrogator.py" About Line 228
def download(self) -> Tuple[os.PathLike, os.PathLike]:
print(f"Loading {self.name} model file from {self.kwargs['repo_id']}")
model_path = Path(hf_hub_download(
**self.kwargs, filename=self.model_path))
tags_path = Path(hf_hub_download(
**self.kwargs, filename=self.tags_path))
return model_path, tags_path
Change into
def download(self) -> Tuple[os.PathLike, os.PathLike]:
print(f"Loading {self.name} model file from {self.kwargs['repo_id']}")
proxies = {
'http': 'http://192.168.31.240:1080/', #Replace here with your own proxy address and port
'https': 'http://192.168.31.240:1080/', #Replace here with your own proxy address and port
}
model_path = Path(hf_hub_download(
**self.kwargs, filename=self.model_path, proxies=proxies)) #Add 'proxies=proxies'
tags_path = Path(hf_hub_download(
**self.kwargs, filename=self.tags_path, proxies=proxies)) #Add 'proxies=proxies'
return model_path, tags_path
hey thanks,
i have already downloaded the model from huggingface separately,
1> can you make it to look for models in i.e.: models/folder inside the extension first? instead of having to download it first time with whichever option from the dropdown menu ( illogical!! ),
following part is so !!!important!!! 2> and it also downloads to a RANDOM TEMP folder which is a bad practice..... and quite frankly impossible to maintain, and we need it to be portable, self contained!!
cheers :))
put file here
I have use this way to fix this issue on my machine .
def download(self) -> Tuple[os.PathLike, os.PathLike]:
print(f"Loading {self.name} model file from {self.kwargs['repo_id']}")
# model_path = Path(hf_hub_download(
# **self.kwargs, filename=self.model_path))
# tags_path = Path(hf_hub_download(
# **self.kwargs, filename=self.tags_path))
model_path = Path("D:/stable-diffusion-webui/models").joinpath(self.kwargs['repo_id']).joinpath(self.model_path)
tags_path = Path("D:/stable-diffusion-webui/models").joinpath(self.kwargs['repo_id']).joinpath(self.tags_path)
return model_path, tags_path
I have use this way to fix this issue on my machine .
def download(self) -> Tuple[os.PathLike, os.PathLike]: print(f"Loading {self.name} model file from {self.kwargs['repo_id']}") # model_path = Path(hf_hub_download( # **self.kwargs, filename=self.model_path)) # tags_path = Path(hf_hub_download( # **self.kwargs, filename=self.tags_path)) model_path = Path("D:/stable-diffusion-webui/models").joinpath(self.kwargs['repo_id']).joinpath(self.model_path) tags_path = Path("D:/stable-diffusion-webui/models").joinpath(self.kwargs['repo_id']).joinpath(self.tags_path) return model_path, tags_path
genius!!!! I will give this a try, but i recently stuck using just the stock webui interrogator instead.
I have use this way to fix this issue on my machine .
def download(self) -> Tuple[os.PathLike, os.PathLike]: print(f"Loading {self.name} model file from {self.kwargs['repo_id']}") # model_path = Path(hf_hub_download( # **self.kwargs, filename=self.model_path)) # tags_path = Path(hf_hub_download( # **self.kwargs, filename=self.tags_path)) model_path = Path("D:/stable-diffusion-webui/models").joinpath(self.kwargs['repo_id']).joinpath(self.model_path) tags_path = Path("D:/stable-diffusion-webui/models").joinpath(self.kwargs['repo_id']).joinpath(self.tags_path) return model_path, tags_path
("D:/stable-diffusion-webui/models") Can you like make it not "absolute" path? this bit bug the hell out of me I put my webui on stick, on the go, home and office, so i usually make my usb drive the same letter, but still it will be nice to not use absolute path in the code... I am noob coder, i dont know how to fix absolute path.
def download(self) -> Tuple[os.PathLike, os.PathLike]:
print(f"Loading {self.name} model file from {self.kwargs['repo_id']}")
runner_path = os.getcwd()
model_path = Path(runner_path).joinpath("models").joinpath(self.kwargs['repo_id']).joinpath(self.model_path)
tags_path = Path(runner_path).joinpath("models").joinpath(self.kwargs['repo_id']).joinpath(self.tags_path)
if (os.path.exists(model_path) and os.path.exists(tags_path)):
pass
else:
model_path = Path(hf_hub_download(
**self.kwargs, filename=self.model_path))
tags_path = Path(hf_hub_download(
**self.kwargs, filename=self.tags_path))
return model_path, tags_path
@bryanray The fork of my warehouse optimizes the download strategy,when loading the model, first query the path where the json file is saved,By default, the model is downloaded to models/interrogators, and the model.json storage path of the model will be saved after downloading
@bryanray The fork of my warehouse optimizes the download strategy,when loading the model, first query the path where the json file is saved,By default, the model is downloaded to models/interrogators, and the model.json storage path of the model will be saved after downloading
finally you got the my itchy back scratched!!!
This is fabulously well done!!!!
I never thought someone fork it and make the same decision as i do, thanks a lot for the heads up!!!!
and thank you for doing so, it is so messy to see stuffs like this, in random folders, of course everyone can search for it, but why bother so much tho, it is bad practice and illogical....
put file here pretty dumb way i would say, and that one single upvote is just stupidly over-confident... cant stand that shait.