stable-diffusion-xl-lightning Beta
Text-to-Image • bytedanceSDXL-Lightning is a lightning-fast text-to-image generation model. It can generate high-quality 1024px images in a few steps.
Usage
Workers - TypeScript
curl
Parameters
Input
-
prompt
string min 1A text description of the image you want to generate
-
negative_prompt
stringText describing elements to avoid in the generated image
-
height
integer min 256 max 2048The height of the generated image in pixels
-
width
integer min 256 max 2048The width of the generated image in pixels
-
image
arrayFor use with img2img tasks. An array of integers that represent the image data constrained to 8-bit unsigned integer values
-
items
numberA value between 0 and 255
-
-
image_b64
stringFor use with img2img tasks. A base64-encoded string of the input image
-
mask
arrayAn array representing An array of integers that represent mask image data for inpainting constrained to 8-bit unsigned integer values
-
items
numberA value between 0 and 255
-
-
num_steps
integer default 20 max 20The number of diffusion steps; higher values can improve quality but take longer
-
strength
number default 1A value between 0 and 1 indicating how strongly to apply the transformation during img2img tasks; lower values make the output closer to the input image
-
guidance
number default 7.5Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt
-
seed
integerRandom seed for reproducibility of the image generation
Output
API Schemas
The following schemas are based on JSON Schema