# Un-0

> Image generation by integrating coupled oscillators, not denoising

- Category: Multimodal Generation / Image Generation
- Language: Python
- Licence: MIT
- Repository: https://github.com/unconv-ai/Un-0
- Website: https://unconv.ai
- Canonical page: https://ai-tldr.dev/tools/un-0/
- Updated: 2026-06-25

## In short

Un-0 is an image-generation model built on Kuramoto dynamics: it produces an image by integrating the phase dynamics of a population of coupled oscillators. It sits in the Image Generation category of the Multimodal Generation tools and is open-source, written in Python and licensed MIT. To get started: install.

## Overview

Un-0 is an image-generation model built on Kuramoto dynamics: it produces an image by integrating the phase dynamics of a population of coupled oscillators. There is no diffusion schedule, no adversary and no iterative denoising step — the learned parameters are the couplings between oscillators, and generation is the simulation of that system settling into a state.

It comes from Unconventional AI, a group researching dynamical systems as a computing substrate on the argument that such systems map onto analog and physical hardware, pointing toward far lower energy use per generated image than today's digital accelerators. The repository is the plain-PyTorch reference implementation of that idea, deliberately readable rather than optimised.

Two independent pipelines are trained separately and shipped together: CIFAR-10 at 32x32 across 10 classes, and ImageNet-64 at 64x64 across 1000 classes. Six pretrained checkpoints are released, named by task and oscillator count, along with the full training recipe. The published scores are FID 8.86 for cifar10/n4096 under clean-FID and FID 6.74 for imagenet64/n16384 under the OpenAI ADM evaluator — measured with different methodologies, so the two columns are not directly comparable. Training is verified on NVIDIA A100, H200 and B200 GPUs.

## What it does

- Generation by integrating coupled Kuramoto oscillator dynamics — no diffusion schedule, adversary or denoising loop
- Six released checkpoints named {task}/n{oscillators}, from a 1.3M-parameter CIFAR-10 model up to a 322M-parameter ImageNet-64 model
- from_pretrained rebuilds the architecture from the checkpoint's own config, so the right model is constructed automatically
- Full training recipes for both CIFAR-10 and ImageNet-64, single-GPU or 8-GPU DDP, with every hyperparameter exposed as a CLI flag
- Optional Weights & Biases logging and clean-FID evaluation, pulled in only as separate dependency groups
- Device selection defaults to auto, preferring CUDA, then Apple Silicon MPS, then CPU

## Getting started

Requires Python 3.11 or newer and PyTorch 2.11 or newer; a CUDA GPU is recommended. The project uses uv for dependency management.

1. Install

   The logging and eval groups (Weights & Biases and clean-fid) are optional and pulled in only when you need them.

```bash
uv sync --group dev
```

2. Sample from released weights in Python

   Loading a released checkpoint by name rebuilds the model from its stored config, then sample_images returns a batch in [0, 1].

```python
import torch
from un0 import ConditionalImplicitKuramotoGenerator
from torchvision.utils import save_image

model = ConditionalImplicitKuramotoGenerator.from_pretrained("cifar10/n4096")

class_ids = torch.tensor([0, 1, 2, 3, 4])      # one image per listed class
images = model.sample_images(class_ids)         # (5, 3, 32, 32) in [0, 1]
save_image(images, "samples.png", nrow=5)
```

3. Or sample from the CLI

   inference.py arranges the samples into a single image grid, one row per class, and writes it to --output. --pretrained and --checkpoint are mutually exclusive.

```bash
uv run python un0/inference.py \
    --pretrained imagenet64/n16384 \
    --classes 0 1 207 \
    --samples-per-class 8 \
    --output samples/imagenet64.png
```

4. Train from scratch

   The CIFAR-10 pipeline is self-contained: the first run downloads the dataset into the Hugging Face cache, no account needed. The multi-GPU form matches the reference effective batch of 8192.

```bash
uv run python un0/train_cifar10.py --checkpoint-dir checkpoints/cifar10

uv run torchrun --nproc_per_node=8 un0/train_cifar10.py \
    --checkpoint-dir checkpoints/cifar10 \
    --wandb-project <your-wandb-project>
```

## When to use it

- Experiment with a generative model whose compute is dynamical-system simulation rather than a neural denoising loop
- Study how sample quality scales with oscillator count using the six released checkpoints as a ladder
- Reproduce the published CIFAR-10 and ImageNet-64 results with the included training recipes and evaluation methodology
- Prototype workloads aimed at analog or physical computing substrates, where oscillator dynamics map onto the hardware

## Version history

- 2026-06-25: Unconventional AI released Un-0 with MIT-licensed weights and training code. Images are generated from a population of Kuramoto oscillators whose pairwise coupling strengths are the learned parameters, reaching FID 6.74 on ImageNet 64x64.
