Vector Lab · a research instrument

Diffusion Atlas

Manifold geometry and benchmarking for diffusion models. One instrument, two views: an Atlas view that reads the shape of the latent space, and a Bench view that scores compositional fidelity. Both run on the same generated images.

Author David M. Berry, University of Sussex Version 0.4.1 Licence GPL-3.0-or-later Repository vector-lab-tools/diffusionatlas DOI 10.5281/zenodo.23715023

Diffusion Atlas is a vector-native research instrument for studying how diffusion models generate images geometrically. Where Manifold Atlas reads the static manifold of a frozen embedding model, Diffusion Atlas reads the generative trajectory of a denoising model: the path through latent space that produces an image. Four operations run across hosted APIs (Replicate, Fal) and a local FastAPI backend (CUDA or Apple Silicon). Everything persists in the browser; nothing leaves your machine unless you call out to a hosted provider.

Diffusion Atlas, main view
Screenshot slot: drop docs/screenshots/hero.png (the main window, Atlas tab open, a trajectory rendered).

What it does

OperationViewBackendCore question
Denoise TrajectoryAtlasLocal onlyWhat path does the model take through latent space?
Guidance SweepAtlasHosted or LocalHow does CFG bend the trajectory? Where does mode collapse?
Latent NeighbourhoodAtlasHosted or LocalWhat does the local manifold look like around an anchor?
Compositional BenchBenchHosted or LocalHow well does the model bind, count, and place?

Quick start

Diffusion Atlas is a Next.js frontend plus an optional Python backend. If you only want hosted operations (Sweep, Neighbourhood, Bench), the frontend alone is enough. For Denoise Trajectory and true latent-space neighbourhoods you need the local backend as well.

1. Clone and install the frontend

git clone https://github.com/vector-lab-tools/diffusionatlas.git
cd diffusionatlas
npm install
npm run dev

Open http://localhost:3000. The app loads with an empty state; click Settings (top right) to configure a provider.

2. (Optional) Install the local backend

Required for Denoise Trajectory. Needs a GPU (CUDA) or Apple Silicon (MPS) with at least 12 GB of available memory for SDXL-sized models.

cd backend
python3 -m venv .venv
source .venv/bin/activate         # Windows PowerShell: .venv\Scripts\Activate.ps1
pip install --upgrade pip
pip install -r requirements.txt
uvicorn main:app --reload

The backend listens on http://127.0.0.1:8000. In Diffusion Atlas Settings, switch the backend to Local and confirm the URL. The first run of a given model downloads weights to ~/.cache/huggingface/ (a few GB for SDXL, more for SD3 / FLUX).

Loopback-only by design. The local backend binds to 127.0.0.1. Do not expose it to the public internet without replacing the self-identification header with real authentication — see the Security Model section in the repository README.

Getting API keys to work

Hosted providers return final images via API. Each needs its own key. The frontend stores keys in your browser only (localStorage); no key is ever sent anywhere except the provider it belongs to. Below are step-by-step instructions for the two wired providers.

Replicate wired

Broad model selection (SDXL, SD3, FLUX). Aggressive rate limits on the free tier — expect retry banners.

Fal wired · recommended

Order-of-magnitude more permissive rate limits than Replicate. Best for sweep- and bench-heavy work.

HuggingFace local only

Needed only to download gated weights (SD3, FLUX-dev) for the local backend. Not entered in the app.

Together · Stability planned

Provider stubs exist; wiring not complete.

Replicate

  1. Create a free account at replicate.com. Sign in with GitHub if you have one.
  2. Go to replicate.com/account/api-tokens.
  3. Click Create token, give it a name (e.g. diffusion-atlas), and copy the token. It starts with r8_.
  4. In Diffusion Atlas, open Settings, choose Hosted → Replicate, and paste the token into the API key field. Save.
  5. The model id field auto-fills with a sensible SDXL preset. You can swap in any Replicate model using its owner/model[:version] form.

Billing. Replicate charges per generation and per second of GPU time. The free tier gives a small running credit; after that you need to add a payment method at replicate.com/account/billing. A single Guidance Sweep at five CFG values typically costs a few cents on SDXL.

Fal

  1. Create an account at fal.ai.
  2. Go to fal.ai/dashboard/keys.
  3. Click Add key, name it, copy the key. Fal keys have the form <key-id>:<key-secret>; paste the whole thing including the colon.
  4. In Diffusion Atlas, open Settings, choose Hosted → Fal, and paste. Save.
  5. The model id auto-fills with a Fal-flavoured preset (fal-ai/<model>). Overrides work the same way as Replicate.

Choosing a model

The Model field in Settings offers suggestions for the selected provider, but it is free text: any model id from the provider's catalogue can be typed in and is used as entered. If a suggested model is withdrawn or renamed, type the current id from the provider's model page (Replicate: owner/model; Fal: fal-ai/<model>; local: a Hugging Face id such as stabilityai/sdxl-turbo). Reset to default restores the provider's starting model.

If a key is rejected, the first thing to check is that you copied the colon-joined pair as one string. A key-id without its secret produces a 401 that reads like a bad key.

HuggingFace (local backend only)

You need this only if you want to run the local backend on a gated model (SD 3 / 3.5, FLUX-schnell or FLUX-dev). SD 1.5 (stable-diffusion-v1-5/stable-diffusion-v1-5), SDXL and SDXL-turbo are ungated and work without a HuggingFace account.

  1. Create an account at huggingface.co/join.
  2. Visit the gated model page, e.g. stabilityai/stable-diffusion-3.5-medium, and accept the licence. For FLUX visit black-forest-labs/FLUX.1-schnell or black-forest-labs/FLUX.1-dev.
  3. Create an access token at huggingface.co/settings/tokens. A read-scope token is enough.
  4. With the backend venv activated, run huggingface-cli login and paste the token. The token is stored in ~/.cache/huggingface/token; you do not paste it into Diffusion Atlas.
  5. Restart the backend. The next load of a gated model will succeed instead of 403.

If a download 403s, the licence was not accepted on the model page under the account the token belongs to. Visit the model page while signed in, click Agree and access repository, then re-try.

Working through the operations

Denoise Trajectory

Traces the iterative denoising path through latent space. The local backend streams per-step latents over NDJSON, with a thumbnail decoded through the VAE every Nth step. The client projects the latents to 3D via PCA (or UMAP, or a 35 mm Film view that renders every captured step as a contact sheet). Local backend required; hosted providers do not expose intermediate latents.

Denoise Trajectory, 3D PCA view
Screenshot slot: docs/screenshots/trajectory.png — the 3D PCA view with thumbnails along the curve.

Guidance Sweep

Generates the same prompt and seed across a list of CFG values (default 1, 2.5, 4, 7.5, 12). A drift curve above the grid plots normalised perceptual-hash distance from the baseline (CFG nearest 7.5), making the controllability surface, and the point where mode collapse begins, visible at a glance.

Guidance Sweep grid with drift curve
Screenshot slot: docs/screenshots/sweep.png — a CFG sweep grid with the drift curve above it.

Latent Neighbourhood

Perturbs a chosen latent and renders a grid of neighbours. Two modes: seed-jitter (hosted-friendly) and true latent-space sampling (local only). Supports cross-backend comparison.

Compositional Bench

GenEval-lite task pack: four categories (single object, two objects, counting, colour binding) by three prompts each. Each result is marked pass or fail manually, or auto-scored with CLIP (ViT-B/32) at a configurable cosine threshold.

Compositional Bench results
Screenshot slot: docs/screenshots/bench.png — the Bench grid with per-category scoring panel.

Troubleshooting

If it is not on this page, open an issue on the tool's repository to report the problem. If you have a fix, a pull request is welcome.

FAQ

When was Diffusion Atlas first created?

The first commit, an initial scaffold tagged v0.1, is dated 26 April 2026. Concept and design are by David M. Berry (University of Sussex); the code was written with Claude Code.

Built at Copenhagen Business School, Denmark, during an Otto Mønsted Visiting Professorship in 2026. The support of the Otto Mønsted Fond (grant 25-12-1849) is gratefully acknowledged.

How has it developed?

The full history is in the commit log and the Roadmap section of the README.

Where is the code?

Where are the questions common to all Vector Lab tools?

API keys, free local routes and common problems across the Vector Lab tools are covered in the Vector Lab FAQ.

Citation

If you use Diffusion Atlas in published research, please cite the archived release. The concept DOI below always resolves to the latest version; use the version DOI for a specific release.

@software{berry_diffusionatlas,
  author    = {Berry, David M.},
  title     = {Diffusion Atlas: Manifold geometry and benchmarking for diffusion models},
  year      = {2026},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.23715023},
  url       = {https://github.com/vector-lab-tools/diffusionatlas}
}

Licence

GNU General Public License, version 3 or later (GPL-3.0-or-later). All prior versions of Diffusion Atlas are retroactively relicensed under the same terms. See LICENSE and COPYING.