SSD-1B

The Segmind Stable Diffusion Model (SSD-1B) is a distilled 50% smaller version of the Stable Diffusion XL (SDXL), offering a 60% speedup while maintaining high-quality text-to-image generation capabilities. It has been trained on diverse datasets, including Grit and Midjourney scrape data, to enhance its ability to create a wide range of visual content based on textual prompts.


API

If you're looking for an API, you can choose from your desired programming language.

POST
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 import requests import base64 # Use this function to convert an image file from the filesystem to base64 def image_file_to_base64(image_path): with open(image_path, 'rb') as f: image_data = f.read() return base64.b64encode(image_data).decode('utf-8') # Use this function to fetch an image from a URL and convert it to base64 def image_url_to_base64(image_url): response = requests.get(image_url) image_data = response.content return base64.b64encode(image_data).decode('utf-8') api_key = "YOUR_API_KEY" url = "https://api.segmind.com/v1/ssd-1b" # Request payload data = { "prompt": "with smoke, half ice and half fire and ultra realistic in detail.wolf, typography, dark fantasy, wildlife photography, vibrant, cinematic and on a black background", "negative_prompt": "scary, cartoon, painting", "samples": 1, "scheduler": "UniPC", "num_inference_steps": 25, "guidance_scale": 9, "seed": 36446545871, "img_width": 1024, "img_height": 1024, "base64": False } headers = {'x-api-key': api_key} response = requests.post(url, json=data, headers=headers) print(response.content) # The response is the generated image
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


promptstr *

Prompt to render


negative_promptstr ( default: None )

Prompts to exclude, eg. 'bad anatomy, bad hands, missing fingers'


samplesint ( default: 1 ) Affects Pricing

Number of samples to generate.

min : 1,

max : 4


schedulerenum:str ( default: DPM2 Karras )

Type of scheduler.

Allowed values:


num_inference_stepsint ( default: 25 ) Affects Pricing

Number of denoising steps.

min : 20,

max : 100


guidance_scalefloat ( default: 7.5 )

Scale for classifier-free guidance

min : 1,

max : 25


seedint ( default: -1 )

Seed for image generation.

min : -1,

max : 999999999999999


img_widthenum:int ( default: 1024 ) Affects Pricing

Can only be 1024 for SDXL

Allowed values:


img_heightenum:int ( default: 1024 ) Affects Pricing

Can only be 1024 for SDXL

Allowed values:


base64boolean ( default: 1 )

Base64 encoding of the output image.

To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.

SSD -1B

The Segmind Stable Diffusion Model (SSD-1B) sets a new standard in AI-driven image generation, offering a compact, efficient solution for transforming text into high-quality visuals. At 50% smaller and 60% faster than the Stable Diffusion XL (SDXL), it provides quick and seamless performance without sacrificing image quality.

Leveraging knowledge from expert models like SDXL, ZavyChromaXL, and JuggernautXL through a robust distillation strategy, SSD-1B ensures diverse and impressive visual outputs. Trained on rich datasets including Grit and Midjourney scrape data, it adeptly handles a broad spectrum of textual prompts. For those seeking a reliable and versatile text-to-image tool, Segmind’s SSD-1B is a top choice, ensuring both speed and visual excellence.

Advantages

  1. Speed and Efficiency: With a 60% speedup compared to its predecessor, SSD-1B ensures rapid text-to-image translations.

  2. Compact Design: Despite being 50% smaller than SDXL, it delivers high-quality visual outputs, showcasing its optimized design.

  3. Diverse Training: Its training on varied datasets ensures a broad spectrum of visual content generation based on user prompts.

  4. Knowledge Distillation: By leveraging insights from multiple expert models, SSD-1B offers a refined and enhanced performance.

Use Cases

  1. Art and Design: It can be used to generate artworks, designs, and other creative content, providing inspiration and enhancing the creative process.

  2. Research: Researchers can use the model to explore generative models, evaluate its performance, and push the boundaries of text-to-image generation.

  3. Safe Content Generation: It offers a safe and controlled way to generate content, reducing the risk of harmful or inappropriate outputs.

SSD -1B License

As for licensing, SSD -1B operates under the the Apache 2.0 license, a permissive open-source license endorsed by the Apache Software Foundation. It allows users to freely use, modify, and distribute the software, even in proprietary projects. The license also includes an express grant of patent rights from contributors to users and has provisions to handle contributions and protect against patent litigation.