LayerUtility: DeepSeek API
DeepSeek API — text inference with multi-node conversation memory
- history
- text
- history
A thin wrapper around DeepSeek's chat API - no local model, no VRAM cost, just a network call for whenever your graph needs an LLM step (expanding a rough idea into a full prompt, rewriting text, generating variations) without loading gigabytes of weights just to do it.
Worth flagging up front: this node's model list has moved past what the README describes it as. The README documents plain DeepSeekAPI as offering exactly one model, deepseek-chat (DeepSeek-V3), and describes the AliYun/VolcEngine routing as a separate node, DeepSeekAPI_V2. The live schema for this node now lists five options - deepseek-chat plus deepseek-r1 and deepseek-v3 each via (aliyun) and (volcengine) suffixes - which is the same routing the README attributes to V2. Trust what's actually on the node: you get the AliYun/VolcEngine options here too, whatever the docs say.
Why the routing options matter
If you're outside China, DeepSeek's own API is the simplest path. VolcEngine is worth knowing about specifically because of its free tier: 500,000 tokens free on signup, and the README notes that using the author's invitation code (27RVS1QN) at signup adds another 3.75 million free R1-model tokens on top.
The inputs and outputs that matter
model- which of the five routes to use; this is also what decides which API key gets checked.user_prompt/system_prompt- your instruction and the model's role framing.history(optional input) /history(output) - wire a previous call'shistoryoutput into a later node'shistoryinput and the conversation carries forward across multiple graph executions.history_length(default 8) caps how many turns get kept before older ones drop off.max_tokens(default 4096),temperature(default 1),top_p,presence_penalty,frequency_penalty- standard chat-completion controls, same knobs you'd expect from any OpenAI-style API.
Outputs: text (the response) and history (updated conversation state to chain forward).
How to install it
Recommended: ComfyUI Manager, search "ComfyUI Layer Style Advance". Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/chflame163/ComfyUI_LayerStyle_Advance.git
Then install_requirements.bat / install_requirements_aki.bat, or pip install -r requirements.txt plus repair_dependency.bat. Restart. No model download for this node - it's pure API glue.
The step that actually matters: find api_key.ini.example in the plugin's own folder, rename it to api_key.ini, and fill in whichever field matches the route you're using - deepseek_api_key for the direct API, aliyun_api_key for the AliYun route, volcengine_api_key for VolcEngine. You only need the key for the route you're actually picking in model.
Common issues & troubleshooting
Node fails with no clear error, or an obvious auth failure. Check api_key.ini exists - not just .ini.example - and that the specific field for your chosen route is filled in. The three routes are independent credentials, not a shared login: having deepseek_api_key set doesn't help you if you picked an (aliyun) model and left aliyun_api_key blank.
Requests time out. This node doesn't expose a time_out setting in its schema - that control lives on the DeepSeekAPIV2 sibling node. If you need to tune request timeout specifically, that's the node to switch to.
Long conversations start losing earlier context. Expected behavior, not a bug - history_length caps how much gets kept. Raise it (up to 64) if you need a longer memory window.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | 5 options: deepseek-chat, deepseek-r1(aliyun), deepseek-v3(aliyun), deepseek-r1(volcengine), deepseek-v3(volcengine) | |
| max_tokens | INT | 40961–8192 | — |
| temperature | FLOAT | 1.00–2 | — |
| top_p | FLOAT | 1.00–1 | — |
| presence_penalty | FLOAT | 0.0-2–2 | — |
| frequency_penalty | FLOAT | 0.0-2–2 | — |
| history_length | INT | 81–64 | — |
| system_prompt | STRING | You are a helpful assistant. | — |
| user_prompt | STRING | — | |
| historyopt | DEEPSEEK_HISTORY | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| history | DEEPSEEK_HISTORY | — |