MCPcopy Create free account
hub / github.com/cientgu/VQ-Diffusion / get_model_buffer

Function get_model_buffer

image_synthesis/utils/misc.py:159–167  ·  view source on GitHub ↗
(model)

Source from the content-addressed store, hash-verified

157
158
159def get_model_buffer(model):
160 state_dict = model.state_dict()
161 buffers_ = {}
162 params_ = {n: p for n, p in model.named_parameters()}
163
164 for k in state_dict:
165 if k not in params_:
166 buffers_[k] = state_dict[k]
167 return buffers_

Callers

nothing calls this directly

Calls 1

state_dictMethod · 0.45

Tested by

no test coverage detected