z-image-turbo-lora
Model Overview
An ultra-fast 6B-parameter text-to-image model with LoRA support (see a separate example of how to use it).
Setup your API Key
If you don’t have an API key for the AI/ML API yet, feel free to use our Quickstart guide.
API Schema
The text prompt describing the content, style, or composition of the image to be generated.
landscape_4_3The size of the generated image.
The format of the generated image.
pngPossible values: If set to True, prompt will be upsampled with more details.
trueThe number of inference steps to perform.
The same seed and the same prompt given to the same version of the model will output the same image every time.
The number of images to generate.
1If set to True, the safety checker will be enabled.
trueThe speed of the generation. The higher the speed, the faster the generation.
regularPossible values: Example #1: Standard Text-to-Image
Let's generate an image of the specified size using a simple prompt.
We obtained the following 1440x512 image by running this code example:

Example #2: Text-to-Image with LoRA Fine-Tuning
The alibaba/z-image-turbo-lora model supports applying up to three LoRA adapters to modify the style or behavior of the base model.
The loras parameter is an array of objects, not strings. Each object describes a single LoRA:
path— where to load the LoRA from (Hugging Face repo ID, direct URL to the weights file, or local path).scale— how strongly this LoRA should influence the result (typically between0.6and1.0).
Let's generate an image using a LoRA to influence the visual style.
We obtained the following 1440x512 image by running this code example:

The scale parameter significantly affects the output. The previous example was generated with scale = 0.85, and here’s what happens when we increase it to 1.0:

Last updated
Was this helpful?