Nodes/ComfyUI-DeepSeek_Online/💯DeepSeekOnline
ComfyUI Node

💯DeepSeekOnline

Let DeepSeek write your prompts, streamed straight into the graph

By Chengym2023·Created 2 years ago·Updated about a year ago· 0
💯DeepSeekOnline
    • content
    • reasoning
    • format
    • negative prompt
    modeldeepseek-chat
    systemYou are a professional AI prompt engineer specializing in creating high-quality, structured image generation prompts for Stable Diffusion.The user will provide some exam text. Please parse the "question" and "answer" and output them in JSON format. EXAMPLE INPUT: Which is the highest mountain in the world? Mount Everest. EXAMPLE JSON OUTPUT: { "question": "Which is the highest mountain in the world?", "answer": "Mount Everest" }
    promptGive a example prompt!在这输入要求,英文输出,标签形式,非mj格式
    prefix_continuation
    fim
    max_tokens4096
    streamtrue
    context
    context_q

    The name is doing honest work here: this node calls DeepSeek's hosted API, hands it your request, and streams a finished prompt back into ComfyUI as a text string. No local model, no VRAM hit, no downloads - just an API key and an internet connection. It's the "LLM-assisted prompting" idea turned into a node, and if you've been writing every prompt by hand, this is the cheap way to stop.

    The practice is more established than it feels. What used to be "go paste your idea into ChatGPT in a browser tab" became a node, and the community converged on it for a real reason: on LLM-encoded checkpoints the text encoder reads your prompt as an instruction, so having an LLM write that instruction is one language model talking to another. People pick DeepSeek specifically because it's dramatically cheaper than the big Western APIs and gets genuinely good results at prompt-writing. This pack is one of several nodes built on that premise.

    How it works

    Under the hood it's an OpenAI-compatible chat client pointed at https://api.deepseek.com. You pick a model, give it a system prompt and your request, and it streams the reply back token by token. Two details make it cleverer than a plain API call:

    • prefix_continuation and fim silently flip the base URL to api.deepseek.com/beta. prefix_continuation does prefix caching - you give it text the model should continue from - and fim does fill-in-the-middle completion, where the model writes the gap between a prompt and a suffix. Both are niche, but they're there.
    • The reasoning output captures deepseek-reasoner's chain-of-thought, which DeepSeek exposes separately from the final answer.

    The inputs and outputs that matter

    Most days you only touch four fields:

    • model - deepseek-chat for everyday prompt expansion, deepseek-reasoner when you want R1-style reasoning (slower, pricier).
    • system - your instructions to the LLM. The default is a working "professional prompt engineer" persona, which is fine to keep.
    • prompt - what you actually want. The default is Chinese ("enter your requirements here, output in English, tag form, not MJ format"), which tells you everything about the pack's origin.
    • max_tokens - cap on output length; 4096 is the default.

    There's also stream (defaults to true), the two beta features above, and optional context/context_q for feeding in a previous exchange for multi-turn work.

    Outputs: content is the raw reply - wire that into a CLIP Text Encode (Positive) and you're done. reasoning is the chain-of-thought when using the reasoner. And here's the quirk: format and negative prompt are both produced by the same regex that pulls the "answer" field out of a JSON reply, so on this node they're effectively identical. Don't expect a real negative prompt out of the negative prompt socket - if you want that, the sibling SiliconCloud node does it properly.

    Installing it

    ComfyUI Manager → search ComfyUI-DeepSeek_Online, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Chengym2023/ComfyUI-DeepSeek_Online
    

    Then restart ComfyUI. The only Python dependency is openai, so no heavy install, no model files. You still have to add your key, and this is where people stumble.

    The trap: config.json

    The README's config example is wrong. It shows a flat file:

    { "api_key": "your-api-key-here" }
    

    ...but the code reads a nested block, and if the key isn't there the node dies with a confusing AttributeError. The shipped config.json already has the right shape - just drop your key in:

    {
      "DeepSeek_online": {
        "api_key": "your-deepseek-api-key",
        "url": "https://api.deepseek.com"
      }
    }
    

    Two more things that bite: the README sends you to SiliconFlow's account page for your "DeepSeek API key," which is the wrong door for this node - you want a key from platform.deepseek.com (the SiliconFlow key belongs to the pack's other node). And there's no temperature control here; the API's default is sensible, but you can't tune it. If you get an error string instead of a prompt, it's almost always the key.

    Category💯AI

    Inputs (9)

    NameTypeDefaultDescription
    modelCOMBOdeepseek-chat2 options: deepseek-chat, deepseek-reasoner
    systemSTRINGYou are a professional AI prompt engineer specializing in creating high-quality, structured image generation prompts for Stable Diffusion.The user will provide some exam text. Please parse the "question" and "answer" and output them in JSON format. EXAMPLE INPUT: Which is the highest mountain in the world? Mount Everest. EXAMPLE JSON OUTPUT: { "question": "Which is the highest mountain in the world?", "answer": "Mount Everest" }
    promptSTRINGGive a example prompt!在这输入要求,英文输出,标签形式,非mj格式
    prefix_continuationSTRING
    fimSTRING
    max_tokensINT40961–8192
    streamBOOLEANtrue
    contextoptSTRING
    context_qoptSTRING

    Outputs (4)

    NameTypeDescription
    contentSTRING
    reasoningSTRING
    formatSTRING
    negative promptSTRING