commit
d38bfc3c97
|
|
@ -21,8 +21,13 @@ from collections import OrderedDict
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
model_cache = OrderedDict()
|
model_cache = OrderedDict()
|
||||||
sam_model_dir = os.path.join(
|
models_path = shared.models_path
|
||||||
extensions_dir, "PBRemTools/models/")
|
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(
|
model_list = [f for f in os.listdir(sam_model_dir) if os.path.isfile(
|
||||||
os.path.join(sam_model_dir, f)) and f.split('.')[-1] != 'txt']
|
os.path.join(sam_model_dir, f)) and f.split('.')[-1] != 'txt']
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue