title: Cairn — Leave, Come Back, Same World
emoji: 🗿
colorFrom: blue
colorTo: gray
sdk: static
pinned: false
license: mit
tags:
- world-models
- video-generation
- long-term-consistency
- object-permanence
short_description: Leave, come back, same world — and edit it
Cairn — leave, come back, same world
Video world models forget. Turn the camera away from a chair for a few seconds and turn back, and it is a different chair, somewhere else, or gone. The usual fixes give the model more implicit memory — a longer context window, or a compressed latent. Both decay with how long you looked away.
Cairn takes the world out of the weights. Objects live in an explicit external ledger — persistent id, pose, appearance, provenance — written by perception on the model's own generated frames, and read back to coerce generation when the camera returns. A table lookup costs the same whether you looked away for 4 frames or 400.
Over 5 seeds, at 128 frames away, every baseline returns a broken world 0% of the time and Cairn 100%, with a flat 3.6 cm position error.
What this Space does
Three things you can check yourself:
- Leave & return — drive the camera away from an object for t frames and come back. Cairn OFF and Cairn ON generate from the same scene, the same trajectory and the same seed, so the only difference is the memory.
- Edit the world — issue
move/remove/recolouron an object while it is off screen, turn back, and see whether the instruction stuck. The baselines cannot express the command at all — there is no row to write to. - The ledger — the actual table, its transaction log, and a rewind to any earlier frame.
How it runs
Entirely in your browser, via Pyodide — no server, no GPU, no
account, nothing uploaded. The first load fetches Python, numpy, scipy and the cairn
wheel (~40 MB, cached afterwards); each run then takes a few seconds.
Pyodide has no ffmpeg, so instead of video you get a filmstrip: the opening shot, the last frame before the camera leaves, a frame from while it is away, and the frames after it comes back. For this claim a strip is arguably the better medium — both halves of the comparison sit in one glance.
Not using Gradio here on purpose: gradio-lite imports gradio before installing the page's
requirements, and gradio 5.x currently cannot be resolved against huggingface-hub 1.x
inside Pyodide. Driving Pyodide directly fixes the ordering and drops gradio's dependency
stack from the download.
What you are watching
A surrogate generator that reproduces how autoregressive video drifts (random walk +
prior pull + salience decay) — not a real video backbone. That is a deliberate trade: exact
ground truth, and a benchmark that runs on a laptop in three minutes, in exchange for not
being LTX-Video. The same cairn library wraps a real diffusers video pipeline in one line:
cairn = CairnPipeline.from_pipeline(pipe)
Everything scientific — the generator, perception, the ledger, the forcing path, the metrics — is the same code the benchmark measures, installed here from the same wheel.
Links
- Code, full benchmark, ablation and honest limitations — https://github.com/NagaYu/cairn
- Dataset — https://huggingface.co/datasets/NagaYu/cairn-departure-return
MIT.