MCPcopy Create free account
hub / github.com/SwayStar123/SpeedrunDiT / init

Method init

preprocessing/encoders.py:65–70  ·  view source on GitHub ↗
(self, device)

Source from the content-addressed store, hash-verified

63 self._vae = None
64
65 def init(self, device): # force lazy init to happen now
66 super().init(device)
67 if self._vae is None:
68 self._vae = load_invae(self.vae_name, device=device)
69 else:
70 self._vae.to(device)
71
72 def __getstate__(self):
73 return dict(super().__getstate__(), _vae=None) # do not pickle the vae

Callers 1

encodeMethod · 0.95

Calls 2

load_invaeFunction · 0.85
initMethod · 0.45

Tested by

no test coverage detected