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 > dspy_nodes > Model

ComfyUI Node: Model

Class Name

Model

Category
DSPy
Author
tom-doerr (Account age: 3545days)
Extension
dspy_nodes
Latest Updated
2026-07-10
Github Stars
0.2K

How to Install dspy_nodes

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

Model Description

Facilitates integration and configuration of OpenAI models for tailored AI text generation.

Model:

The Model node is designed to facilitate the integration and configuration of language models within your AI projects. It serves as a bridge to connect with OpenAI models, allowing you to specify key parameters that tailor the model's behavior to your specific needs. This node is particularly beneficial for those looking to leverage the power of AI-driven text generation, as it provides a straightforward interface to set up and manage model parameters. By using this node, you can easily configure the model's settings, such as the maximum number of tokens it can generate and the API endpoint it should connect to, ensuring a seamless and efficient workflow for AI artists and developers alike.

Model Input Parameters:

model

The model parameter specifies the identifier of the language model you wish to use. It is a string value that defaults to "microsoft/Phi-3-medium-128k-instruct". This parameter is crucial as it determines the specific model architecture and capabilities that will be employed in your project. By selecting the appropriate model, you can influence the quality and style of the generated text, making it essential to choose a model that aligns with your project's goals.

max_tokens

The max_tokens parameter defines the maximum number of tokens that the model is allowed to generate in a single response. It is an integer value with a default of 100, and it must be at least 1. This parameter directly impacts the length and detail of the output generated by the model. Setting a higher value allows for more comprehensive responses, while a lower value can be used to generate concise outputs, depending on the requirements of your task.

api_base

The api_base parameter specifies the base URL of the API endpoint that the model will connect to. It is a string value with a default of "http://localhost:8000/v1/". This parameter is essential for directing the model to the correct server for processing requests. Ensuring that this URL is correctly configured is vital for the successful execution of API calls and the retrieval of model outputs.

Model Output Parameters:

MODEL

The MODEL output parameter represents the configured language model instance that is ready for use in generating text. This output is crucial as it encapsulates all the settings and configurations specified through the input parameters, providing a ready-to-use model that can be integrated into various AI-driven applications. The MODEL output ensures that the model is properly set up and can be seamlessly utilized for text generation tasks.

Model Usage Tips:

  • Ensure that the model parameter is set to a model that suits your specific text generation needs, as different models have varying capabilities and styles.
  • Adjust the max_tokens parameter based on the desired length of the output. For detailed responses, consider increasing the token limit, while for brief outputs, a lower limit may suffice.

Model Common Errors and Solutions:

Invalid API Base URL

  • Explanation: This error occurs when the api_base parameter is set to an incorrect or unreachable URL.
  • Solution: Verify that the api_base URL is correct and that the server is running and accessible. Ensure there are no typos in the URL and that the server is configured to accept requests.

Model Not Found

  • Explanation: This error arises when the specified model parameter does not correspond to a valid or available model.
  • Solution: Double-check the model identifier for accuracy and ensure that the model is available on the server or platform you are using. If necessary, consult the documentation or support resources for the correct model identifiers.

Model Related Nodes

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

Model