Skip to content

adding lora support to z-image controlnet pipelines#13200

Merged
sayakpaul merged 1 commit intohuggingface:mainfrom
scenario-labs:fix_lora_zimage_controlnet
Mar 5, 2026
Merged

adding lora support to z-image controlnet pipelines#13200
sayakpaul merged 1 commit intohuggingface:mainfrom
scenario-labs:fix_lora_zimage_controlnet

Conversation

@christopher5106
Copy link
Contributor

@christopher5106 christopher5106 commented Mar 2, 2026

If you don't see any problem having Lora support for Controlnet pipelines for Z-Image, here is the PR.

@sayakpaul

@sayakpaul
Copy link
Member

Could you provide an example?

@christopher5106
Copy link
Contributor Author

Example:

import torch
from diffusers import ZImageControlNetPipeline
from diffusers import ZImageControlNetModel
from huggingface_hub import hf_hub_download

controlnet = ZImageControlNetModel.from_single_file(
    hf_hub_download(
        "alibaba-pai/Z-Image-Turbo-Fun-Controlnet-Union",
        filename="Z-Image-Turbo-Fun-Controlnet-Union.safetensors",
    ),
    torch_dtype=torch.bfloat16,
)

pipe = ZImageControlNetPipeline.from_pretrained("Tongyi-MAI/Z-Image-Turbo", torch_dtype=torch.bfloat16, controlnet=controlnet)

pipe.load_lora_weights(
    "multimodalart/tarot-z-image-lora", weight_name="tarot-z-image.safetensors",
)

@sayakpaul sayakpaul requested a review from asomoza March 3, 2026 02:33
Copy link
Member

@asomoza asomoza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@sayakpaul sayakpaul merged commit 20364fe into huggingface:main Mar 5, 2026
11 checks passed
@christopher5106 christopher5106 deleted the fix_lora_zimage_controlnet branch March 5, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants