Downloads · 30 days
0
hsuwill000/Z-Image-Turbo-ov
Z-Image-Turbo-ov is a machine learning model from hsuwill000. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
<h1 align="center"⚡️- Z-Image OpenVINO™<br<sub<sup基於單流 Diffusion Transformer 的高效圖像生成基礎模型</sup</sub</h1
Downloads · 30 days
0
Access
Public
Updated Jan 13, 2026
Repo size
5.7 GB
Likes
4
Public
Click a slice to open those files.
.bin5.8 GB · 100%
From the Hugging Face model README
<a href="https://arxiv.org/abs/2511.22699" target="_blank"><img src="https://img.shields.io/badge/Report-b5212f.svg?logo=arxiv" height="21px"></a>
歡迎使用 Z-Image(造相)項目的 OpenVINO™ INT4量化版本!本版本專為 Intel 硬體加速設計,實現高效的本地端推理。
</div>Z-Image 是一個擁有 6B 參數的高性能圖像生成模型。透過 OpenVINO™ 的優化,您可以輕鬆在個人電腦(如 Intel Core™ 處理器或 Arc™ 獨立顯卡)上流暢運行,無需依賴雲端 GPU。
Z-Image採用了 可擴展單流 DiT (S3-DiT) 架構。在此架構中,文本、視覺語義 Token 以及 VAE Token 在序列層面進行拼接,形成統一的輸入流,與傳統雙流架構相比,極大地提升了參數效率。
請執行以下指令安裝必要的相依庫與特定版本:
python.exe -m pip install --upgrade pip
pip3 uninstall -y optimum transformers optimum-intel diffusers
pip3 install git+https://github.com/huggingface/diffusers
pip3 install git+https://github.com/openvino-dev-samples/optimum-intel.git@zimage
pip3 install nncf
pip3 install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cpu
pip3 install openvino==2025.4
optimum-cli export openvino --model Tongyi-MAI/Z-Image-Turbo --task text-to-image Z-Image-Turbo-ov --weight-format int4 --group-size 64 --ratio 1.0
import os
import random
import torch
from optimum.intel import OVZImagePipeline
import openvino as ov
core = ov.Core()
# 偵測支援的設備
available_devices = core.available_devices
print(f"目前可用設備: {available_devices}")
# 1. 模型初始化
device = "GPU" if "GPU" in available_devices else "CPU"
model_id = "hsuwill000/Z-Image-Turbo-ov"
pipe = OVZImagePipeline.from_pretrained(model_id, device=device)
# 2. 設定提示詞與隨機種子
prompt = "Young Chinese woman in red Hanfu, intricate embroidery. Impeccable makeup. Neon lightning-bolt lamp (⚡️), bright yellow glow, above extended left palm. Soft-lit outdoor night background, silhouetted tiered pagoda, blurred colorful distant lights."
seed = random.randint(0, 2**32 - 1)
# 3. 執行推論
image = pipe(
prompt=prompt,
height=512,
width=512,
num_inference_steps=7,
guidance_scale=0.0,
generator=torch.Generator("cpu").manual_seed(seed),
).images[0]
# 4. 儲存結果
image.save("z_image_ov_output.png")