kdro.ai

turfusion · generative model

Pixel art from a list of attributes.

turfusion is a diffusion model that draws pixel-art buildings the way the artists of a collection drew them: from the attributes that describe each plot.

5,041hand-drawn plots in the training set
750 × 750pixels, the art's native grid
1 GPUa single 8 GB consumer card, from scratch
< 1 GBthe whole corpus, losslessly packed, resident in video memory

What it does

Each plot in the collection is described by attributes: the building, its details, the pet in the window (Pet: Tabby Cat). turfusion learns to draw a plot from such a list, so it can draw the plots that exist and ones that never did, in the collection's own hand-drawn style.

How it is built

Trained inside video memory

The whole corpus goes to the GPU once, at start-up: the 5,041 plots at their native 750 × 750, run-length encoded losslessly into under a gigabyte, and decoded for each batch on the GPU itself with a single repeat_interleave. After that the training loop moves nothing but a few bytes of bookkeeping between the computer and the GPU per step: decoding, normalisation, noising, the forward and backward passes and the weight averaging all happen there. A dashboard written with Python's standard library alone shows the run and the GPU's telemetry on the local network.

Pixel-perfect

Hand-drawn pixel art has few colours, about 313 distinct ones per plot, and perfectly flat regions. A diffusion model working in continuous colour leaves a smooth bias of a few levels across an image, which is invisible to the eye and fatal to the pixel grid. turfusion comes with a measurement suite that scores a sample against the art's own statistics, and a region-level flattening step: connected regions whose neighbouring pixels differ by almost nothing are snapped to the palette as one, where snapping pixel by pixel had only made the patchiness worse.

Real plots, and turfusion's drawings of them

Left, a plot as its artists drew it, from the holdings of Turf's largest plot holder. Right, what turfusion draws from that plot's attributes. turfusion learned from the whole collection, so a drawing of an existing plot shows how well it holds the style and the particulars: the plot type, the pet, the clouds and the signs all come from the attribute list.

The real plot: a museum with a rocket in the sky.turfusion's drawing of the museum plot.
Turf Plot [−31, −21] · History Museum, Mcduku Rocket, 3 clouds
The real plot: a worship center of crystal.turfusion's drawing of the worship center plot.
Turf Plot [3, −29] · Worship Center, Distant Balloon, 4 clouds
The real plot: a high school with a graffitied, cracked upper floor.turfusion's drawing of the high school plot, with the two upper floors in the other order.
Turf Plot [−10, −3] · High School, Cobblestone, Rose Wood, Severely Cracked. The drawing puts the two upper floors in the other order.
The real plot: a music hall in birch wood.turfusion's drawing of the music hall plot.
Turf Plot [−32, −31] · Music Hall, Birch Wood, Boos Sign, Bird

Real plots: the Turf collection (contract 0x55d8…44c6), as held by its largest holder at the time of writing. Drawings: turfusion, 250 DDIM steps, guidance 3, one sample each.

How Kristian architected it

One constraint shaped everything: a single 8 GB consumer GPU, used completely, and nothing else. From that came the design:

Weights

The weights are not yet open, but may be available on request: get in touch.

← kdro.ai