replicate / paint-by-text

A microsite for InstructPix2Pix
https://paintbytext.chat
MIT License
426 stars 95 forks source link

downscale input images before sending to Replicate API #4

Closed zeke closed 1 year ago

zeke commented 1 year ago

Even with a relatively small input image like 1024x1024, it's pretty easy to make the model run out of memory:

Screenshot 2023-01-25 at 9 04 20 PM

This PR adds a server-side module thats downscales input images before they're sent to the API, to improve overall performance and avoid OOM errors from the model.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
instruct-pix2pix-demo ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 26, 2023 at 5:11AM (UTC)
zeke commented 1 year ago

Gonna go ahead and merge to keep things moving, but please still review!

zeke commented 1 year ago

Do we want to say anything to the user to let them know it happened?

Considering that it's just a toy / proof of concept, it doesn't really seem necessary.