usamaehsan/ernie-image-turbo-fast
ERNIE-Image-Turbo tuned for cost: FP8 + torch.compile + lean forward, 1-8 steps, optional hires refine
Run usamaehsan/ernie-image-turbo-fast 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
|
|
| width |
integer
|
1024
Min: 256 Max: 2048 |
Rounded down to a multiple of 16
|
| height |
integer
|
1024
Min: 256 Max: 2048 |
Rounded down to a multiple of 16
|
| num_inference_steps |
integer
|
2
Min: 1 Max: 8 |
Denoising steps (the draft's steps when hires_from is set)
|
| sigma_shift |
number
|
4
Min: 1 Max: 12 |
Flow-matching timestep shift; the model card uses 4
|
| hires_from |
integer
|
0
Max: 2048 |
0 = off. Otherwise draft at this long side, upscale, then refine at full size
|
| hires_steps |
integer
|
1
Min: 1 Max: 4 |
Full-size refine steps when hires_from is set
|
| hires_strength |
number
|
0.35
Min: 0.05 Max: 1 |
Noise level the refine restarts from (before shift)
|
| hires_mode |
None
|
latent
|
Upscale the draft in latent space or through a VAE decode/encode
|
| seed |
integer
|
Random seed
|
|
| output_format |
None
|
jpg
|
None
|
| output_quality |
integer
|
90
Min: 1 Max: 100 |
None
|
| eager |
boolean
|
False
|
Debug: skip torch.compile (compare speed)
|
| dump_compile_cache |
boolean
|
False
|
Debug: return the torch.compile cache instead of the image
|
{
"type": "object",
"title": "Input",
"required": [
"prompt"
],
"properties": {
"seed": {
"type": "integer",
"title": "Seed",
"x-order": 9,
"description": "Random seed"
},
"eager": {
"type": "boolean",
"title": "Eager",
"default": false,
"x-order": 12,
"description": "Debug: skip torch.compile (compare speed)"
},
"width": {
"type": "integer",
"title": "Width",
"default": 1024,
"maximum": 2048,
"minimum": 256,
"x-order": 1,
"description": "Rounded down to a multiple of 16"
},
"height": {
"type": "integer",
"title": "Height",
"default": 1024,
"maximum": 2048,
"minimum": 256,
"x-order": 2,
"description": "Rounded down to a multiple of 16"
},
"prompt": {
"type": "string",
"title": "Prompt",
"x-order": 0,
"description": "Text prompt"
},
"hires_from": {
"type": "integer",
"title": "Hires From",
"default": 0,
"maximum": 2048,
"minimum": 0,
"x-order": 5,
"description": "0 = off. Otherwise draft at this long side, upscale, then refine at full size"
},
"hires_mode": {
"enum": [
"latent",
"pixel"
],
"type": "string",
"title": "hires_mode",
"description": "Upscale the draft in latent space or through a VAE decode/encode",
"default": "latent",
"x-order": 8
},
"hires_steps": {
"type": "integer",
"title": "Hires Steps",
"default": 1,
"maximum": 4,
"minimum": 1,
"x-order": 6,
"description": "Full-size refine steps when hires_from is set"
},
"sigma_shift": {
"type": "number",
"title": "Sigma Shift",
"default": 4,
"maximum": 12,
"minimum": 1,
"x-order": 4,
"description": "Flow-matching timestep shift; the model card uses 4"
},
"output_format": {
"enum": [
"jpg",
"png",
"webp"
],
"type": "string",
"title": "output_format",
"description": "An enumeration.",
"default": "jpg",
"x-order": 10
},
"hires_strength": {
"type": "number",
"title": "Hires Strength",
"default": 0.35,
"maximum": 1,
"minimum": 0.05,
"x-order": 7,
"description": "Noise level the refine restarts from (before shift)"
},
"output_quality": {
"type": "integer",
"title": "Output Quality",
"default": 90,
"maximum": 100,
"minimum": 1,
"x-order": 11
},
"dump_compile_cache": {
"type": "boolean",
"title": "Dump Compile Cache",
"default": false,
"x-order": 13,
"description": "Debug: return the torch.compile cache instead of the image"
},
"num_inference_steps": {
"type": "integer",
"title": "Num Inference Steps",
"default": 2,
"maximum": 8,
"minimum": 1,
"x-order": 3,
"description": "Denoising steps (the draft's steps when hires_from is set)"
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
{
"type": "string",
"title": "Output",
"format": "uri"
}