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

Function update_state_dict_

scripts/convert_wan_to_diffusers.py:316–317  ·  view source on GitHub ↗
(state_dict: Dict[str, Any], old_key: str, new_key: str)

Source from the content-addressed store, hash-verified

314
315
316def update_state_dict_(state_dict: Dict[str, Any], old_key: str, new_key: str) -> dict[str, Any]:
317 state_dict[new_key] = state_dict.pop(old_key)
318
319
320def 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…