Pricing for Developers

Shape default: 768x768

Pricing will be calculated by using the closest dimension

steps default: 25 ( $0.000598 every 5 steps above 25 )

Cost Per API Call

$ 0.000000

For enterprise pricing and custom weights or models

contact our sales team.

Stable Diffusion 1.5 Img2Img

Stable Diffusion 1.5 Img2Img, released in 2022, is a groundbreaking deep learning model that has revolutionized the field of image generation. This model is primarily designed to generate detailed images based on text descriptions, perform inpainting and outpainting tasks, and facilitate image-to-image translations guided by a text prompt. The model's unique approach involves consuming a text prompt, an existing image, and a strength value ranging from 0.0 to 1.0 to output a new image that incorporates elements from the original image and the text prompt.

The technical architecture of Stable Diffusion 1.5 Img2Img is a blend of an autoencoder and a diffusion model trained in the autoencoder's latent space. The model encodes images through an encoder that transforms them into latent representations, using a relative downsampling factor of 8. Text prompts are encoded through a ViT-L/14 text-encoder, and the non-pooled output of the text encoder is fed into the UNet backbone of the latent diffusion model via cross-attention. The model's loss is a reconstruction objective between the noise added to the latent and the prediction made by the UNet. The strength value denotes the amount of noise added to the output image, with higher values producing more variation but potentially less semantic consistency with the provided prompt.

Stable Diffusion 1.5 Img2Img offers several advantages over traditional image generation models. Its ability to add noise to the original image makes it a valuable tool for data anonymization and data augmentation, where visual features of image data are altered and anonymized. The model's potential for image upscaling, adding more detail to an image while increasing its resolution, is another significant benefit. Furthermore, Stable Diffusion has been explored as a tool for image compression, although it currently faces limitations in preserving small text and faces compared to JPEG and WebP.

Stable diffusion 1.5 Img2Img use cases

  1. Data Anonymization: Adding noise to original images to protect sensitive information.

  2. Data Augmentation: Altering and enhancing image data for machine learning tasks.

  3. Image Upscaling: Increasing the resolution of an image and potentially adding more detail.

  4. Image Compression: Compressing images while preserving their essential features.

  5. Image-to-Image Translations: Generating new images based on a given prompt and an existing image.

Stable diffusion 1.5 Img2Img license

The model is licensed under the Creative ML OpenRAIL-M license, a form of Responsible AI License (RAIL). This license prohibits certain use cases, including crime, libel, harassment, doxing, exploiting minors, giving medical advice, creating legal obligations automatically, producing legal evidence, and discriminating against or harming individuals or groups based on social behavior, personal characteristics, or legally protected categories. However, users retain the rights to their generated output images and are free to use them commercially.