Show HN: New AI edits images based on text instructions (opens in a new tab)github.com
1098 pointsThis works suprisingly well. Just give it instructions like "make it winter" or "remove the cars" and the photo is altered.
Here are some examples of transformations it can make:
Golden gate bridge: https://raw.githubusercontent.com/brycedrennan/imaginAIry/ma...
Girl with a pearl earring: https://raw.githubusercontent.com/brycedrennan/imaginAIry/ma...
I integrated this new InstructPix2Pix model into imaginAIry (python library) so it's easy to use for python developers.
Comments (227) 59 threads
Show all comments
Showing thread 18 of 59
Our "cluster" is running on a ASUS ROG 2080Ti external GPU in the razer core-x housing, and that actually works just fine in my flat.
We went through several iterations of how this could work at scale. The initial premise was basically the google homepage, but for images.
That's when we realised that scaling this to serve the planet was going go be a hell of a lot more work. But not really, conceptualising the concurrent compute requirements as well as the ever-changing landscape and pace of innovation in this absolutely necessary.
The quick fix is to use a message queue (we're using Bull) and make everything asynchronous.
So essentially, we solved the scaling factor using just one GPU. You'll get your requested image, but it's in a queue, we'll let you know when it's done. With that compute model in place, we can just add more GPUs, and tickets will take less time to serve if the scale engineering is proper.
I'm no expert on GPU/Machine learning/GAN stuff but Stable Diffusion actually prompted me to imagine how to build and scale such a service, and I did so. It is not live yet, but when it does become so the name reserved is dreamcreator dot ai, and I can't say when it will be animated. Hopefully this year.
I'm glad you have this working but I wouldn't exactly call this "solving the scaling problem", you're just running it in a blocking "serial fashion". With enough concurrent users it could still take somebody until the heat death of the universe for their image to finally be generated.
Your queue decouples demand from supply - though you now have another problem - if demand far exceeds supply will your queue overflow?
In that scenario you might need to push the queue back to the requester - ie refuse the job and tell them to resubmit later.