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

Method __init__

utils/reduction.py:36–40  ·  view source on GitHub ↗
(self, storage)

Source from the content-addressed store, hash-verified

34 __slots__ = ["cdata", "_free_weak_ref"]
35
36 def __init__(self, storage):
37 self.cdata = storage._weak_ref()
38 # Save a direct reference to _free_weak_ref because the `torch` module
39 # might be cleared during Python shutdown before this module is cleared.
40 self._free_weak_ref = torch.Storage._free_weak_ref # type: ignore[attr-defined]
41
42 @classmethod
43 def from_weakref(cls, cdata):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected