MCPcopy Create free account
hub / github.com/OpenImagingLab/FlashVSR / onload

Method onload

diffsynth/vram_management/layers.py:60–63  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

58 self.state = 0
59
60 def onload(self):
61 if self.state == 0 and (self.offload_dtype != self.onload_dtype or self.offload_device != self.onload_device):
62 self.to(dtype=self.onload_dtype, device=self.onload_device)
63 self.state = 1
64
65 def forward(self, x, *args, **kwargs):
66 if self.onload_dtype == self.computation_dtype and self.onload_device == self.computation_device:

Callers

nothing calls this directly

Calls 1

toMethod · 0.45

Tested by

no test coverage detected