Nodes/ComfyUI-DeepSeek-API-connector/DeepSeek Prompt Connector
ComfyUI Node

DeepSeek Prompt Connector

An LLM ghostwriter between your idea and your sampler

By KaigorodovTuskul·Created 7 months ago·Updated 21 days ago· 0
DeepSeek Prompt Connector
    • prompt
    • preview
    api_key
    modeldeepseek-chat
    temperature1.00
    max_tokens512
    output_languageenglish
    target_modelsdxl
    prompt_styleDetailed
    system_prompt_modeImprove prompt (default)
    custom_system_prompt
    text

    The name is not subtle: this is a single node that hands your prompt to DeepSeek's chat API and gets a better one back. Type "cyberpunk street, rainy night" into it, and what comes out the other end is a paragraph someone actually tuned for an image model - subject, environment, lighting, lens, composition - ready to feed straight into your sampler's positive prompt.

    Why would you want an LLM in the middle of your graph? Because prompting changed. On SDXL-lineage models a comma-separated tag list still works, but on the modern LLM-encoded stuff (Z-Image, Flux 2 Klein, the Qwen image family) your prompt is read by an actual language model, and it wants sentences and instructions, not (word:1.3) weights it will silently discard. Hand-writing that kind of prompt every time is tedious. This node is the shortcut, and it costs you nothing locally - it is a pure API call, so there's no model to download and no VRAM spent.

    How it works

    The mechanism is refreshingly small. The node builds a system prompt from a preset (or from your custom text), appends a "control block" to your input that tells DeepSeek which image model you're targeting, what style you want, and what language to output in, then POSTs it to https://api.deepseek.com/chat/completions with temperature and max_tokens. That's it - stdlib urllib, no openai package, no requests, nothing to install alongside it.

    It returns two outputs, both plain strings:

    • prompt - the final generated/improved prompt. This is the one you wire into your CLIP Text Encode node (or the LLM-encoder's text input).
    • preview - the same prompt with a short header ([model: ...] [style: ...] [lang: ...]). Handy if you want to eyeball the settings you ran with, or pipe it into a label node; it's the same text, so don't wire both into a workflow that varies them independently.

    The inputs that matter

    You'll set most of these once and leave them alone, but a few deserve attention:

    • api_key - your DeepSeek API key, pasted into the widget. Required; the node throws api_key is required if it's empty. Note that since it lives in the node, it also lives in any workflow JSON you save - don't share a workflow that still has the key in it.
    • model - deepseek-chat (default) or deepseek-reasoner. Chat is the right call for rewriting prompts; reasoner is the R1-style thinking model, slower and pricier, and rarely worth it for this job.
    • text (optional) - your input prompt or rough idea. Leave it empty and the node asks DeepSeek to invent a prompt from scratch, so it doubles as a random-idea generator.
    • system_prompt_mode - six presets: improve, create from idea, photorealistic, cinematic, anime, or Custom. Pick Custom and you must fill custom_system_prompt, or it errors out.
    • target_model - the one people misread. This does not select or download an image model. It's a hint to the LLM about which encoder your downstream node uses: pick sdxl and it writes SDXL-style descriptive tags; pick z-image turbo and it trims to concise, high-signal wording. The list is opinionated (yes, that's "Nano Banana" spelled weirdly), but the logic underneath is sound - different encoders genuinely want different prose.

    Installing it

    The README's stated path is just copy the folder in and restart, which is really a git clone in a hat:

    cd ComfyUI/custom_nodes
    git clone https://github.com/KaigorodovTuskul/ComfyUI-DeepSeek-API-connector
    

    Restart ComfyUI and the node appears under text/deepseek as "DeepSeek Prompt Connector". You can also search "DeepSeek" in ComfyUI Manager if you'd rather do it from the UI. No models to fetch, no extra Python dependencies - the only thing you need that isn't in the repo is a DeepSeek account with a few credits on it.

    Common gotchas

    The obvious failure is a bad or missing key: you'll get a RuntimeError with an HTTP status (401 = wrong key, 402-ish = no credits). Make sure you've actually funded the account, since DeepSeek's API is pay-as-you-go and starts empty. The second classic is forgetting the text input and wondering why a blank node is inventing prompts - that's the feature. And one security note that applies to every LLM node in this category: it sends your text to DeepSeek's servers, and it stores your key in the workflow, so treat saved workflows with the key in them the same way you'd treat a password file.

    It's a small pack with zero footprint in the wild, and the 0-impression search history says almost nobody's found it yet. But the mechanics are honest, the wiring is exactly one node wide, and for anyone running a Chinese-ecosystem image model who keeps hand-writing prompts, it's a genuinely handy little bridge.

    Categorytext/deepseek

    Inputs (10)

    NameTypeDefaultDescription
    api_keySTRING
    modelCOMBOdeepseek-chat2 options: deepseek-chat, deepseek-reasoner
    temperatureFLOAT1.000–2
    max_tokensINT5121–8192
    output_languageCOMBOenglish2 options: english, chinese
    target_modelCOMBOsdxl7 options: z-image turbo, nano banana pro, seedream 4.5, flux 2 klein 9b, qwen image 2512, qwen edit image 2511, +1
    prompt_styleCOMBODetailed5 options: Short, Detailed, Artistic, Cinematic, Technical
    system_prompt_modeCOMBOImprove prompt (default)6 options: Improve prompt (default), Create prompt from idea, Photorealistic refinement, Cinematic style, Anime style, Custom
    custom_system_promptSTRING
    textoptSTRING

    Outputs (2)

    NameTypeDescription
    promptSTRING
    previewSTRING