ComfyUI > Nodes > LM Studio Image to Text Node for ComfyUI > LM Studio (Structured Output)

ComfyUI Node: LM Studio (Structured Output)

Class Name

Expo Lmstudio Structured Output

Category
ComfyExpo/LMStudio
Author
Expo (Account age: 5215days)
Extension
LM Studio Image to Text Node for ComfyUI
Latest Updated
2026-03-11
Github Stars
0.05K

How to Install LM Studio Image to Text Node for ComfyUI

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

LM Studio (Structured Output) Description

Interfaces with LM Studio models to send prompts and receive structured JSON responses.

LM Studio (Structured Output):

The Expo Lmstudio Structured Output node is designed to interface with LM Studio models, allowing you to send a prompt, and optionally an image, to the model and receive a structured JSON response. This node is particularly beneficial for tasks that require a specific format of output, as it enforces the response to match a provided JSON Schema. The node extracts up to six individual key values from the JSON response, which can be used for further processing or analysis. This capability makes it an essential tool for AI artists who need to integrate structured data outputs into their creative workflows, ensuring consistency and reliability in the data received from the model.

LM Studio (Structured Output) Input Parameters:

prompt

The prompt parameter is the main input text that you send to the LM Studio model. It serves as the basis for the model's response and should be crafted to clearly convey the information or task you want the model to address. There are no strict minimum or maximum values for this parameter, but the clarity and specificity of the prompt can significantly impact the quality of the model's output.

image (optional)

The image parameter allows you to include an image alongside the prompt. This can be useful for tasks where visual context is necessary or beneficial. The image should be relevant to the prompt to ensure that the model can effectively incorporate it into its response.

json_schema

The json_schema parameter defines the structure that the model's response should adhere to. It is a JSON formatted string that specifies the expected keys and data types in the response. This parameter is crucial for ensuring that the output is in a usable format and meets the requirements of your specific application.

output_keys

The output_keys parameter is a newline-separated list of keys that you want to extract from the model's JSON response. You can specify up to six keys, and these will be emitted as individual outputs from the node. This parameter allows you to focus on the most relevant parts of the model's response for your task.

debug

The debug parameter is a boolean that, when set to true, enables detailed logging of the node's operations. This can be helpful for troubleshooting and understanding how the node processes inputs and generates outputs. The default value is typically false.

seed

The seed parameter is used to initialize the random number generator, which can affect the model's response. By setting a specific seed, you can ensure that the model's output is reproducible. If set to -1, a random seed is chosen automatically.

LM Studio (Structured Output) Output Parameters:

json_string

The json_string output is the full JSON response from the LM Studio model. It contains all the data generated by the model in response to the prompt and image, structured according to the provided JSON Schema. This output is essential for accessing the complete set of information returned by the model.

value_1 to value_6

The value_1 to value_6 outputs correspond to the individual key values extracted from the JSON response based on the output_keys parameter. Each of these outputs provides a specific piece of data from the model's response, allowing you to easily access and utilize the most relevant information for your task.

LM Studio (Structured Output) Usage Tips:

  • Ensure that your prompt is clear and specific to improve the quality of the model's response.
  • Use the json_schema parameter to enforce a structured output, which can be crucial for applications requiring consistent data formats.
  • Utilize the output_keys parameter to focus on the most relevant parts of the model's response, making it easier to integrate into your workflow.
  • Enable debug mode if you encounter issues, as it provides detailed logs that can help identify and resolve problems.

LM Studio (Structured Output) Common Errors and Solutions:

Error: LM Studio model response timed out after <timeout_seconds> seconds.

  • Explanation: This error occurs when the model takes too long to respond, exceeding the specified timeout period.
  • Solution: Consider increasing the timeout period if possible, or check the model's performance and server load to ensure it can handle the request in a timely manner.

Structured Output: invalid JSON Schema — <exception_message>

  • Explanation: This error indicates that the provided JSON Schema is not valid, preventing the node from processing the response correctly.
  • Solution: Review the JSON Schema for syntax errors or inconsistencies and correct them. Ensure that the schema is properly formatted and matches the expected structure of the model's response.

LM Studio (Structured Output) Related Nodes

Go back to the extension to check out more related nodes.
LM Studio Image to Text Node for ComfyUI
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.