☁️Save OpenAI Embeddings database
Build a vector store via API, not a local model
Building a RAG index locally means running an embedding model on your own GPU - fine if you've got the VRAM to spare, annoying if you're already running an LLM and a diffusion model in the same session. Save OpenAI Embeddings database skips the local-model step entirely: it calls an OpenAI-format embeddings API to do the encoding, and writes the resulting vector store to disk for you.
It's the API-backed sibling of comfyui_LLM_party's Save Embeddings Database node, which runs the embedding model locally. Same job - chunk text, embed it, save a searchable index - different cost tradeoff: this one trades your GPU time for API spend, and skips having a real embedding model on disk in the first place.
How it works
Feed it text, and it splits it into overlapping chunks, sends each chunk to the configured embeddings endpoint, and writes the returned vectors - plus enough metadata to map them back to their source text - to save_path. There's no output on the graph; the whole point is the file it writes.
The inputs and outputs that matter
model_name(defaulttext-embedding-3-small) - which embedding model the API call uses. OpenAI's small model is the cheap, sensible default; swap it if you need a larger one for better retrieval quality.chunk_size/chunk_overlap(200 / 50) - how the text gets split before embedding. Smaller chunks retrieve more precisely later but lose surrounding context; the overlap keeps ideas that straddle a chunk boundary from getting cut in half.save_path- where the resulting vector database is written.file_content(optional) - the text to index, typically piped in from one of the pack's loader nodes (Load File, Load Wikipedia, a web tool) rather than typed by hand.base_url/api_key(optional) - leave blank to inherit fromconfig.ini, or set per-node.is_ollama(default false) - flip this on and the node talks to a local Ollama embeddings endpoint through the same OpenAI-compatible interface, instead of an actual cloud API. Same trick used by the pack'sLLM_api_loadernode - one setting that swaps "cloud" for "local" without changing anything else about how the node's called.is_enable- the standard bypass toggle.
No outputs - this is a terminal node (is_output_node: true, empty output list). Once save_path has the file, its job is done.
How to install it
Search comfyui_LLM_party in ComfyUI Manager and install, then restart. Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/heshengtao/comfyui_LLM_party.git
Run pip install -r requirements.txt from inside the pack's folder using ComfyUI's own Python, then restart. Unlike its local-embedding sibling, this node doesn't need a model file on disk or GPU setup - just working API credentials (or, via is_ollama, a running local Ollama instance).
Common issues & troubleshooting
It fails before touching your text. Check credentials first - an empty or invalid api_key/base_url (or a config.ini that isn't set up) fails at the very first API call, before any chunking or embedding happens.
API costs add up faster than expected. Every chunk is a separate embedding call; a large document with a small chunk_size means a lot of API requests. If you're indexing something big, consider a coarser chunk_size or check your provider's per-call pricing before running this against a whole document library.
Retrieval later feels off - the wrong chunks coming back. That traces back to chunk_size/chunk_overlap, not this node's embedding step itself. Chunks too large blur separate topics together; chunks too small lose the context needed to match a query meaningfully. There's no universal right value - tune it against how dense your source text actually is.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | STRING | text-embedding-3-small | — |
| is_enable | BOOLEAN | true | — |
| chunk_size | INT | 200 | — |
| chunk_overlap | INT | 50 | — |
| save_path | STRING | — | |
| file_contentopt | STRING | — | |
| base_urlopt | STRING | — | |
| api_keyopt | STRING | — | |
| is_ollamaopt | BOOLEAN | false | — |
Outputs (0)
No outputs