MCPcopy Index your code
hub / github.com/huggingface/diffusers / store

Method store

src/diffusers/training_utils.py:823–830  ·  view source on GitHub ↗

r""" Saves the current parameters for restoring later. Args: parameters: Iterable of `torch.nn.Parameter`. The parameters to be temporarily stored.

(self, parameters: Iterable[torch.nn.Parameter])

Source from the content-addressed store, hash-verified

821 }
822
823 def store(self, parameters: Iterable[torch.nn.Parameter]) -> None:
824 r"""
825 Saves the current parameters for restoring later.
826
827 Args:
828 parameters: Iterable of `torch.nn.Parameter`. The parameters to be temporarily stored.
829 """
830 self.temp_stored_params = [param.detach().cpu().clone() for param in parameters]
831
832 def restore(self, parameters: Iterable[torch.nn.Parameter]) -> None:
833 r"""

Callers 15

mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95

Calls

no outgoing calls

Tested by 1

test_kv_cache_clearMethod · 0.36