An open-source project generates original 128 by 128 face images on a Raspberry Pi Pico 2 in about ten seconds.

Pico-Faces is an open-source project that runs a generative image model entirely on a Raspberry Pi Pico 2, which uses the RP2350 microcontroller. The firmware generates original 128 by 128 pixel colour images of human faces without a network connection or host computer. Published on GitHub by developer cpldcpu, the project can display its output on a VGA monitor through a Pimoroni VGA Demo Base or send it over USB serial.
The model is a latent rectified-flow diffusion transformer (DiT), with a structure the repository compares to larger diffusion models such as Flux. A variational autoencoder (VAE) decoder converts the transformer’s latent output into pixels. The model supports conditional generation across five classes based on combinations of gender and smile attributes and was trained using the FFHQ face dataset.
Two builds are available. The higher-quality m3_decD_deep_full uses a transformer with a dimension of 128 and a depth of 12, giving 2.37 million parameters, alongside a VAE decoder with about 493,000 parameters. Its weight blob occupies 4.02 MB and generates an image in about 10 seconds, increasing to around 20 seconds at the higher sampling setting.
The faster m3_long_cfg build uses a dimension of 128 and a depth of 8, with 1.59 million parameters, alongside a decoder containing about 116,000 parameters. Its weight blob is 2.57 MB and generates an image in about 4.3 seconds.
Image quality is reported using generative Frechet inception distance (Gen-FID), with the quantised model scoring 53.8 on the device compared with 52.4 for the floating-point reference. This difference reflects the effect of int8 quantisation. The development pipeline uses calibration, followed by distillation with quantisation-aware training, before folding and exporting the model. According to the developer, the exported model was verified as byte-identical against both C99 and NumPy simulators.
Microcontroller artificial intelligence (AI) has so far focused mainly on inference tasks such as keyword spotting, anomaly detection and small-image classification. These models process an input and return a prediction or label. A diffusion model works differently by generating a new image through an iterative synthesis process. According to the repository, Pico-Faces has roughly 5,000 times fewer parameters than a typical local diffusion model. Running this class of generative model entirely on a microcontroller without external memory is what makes the project notable.
This is a working demonstrator rather than a finished product. Pre-built UF2 firmware is available for flashing onto the Raspberry Pi Pico 2, making the project relatively straightforward to reproduce. Output is limited to 128 by 128 pixel face images, while generation times of around 10 to 20 seconds make it unsuitable for interactive applications.
The Raspberry Pi Pico 2 is among the lower-cost development boards available to Indian engineers, with domestic listings placing the basic board at around 544 to 630 rupees, depending on the distributor and configuration. That low entry cost is significant for Indian readers. Generative AI demonstrations often depend on cloud computing or substantially more powerful processors, whereas Pico-Faces runs entirely on a small development board without a network connection. For engineering colleges working with limited laboratory budgets, the project turns a board already used for embedded systems experiments into a working generative AI demonstrator.
India’s semiconductor design programmes, including the Design Linked Incentive scheme, support domestic work on semiconductor and system-level design. Pico-Faces illustrates a related engineering challenge at the edge: making a generative model small enough to operate within severe memory and compute limits rather than relying on specialised AI hardware. India’s embedded design ecosystem is highly cost-sensitive, and a generative model that fits into roughly four megabytes of storage demonstrates the kind of optimisation that could make more AI workloads practical on low-cost hardware.
For more information, click here.




