ComfyUI Node

BytePlus LLM

The prompt writer that costs you fractions of a cent

By byteplus-sa·Created 8 days ago·Updated about 8 hours ago· 3
BytePlus LLM
    • STRING
    • raw_json
    ◄prompt►
    ◄model▾►
    ◄seed0►
    ◄system_prompt►
    ◄detailhigh►
    ◄fps1.0►
    ◄reasoning_modeauto►
    ◄reasoning_effortmedium►
    ◄turns1►
    ◄streamfalse►
    ◄file_expire_seconds604800►

    The most useful thing an LLM node does in ComfyUI is not chat. It writes prompts - turns "a girl in a café, moody" into four dense paragraphs Seedream or Seedance will actually do something with, writes your shot list, drafts the dialogue two TTS voices will read. That's the job here, and it's why the pack ships a Seed Prompt Writer template wiring this node's text straight into a Seedream prompt.

    It's also the cheapest node in the pack by a wide margin. Text tokens are noise next to video seconds, which makes it the one to test your key with.

    How it works

    The node talks to ModelArk's Responses API, and the model list is broad for a first-party pack: Seed 2.0 Pro, Lite and Mini, Seed 2.1 Turbo, DeepSeek V4.1 Flash, GLM 5.3 Flash. Under each model option in the picker you get that model's own inputs - temperature, plus autogrow slots for reference images and videos, and on Seed 2.0 Lite and Mini, audio as well (up to four clips, 120 minutes total). Nothing is sent inline: images, video frames and audio are uploaded to Ark Files first, and file_expire_seconds (default 604800 - seven days; range 1–30) controls how long those uploads stick around.

    Wire the plain STRING output into anything that takes a prompt - a Seedream or Seedance prompt socket, a Preview as Text, a Save Text node. raw_json gives you the raw response if the text output threw something away.

    The inputs worth setting

    • prompt - what you're asking. For a prompt-writer setup, describe the intent ("write a detailed image prompt for a rain-soaked neon alley, photoreal, 35mm") rather than the image itself; the whole point is that the model does the writing.
    • model - this is where the real choice lives. Mini is the cheap, fast default for prompt rewriting. Pro when you want the writing to be good. DeepSeek V4.1 Flash and GLM 5.3 Flash are there if you already trust one of them for a particular tone.
    • seed is not a reproducibility control. Its tooltip says it plainly: results are non-deterministic regardless, and the seed only decides whether the node re-runs. Same for every generation node in this pack - change the prompt or the seed to get a new call, otherwise you're reading a cache.
    • system_prompt is the personality slot, and for a prompt writer it's the highest-leverage field on the node. Put your house style in there once and stop re-typing "no text, no watermark, cinematic lighting" into every prompt.
    • turns is the sleeper. At 1 every run starts fresh. At 2 or more, each run continues this node's last conversation with the same model, and images, video and audio from the first turn stay in context - a refinement loop without re-uploading references, since uploads only happen on a fresh conversation.
    • reasoning_mode / reasoning_effort: deep thinking. auto sends nothing and takes the model's default. reasoning_effort stretches from minimal to max; max thinks longest and costs the most, and models that can't tell two levels apart treat them as the same. Leave it alone for prompt writing.
    • detail (image detail level), fps (video frames sampled per second) and stream (print the answer to the console as it generates) only earn their keep while you're tuning. For a prompt writer, skip all three.

    Install and key

    cd ComfyUI/custom_nodes
    git clone https://github.com/byteplus-sa/ComfyUI-BytePlus-ModelArk
    pip install -r ComfyUI-BytePlus-ModelArk/requirements.txt
    

    Restart (ComfyUI 0.31.0 or newer), or install from Manager by searching BytePlus ModelArk. Then paste your ModelArk API key into Settings → BytePlus, pick its region - keys are regional, and ap-southeast-1 is the default - and press Save. ModelArk keys are actually validated at save time, so a wrong one is refused rather than silently stored. Or write BYTEPLUS_API_KEY and BYTEPLUS_REGION into user/.env.

    To prove the whole thing works, add this node, type Reply with OK, pick Seed 2.0 Mini, connect the output to Preview as Text, and run. It costs a few tokens.

    Where people get burned

    The 401. If the key and the region don't match you get Invalid API Key and no amount of retyping the key fixes it - set the region the key was created in.

    The other one is a caching surprise: run the same prompt again, change nothing, and the node doesn't call the API at all - ComfyUI reuses the cached result. A feature (you weren't billed) and a confusion (you thought the model got worse). Nudge the seed.

    And the standing caveat for every API node: whatever the hosted model refuses, this node refuses, with no weights to patch. Which is exactly why the community's uncensored prompt-writing setups run small local models instead - worse writing, no filter, no per-call cost.

    CategoryBytePlus ModelArk

    Inputs (11)

    NameTypeDefaultDescription
    promptSTRINGText input to the model.
    modelCOMBOThe model used to generate the response.
    seedINT00–2147483647Seed controls whether the node should re-run; results are non-deterministic regardless of seed.
    system_promptoptSTRINGFoundational instructions that dictate the model's behavior.
    detailoptCOMBOhighImage detail level sent with each image.
    fpsoptFLOAT1.00.2–5Frames per second sampled from each video.
    reasoning_modeoptCOMBOautoDeep thinking (thinking.type). auto sends nothing: the model default (enabled) applies.
    reasoning_effortoptCOMBOmediumChain-of-thought length (reasoning.effort). max thinks the longest (and costs the most); models that do not tell two levels apart treat them alike. Not sent when reasoning_mode is disabled.
    turnsoptINT11–101: every run starts a new conversation (the response is not stored). 2 or more: each run continues this node's last conversation (with the same model) with the new prompt; images, videos and audio from the first turn stay in the conversation.
    streamoptBOOLEANfalseStream the answer to the console while it is generated.
    file_expire_secondsoptINT60480086400–2592000How long uploaded images, videos and audio are kept in Ark Files (1 to 30 days).

    Outputs (2)

    NameTypeDescription
    STRINGSTRING—
    raw_jsonSTRING—