mirror of
https://github.com/modelscope/DiffSynth-Studio.git
synced 2026-03-19 06:48:12 +00:00
11 lines
341 B
Python
11 lines
341 B
Python
def QwenImageTextEncoderStateDictConverter(state_dict):
|
|
state_dict_ = {}
|
|
for k in state_dict:
|
|
v = state_dict[k]
|
|
if k.startswith("visual."):
|
|
k = "model." + k
|
|
elif k.startswith("model."):
|
|
k = k.replace("model.", "model.language_model.")
|
|
state_dict_[k] = v
|
|
return state_dict_
|