loading model…
Draw on the canvas β€” lift to release a wave

Explore cool deep-learning projects.

This is a video transformer I trained to simulate 2D waves. Draw with your mouse or finger β€” when you lift off, a physics simulator seeds the first 8 frames, then the ~18M-parameter model rolls out the rest on my GPU and streams the ripples back to your canvas in real time, one frame at a time. The model learned its physics in a walled tank β€” watch the ripples bounce off the edges and interfere with each other on the way back.

Tip: keep it lively with a few spread-out splashes, and draw over a running wave to drop in another β€” the new splash merges into the ripples already in motion and rings louder than the older waves, which have started to fade. The fade slider sets how fast the water calms (zero lets it ring forever), and speed trades smoothness for slow-motion detail.

Under the hood

How your splash becomes a prediction

No equations β€” just the path a single frame takes through the network. Scroll to walk down the pipeline, one stage at a time.

1
input · 8 frames
Input

Your drawing becomes a height map

The instant you lift off, the splash is frozen as a 128×128 grid of surface heights — a tiny topographic map of the water. A quick physics pass hands the model its first 8 frames of motion to start from.

128 × 128 field · 8 seed frames

2
patchify 16×16
Patchify · ViT

Slice each frame into patches

Every frame is chopped into little 16×16 tiles, and each tile becomes one token — like turning a picture into words the transformer can read. One frame becomes 64 tokens.

patch 16×16 → 64 tokens / frame

3
xyt
embed 384-d
Embed · Position

Tag every token

Each tile is expanded into a 384-number fingerprint, then stamped with where it sits on the grid and when in time it happened. Now the model knows each token’s place in space and moment.

linear → 384-d · spatial pos + RoPE time

4
×10
transformer ×10
Transformer ×10

Let the tokens compare notes

Ten layers of self-attention. Tokens in the same frame share everything; across time, each moment can only look backward — never at the future. This is where the model learns how a ripple here nudges the water there a step later.

10 layers · 8 heads · block-causal attention

5
unpatchify
Head · Unpatchify

Rebuild the next frame

The transformed tokens are turned back into 16×16 tiles and stitched into a full 128×128 frame — the model’s guess for what the water looks like a moment from now.

linear head → unpatchify → 128 × 128

6
conv refine
CNN · Refine

Smooth the seams

A small convolutional network slides across the rebuilt frame, softening the seams between tiles and sharpening the ripples. It only adds a gentle correction on top of what the transformer produced.

residual Conv2d smoothing

7
rollout loop
Rollout · Stream

Feed it back and repeat

The fresh frame joins the last 8 and the whole loop runs again — one new frame at a time, quantized and streamed live from the GPU to your canvas. That’s the ripple you watch unfold.

autoregressive · ~18M params · live on GPU