Nodes/ComfyUI-Minitools/Task System Prompt Selector 👻
ComfyUI Node

Task System Prompt Selector 👻

Stop typing the same system prompt twice — Bernini's task roles, one dropdown away

By lepiai·Created 2 years ago·Updated 13 days ago· 10
Task System Prompt Selector 👻
    • system prompt
    • prompts
    user_prompt
    task_select[default]通用兜底,无特定生成编辑任务时使用

    Every LLM-based prompt node in this pack needs a system prompt that says "you are a specialized text-to-video assistant," and every one of those is a sentence you've typed before. Task System Prompt Selector 👻 is the pack's answer to that redundancy: a dropdown of 13 task roles, each matching ByteDance's Bernini prompt-engineering conventions, and it hands you the right system prompt plus a ready-to-send system,user combined string.

    If you've never heard of Bernini - it's ByteDance's video generation/editing model family, fine-tuned from Wan weights and released Apache 2.0. Its prompt_enhancer defines a clean taxonomy of generation jobs (text-to-image, text-to-video, image-to-video, video-to-video, reference-based, ad insertion...), and this node is a faithful port of that taxonomy. You don't need Bernini to use it, though - a system prompt is a system prompt, and these roles work with any LLM-in-the-graph workflow.

    The two inputs

    • task_select - the dropdown. 13 options like [t2i] 文本描述生成单张图像 (text-to-image), [t2v] 纯文本指令从零生成短视频 (text-to-video), [i2v], [v2v], [r2v], [ads2v] (ad insertion), and a [default] fallback that just says "you are a helpful assistant". Each label is [task code] + plain-language description, which is a nice touch - you pick by what you're doing, not by remembering codes.
    • user_prompt - your actual instruction, multiline. This gets appended to the chosen system prompt.

    The two outputs are the whole point:

    • system prompt (STRING) - just the role text, so you can wire it into anything that wants a standalone system prompt.
    • prompts (STRING) - the concatenated system,user pair (English comma between them), ready to drop into a chat-message node.

    Why you'd bother

    Two reasons, and they're both real. First, the system prompts are actually good - each one is scoped to its task ("You are a helpful assistant specialized in text-to-video generation" vs "...specialized in image editing"), and the LLM-in-the-graph crowd has learned that a tight, task-scoped system prompt drifts less than an open-ended "rewrite my prompt" instruction. Second, it kills the copy-paste: you swap a dropdown, not a text block, and the combined output means one wire into your LLM node instead of assembling the pair yourself.

    The catch: it's not magic. The system prompts are single-line role definitions, not elaborate few-shot scaffolding. If you want a real prompt-enhancer (something that rewrites, expands, adds shot structure), that's the pack's other nodes - MiniMax H3 Prompt Optimizer, which builds on this exact idea with far more machinery. This node is the light version: correct role, every time, zero effort.

    Install

    # ComfyUI Manager: search "ComfyUI-Minitools"
    # or manually:
    cd ComfyUI/custom_nodes
    git clone https://github.com/lepiai/ComfyUI-Minitools
    # restart ComfyUI
    

    No dependencies beyond the standard library - it's a dict lookup with string concatenation. It doesn't call any API and needs no key; it's purely a text presets node.

    Gotchas

    • The labels are bilingual-Chinese-first. Task descriptions are in Chinese with English task codes. If you can't read Chinese, the codes (t2i, v2v, rv2v...) are clear enough, and the English system prompt that comes out is what actually gets used.
    • The combined output is naive. It's literally f"{sys_prompt},{user_prompt}" - English comma. If your downstream LLM node expects JSON or a newline separator, you'll want to take the two outputs separately and format them yourself. The system prompt output exists precisely for that.
    • It's tied to Bernini's task taxonomy, which is video-generation-centric. Fine if you're in that world; a generic image-only workflow will mostly live on [default] and [t2i].

    Small, boring, dependable - which is exactly what you want from a presets node. It won't change your life, but it removes one repetitive step and makes your LLM nodes consistent. Sometimes that's the whole win.

    CategoryMiniTools

    Inputs (2)

    NameTypeDefaultDescription
    user_promptSTRING多行输入用户自定义编辑/生成指令,拼接规则:system_prompt,user_prompt
    task_selectCOMBO[default]通用兜底,无特定生成编辑任务时使用适配ByteDance Bernini框架,下拉选择对应任务场景,自动加载配套系统提示词

    Outputs (2)

    NameTypeDescription
    system promptSTRING
    promptsSTRING