From Facebook timelines to Twitter feeds to Instagram stories—social media platforms have been inundated with selfies of users painted in colorful portraits or abstract likenesses, some with a galaxy in the background and others underwater.

The viral trend, which resulted from the photo generator app Lensa AI's launch of "magic avatars," is underpinned by the neural network Stable Diffusion—created by feeding 10 pictures into the app and choosing an art style for the cost of $7.99 per 50 portraits.