Safetensors isn't optional anymore.

This commit is contained in:
comfyanonymous 2023-05-26 21:46:11 -04:00
parent eb4bd7711a
commit 679bd2845a
1 changed files with 2 additions and 9 deletions

View File

@ -1,14 +1,7 @@
import os
supported_ckpt_extensions = set(['.ckpt', '.pth'])
supported_pt_extensions = set(['.ckpt', '.pt', '.bin', '.pth'])
try:
import safetensors.torch
supported_ckpt_extensions.add('.safetensors')
supported_pt_extensions.add('.safetensors')
except:
print("Could not import safetensors, safetensors support disabled.")
supported_ckpt_extensions = set(['.ckpt', '.pth', '.safetensors'])
supported_pt_extensions = set(['.ckpt', '.pt', '.bin', '.pth', '.safetensors'])
folder_names_and_paths = {}