MCPcopy Create free account
hub / github.com/huggingface/diffusers / get_state

Method get_state

src/diffusers/hooks/hooks.py:42–47  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

40 self._current_context = None
41
42 def get_state(self):
43 if self._current_context is None:
44 raise ValueError("No context is set. Please set a context before retrieving the state.")
45 if self._current_context not in self._state_cache.keys():
46 self._state_cache[self._current_context] = self._state_cls(*self._init_args, **self._init_kwargs)
47 return self._state_cache[self._current_context]
48
49 def set_context(self, name: str) -> None:
50 self._current_context = name

Callers 9

new_forwardMethod · 0.45
new_forwardMethod · 0.45
new_forwardMethod · 0.45
new_forwardMethod · 0.45
new_forwardMethod · 0.45
new_forwardMethod · 0.45
_get_calibration_dataMethod · 0.45

Calls

no outgoing calls

Tested by 1

_get_calibration_dataMethod · 0.36