Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
679bd284
Commit
679bd284
authored
May 26, 2023
by
comfyanonymous
Browse files
Safetensors isn't optional anymore.
parent
eb4bd771
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
folder_paths.py
folder_paths.py
+2
-9
No files found.
folder_paths.py
View file @
679bd284
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
=
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment