MCPcopy Index your code
hub / github.com/modelscope/DiffSynth-Studio / keep

Method keep

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

Source from the content-addressed store, hash-verified

28 self.state = 1
29
30 def keep(self):
31 if self.state != 2:
32 self.to(dtype=self.computation_dtype, device=self.computation_device)
33 self.state = 2
34
35
36class AutoWrappedModule(AutoTorchModule):

Callers 3

forwardMethod · 0.80
forwardMethod · 0.80
forwardMethod · 0.80

Calls 1

toMethod · 0.45

Tested by

no test coverage detected