mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
support direct loading of .safetensors models
- Small fix to allow ckpt files with the .safetensors suffix to be directly loaded, rather than undergo a conversion step first.
This commit is contained in:
@ -142,7 +142,7 @@ class ModelManager(object):
|
|||||||
Return true if this is a legacy (.ckpt) model
|
Return true if this is a legacy (.ckpt) model
|
||||||
'''
|
'''
|
||||||
info = self.model_info(model_name)
|
info = self.model_info(model_name)
|
||||||
if 'weights' in info and info['weights'].endswith('.ckpt'):
|
if 'weights' in info and info['weights'].endswith(('.ckpt','.safetensors')):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user