A small app that allows you to upload an image and replace certain parts with AI.
The app utilizes Meta's Segment Anything Model to create a mask and Stable Diffusion's Masked Inpaintaing to fill the masked area with given prompt.
The SAM embeddings are calculated via Replicate.com and stored using Xata.io's new File storage system. A GRPC service then loads the embeddings and predicts the mask, which in turn is stored again in Xata.io. The application finally sends the image, mask and prompt to Stability AI's API and stores and calculates the embeddings for the generated image, so the user can keep editing.