Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-MoonNodes > ♊ Gemini Advanced Settings

ComfyUI Node: ♊ Gemini Advanced Settings

Class Name

GeminiAdvancedSettings

Category
MoonNodes
Author
m0rtus59 (Account age: 3541days)
Extension
ComfyUI-MoonNodes
Latest Updated
2026-11-04
Github Stars
0.01K

How to Install ComfyUI-MoonNodes

Install this extension via the ComfyUI Manager by searching for ComfyUI-MoonNodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-MoonNodes in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

♊ Gemini Advanced Settings Description

Packages Gemini settings for sampling, output length, reasoning, and optional capabilities.

♊ Gemini Advanced Settings:

GeminiAdvancedSettings prepares a group of generation settings for a Gemini node. It lets you keep choices about response variety, length, reasoning, and optional capabilities together, so you can reuse or adjust a configuration without changing each setting in the receiving node. This node packages the settings into a value; it does not call Gemini, generate text or images, or verify that a particular Gemini model supports every choice.

♊ Gemini Advanced Settings Input Parameters:

temperature

Controls the requested degree of variation when a receiving Gemini node generates a response. Lower values generally favor more consistent wording, while higher values allow more variation; the result still depends on the model and prompt. The default is 1.0, the minimum is 0.0, and the maximum is 2.0, in steps of 0.05. The source comment recommends 1.0 as a minimum for Gemini 3.0+ thinking models, but this node permits lower values and does not enforce that recommendation.

top_p

Sets a sampling threshold that a receiving node can use to limit which next-word choices Gemini considers. Lower values generally narrow the choices; higher values allow a broader set. The default is 0.95, the minimum is 0.0, and the maximum is 1.0, in steps of 0.05. This node stores the value without applying sampling itself.

top_k

Sets a requested limit on the number of next-word choices considered during generation. A smaller positive number can make responses more focused, while a larger one can leave more alternatives available. The default is 40, the minimum is 0, and the maximum is 100, in steps of 1. The source does not define what 0 means to a receiving node or model, so do not assume it disables this setting.

max_output_tokens

Sets a requested limit related to the length of a generated response. A lower limit can help keep responses short, but may leave a long answer incomplete. The default is 0, the minimum is 0, and the maximum is 65536, in steps of 128. This node only passes the number along: the source does not establish whether 0 means an automatic limit, an omitted limit, or something else in the receiving node.

thinking_level

Selects a requested level of reasoning for a receiving Gemini node. The available options are default, minimal, low, medium, and high; the default is default. Choosing a level may affect how a compatible model approaches a task, but this node does not perform reasoning or guarantee that every model accepts every option. Use default when you have no model-specific reason to change it.

structured_outputs_json

Indicates whether you want a receiving node to request structured JSON output. The options are False and True, with False as the default. Enable it when another step needs machine-readable data rather than free-form prose. This node stores the choice under the key structured_outputs; it does not create or validate JSON itself.

google_search_grounding

Indicates whether you want a receiving node to request Google Search grounding. The options are False and True, with False as the default. It can be useful for tasks that need information beyond a prompt, provided the receiving node and selected model support it. Enabling this switch here does not run a search or guarantee sourced results.

code_execution

Indicates whether you want a receiving node to request code execution. The options are False and True, with False as the default. It may be relevant to tasks involving calculations or code, if the receiving node and selected model support the capability. This settings node does not execute code.

♊ Gemini Advanced Settings Output Parameters:

advanced_settings

A single GEMINI_SETTINGS value containing the eight selected settings. Its keys are temperature, top_p, top_k, max_output_tokens, thinking_level, structured_outputs, google_search_grounding, and code_execution. Notice that the output key structured_outputs corresponds to the input named structured_outputs_json. Connect this output to a node that accepts GEMINI_SETTINGS; it is configuration data, not a generated response or confirmation that Gemini accepted the settings.

♊ Gemini Advanced Settings Usage Tips:

  • Start with the defaults, then change one setting at a time. This makes it easier to tell which change affected a receiving node’s results.
  • For responses where consistency matters, try a lower temperature and compare results. Keep the source comment’s 1.0 recommendation in mind when working with Gemini 3.0+ thinking models.
  • For shorter responses, set a positive max_output_tokens value and check that the receiving node interprets it as you expect. Avoid relying on an assumed meaning for 0.
  • Enable structured_outputs_json when a later step needs JSON, and check the generated response before passing it to a parser. This node does not validate the response format.
  • Turn on google_search_grounding or code_execution only for tasks that need those capabilities, and confirm that your receiving node and selected model support them.
  • Leave thinking_level at default unless you know which levels the selected model accepts. If you change top_p or top_k, test each separately because their combined effect is harder to assess.

♊ Gemini Advanced Settings Common Errors and Solutions:

No error message is defined by this node

  • Explanation: The supplied class only returns a settings value; it contains no explicit error messages or model-support checks. An error you see while using these settings may come from the receiving node or its API request.
  • Solution: Read the full error in the receiving node, then check its model selection and supported settings. Use the cases below as troubleshooting guidance, not as messages guaranteed to come from GeminiAdvancedSettings.

Invalid value for temperature, top_p, top_k, or max_output_tokens

  • Explanation: A workflow or receiving node may reject a number outside the input’s allowed range, or a model may reject a value it does not support. The ranges in this node are temperature 0.0–2.0, top_p 0.0–1.0, top_k 0–100, and max_output_tokens 0–65536. - Solution: Check each value against those ranges. If the values are within range but the request still fails, try the defaults and check the receiving node’s model-specific requirements.

Unsupported thinking_level

  • Explanation: A receiving node or selected model may not accept the chosen reasoning level, even though this settings node offers it.
  • Solution: Change thinking_level to default and try again. Check the receiving node’s guidance before selecting another level.

JSON output was expected but the response is not valid JSON

  • Explanation: Turning on structured_outputs_json passes a setting to the receiving node; this node does not generate or validate the model’s response. The receiving node may need additional configuration to produce the format your next step expects.
  • Solution: Confirm that the receiving node supports structured output, inspect its response, and configure any schema or formatting requirements there.

Google Search grounding or code execution is unavailable

  • Explanation: Enabling either option passes a requested capability onward, but availability depends on the receiving node and selected model.
  • Solution: Turn off the unsupported option, or choose a receiving-node and model configuration that supports it. Check the downstream error for the capability it names.

Output ended early or was shorter than expected

  • Explanation: A positive max_output_tokens value may be too low for the requested response. Other limits or generation behavior in the receiving node may also affect length.
  • Solution: Increase the value within the allowed range and retry. If it is set to 0, check how the receiving node interprets 0 before changing it.

Incompatible connection type

  • Explanation: advanced_settings is a GEMINI_SETTINGS value, not prompt text, an image, or a generated answer. A socket expecting another type may not accept it.
  • Solution: Connect advanced_settings to an input that accepts GEMINI_SETTINGS.

♊ Gemini Advanced Settings Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-MoonNodes
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

♊ Gemini Advanced Settings