Configure Gemini Interactions Safety
Ten knobs that tell Gemini how censored you want it
- safety_config
This is a settings node, and it's honest about it: eleven dropdowns, one output, no API call, nothing queued. It exists because the Gemini Interactions text node lets you set a single global safety threshold, and sometimes you want to loosen one category without loosening all ten.
You don't need it for a first run. The text node has its own safety_level and safety_method, and the config node behind it carries defaults. Reach for this one when you want to be specific - that's the whole point.
Where it sits in the graph
Wire its safety_config output (GEMINI_SAFETY_CONFIG) into the safety_config input on Expanded Gemini Interactions (Text/Image). That's it.
The precedence is worth knowing because the code is unambiguous about it: if safety_config is connected, it's used verbatim and the text node's own safety_level/safety_method widgets are ignored entirely. If it isn't connected, the text node's settings are used; if those are set to default, they fall back to the safety_level/safety_method on the config node. If that resolves to default too, nothing is sent to Google at all and you get the provider's own defaults.
So a wired-in safety node silently outranks the widget sitting right next to it. If your threshold changes stopped having any effect, check whether this node is plugged in.
The inputs
Ten harm categories, each its own dropdown, plus method:
- Text categories:
harassment,hate_speech,sexually_explicit,dangerous_content,civic_integrity. - Image categories:
image_harassment,image_hate,image_sexually_explicit,image_dangerous_content. - Prompt categories:
jailbreak. method: how the blocking decision is scored,default,probabilityorseverity.
Each category offers the same six thresholds: block_none, off, block_only_high, block_medium_and_above, block_low_and_above, and default. Read them as "block only what's very likely harmful" upward to "block anything with a hint of it", with default meaning don't send this category and block_none meaning allow it. off is documented as disabling the filter completely - in practice those two produce the same result for most people, and chasing the difference is not how you get a stubborn refusal to unstick.
Every category defaults to block_none, which is the author's choice rather than Google's: out of the box this node asks for the loosest setting on all ten harms.
The execute method assembles one dictionary per category - type plus threshold, with a method key only when you've moved off default - into a list, and the text node sends that list as safety_settings on the request.
The reality check
This is a request, not a switch you own. Thresholds change how aggressively Google's classifier blocks an input or output; they don't change the model's own behaviour, its system-level policy, or the fact that it's a closed model with no weights for you to edit. The KB's framing applies exactly here: you cannot abliterate a closed model the way you strip refusals from a local LLM, so whatever Google refuses, this node refuses too - just with cleaner error messages (external-api-nodes.md, llm-in-comfyui.md).
Google's Gemini image line is the most aggressively filtered thing in the KB's comparison table, and a January 2026 policy update tightened it further on celebrity and famous-IP prompts (closed-source-models.md, kg/entities/google.json). Nothing on this node reverses that; it only stops you from being blocked at the margin by an over-eager category. If your content is genuinely out of policy, you'll see it as an error string in the text node's text output, and the pack's README already tells you what that looks like in the older code path - the NoneType object has no attribute 'parts' message, which is a policy refusal wearing a Python traceback.
So: use it to stop a false positive on a medical or product image. Don't use it thinking it's a jailbreak.
Install
Same pack, same drill - Manager search for ComfyUI Gemini Expanded API, or:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI_Gemini_Expanded_API.git
cd ComfyUI_Gemini_Expanded_API
pip install -r requirements.txt
Restart ComfyUI, and remember this node needs credentials downstream: it configures a filter, it doesn't authenticate anything. The API key node still has to be wired into the text node.
Where people get burned
- It overrides the text node's
safety_level. Covered above, but it's the number one confusion with this node - the keyboard-facing widget looks authoritative and isn't. - You still need
include_imagesand an image model to generate images. Relaxingimage_sexually_explicitdoesn't turn a text model into an image generator; you'd get the text node's 64×64 placeholder grey image back. methodis a stranger in the list.severityandprobabilitychange how the classifier scores, not what's allowed. If you don't have a reason, leave it ondefault.- The output is a list, not a dict, so don't try to hand-edit it or feed it into a text output expecting readable JSON.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| harassment | COMBO | off | Negative or harmful comments targeting identity. |
| hate_speech | COMBO | off | Content that promotes violence or incites hatred. |
| sexually_explicit | COMBO | off | Contains references to sexual acts or other lewd content. |
| dangerous_content | COMBO | off | Promotes, facilitates, or encourages harmful acts. |
| civic_integrity | COMBO | off | Content that may mislead or influence elections. |
| image_harassment | COMBO | off | Images depicting harassment. |
| image_hate | COMBO | off | Images depicting hate speech. |
| image_sexually_explicit | COMBO | off | Images containing sexually explicit content. |
| image_dangerous_content | COMBO | off | Images depicting dangerous content. |
| jailbreak | COMBO | default | Prompts designed to bypass safety filters. 'default' keeps filter disabled. |
| method | COMBO | severity | Method for blocking content: severity vs probability score. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| safety_config | GEMINI_SAFETY_CONFIG | — |