prunaai/z-image-lora
A Lora version of z-image, an Efficient Image Generation Foundation Model with Single-Stream Diffusion Transformer
Run prunaai/z-image-lora with an API
Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.
Input schema
The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.
| Field | Type | Default value | Description |
|---|---|---|---|
| prompt |
string
|
Text prompt for image generation
|
|
| negative_prompt |
string
|
|
Negative prompt to specify what you don't want in the image
|
| height |
integer
|
1024
Min: 64 Max: 2048 |
Height of the generated image
|
| width |
integer
|
1024
Min: 64 Max: 2048 |
Width of the generated image
|
| num_inference_steps |
integer
|
28
Min: 1 Max: 50 |
Number of inference steps. Recommended range: 28-50
|
| guidance_scale |
number
|
4
Max: 20 |
Guidance scale for classifier-free guidance. Recommended range: 3.0-5.0
|
| seed |
integer
|
Random seed. Set for reproducible generation
|
|
| lora_weights |
array
|
LoRA weights as an array of URLs. Supports .safetensors URLs, tar files, and zip files (e.g., ['https://example.com/lora1.safetensors', 'https://example.com/lora2.safetensors'])
|
|
| lora_scales |
array
|
Scales for each LoRA as an array of floats. Must match the number of lora_weights. Defaults to 1.0 for each if not provided.
|
|
| output_format |
None
|
jpg
|
Format of the output images
|
| output_quality |
integer
|
80
Max: 100 |
Quality when saving the output images, from 0 to 100. 100 is best quality, 0 is lowest quality. Not relevant for .png outputs
|
{
"type": "object",
"title": "Input",
"required": [
"prompt"
],
"properties": {
"seed": {
"type": "integer",
"title": "Seed",
"x-order": 6,
"nullable": true,
"description": "Random seed. Set for reproducible generation"
},
"width": {
"type": "integer",
"title": "Width",
"default": 1024,
"maximum": 2048,
"minimum": 64,
"x-order": 3,
"description": "Width of the generated image"
},
"height": {
"type": "integer",
"title": "Height",
"default": 1024,
"maximum": 2048,
"minimum": 64,
"x-order": 2,
"description": "Height of the generated image"
},
"prompt": {
"type": "string",
"title": "Prompt",
"x-order": 0,
"description": "Text prompt for image generation"
},
"lora_scales": {
"type": "array",
"items": {
"type": "number"
},
"title": "Lora Scales",
"x-order": 8,
"nullable": true,
"description": "Scales for each LoRA as an array of floats. Must match the number of lora_weights. Defaults to 1.0 for each if not provided."
},
"lora_weights": {
"type": "array",
"items": {
"type": "string"
},
"title": "Lora Weights",
"x-order": 7,
"nullable": true,
"description": "LoRA weights as an array of URLs. Supports .safetensors URLs, tar files, and zip files (e.g., ['https://example.com/lora1.safetensors', 'https://example.com/lora2.safetensors'])"
},
"output_format": {
"enum": [
"png",
"jpg",
"webp"
],
"type": "string",
"title": "output_format",
"description": "Format of the output images",
"default": "jpg",
"x-order": 9
},
"guidance_scale": {
"type": "number",
"title": "Guidance Scale",
"default": 4,
"maximum": 20,
"minimum": 0,
"x-order": 5,
"description": "Guidance scale for classifier-free guidance. Recommended range: 3.0-5.0"
},
"output_quality": {
"type": "integer",
"title": "Output Quality",
"default": 80,
"maximum": 100,
"minimum": 0,
"x-order": 10,
"description": "Quality when saving the output images, from 0 to 100. 100 is best quality, 0 is lowest quality. Not relevant for .png outputs"
},
"negative_prompt": {
"type": "string",
"title": "Negative Prompt",
"default": "",
"x-order": 1,
"description": "Negative prompt to specify what you don't want in the image"
},
"num_inference_steps": {
"type": "integer",
"title": "Num Inference Steps",
"default": 28,
"maximum": 50,
"minimum": 1,
"x-order": 4,
"description": "Number of inference steps. Recommended range: 28-50"
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
{
"type": "array",
"items": {
"type": "string",
"format": "uri"
},
"title": "Output"
}