Update model manager to display folder path

This commit is contained in:
Eric Lam
2025-05-18 19:31:16 -07:00
parent 166debfabb
commit d9a36dc901
2 changed files with 19 additions and 4 deletions
+11 -2
View File
@@ -921,14 +921,23 @@ def check_model_installed(json_obj):
item['installed'] = 'True'
if 'installed' not in item:
item['installed'] = 'False'
if item['filename'] == '<huggingface>':
filename = os.path.basename(item['url'])
else:
filename = item['filename']
fullpath = os.path.join(folder_paths.models_dir, item['save_path'], filename)
if model_dir_name in folder_paths.folder_names_and_paths:
paths = folder_paths.folder_names_and_paths[model_dir_name][0]
item['installed'] = 'True' if os.path.exists(fullpath) else 'False'
for folder_path in paths:
base_path = os.path.split(folder_path)[0]
fullpath = os.path.join(base_path, item['save_path'], filename)
if os.path.exists(fullpath):
item['installed'] = 'True'
item['folder_path_source'] = base_path
with concurrent.futures.ThreadPoolExecutor(8) as executor:
for item in json_obj['models']: