Nodes/ComfyUI_omost/Omost LLM Chat
ComfyUI Node

Omost LLM Chat

Let an LLM be your layout artist

By huchenlei·Created 2 years ago·Updated about a year ago· 445
Omost LLM Chat
  • llm
  • conversation
  • OMOST_CONVERSATION
  • OMOST_CANVAS_CONDITIONING
text
max_new_tokens4096
top_p0.90
temperature0.60
seed0

Omost's whole trick, in one sentence: instead of you wrestling a single prompt that has to describe every subject, position and lighting decision at once, a small LLM writes you a structured layout - one global description plus a set of region boxes, each with its own prompt and color - and then a regional-conditioning node turns those boxes into diffusion conditions. Omost LLM Chat is where the layout actually gets written. It's the centerpiece of this pack, and it's the node behind every "wait, the AI composed the composition?" result you've seen.

The flow is simple. You type a natural-language request into text - "a girl in a hanbok sitting on a wooden chair by a window" - and the node pipes it through an Omost-tuned LLM (loaded by Omost LLM Loader or Omost LLM HTTP Server) using the Omost system prompt, which teaches the model a Canvas class API. The reply comes back as Python: set_global_description() for the whole image, then add_local_description() per region with a location, size, and color. The node regexes the code block out, parses it, and converts it to the pack's OMOST_CANVAS_CONDITIONING format - rect coordinates in a 90×90 canvas, prefixes, suffixes, color.

The inputs a beginner actually touches:

  • text - your description. Keep it to a sentence or two; the LLM does the elaborating.
  • temperature (default 0.6) and top_p (default 0.9) - the usual sampling knobs. Set temperature to 0 and it decodes greedily, which you usually want for repeatable layouts.
  • max_new_tokens (default 4096) - how long a layout it's allowed to write.
  • seed - the front end randomizes it, but pin it to reproduce a layout.
  • conversation (optional) - feed the previous OMOST_CONVERSATION output back in for multi-round editing ("now make the chair red").

Two outputs. OMOST_CONVERSATION is the running transcript; wire it back into conversation to keep the chat going. OMOST_CANVAS_CONDITIONING is the payload, and it feeds Omost Layout Cond (ComfyUI-Area) or the Dense Diffusion variant to become actual conditioning.

The honest warning, because every Omost guide leads with it: with the local loader, each chat takes about 3–5 minutes on a 4090. That's not a bug in this node - it's an 8B model generating a long structured answer in-process. The community fix is Omost LLM HTTP Server pointed at a TGI or llama.cpp endpoint, which cuts it to tens of seconds. If you're going to iterate, set that up first.

One real failure mode: the node expects the LLM's reply to contain a ```python code block defining canvas = Canvas(). If you've pointed it at a generic LLM that isn't Omost-tuned, the parse fails and you get a "Response does not contain codes!" error - stick to the official Omost checkpoints.

Categoryomost

Inputs (7)

NameTypeDefaultDescription
llmOMOST_LLM
textSTRING
max_new_tokensINT4096128–4096
top_pFLOAT0.900–1
temperatureFLOAT0.600–2
seedINT00–18446744073709550000
conversationoptOMOST_CONVERSATION

Outputs (2)

NameTypeDescription
OMOST_CONVERSATIONOMOST_CONVERSATION
OMOST_CANVAS_CONDITIONINGOMOST_CANVAS_CONDITIONING