MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / hash_state_dict_keys

Function hash_state_dict_keys

models/transformer/utils.py:205–208  ·  view source on GitHub ↗
(state_dict, with_shape=True)

Source from the content-addressed store, hash-verified

203 return model_config, is_controlnet, i2v_mode, is_5b
204
205def hash_state_dict_keys(state_dict, with_shape=True):
206 keys_str = convert_state_dict_keys_to_single_str(state_dict, with_shape=with_shape)
207 keys_str = keys_str.encode(encoding="UTF-8")
208 return hashlib.md5(keys_str).hexdigest()
209
210def convert_state_dict_keys_to_single_str(state_dict, with_shape=True):
211 keys = []

Callers

nothing calls this directly

Tested by

no test coverage detected