MCPcopy Create free account
hub / github.com/ace-step/ACE-Step / __exit__

Method __exit__

acestep/cpu_offload.py:17–22  ·  view source on GitHub ↗
(self, *args)

Source from the content-addressed store, hash-verified

15 return self.model
16
17 def __exit__(self, *args):
18 if not hasattr(self.model,"torchao_quantized"):
19 self.model.to("cpu")
20 if torch.cuda.is_available():
21 torch.cuda.empty_cache()
22 torch.cuda.synchronize()
23
24
25T = TypeVar('T')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected