CoolFace
Datasetpublic

hammamiomar/sdxl-turbo-sae-labels

SDXL-Turbo SAE Feature Labels 20,480 labeled sparse autoencoder features across 4 UNet attention blocks in SDXL-Turbo, plus 50K generated images with full activation logs. Built for latent-dance — a real-time audio-reactive music visualizer using SAE steering at 50 FPS. Important attribution: The SDXL-Turbo sparse autoencoders/checkpoints used here were trained and released by Surkov et al. / EPFL through sdxl-unbox. This dataset does not claim authorship of the SAE training. It… See the full description on the dataset page: https://huggingface.co/datasets/hammamiomar/sdxl-turbo-sae-labels.

sourceHugging Facemitupdated 5mo agoView on Hugging Face
0likes221downloads
Dataset Card

SDXL-Turbo SAE Feature Labels

20,480 labeled sparse autoencoder features across 4 UNet attention blocks in SDXL-Turbo, plus 50K generated images with full activation logs.

Built for latent-dance — a real-time audio-reactive music visualizer using SAE steering at 50 FPS.

Important attribution: The SDXL-Turbo sparse autoencoders/checkpoints used here were trained and released by Surkov et al. / EPFL through `sdxl-unbox`. This dataset does not claim authorship of the SAE training. It contributes labels, activation logs, VLM consensus annotations, factor groupings, and analysis for those upstream SAE features, built for latent-dance. The public checkpoint files are available from the upstream Hugging Face model repository: surokpro2/sdxl-saes.

Upstream SAE Architecture

The SAE architecture and checkpoints come from Surkov et al. / EPFL's `sdxl-unbox` work. latent-dance uses those upstream SAEs and provides the feature labeling and activation-analysis dataset below.

ParameterValue
Base modelSDXL-Turbo (stabilityai/sdxl-turbo)
SAE typeTop-K (k=10)
Hidden dim5,120 features per block
Model dim1,280
Training data~50K SDXL-Turbo generations

Steered Blocks

BlockUNet PathEncodes
down.2.1down_blocks.2.attentions.1Composition, objects, scenes
mid.0mid_block.attentions.0Abstract structure, spatial patterns
up.0.0up_blocks.0.attentions.0Local details (faces, accessories)
up.0.1up_blocks.0.attentions.1Style, texture, lighting

Dataset Contents

Labels (sae_labels/)

DirectoryDescriptionSize
final/{block}.jsonPrimary output — fused consensus labels for all 20,480 features12 MB
factors/{block}.jsonNMF factor groupings (150 per block)~1.2 MB
factors/.nmf_cache_*.npyCached NMF W/H matrices for fast re-analysis120 MB
vlm_labels/{model}/{block}.jsonlRaw VLM annotations from 3 models15 MB
vlm_labels/viewer.htmlHTML viewer for browsing VLM labels27 KB
supplement/{block}.jsonTF-IDF prompt analysis + spatial activation patterns4.9 MB
clusters/{block}.jsonHDBSCAN clusters on decoder weights432 KB

Images & Activations (sae_images/)

ArtifactDescriptionSize
generated/*.jpg50,000 SDXL-Turbo images (512x512, JPEG q90)3.0 GB
activations.jsonlPer-image SAE activations for all 4 blocks (top-k sparse)6.8 GB
feature_sets/{block}/{fid}/metadata.jsonPer-feature image selection (top-10 on, 3 off)1.7 GB

Label Schema

Each entry in final/{block}.json:

json
{
  "block": "down.2.1",
  "feature_id": 0,
  "label": "office organization supplies",
  "category": "object",
  "confidence": "high",
  "method": "vlm_consensus_3way",
  "mean_activation": 19.95,
  "activation_cv": 0.5575,
  "vlm_labels": {
    "kimi_k2_5": "office organization supplies",
    "qwen3_vl_235b": "office supplies and document organization",
    "glm_4_6v": "Office folders and bind"
  },
  "tfidf_top5": ["holder", "folder", "white", "rack", "open"],
  "spatial_pattern": null,
  "n_activating_images": 0
}

Confidence Levels

LevelMeaningCount%
high2+ VLMs agree (cosine sim > 0.5)16,74182%
mediumVLMs disagree but TF-IDF aligns with one2,93614%
lowBest single-model guess8034%

Categories

27 categories across all blocks: object, scene, composition, character, face, body, action, style, mood, color, lighting, texture, pattern, material, spatial, symmetry, border, depth, density, contrast, shape, edge, subject, accessory, object_detail, setting, unclear, unknown.

Factor Schema

Each entry in factors/{block}.json:

json
{
  "factor_id": 0,
  "label": "cute cartoon characters",
  "category": "unknown",
  "n_constituents": 3,
  "constituents": [
    {"feature_id": 4781, "weight": 118.1, "label": "...", "category": "..."},
    {"feature_id": 3745, "weight": 2.56, "label": "cute cartoon characters", "category": "character"}
  ],
  "mean_activation": 0.3151,
  "max_activation": 0.6467,
  "n_active_images": 49735
}

Activation Schema

Each line in activations.jsonl:

json
{
  "id": 0,
  "prompt": "a photo of a sunset over mountains",
  "down.2.1": [
    {"f": 6, "mean": 20.98, "max": 43.07, "sum": 272.72, "row": 3, "col": 8},
    ...
  ],
  "mid.0": [...],
  "up.0.0": [...],
  "up.0.1": [...]
}

Each block entry contains the top-k (k=10) active features per 16x16 patch, with mean/max/sum aggregation and spatial coordinates.

Pipeline Overview

StageDescriptionCost
0HDBSCAN clustering on decoder weightsCPU
150K image generation + SAE activation logging (Modal A100)~$10
2Feature ranking + top-10/off-3 image selectionCPU
3VLM ensemble annotation (Qwen3-VL-235B + GLM-4.6V + Kimi K2.5)~$75
4TF-IDF prompt supplements + spatial activation analysisCPU
5Sentence-embedding fusion → consensus labelsCPU
6Ground-truth validation (14/16 = 87.5% pass)~$0.02
7NMF factor grouping → 150 concepts per blockCPU

Total cost: ~$85

Usage

python
import json
from pathlib import Path

# Load final labels for a block
with open("sae_labels/final/down.2.1.json") as f:
    features = json.load(f)

# Build a lookup
label_map = {f["feature_id"]: f["label"] for f in features}
print(label_map[2301])  # "monstrous fantasy creatures"

# Filter by category
objects = [f for f in features if f["category"] == "object"]
print(f"{len(objects)} object features")

# Load NMF factors
with open("sae_labels/factors/down.2.1.json") as f:
    factors = json.load(f)

for factor in factors[:5]:
    labels = [c["label"] for c in factor["constituents"][:3]]
    print(f"Factor {factor['factor_id']}: {factor['label']} — {labels}")

Acknowledgments

  • —SDXL-Turbo SAE architecture and checkpoints by sdxl-unbox / sdxl-unbox.epfl.ch (Surkov et al., EPFL). These SAEs were not trained by latent-dance.
  • —NMF factor grouping inspired by Paint With Ember (Goodfire, 2025)
  • —VLM annotations via OpenRouter (Qwen3-VL-235B, GLM-4.6V, Kimi K2.5)
hammamiomar/sdxl-turbo-sae-labels · CoolFace