Cover photo

How I use AI to store NFTs onchain

A new way to mint onchain art

Nahiko

Nahiko

Estimated read time: 1 minute 12 seconds.

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.

post image
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:

post image
Doesn't look too good

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

post image
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.

post image
"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:

post image
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:

365hues
Commented 9 months ago

i have alot of questions

Nahiko
Nahiko
Commented 9 months ago

And I, a lot of answers ! feel free to ask (here or per DM)

How I use AI to store NFTs onchain