blip2 model path
parent
cf55b2da61
commit
d1a8edae13
|
|
@ -1,4 +1,5 @@
|
|||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
config.json
|
||||
.vscode/
|
||||
.vscode/
|
||||
models/
|
||||
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
Loading…
Reference in New Issue