Nodes/ComfyUI_LayerStyle_Advance/LayerUtility: DeepSeek API V2
ComfyUI Node Runs on cloud

LayerUtility: DeepSeek API V2

DeepSeek API V2 — DeepSeek text inference, with a China-friendly routing option

By chflame163·Created 2 years ago·Updated 4 months ago· 696
LayerUtility: DeepSeek API V2
  • history
  • text
  • history
model
time_out300
max_tokens4096
temperature1.0
top_p1.0
presence_penalty0.0
frequency_penalty0.0
history_length8
system_promptYou are a helpful assistant.
user_prompt

Same idea as the pack's Gemini node - a thin API wrapper so you can get an LLM text step inside your ComfyUI graph without loading a local model - but for DeepSeek, and specifically the V2 revision that adds routing through two additional Chinese cloud providers on top of DeepSeek's own API. If you're outside China, DeepSeek's direct API is normally the simpler option; V2's real value is for people who need - or specifically want cheaper/more reliable access via - AliYun or VolcEngine instead.

model is where that routing choice actually lives: five options, deepseek-chat (DeepSeek's own API, the V3 model), plus deepseek-r1 and deepseek-v3 each available via (aliyun) or (volcengine) suffixes. VolcEngine is worth knowing about specifically because it comes with a meaningful free tier - 500,000 tokens free, and the README notes that using chflame163's own invitation code when signing up gets an extra 3.75 million free R1-model tokens. time_out (default 300 seconds) is how long the node waits for a response before giving up - worth raising if you're on a slower routing path. max_tokens, temperature, top_p, presence_penalty, and frequency_penalty are the standard generation controls you'd expect from any chat-completions API. history_length (default 8) caps how many turns of conversation get kept before older ones are discarded, working alongside the optional history input - wire the history output from a previous DeepSeek call back into a later one and the node maintains context across multiple graph executions, which is the multi-node conversation chaining this node is specifically built to support. system_prompt and user_prompt are the actual instruction and role-setting text. Outputs are text (the response) and history (the updated conversation state to feed forward).

Getting a key set up depends on which route you're using. For DeepSeek's own API, apply at platform.deepseek.com/api_keys. For the V2-specific routes, apply separately at VolcEngine's console or AliYun's Bailian console. Whichever you use, the key goes in the same place: find api_key.ini.example in the plugin's root directory, rename it to api_key.ini, and fill in the relevant field - deepseek_api_key, volcengine_api_key, or aliyun_api_key depending on which model route you picked. You only need to fill in the key for the route you're actually using.

Install the pack itself via ComfyUI Manager (search "ComfyUI Layer Style Advance") or git clone https://github.com/chflame163/ComfyUI_LayerStyle_Advance into custom_nodes/, restart, run the requirements installer. No model download needed here - it's pure API glue like the Gemini nodes, so the setup burden is entirely on getting the right key into api_key.ini, not on downloading anything.

Failures here are almost always credential or routing issues rather than node bugs: a blank or wrong API key produces an authentication error from whichever provider you're hitting, and picking an (aliyun) or (volcengine) model variant without having filled in that specific key in api_key.ini will fail even if your deepseek_api_key field is correctly set - the three routes are independent credentials, not a shared login. If requests are timing out, raising time_out past the 300-second default is the direct fix before assuming anything else is wrong.

Category😺dzNodes/LayerUtility

Inputs (11)

NameTypeDefaultDescription
modelCOMBO5 options: deepseek-chat, deepseek-r1(aliyun), deepseek-v3(aliyun), deepseek-r1(volcengine), deepseek-v3(volcengine)
time_outINT3001–3600
max_tokensINT40961–8192
temperatureFLOAT1.00–2
top_pFLOAT1.00–1
presence_penaltyFLOAT0.0-2–2
frequency_penaltyFLOAT0.0-2–2
history_lengthINT81–64
system_promptSTRINGYou are a helpful assistant.
user_promptSTRING
historyoptDEEPSEEK_HISTORY

Outputs (2)

NameTypeDescription
textSTRING
historyDEEPSEEK_HISTORY