Stable Diffusion
Last updated
Was this helpful?
Last updated
Was this helpful?
Stable Diffusion is a state-of-the-art deep learning model designed for generating high-quality images from textual descriptions. It utilizes a latent diffusion process, a type of generative model that iteratively refines noise to produce detailed and realistic images. This model is highly efficient, scalable, and capable of running on consumer-grade hardware, making it widely used for applications in art generation, content creation, and research. Developed with open accessibility in mind, Stable Diffusion empowers developers and creators to explore generative AI while maintaining adaptability for various use cases.
Apolo utilizes and to make inference/have a UI playground.
Stable Diffusion WebUI is an intuitive, browser-based interface designed for generating and managing AI-generated images using Stable Diffusion. It offers customizable workflows, advanced image settings, and integrations for various Stable Diffusion models, enabling users to create and edit images with ease.
StableStudio is a web application built to enhance the Stable Diffusion experience. It provides minimalistic UI and batch inference capability.
Feature
How the Apolo App Helps
Text‑to‑Image & Image‑to‑Image
Prompt → image or edit existing images via Web UI or REST.
Multiple UIs
Switch between AUTOMATIC1111 (power‑user) and StableStudio (lightweight).
Custom Models
Point to any Hugging Face model (stabilityai/stable-diffusion‑xl
, lora/…
).
GPU Presets
Pick from gpu-l4-x1
, gpu-a100-x1
, etc.; Apolo sets env vars & drivers.
Secrets Integration
Store HF tokens in Apolo Secrets instead of plain text.
Scalable Replicas
replica_count
lets you handle bursty image queues.
Deploy via either the Web Console UI or Apolo CLI.
2 · Configure the wizard
Section
Field
Example
Notes
Enable HTTP Ingress
auth = true
Adds basic‑auth to the public URL.
Resource Preset
gpu-a100-x1
1× NVIDIA A100 80 GB (or choose gpu-l4-x1
, etc.).
Stable Diffusion
replica_count = 1
Increase for concurrent jobs.
Hugging Face Model
stabilityai/stable-diffusion-2-1-unclip-small
Any HF repo path.
HF Token
Secret HF_TOKEN
Needed for private or gated models.
Click Install. Wait until Status → healthy; copy the external_api host (REST) or open the Web UI at https://sd-<id>.apps.<cluster>.apolo.us
.
Create a declarative YAML and push it with one command.
Explanation
preset.name=gpu-l4-x1
requests one NVIDIA L4; Apolo auto‑sets CUDA_VISIBLE_DEVICES
& default batch flags.
replica_count=2
launches two pods behind a load balancer for higher QPS.
hugging_face_model.model_hf_name
points to SD‑XL‑Turbo for faster drafts.
hf_token
pulls the secret string from the HF_TOKEN key in Apolo Secrets.
Inputs
JSON Path
Default
Description
preset.name
–
GPU preset per replica.
ingress_http.auth
true
Basic‑auth gate.
stable_diffusion.replica_count
1
Number of pods.
stable_diffusion.hugging_face_model.model_hf_name
–
HF model repo.
stable_diffusion.hugging_face_model.hf_token
null
Secret or string token.
Outputs
Key
Purpose
external_api.*
Public REST endpoint (/v1/txt2img
).
internal_api.*
In‑cluster endpoint for other workloads.
hf_model.model_hf_name
Echoes the loaded model.
Once the app is healthy Apolo exposes auto‑generated Swagger docs at:
txt2img endpoint
The response contains a base64‑encoded PNG under images[0]
.
AUTOMATIC1111 Web UI – the default root path (/
).
StableStudio – served at /stablestudio
when enabled in the chart.
Connecting StableStudio
Open StableStudio and click Settings (gear icon, top right).
Paste the external URL of your Stable Diffusion deployment into Host URL.
Status should show Ready without history plugin.
Click Generate and enjoy!
Note: The host URL is stored only in localStorage
; each browser or private window needs to be configured again.