Replies: 2 comments 2 replies
|
The unconditional model is loaded with For LoRA weights to be applied to the unconditionnal model, they need to have the If you're asking if the LoRA weights that target the main diffusion model are also applied to the unconditionnal model, then no. But if the LoRA model is made with duplicated weights targetting the uncond model, then they would be applied. |
|
Confirming from the source, since I looked into this recently: in So no, it's not done automatically, and it matters exactly in your case: you load the uncond transformer with If your LoRA only ships main-branch weights, the straightforward fix is duplicating the keys into the uncond namespace before use: from safetensors.torch import load_file, save_file
sd = load_file("lora.safetensors")
out = dict(sd)
prefix = "model.diffusion_model."
for k, v in sd.items():
if k.startswith(prefix):
out["model.diffusion_model.uncond." + k[len(prefix):]] = v
save_file(out, "lora_with_uncond.safetensors")Roughly doubles the file size in memory since every tensor exists twice, but that's the cost of the separate uncond model. If the LoRA was trained with the uncond keys already duplicated (some of the Ideogram4 ones are), check the key names first and skip this entirely. If that gets the LoRA applying on both branches, marking the thread solved would help the next Ideogram4 user hunting for this. |
Uh oh!
There was an error while loading. Please reload this page.
The title. I have read LORAs need to be applied to both parts of Ideogram4 for proper results. Is it done automatically or not? TIA
All reactions