Nodes/ComfyUI Griptape Nodes/Griptape Embedding Driver: LM Studio
ComfyUI Node

Griptape Embedding Driver: LM Studio

Local embeddings for free, served by LM Studio on your own machine

By griptape-ai·Created 2 years ago·Updated about a year ago· 238
Griptape Embedding Driver: LM Studio
    • DRIVER
    embedding_model
    base_urlhttp://127.0.0.1
    port1234
    use_native_toolsfalse
    api_keylm_studio

    Here's the cheapest embedding driver in the pack: it costs nothing per call because it runs against LM Studio, the desktop app that hosts local models, on your own machine. Griptape Embedding Driver: LM Studio points Griptape's embedding requests at LM Studio's OpenAI-compatible server on http://127.0.0.1:1234 - no API bill, no data leaving your computer, no Hugging Face queue.

    If you're already using LM Studio for chat models, this is a no-brainer for experiments: install the app, load an embedding-capable model, and your RAG pipeline has local embeddings in minutes. The tradeoff is that local embedding models are typically smaller and faster than the managed giants - fine for personal projects, less so for production-grade retrieval.

    How it works

    Configuration node, pack-standard: it produces an EMBEDDING_DRIVER that downstream RAG/vector-store nodes use to convert text into vectors, with LM Studio doing the actual inference. Technically it's a subclass of the OpenAI-Compatible embedding driver, because LM Studio speaks that protocol.

    The inputs:

    • embedding_model - which model LM Studio serves embeddings from. Load it in the app first.
    • base_url - defaults to http://127.0.0.1; the local server.
    • port - defaults to 1234, LM Studio's default server port. If you changed it in the app, change it here.
    • use_native_tools - a boolean with a slightly confusing name for an embedding driver. It's inherited from the OpenAI-compatible base; leave it off unless you have a reason.
    • api_key - defaults to the string lm_studio. LM Studio's local server doesn't actually check keys, so any value works; the default is just there to satisfy the API shape.

    Installing

    Ships in the ComfyUI Griptape Nodes pack:

    • ComfyUI Manager: search "Griptape" → install ComfyUI-Griptape.
    • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/griptape-ai/ComfyUI-Griptape, then restart.

    You'll also need LM Studio itself (lmstudio.ai): install it, load an embedding model, and enable the local server. Pack dependencies are griptape[all], openai, python-dotenv, plus git-hosted extensions. The torch caveat applies pack-wide (reinstall torch with the CUDA index if Griptape's install breaks ComfyUI's build).

    Gotchas

    "Connection refused" is the #1 issue, and it's almost always the same cause: the LM Studio server isn't running, or it's on a different port than the node's 1234 default. Start the server in the app before running the workflow. Second: LM Studio must have an embedding model loaded - a chat model doesn't serve embeddings, and requests will fail or return garbage. And because everything runs on your machine, embedding a big corpus takes local CPU/GPU time; don't compare its speed to a managed API.

    CategoryGriptape/Agent Drivers/Embedding

    Inputs (5)

    NameTypeDefaultDescription
    embedding_modeloptSTRINGSelect the embedding model to use.
    base_urloptSTRINGhttp://127.0.0.1The base URL for the embedding service.
    portoptSTRING1234The port number for the embedding service.
    use_native_toolsoptBOOLEANfalseEnable or disable the use of native tools.
    api_keyoptSTRINGlm_studioAPI key for the embedding service.

    Outputs (1)

    NameTypeDescription
    DRIVEREMBEDDING_DRIVER