MCPcopy Create free account
hub / github.com/tdrussell/diffusion-pipe / from_weakref

Method from_weakref

utils/reduction.py:43–47  ·  view source on GitHub ↗
(cls, cdata)

Source from the content-addressed store, hash-verified

41
42 @classmethod
43 def from_weakref(cls, cdata):
44 instance = cls.__new__(cls)
45 instance.cdata = cdata
46 instance._free_weak_ref = torch.Storage._free_weak_ref # type: ignore[attr-defined]
47 return instance
48
49 def expired(self):
50 return torch.Storage._expired(self.cdata) # type: ignore[attr-defined]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected