diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

ZImagePipeline Add Lora

Open snz2 opened this issue 1 month ago • 2 comments

Currently, ZImagePipeline does not support applying LoRA models. This limits the flexibility of the pipeline when trying to use specific styles or customized models.

I would like to request native support for LoRA in ZImagePipeline. Please enable the pipeline to apply LoRA weights.

snz2 avatar Nov 29 '25 07:11 snz2

Hi, thanks for the issue, I'm adding a lora we can use to test this and track it: https://huggingface.co/renderartist/Technically-Color-Z-Image-Turbo

ccing: @sayakpaul

asomoza avatar Nov 29 '25 08:11 asomoza

@snz2 would you like to contribute the support? It's relatively easy to enable native LoRA support actually:

  1. Create a ZImageLoraLoaderMixin class like this: https://github.com/huggingface/diffusers/blob/b010a8ce0c5b5288045045f9f79c496899e80b5a/src/diffusers/loaders/lora_pipeline.py#L5088
  2. Extend the corresponding ZImagePipeline to subclass from ZImageLoraLoaderMixin
  3. That's it.

Additionally, we need to add a conversion function in case the LoRA isn't in the Diffusers format.

If you're not interested, that's fine too. I will get to it, soon.

sayakpaul avatar Nov 29 '25 08:11 sayakpaul