mirror of
https://github.com/modelscope/DiffSynth-Studio.git
synced 2026-04-24 06:46:13 +00:00
11 lines
283 B
Python
11 lines
283 B
Python
def AceStepDiTModelStateDictConverter(state_dict):
|
|
new_state_dict = {}
|
|
prefix = "decoder."
|
|
|
|
for key in state_dict:
|
|
if key.startswith(prefix):
|
|
new_key = key[len(prefix):]
|
|
new_state_dict[new_key] = state_dict[key]
|
|
|
|
return new_state_dict
|