Brendan McKeag

Runpod Partners With RandomSeed to Provide Accessible, User-Friendly Stable Diffusion API Access

September 22, 2023

Runpod is delighted to collaborate with RandomSeed by providing the serverless compute power required to create generative AI art through their API access. The mission of RandomSeed is to help developers build AI image generators by providing a hosted AUTOMATIC1111 API that can create images on-demand through API calls, saving developers the burden of having to host and manage their own infrastructure for Stable Diffusion.

The Benefits of Serverless Pricing

RandomSeed helps leverage the serverless capacity of Runpod by providing a user-friendly method to interact with Stable Diffusion through API calls with none of the technical expertise that would normally be required in building and maintaining such a setup. All you have to do is pass your parameters to RandomSeed in an API request and you'll have your image served wherever it needs to go. The end result is that you only pay for the server time you actually use, which ends up costing you an average of a cent (or even less) per image. This means that your costs scale with your needs, compared to the static, per-hour price of renting a pod.

RandomSeed even has a playground that you can use to test out the service and see if it's a good fit for you:

AUTOMATIC1111 API documentation

RandomSeed has graciously contributed the following documentation on how to pass requests to the Stable Diffusion API.

AUTOMATIC1111 has emerged as a leading tool for image generation through stable diffusion, boasting a comprehensive API that enables a multitude of functions. However, it’s near impossible to find in-depth documentation explaining what each parameter does. In this article, we attempt to share our findings from using the API while running our own cloud-based AUTOMATIC1111 API at RandomSeed.

txt2img

Model Module
control_v11p_sd15_cannycanny
control_v11p_sd15_mlsdMLSD
control_v11p_sd15_depthdepth, depth_leres, depth_leres_boost
control_v11p_sd15_normalbaenormal-bae
control_v11p_sd15_segsegmentation
control_v11p_sd15_inpaintinpaint, inpaint_only, inpaint_only+lama
control_v11p_sd15_lineartlineart, lineart_coarse, lineart_standard
control_v11p_sd15s2_lineart_animelineart_anime
control_v11p_sd15_openposeopenpose, openpose_face, openpose_faceonly, openpose_full, openpose_hand
control_v11p_sd15_scribblescribble_pidinet, scribble_hed, scribble_xdog, fake_scribble
control_v11p_sdd15_softedgesoftedge_hed
control_v11p_sd15_tiletile_resample, tile_colorfix, tile_colorfix+sharp
control_v11e_sd15_shuffleshuffle
control_v11e_sd15_ip2p aka instruct Pix2Pixnull
control_v1p_sd15_grcode_monsternull
Model Module
control_v11p_sd15_cannycanny
control_v11p_sd15_mlsdMLSD
control_v11p_sd15_depthdepth, depth_leres, depth_leres_boost
control_v11p_sd15_normalbaenormal-bae
control_v11p_sd15_segsegmentation
control_v11p_sd15_inpaintinpaint, inpaint_only, inpaint_only+lama
control_v11p_sd15_lineartlineart, lineart_coarse, lineart_standard
control_v11p_sd15s2_lineart_animelineart_anime
control_v11p_sd15_openposeopenpose, openpose_face, openpose_faceonly, openpose_full, openpose_hand
control_v11p_sd15_scribblescribble_pidinet, scribble_hed, scribble_xdog, fake_scribble
control_v11p_sdd15_softedgesoftedge_hed
control_v11p_sd15_tiletile_resample, tile_colorfix, tile_colorfix+sharp
control_v11e_sd15_shuffleshuffle
control_v11e_sd15_ip2p aka instruct Pix2Pixnull
control_v1p_sd15_grcode_monsternull
Parameter Description
maskBase64 image specifying area to inpaint
inpainting_mask_invert0 = mask area, 1 = area outside mask
inpainting_fillFill behavior (0: fill, 1: original, 2: latent noise, 3: latent nothing)
resize_modeResize behavior (0–3: just resize, crop+resize, resize, fill)
inpaint_full_res_paddingPadding in pixels (default: 0)
inpaint_full_restrue = keep same res as source, false = stretch area
image_cfg_scaleDegree of resemblance to input image (lower = more different)

Example Calls

We’re going to show you how you can use the API to do some basic image generations. Make sure that you have cloned the auto1111 repo from here, and have it running locally on your PC.

txt2img generation:

img2img generation:

Inpainting example:

We’re going to inpaint over the dog’s ears for this example.

QR Monster ControlNet (Illusion Diffusion)

QR Monster Controlnet is taking the internet by storm. If you want to generate images like this, or this, you can make the request like below:

Conclusion

We hope this documentation gives you a good starting point for generating images with AUTO1111 API. As you work with the API, don't be afraid to tweak the settings and observe its impact. Refer to the documentation and examples as needed. With some practice, you'll be leveraging AUTOMATIC1111 to create amazing AI artworks.1 Let us know if you make something cool!

Build what’s next.

The most cost-effective platform for building, training, and scaling machine learning models—ready when you are.

12:22