File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -1176,13 +1176,8 @@ def _load_pretrained_model(
11761176 error_msgs = []
11771177
11781178 # Deal with offload
1179- is_safetensors = False
11801179 if device_map is not None and "disk" in device_map .values ():
1181- archive_file = (
1182- resolved_archive_file [0 ] if isinstance (resolved_archive_file , (list , tuple )) else resolved_archive_file
1183- )
1184- is_safetensors = archive_file .endswith (".safetensors" )
1185- if offload_folder is None and not is_safetensors :
1180+ if offload_folder is None :
11861181 raise ValueError (
11871182 "The current `device_map` had weights offloaded to the disk. Please provide an `offload_folder`"
11881183 " for them. Alternatively, make sure you have `safetensors` installed if the model you are using"
You can’t perform that action at this time.
0 commit comments