MCPcopy Create free account
hub / github.com/tdrussell/diffusion-pipe / state_dict

Method state_dict

optimizers/optimizer_utils.py:254–260  ·  view source on GitHub ↗

Returns a dictionary containing the current state of the tensor.

(self)

Source from the content-addressed store, hash-verified

252 return self.dequantize().to(*args, **kwargs)
253
254 def state_dict(self):
255 """Returns a dictionary containing the current state of the tensor."""
256 return {
257 'quantized': self.quantized,
258 'scale': self.scale,
259 'orig_dtype': self.orig_dtype
260 }
261
262 def _load_from_state_dict(self, state_dict):
263 """Loads the tensor state from a state dictionary."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected