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 > Sage Utils > Ollama Advanced Options

ComfyUI Node: Ollama Advanced Options

Class Name

Sage_OllamaAdvancedOptions

Category
Sage Utils/LLM/Ollama
Author
arcum42 (Account age: 6442days)
Extension
Sage Utils
Latest Updated
2026-05-17
Github Stars
0.03K

How to Install Sage Utils

Install this extension via the ComfyUI Manager by searching for Sage Utils
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Sage Utils 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

Ollama Advanced Options Description

Advanced configuration node for fine-tuning Ollama LLMs with customizable output settings.

Ollama Advanced Options:

The Sage_OllamaAdvancedOptions node is designed to provide advanced configuration options for Ollama Language Learning Models (LLMs). This node is particularly useful for users who wish to fine-tune the behavior of their LLMs by adjusting various parameters that influence the model's output. By offering a range of customizable settings, this node allows you to control aspects such as the number of tokens to keep or predict, the randomness of the output, and penalties for repetition or frequency. These options enable you to tailor the model's responses to better suit specific tasks or creative projects, enhancing the flexibility and effectiveness of your AI-driven applications.

Ollama Advanced Options Input Parameters:

num_keep

The num_keep parameter specifies the number of tokens to retain from the input sequence. This can be useful for maintaining context in a conversation or text generation task. The value ranges from 0 to 100, with a default of 0, meaning no tokens are kept by default.

num_predict

The num_predict parameter determines the number of tokens the model should predict. A value of -1 allows the model to decide the number of tokens based on its internal logic, while you can specify a range from -1 to 2048 to control the length of the output. The default is -1.

top_k

The top_k parameter limits the sampling pool to the top k tokens, which can help in generating more coherent and focused outputs. It ranges from 1 to 1000, with a default value of 40, allowing you to balance between randomness and determinism.

top_p

The top_p parameter, also known as nucleus sampling, controls the cumulative probability threshold for token selection. It ranges from 0.0 to 1.0, with a default of 0.9, enabling you to adjust the diversity of the generated text by including only the most probable tokens until the threshold is met.

repeat_last_n

The repeat_last_n parameter sets the number of recent tokens to consider for repetition penalties. This helps in reducing redundancy in the output. The range is from 0 to 256, with a default of 64, allowing you to manage how much recent context affects repetition.

temperature

The temperature parameter influences the randomness of the model's predictions. A higher temperature results in more random outputs, while a lower temperature makes the output more deterministic. It ranges from 0.0 to 1.0, with a default of 0.8.

repeat_penalty

The repeat_penalty parameter applies a penalty to repeated tokens, discouraging the model from generating repetitive sequences. It ranges from 1.0 to 2.0, with a default of 1.1, providing control over the model's tendency to repeat itself.

presence_penalty

The presence_penalty parameter adjusts the likelihood of introducing new tokens that have not appeared in the text so far. It ranges from -2.0 to 2.0, with a default of 0.0, allowing you to encourage or discourage the introduction of new topics or ideas.

frequency_penalty

The frequency_penalty parameter penalizes tokens based on their frequency in the text, helping to reduce overuse of certain words or phrases. It ranges from -2.0 to 2.0, with a default of 0.0, enabling you to manage the balance between frequent and infrequent terms.

Ollama Advanced Options Output Parameters:

options

The options output parameter provides a dictionary of the configured settings for the Ollama LLM. This output is crucial as it encapsulates all the advanced options you have set, allowing for consistent application of these settings in subsequent nodes or processes. It ensures that the model operates with the desired configurations, enhancing the predictability and quality of the generated content.

Ollama Advanced Options Usage Tips:

  • Experiment with the temperature and top_p parameters to find the right balance between creativity and coherence in your model's outputs.
  • Use the repeat_penalty and frequency_penalty to manage repetition and ensure diverse language generation, especially in longer texts.
  • Adjust num_predict based on the context and length of the desired output to optimize performance and relevance.

Ollama Advanced Options Common Errors and Solutions:

InvalidParameterValue

  • Explanation: This error occurs when a parameter value is set outside its allowed range.
  • Solution: Double-check the parameter values to ensure they fall within the specified minimum and maximum limits.

MissingOutputOptions

  • Explanation: This error indicates that the options output was not generated, possibly due to misconfiguration.
  • Solution: Review all input parameters to ensure they are correctly set and that the node is properly connected in the workflow.

Ollama Advanced Options Related Nodes

Go back to the extension to check out more related nodes.
Sage Utils
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.

Ollama Advanced Options