Everything you need to build an entry. The documentation explains how it all fits together; the rest are the contract itself, which the validator enforces exactly. Run the self-test before you spend a submission.
How the contract works, how to build on either track, a full reference for
RoguesDrawer and the spec constants, every validation stage, and what each
rejection message means. Start here if you have not built one of these before.
/docs
download
Starter kit
Everything below in one archive, laid out so the paths in the files work
unchanged once unzipped. Two working entries are included — one ONNX, one
model.py — both of which pass validation and are deliberately
bad drawers.
starter-kit.zip · 12 KB
contract
The I/O contract
What every model must accept and return, whichever track you pick: input shapes, output range, determinism, the wall-clock budget. The comments explain why each rule exists, which is usually the fastest way to see what the validator will object to.
spec.py
contract
The base class — track B
Subclass RoguesDrawer, implement load() and
draw(). Deliberately not an nn.Module: the interior is
yours, and a JAX or pure-NumPy entry is just as valid as a torch one.
base_drawer.py
tool
Check before you submit
Runs the same checks the server runs, detects your track automatically, and writes a preview PNG. If it passes here it will not be rejected there — and it costs you nothing, where a failed submission costs you the round trip.
python selftest.py --dir your/entry
Export a frozen graph from anything: PyTorch, JAX, TensorFlow, or hand-written
NumPy. The architecture travels inside the file, so any design is allowed. Your
sampling loop has to be exported too, not just one step.
Example: starter_onnx.py
Ship Python and a weights.safetensors. More flexible — runtime
branching, custom sampling, anything Python expresses — and it runs inside a
locked-down container with no network.
Example: starter_model.py
The house model is a LoRA on a flow-matching diffusion model, so this is the approach the baseline score comes from.
Four units, free: the theory, then Diffusers from scratch, then fine-tuning and guidance, then Stable Diffusion. Assumes Python, PyTorch and deep-learning basics. Roughly 6–8 hours a unit.
huggingface.co/learn/diffusion-course
theory
What are Diffusion Models? — Lil'Log
The clearest derivation of the maths, and it opens by situating diffusion next to GANs, VAEs and flow models — so it doubles as a map of the whole field.
lilianweng.github.io
Autoencoders, discrete codebooks and flows. Every implementation linked here is PyTorch.
Autoencoders → VAEs → β-VAE and disentanglement, in one piece. Start here before VQ-VAE; the discrete version only makes sense against the continuous one.
lilianweng.github.io
paper
VQ-VAE — Neural Discrete Representation Learning
van den Oord, Vinyals & Kavukcuoglu, 2017. Replaces the VAE's continuous latent with a discrete codebook and nearest-neighbour lookup. Fixes blurry reconstructions and sidesteps posterior collapse, because a discrete bottleneck must be used.
arXiv:1711.00937
notebook
VQ-VAE in PyTorch, end to end
A single runnable notebook covering the codebook, the straight-through estimator and the commitment loss — the three parts that are fiddly to get right from the paper alone.
zalandoresearch/pytorch-vq-vae
notebook
VAE → VQ-VAE in PyTorch
Plain VAE first, then the vector-quantised version, in the same codebase. The easiest way to see exactly what the discrete bottleneck changes.
Jackson-Kang/Pytorch-VAE-tutorial
code
VQGAN — Taming Transformers
Esser, Rombach & Ommer, CVPR 2021, in PyTorch. VQ-VAE plus an adversarial patch discriminator, with an autoregressive transformer over the codebook. This is the lineage latent diffusion came out of, and a strong fit for line art: the codebook learns strokes.
github.com/CompVis/taming-transformers
theory
Flow-based Deep Generative Models
Normalising flows and exact likelihoods. Relevant background for flow matching, which is what the house model actually trains with.
lilianweng.github.io
A different framing: emit a sequence of strokes rather than an image of one. The game's drawings are polylines underneath, so a model that produces strokes directly skips the raster round trip entirely. Note the contract still wants a 512×512 image back — rasterise your strokes before returning.
Ha & Eck, 2017. The foundational one, and it is trained on Quick, Draw!. A sequence-to-sequence VAE over stroke-3 tuples (Δx, Δy, pen state), which is exactly the format the game's stroke schema uses.
arXiv:1704.03477
annotated
Sketch-RNN, annotated line by line
labml's PyTorch implementation with the paper's equations printed beside the code. The clearest route in if the paper's bivariate-Gaussian mixture output is where you get stuck — and it is where most people get stuck.
nn.labml.ai/sketch_rnn
code
rfeinman/Sketch-RNN
A faithful, efficient PyTorch port of Ha & Eck. Runnable as a starting point rather than a reading exercise.
github.com/rfeinman/Sketch-RNN
paper
DoodleFormer
Two stages: predict coarse part locations first, then draw the strokes. Explicitly targets the failure where a sketch has the right parts in the wrong arrangement, which is the main thing that goes wrong on multi-object scenes.
arXiv:2112.03258
paper
SketchAgent
Drives sketching with a language model over a coordinate grid, no sketch-specific training at all. Worth reading for the framing even if you don't build it — it treats drawing as a sequential decision problem rather than a generative one.
arXiv:2411.17673
Your model is handed a frozen text embedding, not a string. These explain what that vector is and where it comes from.
Radford et al., 2021. Two encoders trained contrastively on 400M image–text pairs so matching pairs land close together and mismatched ones far apart. One caveat we hit here: CLIP cannot represent negation, so "a drawing with no X" and "a drawing with X" embed almost identically.
arXiv:2103.00020
code
openai/CLIP
Reference implementation with pretrained weights. A few lines to embed an image or a caption and take cosine similarity — useful for scoring your own outputs.
github.com/openai/CLIP
tutorial
The Illustrated Word2vec
The gentlest possible introduction to embeddings: why a word becomes a vector, what cosine similarity means, and why arithmetic on those vectors does anything at all.
jalammar.github.io
Send anything you'd like listed and it'll appear here with a type badge, a short description and a link.
noise
Your model is run twice on identical inputs and rejected if the images differ.
Seed anything you create from noise itself, and leave dropout off.
This is what makes a leaderboard placing reproducible.
If you build a diffusion model, export the whole denoising loop, not one step. There's a wall-clock budget per image rather than a fixed step count, so spending more steps is allowed until it costs you the limit.
The sandbox runs with networking disabled. Fetching a checkpoint at runtime won't fail cleanly — it will hang and then time out. Everything must be in your weights file.
Counted per GitHub account, resetting at midnight UTC. Rejected entries don't count — only runs that reached the GPU and produced images.
You're about to submit as .