stability-ai/sdxl cover image
featured

stability-ai/sdxl

SDXL consists of an ensemble of experts pipeline for latent diffusion: In a first step, the base model is used to generate (noisy) latents, which are then further processed with a refinement model (available here: https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0/) specialized for the final denoising steps. Note that the base model can be used as a standalone module.

SDXL consists of an ensemble of experts pipeline for latent diffusion: In a first step, the base model is used to generate (noisy) latents, which are then further processed with a refinement model (available here: https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0/) specialized for the final denoising steps. Note that the base model can be used as a standalone module.

Public
$0.0005 / sec
ProjectLicense

HTTP/cURL API

You can use cURL or any other http client to run inferences:

curl -X POST \
    -d '{"input": {"prompt": "..."}}'  \
    -H 'Content-Type: application/json'  \
    -H "Authorization: bearer $(deepctl auth token)"  \
    'https://api.deepinfra.com/v1/inference/stability-ai/sdxl'

The inpu/output is compatible with the cog interface.

Input fields

promptstring

Input prompt

Default value: An astronaut riding a rainbow unicorn


negative_promptstring

Input Negative Prompt

Default value:


imagefile

Input image for img2img or inpaint mode


maskfile

Input mask for inpaint mode. Black areas will be preserved, white areas will be inpainted.


widthinteger

Width of output image

Default value: 1024


heightinteger

Height of output image

Default value: 1024


num_outputsinteger

Number of images to output.

Default value: 1

Range: 1 ≤ num_outputs ≤ 4


schedulerstring

scheduler

Default value: DDIM

Allowed values: DDIMDPMSolverMultistepHeunDiscreteKarrasDPMK_EULER_ANCESTRALK_EULERPNDM


num_inference_stepsinteger

Number of denoising steps

Default value: 50

Range: 1 ≤ num_inference_steps ≤ 500


guidance_scalenumber

Scale for classifier-free guidance

Default value: 7.5

Range: 1 ≤ guidance_scale ≤ 50


prompt_strengthnumber

Prompt strength when using img2img / inpaint. 1.0 corresponds to full destruction of information in image

Default value: 0.8

Range: 0 ≤ prompt_strength ≤ 1


seedinteger

Random seed. Leave blank to randomize the seed


refinestring

Which refine style to use

Default value: no_refiner

Allowed values: no_refinerexpert_ensemble_refinerbase_image_refiner


high_noise_fracnumber

for expert_ensemble_refiner, the fraction of noise to use

Default value: 0.8

Range: 0 ≤ high_noise_frac ≤ 1


refine_stepsinteger

for base_image_refiner, the number of steps to refine, defaults to num_inference_steps


apply_watermarkboolean

Applies a watermark to enable determining if an image is generated in downstream applications. If you have other provisions for generating or deploying images safely, you can use this to disable watermarking.

Default value: true

Input Schema

Output Schema