Nodes/Comfyui-Deepseek/Deepseek Chat Advanced
ComfyUI Node

Deepseek Chat Advanced

When you need the output to behave a certain way

By yichengup·Created 2 years ago·Updated 2 years ago· 37
Deepseek Chat Advanced
    • STRING
    prompt
    system_promptYou are a helpful assistant
    temperature1.0
    max_tokens2048
    top_p1.0
    frequency_penalty0.0
    presence_penalty0.0
    stop_sequence

    "Deepseek Chat Advanced" is the same deepseek-chat (V3) API call as its plain sibling, with every sampling dial the DeepSeek API supports bolted onto the side. If you just want to chat with the model, use the basic node. If you're feeding the output into something that cares about length, format, or repetition, this is the one to reach for.

    How it works

    Same mechanism as every node in this pack: reads your key from config.json, builds an OpenAI-style chat completion against api.deepseek.com, and returns the model's answer as a single STRING. The difference is the request carries all the tuning parameters, so the model's behavior actually changes with your settings.

    The inputs that matter

    prompt and system_prompt are required and work as you'd expect. The optional set is where this node earns its name:

    • temperature (default 1.0) - the author's tooltip says it plainly: bigger = more creative, smaller = more rigorous. Crank down for structured output, up for variety.
    • max_tokens (default 2048, cap 4096) - the ceiling on reply length. If answers come back cut off, raise this.
    • top_p (default 1.0) - nucleus sampling; lower it to make replies less diverse.
    • frequency_penalty and presence_penalty (both default 0.0) - the first discourages the model from repeating words, the second pushes it toward new topics. Useful if you're generating prompts and they keep coming out the same shape.
    • stop_sequence - a string that, the instant the model starts producing it, ends the reply. This one's quietly the most useful: it lets you get a fixed-format answer (say, a prompt ending on a specific marker) that a downstream node can parse.

    One output: STRING.

    What you'll actually touch

    Honestly? For the typical "write me a prompt" use, you'll leave most of these alone - they're the same OpenAI-style knobs you've seen everywhere. The two worth knowing: max_tokens (long reasoning eats it fast) and stop_sequence if your output is going anywhere that needs parsing. Also note there's no top_k here - DeepSeek's own API doesn't support it. That's exactly why the SiliconFlow variants in this pack are separate nodes: that provider does have top_k.

    Install and gotchas

    Install is shared across the whole pack: search "Comfyui-Deepseek" in ComfyUI Manager, or git clone https://github.com/yichengup/Comfyui-Deepseek into ComfyUI/custom_nodes, then restart. Dependencies are just openai and requests - no models.

    Your key goes in custom_nodes/Comfyui-Deepseek/config.json as api_key (get one from platform.deepseek.com), then restart ComfyUI - the node reads the file when it's created, not on every run.

    Two traps specific to this node:

    • Errors are strings, not exceptions. If the output starts with Error: - including a bad key or an empty balance - that's the API complaining, delivered as your "answer."
    • No conversation memory. Advanced is still single-shot, same as the basic node. Long multi-turn discussions aren't what this node does; the Reasoner node in the pack handles that.

    If you're here because you want to tune a model that writes prompts, this is the right node. If you just want a quick LLM in your graph, the plain Deepseek Chat node is fewer knobs and fewer things to accidentally break.

    Category💎DeepAide

    Inputs (8)

    NameTypeDefaultDescription
    promptSTRING
    system_promptSTRINGYou are a helpful assistant
    temperatureoptFLOAT1.00–2创造性(越大越有创意,越小越严谨)
    max_tokensoptINT20481–4096最大输出长度
    top_poptFLOAT1.00–1采样范围(影响回答的多样性)
    frequency_penaltyoptFLOAT0.0-2–2用词重复度(越大越不爱重复用词)
    presence_penaltyoptFLOAT0.0-2–2话题重复度(越大越容易换新话题)
    stop_sequenceoptSTRING停止标记(AI看到这个词就停止回答)

    Outputs (1)

    NameTypeDescription
    STRINGSTRING