model-loader allow absolsute path

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2024-11-27 15:36:22 -05:00
parent 00ebdf3476
commit a2dc3670a1
6 changed files with 45 additions and 4 deletions
+5
View File
@@ -188,6 +188,11 @@ def get_closet_checkpoint_match(s: str):
if found and len(found) == 1:
return found[0]
# absolute path
if s.endswith('.safetensors') and os.path.isfile(s):
checkpoint_info = CheckpointInfo(s)
return checkpoint_info
# reference search
"""
found = sorted([info for info in shared.reference_models.values() if os.path.basename(info['path']).lower().startswith(s.lower())], key=lambda x: len(x['path']))