Embedding Merge

ComfyUI custom node port of the Automatic1111 Embedding Merge extension.

I’m not sure where to put this, it is something that I’d wished someone else should do so posting it somewhere is probably the Kantian thing to do. So I’m putting it here for now.

Most of the code is straight from the original author (klimaleksus), I tried not to modify anything I didn’t have to. My changes are a little brute force and used a lot of AI, but it passes my tests as far as producing the same output as in ReforgeUI. I had to make it write the embeddings into the Models/Embeddings/TempEmbeddings folder, since I couldn’t find a way to keep the embeddings in memory, which I’m not totally satisfied with.

In any case, I’m putting this out here in case anyone else wants to use it, improve on it, or whatever. The current design satisfies my own use case, so I’m probably not going to do anything more with it.