Conversation
Updated the pipeline structure to include ZImageImg2ImgPipeline
alongside ZImagePipeline.
Implemented the ZImageImg2ImgPipeline class for image-to-image
transformations, including necessary methods for
encoding prompts, preparing latents, and denoising.
Enhanced the auto_pipeline to map the new ZImageImg2ImgPipeline
for image generation tasks.
Added unit tests for ZImageImg2ImgPipeline to ensure
functionality and performance.
Updated dummy objects to include ZImageImg2ImgPipeline for
testing purposes.
|
For some reason the VAE Tiling couldn't meet the 0.2 diff threshold, my test has upped that to 0.3, whether further investigation is warranted I am not sure. |
asomoza
left a comment
There was a problem hiding this comment.
thanks a lot again! for this one we should probably wait for the lora one to be merged. I left a few comments
|
@asomoza I just thought, I have inpainting PR lined up, do you think keeping this one img2img only and inpainting after that, separately, is the better approach, to keep the PR review easier? Or is it less work for you guys if I also merge this in this PR? |
|
I prefer to keep them separated, I'm not really sure the inpainting can be good with this model so I want to test it and maybe we can add something like differential diffusion as a switch for it to be better |
- Add `# Copied from` annotations to encode_prompt and _encode_prompt - Add ZImagePipeline to auto_pipeline.py for AutoPipeline support
|
@CalamitousFelicitousness you need to resolve the conflict before we can proceed |
Resolved conflict in src/diffusers/pipelines/__init__.py by: - Accepting upstream's expanded Kandinsky5 pipelines - Preserving ZImageImg2ImgPipeline addition
|
@asomoza The conflict has been resolved. |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Resolve conflict in _toctree.yml: use upstream's z_image.md naming convention and add ZImageImg2ImgPipeline documentation.
|
@asomoza Gentle reminder if you could review. |
|
@sayakpaul do you have time to also review it if I missed something |
sayakpaul
left a comment
There was a problem hiding this comment.
Just some nits! Thanks for this!
|
|
||
| Z-Image-Turbo is a distilled version of Z-Image that matches or exceeds leading competitors with only 8 NFEs (Number of Function Evaluations). It offers sub-second inference latency on enterprise-grade H800 GPUs and fits comfortably within 16G VRAM consumer devices. It excels in photorealistic image generation, bilingual text rendering (English & Chinese), and robust instruction adherence. | ||
|
|
||
| ## Image-to-image |
There was a problem hiding this comment.
If the default example docstrings don't change, then we can remove this as ## ZImageImg2ImgPipeline below will render it.
| t_scale=1000.0, | ||
| axes_dims=[8, 4, 4], | ||
| axes_lens=[256, 32, 32], | ||
| ) |
There was a problem hiding this comment.
We can do something like:
https://github.com/huggingface/diffusers/blob/f67639b0bb54d3ccf7fc17157ba0b1e2e959ac5e/tests/pipelines/z_image/test_z_image.py#L104C9-L110C1
And fix the slices for test_inference()?



What does this PR do?
This PR adds img2img pipeline for Z-Image. The summary of changes are below
Closes issue #12752
Tested using a simple script:
Testing script
Prompt:
a woman sitting in a dark room, oil painting style, impressionist, vibrant colorsLoRA functionality depends on my other PR #12750, so they will have to be merged sequentially. I did not think there was much point in leaving it out.
Before submitting
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
@sayakpaul @asomoza