Open
Conversation
The base model is: https://huggingface.co/Tongyi-MAI/Z-Image-Turbo This is a JavaScript demo of Z-Image Turbo accelerated by WebNN and WebGPU. By default it uses WebGPU, since WebNN is not available, it depends on the dynamic shape support. ONNX models: https://huggingface.co/webnn/Z-Image-Turbo Co-authored-by: Belem Zhang <belem.zhang@intel.com>
Contributor
Author
|
@fdwr, PTAL, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Models
The base model is Z-Image Turbo.
Z-Image-Turbo – 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.
It is consist of 3 models:
We converted the model to ONNX format with several optimization as follows:
ONNX models have been published at https://huggingface.co/webnn/Z-Image-Turbo.
Model Size:
Demo
Based on SDXL-Turbo, made some adjustments on the UI, and optimized the pipeline to improve the performance and memory efficiency through following strategies:
By default it uses the WebGPU EP, WebNN is not available now. It depends on the dynamic shape support. (User prompt is a dynamic input shape).
RAM requirements (WebGPU):
Preview
https://honry.github.io/webnn-developer-preview/demos/z-image-turbo/