replicate/qwen-image-2.1-lora
Run Qwen Image 2.1 with your own custom LoRAs
Run replicate/qwen-image-2.1-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
|
Image generation or editing prompt
|
|
| negative_prompt |
string
|
|
Negative prompt; used when guidance is greater than 1
|
| image |
string
|
Optional reference image for editing
|
|
| reference_images |
array
|
Additional reference images, up to ten total
|
|
| aspect_ratio |
None
|
1:1
|
Output aspect ratio
|
| width |
integer
|
Custom output width, a multiple of 32
|
|
| height |
integer
|
Custom output height, a multiple of 32
|
|
| num_inference_steps |
integer
|
40
Min: 1 Max: 100 |
Denoising steps
|
| guidance_scale |
number
|
1
Min: 1 Max: 10 |
True CFG scale; 1 disables classifier-free guidance
|
| num_outputs |
integer
|
1
Min: 1 Max: 4 |
Number of images
|
| seed |
integer
|
Max: 2147483647 |
Random seed
|
| lora |
string
|
SimpleTuner LoRA safetensors URL or local path
|
|
| lora_scale |
number
|
1
Min: -3 Max: 3 |
Primary LoRA strength
|
| lora_2 |
string
|
Optional second LoRA
|
|
| lora_2_scale |
number
|
1
Min: -3 Max: 3 |
Second LoRA strength
|
| use_kv_cache |
boolean
|
True
|
Reuse text and condition-image prefix keys and values
|
| output_format |
None
|
png
|
Output format
|
| output_quality |
integer
|
95
Min: 1 Max: 100 |
WebP quality
|
{
"type": "object",
"title": "Input",
"required": [
"prompt"
],
"properties": {
"lora": {
"type": "string",
"title": "Lora",
"x-order": 11,
"nullable": true,
"description": "SimpleTuner LoRA safetensors URL or local path"
},
"seed": {
"type": "integer",
"title": "Seed",
"maximum": 2147483647,
"minimum": 0,
"x-order": 10,
"nullable": true,
"description": "Random seed"
},
"image": {
"type": "string",
"title": "Image",
"format": "uri",
"x-order": 2,
"nullable": true,
"description": "Optional reference image for editing"
},
"width": {
"type": "integer",
"title": "Width",
"x-order": 5,
"nullable": true,
"description": "Custom output width, a multiple of 32"
},
"height": {
"type": "integer",
"title": "Height",
"x-order": 6,
"nullable": true,
"description": "Custom output height, a multiple of 32"
},
"lora_2": {
"type": "string",
"title": "Lora 2",
"x-order": 13,
"nullable": true,
"description": "Optional second LoRA"
},
"prompt": {
"type": "string",
"title": "Prompt",
"x-order": 0,
"description": "Image generation or editing prompt"
},
"lora_scale": {
"type": "number",
"title": "Lora Scale",
"default": 1,
"maximum": 3,
"minimum": -3,
"x-order": 12,
"description": "Primary LoRA strength"
},
"num_outputs": {
"type": "integer",
"title": "Num Outputs",
"default": 1,
"maximum": 4,
"minimum": 1,
"x-order": 9,
"description": "Number of images"
},
"aspect_ratio": {
"enum": [
"1:1",
"4:3",
"3:4",
"3:2",
"2:3",
"16:9",
"9:16"
],
"type": "string",
"title": "aspect_ratio",
"description": "Output aspect ratio",
"default": "1:1",
"x-order": 4
},
"lora_2_scale": {
"type": "number",
"title": "Lora 2 Scale",
"default": 1,
"maximum": 3,
"minimum": -3,
"x-order": 14,
"description": "Second LoRA strength"
},
"use_kv_cache": {
"type": "boolean",
"title": "Use Kv Cache",
"default": true,
"x-order": 15,
"description": "Reuse text and condition-image prefix keys and values"
},
"output_format": {
"enum": [
"png",
"webp"
],
"type": "string",
"title": "output_format",
"description": "Output format",
"default": "png",
"x-order": 16
},
"guidance_scale": {
"type": "number",
"title": "Guidance Scale",
"default": 1,
"maximum": 10,
"minimum": 1,
"x-order": 8,
"description": "True CFG scale; 1 disables classifier-free guidance"
},
"output_quality": {
"type": "integer",
"title": "Output Quality",
"default": 95,
"maximum": 100,
"minimum": 1,
"x-order": 17,
"description": "WebP quality"
},
"negative_prompt": {
"type": "string",
"title": "Negative Prompt",
"default": "",
"x-order": 1,
"description": "Negative prompt; used when guidance is greater than 1"
},
"reference_images": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
},
"title": "Reference Images",
"x-order": 3,
"nullable": true,
"description": "Additional reference images, up to ten total"
},
"num_inference_steps": {
"type": "integer",
"title": "Num Inference Steps",
"default": 40,
"maximum": 100,
"minimum": 1,
"x-order": 7,
"description": "Denoising steps"
}
}
}
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"
}