Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/aigc3d/LHM
/ tocpu
Method
tocpu
engine/SegmentAPI/SAM.py:121–124 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
119
RATIO_MAP = [[512, 1], [1280, 0.6], [1920, 0.4], [3840, 0.2]]
120
121
def
tocpu(self):
122
self.box_prior.cpu()
123
self.image_predictor.model.cpu()
124
torch.cuda.empty_cache()
125
126
def
tocuda(self):
127
self.box_prior.cuda()
Callers
nothing calls this directly
Calls
1
cpu
Method · 0.80
Tested by
no test coverage detected