Skip to content
代码片段 群组 项目
提交 25b51b1a 编辑于 作者: comfyanonymous's avatar comfyanonymous
浏览文件

Hunyuan DiT lora support.

上级 61a2b00b
No related branches found
No related tags found
无相关合并请求
......@@ -282,4 +282,10 @@ def model_lora_keys_unet(model, key_map={}):
key_lora = "transformer.{}".format(k[:-len(".weight")]) #simpletrainer and probably regular diffusers lora format
key_map[key_lora] = to
if isinstance(model, comfy.model_base.HunyuanDiT):
for k in sdk:
if k.startswith("diffusion_model.") and k.endswith(".weight"):
key_lora = k[len("diffusion_model."):-len(".weight")]
key_map["base_model.model.{}".format(key_lora)] = k #official hunyuan lora format
return key_map
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册