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

Function update_state_dict_

scripts/convert_skyreelsv2_to_diffusers.py:69–70  ·  view source on GitHub ↗
(state_dict: Dict[str, Any], old_key: str, new_key: str)

Source from the content-addressed store, hash-verified

67
68
69def update_state_dict_(state_dict: Dict[str, Any], old_key: str, new_key: str) -> dict[str, Any]:
70 state_dict[new_key] = state_dict.pop(old_key)
71
72
73def load_sharded_safetensors(dir: pathlib.Path):

Callers 1

convert_transformerFunction · 0.70

Calls 1

popMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…