diffusionminer / README.md
kerzgrr's picture
Add Diffusion Miner teacher checkpoint, Tile VAE, live infer, and gameplay GIF
b4b7ca9 verified
|
Raw History Blame Contribute Delete
2.34 kB
---
license: apache-2.0
library_name: pytorch
pipeline_tag: other
tags:
- world-model
- diffusion
- mining
- video
- causal
- game
---
# Diffusion Miner
An action-conditioned world model that learned a falling-sand mining sandbox. You hold **A / D** to walk, **W** or Space to jump, and the arrows to dig; it invents the next frame.
![demo](demo.gif)
256×256 at 12 FPS. The attention prefix is 12 latent frames; a ConvGRU world memory scans 48. About 220M parameters. The codec is a frozen Tile VAE trained on this game, not SDXL. Needs a CUDA GPU with BF16.
This release is the teacher-stage instantaneous flow checkpoint. One step is the right setting — there is no distilled student.
## Play it
```bash
pip install torch numpy pillow safetensors huggingface_hub
hf download kerzgrr/diffusionminer --local-dir checkpoints/diffusionminer
python checkpoints/diffusionminer/live_infer.py \
--local-dir checkpoints/diffusionminer \
--steps 1
```
If the weights are already in the current directory:
```bash
python live_infer.py --steps 1 --window-scale 3 --seed 2026
```
Click the window once so it has focus. Esc quits. Clicking the canvas drops a miner into the latent history if you want to poke it.
Write a short gameplay GIF with the scripted training miner:
```bash
python live_infer.py \
--local-dir checkpoints/diffusionminer \
--steps 1 \
--seed-play \
--autoplay \
--frames 144 \
--output diffusionminer.gif
```
## Controls
| key | action |
|---|---|
| `A` | move left |
| `D` | move right |
| `W` / Space | jump |
| ← ↑ → ↓ | dig that way |
Action vector is `[left, right, jump, dig_left, dig_right, dig_up, dig_down]` as floats in `{0,1}`. Opposite move keys cancel. Only one dig direction is active at a time.
## What's in the files
| file | what |
|---|---|
| `ema.safetensors` | playable teacher weights |
| `codec.pt` | frozen Tile VAE |
| `config.json` | video / model / codec settings used at train time |
| `livediffusion/` | inference package used by `live_infer.py` |
| `live_infer.py` | live play launcher |
| `demo.gif` | scripted gameplay clip |
If something breaks, it is probably a GPU that cannot do BF16, or running `live_infer.py` without the rest of this snapshot on `sys.path`.