Skip to content

Commit

Permalink
Tweak comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rwightman committed Oct 21, 2024
1 parent cd15a7b commit 13ee1d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/open_clip/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
try:
import _codecs
import numpy as np
# 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
torch.serialization.add_safe_globals([
_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
np.core.multiarray.scalar,
np.dtype,
np.dtypes.Float64DType,
Expand Down

0 comments on commit 13ee1d7

Please sign in to comment.