Generating alien lifeforms in the browser

Generating alien lifeforms in the browser

October 24, 2026

I’m building a game that needs a lot of lifeforms - anything from single-celled organisms, through to human-like beings, through to imaginary creatures like gaseous beings. I wanted images for all of them, but I really didn’t want to pay for compute every time I generated one. So I asked Claude to research which image models could run in the browser.

Turns out you can run a pretty decent one. FLUX.2 Klein 4B has been ported to WebGPU by the flux-klein.js project, and there’s a LoRA that gets a good image in two steps. The first load downloads around 5.5GB, but after that it’s cached in the browser. Nothing gets uploaded, and there’s no server for me to pay for.

Check it out at: stuartervine.com/sprites

You pick a base form, add traits - limbs, skin, colors, habitat etc. - and describe the lifeform. It then generates 3-4 images of it at 256x256 from different angles. It also builds a properties card, showing whether it’s intelligent, how it eats, where it lives, how it breeds and how dangerous it is.

Keeping it the same creature

If you generate four angles from the same text, you get four different creatures. Instead, the first image is generated from the text, and the others are edits of that image - “the same creature, now shown from the side”. It works better than I expected, although markings still drift a little between views.

Crystalline beings don’t have fur

The first version let you pick any trait for any lifeform, so you could end up with a crystalline being covered in fur. I asked Claude to make the base form restrict the other properties - a crystalline lifeform probably shouldn’t have fur, but it might have crystal tendrils. Now each form belongs to a family, each trait says which families it suits, and each family gets a few traits of its own. The properties card works the same way, so a crystal grazer “seeds shards that grow into new individuals” rather than giving birth.

It’s still rough around the edges. The properties card doesn’t feed back into the images yet, and it ignores your description when filling in the card. You’ll also need a desktop browser with WebGPU and a reasonable GPU. Have a play, and see what you can come up with.