mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-15 13:02:35 +08:00
Implement TwinFlow-Z-Image LoRA compatibility
Add compatibility for TwinFlow-Z-Image LoRAs to target t_embedder_2.* keys.
This commit is contained in:
parent
f21f6b2212
commit
00c4e72a97
@ -328,6 +328,13 @@ def model_lora_keys_unet(model, key_map={}):
|
||||
key_map["lycoris_{}".format(key_lora.replace(".", "_"))] = to
|
||||
key_map[key_lora] = to
|
||||
|
||||
# TwinFlow-Z-Image LoRAs can target t_embedder_2.* keys.
|
||||
# Alias them back to t_embedder.* targets for compatibility.
|
||||
if isinstance(model, comfy.model_base.TwinFlow_Z_Image):
|
||||
for key in list(key_map.keys()):
|
||||
if "t_embedder." in key and "t_embedder_2." not in key:
|
||||
key_map[key.replace("t_embedder.", "t_embedder_2.", 1)] = key_map[key]
|
||||
|
||||
if isinstance(model, comfy.model_base.Kandinsky5):
|
||||
for k in sdk:
|
||||
if k.startswith("diffusion_model.") and k.endswith(".weight"):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user