-
Notifications
You must be signed in to change notification settings - Fork 107
feat: Add support for Qwen Image LoRA #642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
I just tested this (with your other PR for nunchaku itself) and it seems to work fine (see #479 (comment)) Though this doesn't seem to support LoRAs that have trigger words ? @Bluear7878 |
|
Hmm it seems torch.compile is breaking this PR: Loras work fine when I don't use torch.compile 😎 |
|
It seems LoRAs don't unload when I bypass the load lora node. I need to manually unload the model (comfyui-manager button) to be able to unload any lora. This is a pretty big issue, as it behaves weirdly and need workaround and is painful for end-users From most important to least important fixes needed:
|
I don't believe the text encoder is ever fine-tuned when training a Qwen Image LoRA, so it doesn't need to be passed through the LoRA Apply node (meaning trigger words will work with this PR). You can see this by looking at the weights of Qwen Image LoRAs that use trigger words on HuggingFace:
Notice that all of the weights are for the diffusion model. The text encoder isn't modified, even though a trigger word is required. Also the workflow uses the Compare to SDXL: Note that the |

Closes #479
This pr introduces support for applying LoRA weights to the Qwen-image model. at Comfy
Issues
Please be aware that there is a known limitation in this implementation: the CPU offload mode does not currently work when a LoRA is applied.
I am actively working on resolving this issue and plan to release a fix in a follow-up PR soon.