🤖 Nexa Text Generation
Talk to your Nexa-hosted GGUF — with the thinking kept separate from the answer
- model_config
- context
- thinking
This is where the pack's Nexa SDK mode actually talks. NexaModelSelector finds the models; this node generates the text. Wire the selector's model_config output into this node's model_config input, pick a model, type a prompt, and you get two strings back: context (the answer) and thinking (the reasoning, if you asked for it). That split is the best thing this node does - reasoning models like DeepSeek-R1 and the Qwen3-Thinking line vomit their chain-of-thought into the output, and here you get the clean answer without the noise, or with it, on a separate wire, whichever you want.
How it works
The node calls the Nexa service's OpenAI-compatible /v1/chat/completions endpoint - no key, no cloud, just your local service on port 11434. The preset_model dropdown is built at load time: downloaded models at the top, then a separator, then the pack's preset model IDs. Those presets are all Qwen3, mostly abliterated variants, mostly Q8_0 - the pack's taste, so pick accordingly. Select Custom and type your own ID into custom_model in author/model:quant format. auto_download (on by default) runs nexa pull for you when the model isn't cached.
Then comes the clever bit: the node strips thinking tags - <think>…</think>, <thinking>…</thinking>, [THINKING]…[/THINKING] - out of the response. context gets the cleaned final answer; thinking gets whatever reasoning was stripped, and only when enable_thinking is on. Set it off and the tags still get removed, you just don't get a thinking wire filled.
The inputs that matter
model_config- fromNexaModelSelector; without it, nothing downstream works.preset_model/custom_model- one or the other; presets are a dropdown, custom takes an ID.auto_download- keep on unless you deliberately pre-pull everything.max_tokens- default 512, but the README makes a strong case for 256: at 512 you get eleven paragraphs of boilerplate, at 256 you get one clean paragraph. The whole "why 256" section is worth a read.temperature(0.7),top_p(0.9),top_k(40),repetition_penalty(1.1) - defaults are fine to start.enable_thinking- on if your model reasons and you want it separate.prompt- at the bottom of the node, deliberately, because it's the field you edit most.
Common issues
"Service is not available" means nexa serve isn't running - start it and confirm with curl http://127.0.0.1:11434/v1/models. Output running long? Cut max_tokens to 256 and tighten the system prompt. A model not in the dropdown? nexa pull it, refresh the selector, restart ComfyUI. If nexa list shows 0B entries, it's the stale-cache cleanup from the README (~/.cache/nexa.ai/nexa_sdk/models - nuke the local/workspace dirs and the *.lock files).
Install
ComfyUI Manager (search "ComfyUI-GGUF-FX") or clone + pip install -r requirements.txt, restart. Nexa mode additionally needs pip install nexaai and a running nexa serve - that's the price of admission for the managed-model workflow. If you just want to run a GGUF file directly without a service, the pack's local text path is the lighter option.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| model_config | NEXA_MODEL | Nexa 模型配置(来自 Model Selector) | |
| preset_model | COMBO | Custom (输入自定义模型 ID) | 可用模型列表(顶部为已下载模型) |
| custom_model | STRING | 自定义模型 ID(格式: author/model:quant) | |
| auto_download | BOOLEAN | true | 自动下载模型(使用 nexa pull) |
| max_tokens | INT | 5121–8192 | 最大生成 token 数 |
| temperature | FLOAT | 0.70–2 | 温度参数(越高越随机) |
| top_p | FLOAT | 0.900–1 | Top-p 采样 |
| top_k | INT | 400–100 | Top-k 采样(0 表示禁用) |
| repetition_penalty | FLOAT | 1.11–2 | 重复惩罚 |
| enable_thinking | BOOLEAN | false | 启用思考模式(支持 DeepSeek-R1, Qwen3-Thinking 等模型) |
| prompt | STRING | Hello, how are you? | 输入提示词 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| context | STRING | — |
| thinking | STRING | — |