Skip to content

Conversation

@JerryWu-code
Copy link
Contributor

@JerryWu-code JerryWu-code commented Nov 26, 2025

What does this PR do?

This PR adds unittest for Z-image Series⚡️ as discussed in #12703 (comment). Z-Image-Turbo, the distillation variant of our Z-Image, could generate 1K resolution photorealistic photo while excels in complex en/zh text rendering within 1-second in H800/H100 cards in bf16-precision.

Z-Image is a powerful and highly efficient 6B-parameter image generation model that is friendly for consumer-grade hardware, with strong capabilities in photorealistic image generation, accurate rendering of both complex Chinese and English text, and robust adherence to bilingual instructions.

The technical report and Z-Image-Turbo checkpoint will be released very soon !!!

Thanks for the support of @yiyixuxu.

Fixes # (issue)

  • Fix bugs for num_images_per_prompt with actual batch.
  • Refine unitest and skip for cases needed separate test env; Fix compatibility with unitest in model, mostly precision formating.
  • Add clean environment for test_save_load_float16 separate environment test and add notes for that; Styling.
  • Merge remote main branch for easy integration.

JerryWu-code and others added 30 commits November 23, 2025 19:54
…ryWu-code/z-image

# Conflicts:
#	src/diffusers/models/transformers/transformer_z_image.py
…ace its origin implement; Add DocString in pipeline for that.
…rd, replace its origin implement; Add DocString in pipeline for that."

This reverts commit fbf26b7.
@HuggingFaceDocBuilderDev

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.

Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

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

thanks so much for the PR! I left some small suggestions:)
let me know what you think

@JerryWu-code
Copy link
Contributor Author

Hi yiyi, this commit e277137 is ready to merged !! 🚀🚀🚀 Thanks 😊

Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

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

thanks! will merge as soon as CI passes

@yiyixuxu yiyixuxu merged commit e6d4612 into huggingface:main Nov 26, 2025
16 of 18 checks passed
# Cannot use enable_full_determinism() which sets it to True
os.environ["CUDA_LAUNCH_BLOCKING"] = "1"
os.environ["CUBLAS_WORKSPACE_CONFIG"] = ":16:8"
torch.use_deterministic_algorithms(False)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I merged this but the tests are a bit flaky (it passed now and passed on my local but I think it is a bit non-deterministic)
Just making a note if it comes up in the future and we can look into it @sayakpaul @DN6

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that would be great !!! Looing forward to that version hah, Thanks your team ~ 😊

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.

4 participants