Josh Atwal

Logo

josh.atwal@outlook.com

AI Generated Spotify Playlist Art

5 August 2023

Spotify offers a cool feature where you can create playlist cover art, however I found the results very lackluster and highly incongruent with the actual content of the playlist.

Given the recent release of Stable Diffusion XL, I decided to develop my own implementation. Here’s how it works:

  1. Use the Spotify API to get the playlist’s tracks, and the genre of each track.
  2. Use GPT-3.5-Turbo to determine the genre of the playlist.
  3. Use GPT-4 with the genre and track titles to generate a txt2img model prompt.
  4. Use Stable Diffusion XL to generate the image using the prompt.

You can find the code for this on my Github.


Example 1: Black Metal

Black metal is a genre that originated out of Norway and is characterised by its fast tempos, shrieking vocals, highly distorted guitars, and lo-fi production. Black metal often tries to achieve a cold, dark, and evil atmosphere and often deals with occult and misanthropic themes.

Here is the playlist art generated by Spotify:

Spotify Playlist Art


Really not sure how fluffy pink and green animals have anything to do with black metal.

Here are some examples generated using my method:

Spotify Playlist Art


Far more appropriate I think!

Here is an example of one of the prompts from GPT-4 used to generate an image:

Gloomy and mystical forest in monochrome, ancient runes, a solitary pathway in the frost, burning ashes, an ethereal ghost chained in ice, an ominous maritime event under starry skies, a melancholic iron horse below a gibbet elm, and a failing love exchange.

You can check out the playlist I used here:



Example 2: Death Metal / Hardcore

The second playlist I tried was a mix of genres. I listen to this playlist in the gym so its a big mix of aggressive genres including death metal, goregrind, hardcore, metalcore, deathcore, slam, beatdown, black metal, and more. Themes include violence, gore, death, as well as pessimistic views on society and humanity.

This is the image generated by Spotify:

Spotify Playlist Art


Again, very weird and not at all representative of the playlist. Here are some examples generated using my method:

Spotify Playlist Art


I think these look really great and could easily be album covers! Here is an example prompt:

Dark, aggressive energy swirling amidst chaos, shreds of divine mockery, and desolate landscapes. Eerily glowing thrones of blood under a cold, celestial sky. Shadowy figures in self-inflicted terror, scenes of macabre transformation, and chanting voiceless choirs near graveyards. Splashes of neon arterial spray patterns against relentless tyranny.

Playlist:



Example 3: Breakcore

My final example is breakcore, an electronic genre that is characterised by its fast tempos, complex rhythms, and heavy use of sampling. Themes of this genre include chaos, dystopia, technology, digitalisation, and the internet. Many songs are heavily atmospheric with themes of isolation and loneliness.

Spotify image:

Spotify Playlist Art


This one is the least bad… but still quite uninteresting and not really thematically related to the playlist. Here are some examples generated using my method:

Spotify Playlist Art


Very cyberpunk indeed. Example prompt:

Dystopian cyberpunk cityscape under a mysterious, star-filled sky, fragmented heart amid the fog, silent hill and tundra. Traces of angels, fairies, and violet-hued characters. Music vibrations emitting from a mainframe, breakbeat rhythms echoing, with a sense of melancholy, mystery, and fleeting joy.

Playlist: