MCPcopy
hub / github.com/KlingAIResearch/ReCamMaster / forward

Method forward

diffsynth/vram_management/layers.py:33–38  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

31 self.state = 1
32
33 def forward(self, *args, **kwargs):
34 if self.onload_dtype == self.computation_dtype and self.onload_device == self.computation_device:
35 module = self.module
36 else:
37 module = copy.deepcopy(self.module).to(dtype=self.computation_dtype, device=self.computation_device)
38 return module(*args, **kwargs)
39
40
41class AutoWrappedLinear(torch.nn.Linear):

Callers

nothing calls this directly

Calls 1

toMethod · 0.45

Tested by

no test coverage detected