Forget Fancy NPUs, Watch A Retro Commodore 64 Generate AI Images
by
Zak Killian
—
Friday, May 10, 2024, 02:44 PM EDT
Generative AI processing is highly complex, such that doing it in a performant fashion requires mountains of parallel processing power. This is the reason everyone's buying up expensive GeForce-adjacent GPUs for their datacenters, and why companies are focused on adding power-efficient NPUs to their SoCs. You can do generative AI work on a typical consumer CPU, but it takes several minutes to create a single low-resolution image.
So, what about using a Commodore 64 to do it? There's no "trick" here—it's just that the workload is much, much smaller than you likely imagine. The author, Nick A. Bild, describes his process in creating the program on his Github page for the project. In essence, he created a Principal Component Analysis (PCA) algorithm that can run on the Commodore 64's 8-bit CPU and 64K of RAM by radically simplifying a much more complex AI model.
The Commodore 64 program can only generate single-color 8x8 sprite characters, but it really is generating them. The dataset was "about 100 retro-inspired sprites", and the generation process takes around 20 minutes to run on a real C64. The final image produced is shown on screen when it's finished. Bild shares a few sprites generated by the program, which we'll reproduce here:
Just like with Stable Diffusion or other image generators, Bild's generator (dubbed "c64_gen_ai") supports a variable number of iterations, although he says that it typically offers better results with a higher number of iterations. The 20 minute figure we gave above was for a 94-iteration sprite. There's a video—thankfully heavily abridged—embedded below if you'd like to see the whole thing working for yourself.
Obviously, this is mostly a proof of concept and "for fun" project than anything of practical use, but it does illustrate that AI is just like any other compute workload in that the demands on the hardware vary tremendously depending on the circumstance. Even the 10-TOPS NPU in Intel's Meteor Lake is plenty potent enough for some sorts of AI work.