Hacker News new | ask | show | jobs
by soulofmischief 1269 days ago
Your link suggests this is the case for small images, thumbnails, not large images such as that typically produced by SD
2 comments

SQLite has also measured the performance impact for storing larger BLOBs:

https://www.sqlite.org/intern-v-extern-blob.html

The verdict: storing blobs in the database is totally fine. Stable diffusion is totally compute bound, the overhead of storing a 1mb file in a sqlite db is miniscule.

That article also points to the paper https://www.microsoft.com/en-us/research/publication/to-blob..., the images produced by stable diffusion are about 500-600Kb in size. At this point it could be a similar performance or could be a little better or a little worse. I am not saying that it is better to store files in SQLite, just saying that nothing wrong with it, if those files are below 1Mb.
> I am not saying that it is better to store files in SQLite, just saying that nothing wrong with it, if those files are below 1Mb.

There is one very obvious thing wrong with it, the fact that those resulting images aren't files that are easily accessible to other things.

Unless storing in SQLite actually offers a real advantage in some other way, it's a disadvantage when the output is something you'll want to use with other tools.