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
Earlier commentsWorks perfectly for me (Gentoo Linux + nVidia RTX3060 12GiB VRAM - I installed last week your package and it just worked, experimenting with it since then, telling about it parents & colleagues).
The results (especially in relation to "people's faces") can vary a lot between ok/scary/great (I still have to understand how the options/parameters work), all in all it's a great package that's easy to handle & use.
In general, if I don't specify a higher output resolution setting than the default (512x386 or something similar), with e.g. "-w 1024 -h 768", then faces get garbled/deformed like straight from a Stephen King novel => is this expected?
Cheers :)
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.
I was thinking of deploying something like that in one of our app features, but I'm scared of making our Users look like vampires :-)
Is it your experience that the model struggles more with faces than with other changes?
All comments shown.
Couldn't load more comments. Check your connection and try again.