Skip to content

typesafe-image-diffusion

Experiment that makes 16x16 pixel art by asking Jev 256 parallel per-pixel color Choice questions, plus refinement passes.

Demoprototype

Overview

typesafe-image-diffusion turns a classifier into a toy image generator. For a text prompt, it asks 256 parallel Choice questions, one per pixel of a 16x16 grid. Each pixel is told its row, column and distance from the center plus the prompt, and asked which of 16 palette colors it should be. Stitching the answers together gives pixel art with no diffusion weights or training.

Optional refinement passes (0 to 5) ask each pixel again with its previous color and its 3x3 neighborhood, letting it stay or change to clean up holes and edges; the UI animates each pass. The author notes that sending the full grid to every pixel hit a max-tokens error, while slimming to local neighborhoods reduced tokens (about 57k for pass 0) and improved results. It is built with FastAPI.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich of 16 palette colors should this pixel be?16 palette colors
ChoiceGiven your previous color and 3x3 neighborhood, which color should this pixel be now?16 palette colors

How it works

  1. Enter a prompt and number of refinement passes.
  2. Ask 256 per-pixel Choice questions in parallel.
  3. Optionally re-ask each pixel with neighborhood context.
  4. Return the grid, pass history and token usage.

Strengths

  • Creative demonstration of parallel Choice questions.
  • Shows token-budget lessons for large fan-outs.

Caveats

  • Toy experiment; low-resolution output.
  • Token use grows with each refinement pass.

Getting started

export TYPESAFE_API_KEY=... && ./start_server.sh, then open http://127.0.0.1:8000

At a glance

Type
Demo
Status
prototype
Language
Python
Runtime
FastAPI web app
Has code
yes

Use cases and integrations

How curated lists describe it

  • Diffusion-style pixel art out of a classifier: 256 parallel per-pixel Jev questions plus refinement passes.

    hellogumbo/awesome-jev

Frequently asked questions

How does a classifier draw?

Each pixel is a separate Choice over 16 colors, and the answers are assembled into an image.

What do refinement passes do?

Each pixel sees its previous color and neighbors and may change, like a denoising step.

How many tokens does it use?

About 57k input tokens for the first pass, more with each refinement.

Related projects

  • Toy chat that makes Jev talk by repeatedly choosing its next word from a tiny caveman vocabulary.

    ProjectprototypeTypeScript
  • Local browser app that turns Jev's per-pixel colour probability distributions into textured paintings.

    Browser extensionprototypeJavaScript
  • ChatGPT-style web chat where every word of every reply is a Jev multiple-choice decision over a ~1,800-word vocabulary plus END.

    ProjectprototypeTypeScript
  • Text generation with Jev via cascaded Choice questions: word type, WordNet category, embedding cluster, then the word itself.

    ProjectresearchPython
  • Experiment that deliberately misuses Jev as a text generator by asking which symbol comes next and sampling from the returned distribution.

    ProjectresearchPython
  • Chat client that makes Jev write by asking Next word? over a 20,000-word dictionary in 255-word buckets plus a run-off.

    ProjectresearchPython