Downloads · 30 days
30
4% of all-time downloads
linoyts/beyond-reality-z-image-diffusers
beyond-reality-z-image-diffusers is a text-to-image model from linoyts. Use it when you need an image from a text prompt. It is set up for diffusers. The card lists the license as apache-2.0.
This is a converted version of the Beyond Reality Z-Image transformer, converted to diffusers format for use with the ZImagePipeline.
Downloads · 30 days
30
4% of all-time downloads
All-time downloads
798
Public
Parameters
6.2B
36.9 GB on disk
Likes
5
Public
Click a slice to open those files.
.safetensors12.3 GB · 100%
From the Hugging Face model README
This is a converted version of the Beyond Reality Z-Image transformer, converted to diffusers format for use with the ZImagePipeline.
This transformer is based on Beyond Reality Z-Image, converted from ComfyUI format to diffusers format.
import torch
from diffusers import ZImagePipeline, ZImageTransformer2DModel
# Load the custom transformer
transformer = ZImageTransformer2DModel.from_pretrained(
"linoyts/beyond-reality-z-image-diffusers",
torch_dtype=torch.bfloat16
)
# Load the pipeline with custom transformer
pipe = ZImagePipeline.from_pretrained(
"Tongyi-MAI/Z-Image-Turbo",
transformer=transformer,
torch_dtype=torch.bfloat16,
)
pipe.to("cuda")
# Generate an image
prompt = "A beautiful landscape with mountains and a lake, photorealistic, 8k"
image = pipe(
prompt=prompt,
num_inference_steps=8,
guidance_scale=0.0, # Z-Image-Turbo uses guidance_scale=0
width=1024,
height=1024,
).images[0]
image.save("output.png")
The model was converted from ComfyUI format to diffusers format with the following key transformations:
model.diffusion_model. prefix from all keysx_embedder to all_x_embedder.2-1final_layer to all_final_layer.2-1attention.qkv into attention.to_q, attention.to_k, attention.to_vattention.out to attention.to_out.0attention.q_norm to attention.norm_qattention.k_norm to attention.norm_k