path: /blog/how-i-use-ai-to-store-nfts-onchain.html

← blog

originally published on paragraph

How I use AI to store NFTs onchain

A new way to mint onchain art

GM fellow beliebers !

Just five months in, and we've hit 120 subscribers with zero drop-offs!

Writing is hard. But I do it because you love it.

me writing this way past bedtime (2AM, let me sleep 😭)
me writing this way past bedtime (2AM, let me sleep 😭)

Alright, Today we use AI to store images onchain 👇


Onchain NFTs are hard

Ethereum isn't designed for large files. Smart contracts are capped at 24kb.

For context, here’s Beeple's latest Everyday compressed to ~24kb:

Doesn't look too good
Doesn't look too good

And it still costs $240 to put this pixelated garbage 👆 onchain:

Ethfs is a great project that makes it easy to store any file onchain
Ethfs is a great project that makes it easy to store any file onchain

This is why most onchain art is pixel art.

Less details → smaller files → cheaper storage !

the birth of "compressionism" a movement led by 0xdiid

A new technique

Stable diffusion is the best compression algorithm I've seen.

After storing the initial 3-8GB model,

each image is just a sentence and a few bytes of data.

"Jabba the hutt" leads to a 2k super detailed image thanks to @javilopen's Mystic V2
"Jabba the hutt" leads to a 2k super detailed image thanks to @javilopen's Mystic V2

Sadly storing Stable Diffusion onchain would cost millions (I don't have) 😅

The Trick

What if we only store a low-res version of the artwork + a prompt ?

Future upscalers, likely embedded in browsers, can handle the rest,

Here's a real-life example for my next project Zima:

This example uses the ClarityAI upscaler
This example uses the ClarityAI upscaler

This is how I turn a detailed 3D render into an AI✨ upscaled onchain artwork.


See you next week ✌

Nahiko


If you enjoyed this issue, please tap the Share button below ❤ Thank you!

I share 1 new thing I learned in the NFT space, every Sunday ✨ Don’t miss the next one:

get new posts by email