Nodes/comfy-ovum/LMStudio Prompt Chain Ovum
ComfyUI Node

LMStudio Prompt Chain Ovum

LM Studio Prompt Chain Ovum — keep the conversation going across nodes

By sfinktah·Created about a year ago·Updated 10 months ago· 7
LMStudio Prompt Chain Ovum
  • context
  • context
  • text
input_promptNext prompt here
modeuse_context

LMStudioPromptChainOvum is the second act of the pack's LM Studio story. The first node, LMStudioPromptOvum, fires off a single prompt and gets a single reply. This one takes the conversation context that the first node produced and continues it - same chat, next question - so you can build a multi-step dialogue across the graph instead of a series of forgetful one-shots.

If you've ever tried to get a model to refine its own output ("rewrite that, more concise, keep the style") you know the pain: every fresh call forgets everything. Chain nodes exist to fix exactly that. The model remembers what it said, because the whole history travels with the LLM_CONTEXT bundle.

How it works

Three inputs, per the schema:

  • context (LLM_CONTEXT) - the incoming chat history from LMStudioPromptOvum or a previous chain node. This is what makes it a conversation rather than a list of prompts.
  • input_prompt - your next question or instruction, multiline. Defaults to "Next prompt here".
  • mode - which prompt mode to use for this step. The key option is use_context (the default): it reuses the mode from the incoming context, so the chain keeps whatever persona/template the conversation started with. The other choices (none, prompt, pixelwave, style, descriptor, character, true-or-false, custom) let you switch modes mid-conversation.

Two outputs:

  • context (LLM_CONTEXT) - the updated history, ready to feed the next chain node. Just start chaining: Prompt → Chain → Chain → done.
  • text (STRING) - this step's reply, wire it into your text encoder or a show-text node.

The nice property: chain nodes inherit the server, model, seed, and request serialization of the parent node, so you don't re-enter server details - you just keep asking questions.

The obvious pattern

A realistic chain: node 1 (LMStudioPromptOvum) asks "give me a cinematic prompt for a misty forest at dawn," mode pixelwave. Its context output feeds a chain node that says "add a color palette constraint" - the model already knows what it wrote, so the addition is coherent. Chain again: "now make it work as a negative prompt," and so on until the final text lands in your CLIP encoder. Multi-turn refinement, fully local, no API key.

Gotchas

  • You need the parent node's context output, not its text output. If you chain text into text, you're back to stateless one-shots. The context socket is the memory.
  • use_context only works if the incoming context carries a mode. If you feed it a context that has no mode, pick one explicitly.
  • Everything from the LM Studio setup applies - server running, model loaded, and for auto-unload the liquid/lfm2-1.2b tiny model installed (see the LMStudioPromptOvum article for the full setup and the "connection refused" troubleshooting).
  • All LM Studio requests from these nodes are serialized, so a busy graph won't fire concurrent calls at the server - good for stability, slightly slower for throughput.

Install

Ships in comfy-ovum:

cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum

or ComfyUI Manager → comfy-ovum, restart. Then make sure LM Studio is running with its server enabled on localhost:1234 and a model loaded.

CategoryOvum/LLM

Inputs (3)

NameTypeDefaultDescription
contextLLM_CONTEXTLLM context from LMStudioPromptOvum or previous chain node
input_promptSTRINGNext prompt hereAdditional prompt to ask within the same chat context.
modeCOMBOuse_contextPrompt mode for this step. Choose "use_context" to reuse the mode from the incoming context.

Outputs (2)

NameTypeDescription
contextLLM_CONTEXT
textSTRING