Merge pull request #55 from d8ahazard/main

Use shared models path
main
mattya_monaca 2024-11-04 15:05:07 +09:00 committed by GitHub
commit d38bfc3c97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 2 deletions

View File

@ -21,6 +21,11 @@ from collections import OrderedDict
from PIL import Image
model_cache = OrderedDict()
models_path = shared.models_path
sams_dir = os.path.join(models_path, "sam")
if os.path.exists(sams_dir):
sam_model_dir = sams_dir
else:
sam_model_dir = os.path.join(
extensions_dir, "PBRemTools/models/")
model_list = [f for f in os.listdir(sam_model_dir) if os.path.isfile(