EasyRAG - LM Studio API (Simple)
The fastest way to get a local LLM chatting inside ComfyUI
- rag_index
- image
- answer
EasyRAG - LM Studio API (Simple) is the stripped-down twin of the Advanced node, and the best entry point into this whole pack. Same local server, same LM Studio, same RAG and image support - minus the knobs. You get question, model, a system prompt, a seed, and one checkbox. That's it. The advanced node exposes temperature, max_tokens, top_k and streaming; this one hardcodes them (temperature 0.2, max_tokens 4096, no streaming, plain chat/completions mode) so there's nothing to fiddle with. One answer string comes out the other end.
Why you'd start here
If you've never gotten LM Studio talking to ComfyUI before, this node is the smoke test. Wire it up with no RAG index, ask it anything, and you'll know within one run whether your LM Studio server is up, reachable, and speaking the same API dialect - before you build a whole retrieval pipeline on top of it. Then, when it works, upgrade to the Advanced node without changing anything else: the inputs are a superset, the outputs just get richer.
The inputs that exist and what they do:
question- your prompt or query.base_url-http://127.0.0.1:1234by default; LM Studio's Local Server must be running there.model- dropdown populated from the server's model list.system_prompt_source/system_prompt- the preset dropdown (custom, or the shipped SDXL/Anima/Z-Image rule files) with your own text as the fallback.seed- for reproducible outputs on models that honor it.unload_model_after_response- default on, and this is the feature that keeps the LLM from squatting in VRAM while your image model runs.
It's not a dumbed-down toy, though. It still accepts a RAG_INDEX (retrieval fixed at top 5 chunks, embedding model loaded and unloaded around the search) and it still does dynamic multi-image input - connect IMAGE sockets and they go along as base64 data URLs. The simplicity is only in the sampling knobs, not the capabilities.
What you give up, honestly
Because streaming is off and max_tokens is fixed at 4096, long or thoughtful answers can get truncated at the cutoff, and you wait for the full response instead of watching tokens land. There's no context_used output either - the Simple node returns only answer - so if you're debugging whether RAG pulled the right chunks, you'll want the Advanced node for its context_used string. And with temperature locked at 0.2, it's tuned for "answer from the documents, don't improvise," which is right for RAG but wrong if you wanted a creative prompt-bending chat.
Gotchas
The same family as its big sibling: the model dropdown scans the default 127.0.0.1:1234 at load time (empty dropdown = check the server), and nothing works at all until LM Studio is running with a model loaded and Local Server enabled. If you changed base_url to a remote host, the dropdown can still look empty while the node works fine - at run time it re-queries the URL you gave it.
Install
It ships in the pack, so one install gets you all six nodes - ComfyUI Manager search "ComfyUI Easy RAG", or:
cd ComfyUI/custom_nodes
git clone https://github.com/nregret/Comfyui-Easy-RAG
cd Comfyui-Easy-RAG
pip install -r requirements.txt
Restart, find it under RagPrompt.
The honest take: once you've confirmed the connection with this node, you'll probably migrate to Advanced for real work, because context_used is too useful to live without and you'll want streaming back. But for a beginner who just wants to see a local LLM answer a question inside the graph without drowning in parameters, Simple is exactly the right first run - and for a quick "does my LM Studio setup work" check, it's the fastest node in the pack.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| question | STRING | — | |
| base_url | STRING | http://127.0.0.1:1234 | — |
| model | COMBO | 1 options: | |
| system_prompt_source | COMBO | 🛠️ 自定义 | 5 options: 🛠️ 自定义, 📄 Anima_提示词规则.txt, 📄 SDXL_提示词规则.txt, 📄 Z-Image_step1中文提示词规则.txt, 📄 Z-Image_step1英文提示词规则.txt |
| system_prompt | STRING | You are a rigorous local RAG assistant. Prefer answering from the provided context. | — |
| seed | INT | 00–18446744073709550000 | — |
| unload_model_after_response | BOOLEAN | true | — |
| rag_indexopt | RAG_INDEX | — | |
| imageopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| answer | STRING | — |