diff --git a/.gitignore b/.gitignore index 9871132..3c39af7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ # Byte-compiled / optimized / DLL files __pycache__/ config.json -.vscode/ \ No newline at end of file +.vscode/ +models/ \ No newline at end of file diff --git a/scripts/dataset_tag_editor/interrogators/blip2_captioning.py b/scripts/dataset_tag_editor/interrogators/blip2_captioning.py index 179c3f4..4d37ab3 100644 --- a/scripts/dataset_tag_editor/interrogators/blip2_captioning.py +++ b/scripts/dataset_tag_editor/interrogators/blip2_captioning.py @@ -13,10 +13,10 @@ class BLIP2Captioning: def load(self): if self.model is None or self.processor is None: self.processor = Blip2Processor.from_pretrained( - self.MODEL_REPO, cache_dir=paths.setting_model_path + self.MODEL_REPO, cache_dir=paths.model_path / "aesthetic" ) self.model = Blip2ForConditionalGeneration.from_pretrained( - self.MODEL_REPO, cache_dir=paths.setting_model_path + self.MODEL_REPO, cache_dir=paths.model_path / "aesthetic" ).to(devices.device) def unload(self): diff --git a/scripts/paths.py b/scripts/paths.py index 7495da7..de86969 100644 --- a/scripts/paths.py +++ b/scripts/paths.py @@ -13,5 +13,6 @@ class Paths(Singleton): self.base_path:Path = base_dir_path() self.script_path: Path = self.base_path / "scripts" self.userscript_path: Path = self.base_path / "userscripts" + self.model_path = self.base_path / "models" paths = Paths() \ No newline at end of file