Gemini System Instruction
Set the rules once, apply to everything
- client
- client
If you find yourself re-typing the same instruction into every Gemini node - "always answer in concise bullet points," "never mention the prompt," "you are a professional photo critic" - this node kills the repetition. It attaches a persistent system instruction to the client, and every node downstream of it inherits that behavior. One place to edit your persona, rules, and output style; zero drift across the graph.
Like Gemini Safety Settings, it's a pass-through: GEMINI_API_CLIENT in, the same client out, with the instruction baked in. The execution layer merges the system instruction into each request that uses that client - which is the whole mechanism. No API call happens here; it's pure client configuration.
Inputs
- client - required. From Gemini API Config, or chained from another config node.
- system_instruction - required. The actual instruction, multiline. This is where you put your persona ("You are a moody film critic"), your format rules ("Respond in bullet points, no preamble"), or your domain constraints.
Output
One output, client - wire it into Gemini Text Generation, Gemini Vision, Gemini Detect, or another pass-through. You can chain this with Gemini Safety Settings in any order; both mutate the same client object.
Install
Part of the ERPK Collection:
cd ComfyUI/custom_nodes
git clone https://github.com/eRepublik-Labs/comfyui-nodes-erpk.git erpk
cd erpk && pip install -r requirements.txt
Restart (or ComfyUI Manager → search erpk), Google AI Studio key in Settings > ERPK > API Keys. No cost of its own - the instruction rides along on paid calls.
Two honest warnings. First, the client input is required here, unlike most Gemini nodes: if you leave it unconnected the node has nothing to configure and no standalone fallback. Second, "system" means global: anything wired through this client obeys it, so a very specific instruction on a shared client will surprise you when a node you didn't think about starts following it. When in doubt, keep one client per workflow role - config → instruction → generators - and don't reuse it across unrelated branches.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| client | GEMINI_API_CLIENT | Gemini API client to configure | |
| system_instruction | STRING | System-level instruction to guide model behavior |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| client | GEMINI_API_CLIENT | — |