# How I use AI to store NFTs onchain

*A new way to mint onchain art*

By [Nahiko's Bookmarks](https://paragraph.com/@nahiko) · 2024-09-29

---

![](https://paragraph.xyz/editor/callout/information-icon.png)

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.

![](https://storage.googleapis.com/papyrus_images/ec89a40c88848510bdee4304b84063b7.webp)

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:

![](https://storage.googleapis.com/papyrus_images/3b3aafa3ca796e34dfde3fd6bb6b0c4a.png)

Doesn't look too good

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

![](https://storage.googleapis.com/papyrus_images/baa035a4dea7718238862c1b385bbc57.png)

[Ethfs](https://ethfs.xyz/) 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 !

[![User Avatar](https://storage.googleapis.com/papyrus_images/aa34f9d24c68bbb8897638197cfaf711.jpg)](https://twitter.com/BaseChain)

[BaseChain](https://twitter.com/BaseChain)

[@BaseChain](https://twitter.com/BaseChain)

[![Twitter Logo](https://paragraph.xyz/editor/twitter/logo.png)](https://twitter.com/BaseChain/status/1836857083678871578)

ok but do you have a [@0xdiid](https://twitter.com/0xdiid) 1/1?

![](https://storage.googleapis.com/papyrus_images/a7e955af0f114bf0f2e4192007a3a52a.png)

[![User Avatar](https://storage.googleapis.com/papyrus_images/d092006aa636c31bdd1fd03b23984d11.jpg)](https://twitter.com/smokestacks)

[smokestacks](https://twitter.com/smokestacks)

[@smokestacks](https://twitter.com/smokestacks)

[![Twitter Logo](https://paragraph.xyz/editor/twitter/logo.png)](https://twitter.com/smokestacks/status/1836822822309745094)

ok but do you have a [@0xdiid](https://twitter.com/0xdiid) 1/1?

![](https://storage.googleapis.com/papyrus_images/1bdae926225893ae1cf21afa2517bebc.jpg)

 [![Like Icon](https://paragraph.xyz/editor/twitter/heart.png) 26](https://twitter.com/BaseChain/status/1836857083678871578)[

21:57 • 19 Sept 2024

](https://twitter.com/BaseChain/status/1836857083678871578)

_the birth of "compressionism" a movement led by_ [_0xdiid_](https://x.com/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.

![](https://storage.googleapis.com/papyrus_images/3edbfc64c5363237f60177996ab197b4.png)

"Jabba the hutt" leads to a 2k super detailed image thanks to [@javilopen](https://x.com/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**:

![](https://storage.googleapis.com/papyrus_images/a56427faa8d6a7b0185b526c09377b19.png)

This example uses the [ClarityAI upscaler](https://replicate.com/philz1337x/clarity-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!_

[Share on Twitter](https://twitter.com/intent/tweet?text=I%20found%20an%20interesting%20newsletter%20%21%0A%0A%40nahiiko%20pushes%20the%20boundaries%20of%20NFTs%20and%20shares%20everything%20he%20learns%20along%20the%20way%3A%0A%0Anahikosbookmarks.com)

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

[Subscribe](https://paragraph.xyz/@nahiko/memberships)

---

*Originally published on [Nahiko's Bookmarks](https://paragraph.com/@nahiko/bookmarked-28)*
