R

Results 91 comments of R

我明白你的意思,下载错过了顶级目录并且正在相互覆盖。 I see what you mean, the downloads miss the top directory and are overwriting one another, also for my last few. ``` json_pp < model.json | tail -n 21...

We can place the 'models/' + repo_id with slashes replaced with double dashes in there manually if it's not already there.

I meant this ``` def download(self) -> None: dashed_part = 'models--' + '--'.join(self.repo_id.split('/')) mdir = Path(shared.models_path, 'interrogators', dashed_part) ... model_path = hf_hub_download( repo_id=self.repo_id, filename=self.model_path, local_dir=mdir) ``` but I have to...

I think what might work is ``` def download(self) -> None: dashed_part = 'models--' + '--'.join(self.repo_id.split('/')) mdir = Path(shared.models_path, 'interrogators', dashed_part) local_dir = Path(shared.models_path, 'interrogators', dashed_part) ... model_path = hf_hub_download(...

ok I will fix that too, then. maybe we can add in settings: ``` shared.opts.add_option( key='tagger_hf_cache_dir', info=shared.OptionInfo( os.environ.get('HF_HOME', str(Path(shared.models_path, 'interrogators'))), label='HuggingFace cache directory', section=section, ), ) ```

okay it's in [this](https://github.com/picobyte/stable-diffusion-webui-wd14-tagger/pull/30/files) pull request. Note that I removed all local_dir. It should work with both environment variables, or default to the `Path(shared.models_path, 'interrogators')` but will be configurable in...

hmm, from [environment_variables](https://huggingface.co/docs/huggingface_hub/v0.16.3/en/package_reference/environment_variables), they are not exactly the same. `HUGGINGFACE_HUB_CACHE` defaults to `"$HF_HOME/hub"` so I think we only need HUGGINGFACE_HUB_CACHE`, if the user has only set HF_HOME, then this default...

I did introduce an `is_hf` parameter to WaifuDiffusionInterrogator, [here](https://github.com/picobyte/stable-diffusion-webui-wd14-tagger/blob/4e581a2baeeb68b2ca6a7a7856744a78a6d43d2e/tagger/interrogator.py#L390), If it is set to False, then a local model can be used. I actually use that for two models, but...

That's fine, thanks for helping me out. I'd have a hard time understanding the problem. However, I'm a bit afraid that changes here might raise problems for others, so also...

I pushed a change on top: d252c2a297d5673adec78950a56546140f7c0425, See commit message. It unifies the HuggingFace download, gives more download tweak options. If you want to set local_dir instead of the cache_dir,...