Image creation with SDXL
Simply write a description of what you want, and doesn't want, wait for a few seconds and you'll get an awesome image, ready to share. SDXL is a text-to-image generative AI model developed by Stability AI that excels in creating visually appealing images.
Features
Text-to-Image Generation
To generate images using SDXL, simply provide a prompt and execute the model.
Image In-Painting
This lets you modify parts of an existing image with generated content. Simply provide an image with a mask and a prompt for the masked area. The mask has to a black-and-white image with the same shape as the input image. White pixels will be modified based on the prompt, while black pixels will be preserved.
Image-to-Image Generation
This functionality enables you to transform an image based on the prompt you enter. The prompt_strength parameter controls the strength of applying the prompt to the input image.
Use cases examples
- - Create pictures for your social networks posts
- - Add special objects on a photo
- - Be inspired with interior designs
- - Make fun images for your friends
Try it
Examples
Input
{"input":{"prompt":"An orange cocktail with a stra...""negative_prompt":"bad quality""image":"mask":"width":1024"height":1024"num_outputs":1"scheduler":"K_EULER""num_inference_steps":50"guidance_scale":7.5"prompt_strength":0.8"seed":2986"refine":"no_refiner""high_noise_frac":0.8"refine_steps":50"apply_watermark":true"lora_scale":0.6"disable_safety_checker":false}"id":75}
Output
{"status":"succeeded""output":[0:"https://rbqktisnztholqojxlaf.s..."]"prediction_time":11.955283}
API Information
Input description
Input prompt
Default value: An astronaut riding a rainbow unicorn
Input Negative Prompt
Input image for img2img or inpaint mode
Input mask for inpaint mode. Black areas will be preserved, white areas will be inpainted.
Width of output image
Default value: 1024
Height of output image
Default value: 1024
Number of images to output.
Default value: 1
The scheduler to use.
Default value: K_EULER
Enum values: DDIM, DPMSolverMultistep, HeunDiscrete, KarrasDPM, K_EULER_ANCESTRAL, K_EULER, PNDM
Number of denoising steps
Default value: 50
Scale for classifier-free guidance
Default value: 7.5
Prompt strength when using img2img / inpaint. 1.0 corresponds to full destruction of information in image
Default value: 0.8
Random seed. Leave blank to randomize the seed
The refiner to use.
Default value: no_refiner
Enum values: no_refiner, expert_ensemble_refiner, base_image_refiner
For expert_ensemble_refiner, the fraction of noise to use
Default value: 0.8
For base_image_refiner, the number of steps to refine.
Default value: 50
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
LoRA additive scale. Only applicable on trained models.
Default value: 0.6
Disable safety checker for generated images.
Output JSON Schema
This represents the JSON schema that details the structure of the model's output.