We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 191af3e commit 00a9189Copy full SHA for 00a9189
comfy/sd1_clip.py
@@ -186,7 +186,10 @@ def load_embed(embedding_name, embedding_directory):
186
import safetensors.torch
187
embed = safetensors.torch.load_file(embed_path, device="cpu")
188
else:
189
- embed = torch.load(embed_path, weights_only=True, map_location="cpu")
+ if 'weights_only' in torch.load.__code__.co_varnames:
190
+ embed = torch.load(embed_path, weights_only=True, map_location="cpu")
191
+ else:
192
+ embed = torch.load(embed_path, map_location="cpu")
193
if 'string_to_param' in embed:
194
values = embed['string_to_param'].values()
195
0 commit comments