--- license: apache-2.0 library_name: videox_fun pipeline_tag: text-to-image tags: - lora --- # Z-Image-Fun-Lora-Distill [![Github](https://img.shields.io/badge/🎬%20Code-VideoX_Fun-blue)](https://github.com/aigc-apps/VideoX-Fun) ## Model Card | Name | Description | |--|--| | Z-Image-Fun-Lora-Distill-4-Steps-2602.safetensors | A Distill LoRA for Z-Image that distills both steps and CFG. Compared to Z-Image-Fun-Lora-Distill-8-Steps.safetensors, it requires only 4 steps instead of 8 steps, its colors are more consistent with the original model, and the skin texture is better. | | Z-Image-Fun-Lora-Distill-4-Steps-2602-ComfyUI.safetensors | ComfyUI version of Z-Image-Fun-Lora-Distill-4-Steps-2602.safetensors | | Z-Image-Fun-Lora-Distill-8-Steps-2602.safetensors | A Distill LoRA for Z-Image that distills both steps and CFG. Compared to Z-Image-Fun-Lora-Distill-8-Steps.safetensors, its colors are more consistent with the original model, and the skin texture is better. | | Z-Image-Fun-Lora-Distill-8-Steps-2602-ComfyUI.safetensors | ComfyUI version of Z-Image-Fun-Lora-Distill-8-Steps-2602.safetensors | | 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](https://huggingface.co/alibaba-pai/Z-Image-Fun-Controlnet-Union-2.1). - 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. - The purpose of this model is to provide fast generation compatibility for Z-Image derivative models, not to replace Z-Image-Turbo. ## Results ### The difference between the 2602 version model and the previous model
Z-Image-Fun-Lora-Distill-8-Steps-2602 Z-Image-Fun-Lora-Distill-4-Steps-2602 Z-Image-Fun-Lora-Distill-8-Steps
### Work itself
Output 25 steps Output 8-Steps-2602 Output 4-Steps-2602
Output 25 steps Output 8-Steps-2602 Output 4-Steps-2602
Output 25 steps Output 8-Steps-2602 Output 4-Steps-2602
Output 25 steps Output 8-Steps-2602 Output 4-Steps-2602
### Work with Controlnet
Pose + Inpaint Output 25 steps Output 8-Steps-2602 Output 4-Steps-2602
Pose + Inpaint Output 25 steps Output 8-Steps-2602 Output 4-Steps-2602
Pose Output 25 steps Output 8-Steps-2602 Output 4-Steps-2602
Canny Output Output 8-Steps-2602 Output 4-Steps-2602
Depth Output Output 8-Steps-2602 Output 4-Steps-2602
## Inference Go to the VideoX-Fun repository for more details. Please clone the VideoX-Fun repository and create the required directories: ```sh # 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-4-Steps-2602.safetensors │ ├── 📦 Z-Image-Fun-Lora-Distill-8-Steps-2602.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)