Z-Image-Fun-Lora-Distill

Github

Model Card

Name Description
Z-Image-Fun-Lora-Distill-8-Steps.safetensors This is a Distill LoRA for Z-Image that distills both steps and CFG. This model does not require CFG and uses 8 steps for inference.

Model Features

  • This is a Distill LoRA for Z-Image that distills both steps and CFG. It does not use any Z-Image-Turbo related weights and is trained from scratch. It is compatible with other Z-Image LoRAs and Controls.
  • This model will slightly reduce the output quality and change the output composition of the model. For specific comparisons, please refer to the Results section. In most cases, the Distill LoRA performs well; currently, the biggest issue is that it may make the generated results brighter.
  • The purpose of this model is to provide fast generation compatibility for Z-Image derivative models, not to replace Z-Image-Turbo.

TODO

  • Optimize the output brightness;
  • Train a 4-step LoRA.

Results

Work itself

Output 25 steps Output 8 steps
Output 25 steps Output 8 steps
Output 25 steps Output 8 steps
Output 25 steps Output 8 steps

Work with Controlnet

Pose + Inpaint Output 25 steps Output 8 steps
Pose + Inpaint Output 25 steps Output 8 steps
Pose Output 25 steps Output 8 steps
Pose Output 25 steps Output 8 steps
Canny Output Output 8 steps
Depth Output Output 8 steps

Inference

Go to the VideoX-Fun repository for more details.

Please clone the VideoX-Fun repository and create the required directories:

# Clone the code
git clone https://github.com/aigc-apps/VideoX-Fun.git

# Enter VideoX-Fun's directory
cd VideoX-Fun

# Create model directories
mkdir -p models/Diffusion_Transformer
mkdir -p models/Personalized_Model

Then download the weights into models/Diffusion_Transformer and models/Personalized_Model.

πŸ“¦ models/
β”œβ”€β”€ πŸ“‚ Diffusion_Transformer/
β”‚   └── πŸ“‚ Z-Image/
β”œβ”€β”€ πŸ“‚ Personalized_Model/
β”‚   β”œβ”€β”€ πŸ“¦ Z-Image-Fun-Lora-Distill-8-Steps.safetensors
β”‚   β”œβ”€β”€ πŸ“¦ Z-Image-Fun-Controlnet-Union-2.1.safetensors
β”‚   └── πŸ“¦ Z-Image-Fun-Controlnet-Union-2.1-lite.safetensors

To run the model, first set the lora_path in examples/z_image/predict_t2i.py to: Personalized_Model/Z-Image-Fun-Lora-Distill-8-Steps.safetensors

Then, run the file: examples/z_image/predict_t2i.py

The following scripts are also supported:

  • examples/z_image_fun/predict_t2i_control_2.1.py
  • examples/z_image_fun/predict_i2i_inpaint_2.1.py

Recommended Settings:

  • cfg = 1.0
  • steps = 8
  • lora_weight = 0.8 (suggested range: 0.7 ~ 0.8)
Downloads last month
438
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Collection including alibaba-pai/Z-Image-Fun-Lora-Distill