beyond-reality-z-image-diffusers

This is a converted version of the Beyond Reality Z-Image transformer, converted to diffusers format for use with the ZImagePipeline.

Model Description

This transformer is based on Beyond Reality Z-Image, converted from ComfyUI format to diffusers format.

Usage

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")

Original Model

Conversion Details

The model was converted from ComfyUI format to diffusers format with the following key transformations:

  • Removed model.diffusion_model. prefix from all keys
  • Renamed x_embedder to all_x_embedder.2-1
  • Renamed final_layer to all_final_layer.2-1
  • Split attention.qkv into attention.to_q, attention.to_k, attention.to_v
  • Renamed attention.out to attention.to_out.0
  • Renamed attention.q_norm to attention.norm_q
  • Renamed attention.k_norm to attention.norm_k
Downloads last month
17
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for linoyts/beyond-reality-z-image-diffusers

Finetuned
(47)
this model

Space using linoyts/beyond-reality-z-image-diffusers 1