Live demo · Text to image

Describe it.
See it in four steps.

Type a description and a diffusion model paints it at 1024×1024 in seconds. SDXL with the four-step SDXL-Lightning UNet runs on a GPU that Chalk deploys from a single Python file.

Describe an image

Pick an example or write your own, then press Generate. The demo shares one GPU, so if it is busy your request waits its turn. Unsafe prompts and images are refused.

sdxl-lightningOpen in new tab

How it works

A diffusion model starts from pure noise and removes a little of it at each step, guided by your words. Distillation teaches it to take a few large steps instead of dozens of small ones.

Describe

Your description is sent to the scaling group as one small JSON request. It is checked against a short list of disallowed subjects before it ever reaches the GPU.

Denoise

SDXL's two text encoders turn the words into embeddings, then the distilled SDXL-Lightning UNet removes noise in just four steps instead of the usual 30 to 50.

Check and return

The fp16 VAE decodes a 1024×1024 image, a second model screens it for unsafe content, and the result comes back as a compact WebP.

Getting started

Deploy your own in three commands

Clone the example, log in, and run the deploy script. Chalk builds the image, provisions an L4, and prints a URL that serves this exact demo. The first deploy takes about 15 minutes; after that, code changes redeploy from cached layers.

The API is one JSON endpoint, so the same deployment can back a product feature, a batch job, or an agent that needs to draw.

chalk-ai/text-to-image
git clone https://github.com/chalk-ai/text-to-image
cd text-to-image

# Or export CHALK_CLIENT_ID and CHALK_CLIENT_SECRET.
chalk login

# Builds the image, provisions a GPU, prints your demo's URL.
./deploy.py --gpu nvidia-l4

What Chalk handles

The model is the interesting part. Everything around it is the part Chalk does for you.

Images from Python

Image.debian_slim().pip_install(...) builds the container, and the replica pulls 7 GB of weights from Hugging Face in under a minute at startup. No Dockerfile, no registry to manage.

GPUs on demand

Ask for gpu="nvidia-l4" and Chalk provisions the node, schedules the replica, and gives it an HTTPS URL.

Seconds, not minutes

On one NVIDIA L4, a 1024×1024 image takes 1.2 seconds of GPU time, safety check included, and under two seconds end to end.

Guardrails in the server

A prompt filter, an image safety classifier, a generation budget, and a bounded queue live in the same small Python file as the model.

Runs in your cloud

The replica runs in your Chalk environment. Prompts and images never pass through a third-party API.

Four files, open source

The server, page, weight download, and deploy script are Apache-2.0 on GitHub. Swap in your own fine-tune or LoRA and redeploy.

Serve your own generative model

Images, audio, video, or your own fine-tune. Talk to an engineer about running it on GPUs in your cloud.