Skip to content

About

history of vision models through the lens of minecraft texure generation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

mc-diffusion

A from-scratch walk through the history of image generation, trained on Minecraft item textures.

The idea is to build each major generative architecture in order, in plain PyTorch, and see how far each one gets on the same dataset before moving to the next:

  1. VAE — variational autoencoder. Learn a compressed latent space and sample from it. (current stage, first pass in vae.ipynb)
  2. VQ-VAE / VQGAN — discrete latent codebooks plus an adversarial + perceptual loss. The bridge between autoencoders and latent diffusion.
  3. Diffusion — DDPM-style denoising, first in pixel space and then in the latent space learned above.

Everything lives in notebooks so each step can be read top to bottom.

Dataset

The training data is scraped from community-made Minecraft resource packs on Modrinth. Preprocessing can be found in downloads.ipynb and move_items.ipynb.

The current target item is diamond_sword, giving a few dozen 32×32 RGB images. Small on purpose: it's enough to see the models learn something without needing a GPU.

Layout

downloads.ipynb     fetch resource packs from Modrinth
move_items.ipynb    extract one item texture from every pack, clean, resize
vae.ipynb           VAE implementation + training loop + samples
data/
  packs/            downloaded .zip resource packs
  extra/            versions.json
  <item>/           extracted, cleaned 32x32 textures (e.g. diamond_sword/)

data/ is gitignored; regenerate it with the two notebooks above.

Setup

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install torch torchvision   # not pinned in requirements.txt
cp .env.example .env            # set DATA_DIR (defaults to ./data if left local)

Then run the notebooks in order: downloads.ipynb → move_items.ipynb → vae.ipynb.

Progress

  • Data pipeline (Modrinth scrape, item extraction, cleanup)
  • VAE — MLP encoder/decoder, BCE reconstruction + KL, prior sampling
  • VAE — convolutional encoder/decoder
  • VQ-VAE
  • VQGAN
  • DDPM in pixel space
  • Latent diffusion

About

history of vision models through the lens of minecraft texure generation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages