MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / inner

Function inner

sat/sgm/modules/autoencoding/magvit2_pytorch.py:158–169  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

156def remove_vgg(fn):
157 @wraps(fn)
158 def inner(self, *args, **kwargs):
159 has_vgg = hasattr(self, "vgg")
160 if has_vgg:
161 vgg = self.vgg
162 delattr(self, "vgg")
163
164 out = fn(self, *args, **kwargs)
165
166 if has_vgg:
167 self.vgg = vgg
168
169 return out
170
171 return inner
172

Callers

nothing calls this directly

Calls 1

fnFunction · 0.85

Tested by

no test coverage detected