AI image generation is all the rage, and you could be forgiven for thinking with all this talk of AI PCs, NPUs and Nvidia H100s that it's only ultra-modern hardware that's up to the task. Turns out, however, that even the elderly Commodore 64 can get in on the action, thanks to some algorithm wrangling and a good dose of old-fashioned ingenuity.
Hackaday user Nick Bild has put together a project detailing how the now 42-year-old machine was made to perform a task traditionally thought of as very hardware intensive, through the adaptation of a probabilistic PCA algorithm, which was then used to produce 8x8 retro game sprites.
An initial model was built using modified Python code, before being trained on around 100 sprites created with the use of a custom spreadsheet on a modern PC. The parameter values produced were then plugged into a script using simplified logic to run the generative and randomised parts of the algorithm, which, thanks to that simplification, could then be converted into BASIC code to run on the Commodore 64.
That code, once run on the aged machine, created unique 8x8 images that were then expanded to 64x64 (4K eat your heart out) which were then displayed as an output on the screen. Nick says that it took around 20 minutes to create 94 iterations, which given the processing power here—a 1.023MHz CPU with 64KB of RAM— is really quite a speedy result.
Ok, so the output might be more than a little simplistic by modern, Stable Diffusion-based AI image generation standards, and a lot of the hard work was performed on a modern machine, but the fact the little Commodore 64 was capable of being part of the process at all is impressive.
My favourite part of the whole project is the listing of the bill of materials at the bottom of the page, which equates to, err, one Commodore 64 and nothing else. The sprites themselves are charming too, with models that look like they could have been taken straight from an actual retro game.
While I doubt Meta or OpenAI
Read more on pcgamer.com