We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd15a7b commit 13ee1d7Copy full SHA for 13ee1d7
src/open_clip/factory.py
@@ -29,9 +29,9 @@
29
try:
30
import _codecs
31
import numpy as np
32
- # add safe globals, known to be needed for metaclip weights
+ # add safe globals that are known to be needed for metaclip weights loading in weights_only=True mode
33
torch.serialization.add_safe_globals([
34
- _codecs.encode, # now in pytorch main but some pytorch versions w/ weights_only flag don't have it
+ _codecs.encode, # this one not needed for PyTorch >= 2.5.0
35
np.core.multiarray.scalar,
36
np.dtype,
37
np.dtypes.Float64DType,
0 commit comments