A simple cog script/model to calculate the embeddings for Segment Anything. The purpose is to calculate the embeddings on a powerful machine, for example on Replicate, and then calculate the segments on a CPU-only machine. PhotograftAI is an example demo where I use this architecture.