Files
DiffSynth-Studio/diffsynth/utils/state_dict_converters/qwen_image_text_encoder.py
2025-12-04 16:33:07 +08:00

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_