V 1.0.0 - model version helper

This commit is contained in:
DESKTOP-CNFQ7PM\Primere
2024-10-25 09:29:50 +02:00
parent d0f1999831
commit 02f377db0d
+2 -1
View File
@@ -40,7 +40,8 @@ if len(ModelsList) > 0:
print('Model [' + str(model_counter) + '] / ' + str(len(ModelsList)) + ' already cached: ' + modelaname_only + ' -> ' + str(model_version))
else:
File_link = Path(str(model_path)).resolve()
comfyModelDir = os.path.join(comfy_dir, 'models')
# comfyModelDir = os.path.join(comfy_dir, 'models')
comfyModelDir = str(Path(folder_paths.folder_names_and_paths['checkpoints'][0][0]).parent)
modelType = str(File_link)[len(comfyModelDir) + 1:str(File_link).find('\\', len(comfyModelDir) + 1)]
utility.add_value_to_cache('model_version', modelaname_only, modelType + '_symlink')
print('Model [' + str(model_counter) + '] / ' + str(len(ModelsList)) + ' symlinked file: ' + modelaname_only + ' -> from: ' + modelType)