Nodes/KRuins-ComfyUI-Node-Suite/KRuins - Show Text
ComfyUI Node

KRuins - Show Text

The Node That Tells You Which Wildcard It Actually Picked

By Rampart187·Created 8 days ago·Updated a day ago· 0
KRuins - Show Text
      ◄text—►

      You generated four images from a wildcard prompt. Image 3 has great hair and a bad jacket. Which line of haircolor.txt produced it? Without help, you're reading four resolved prompts out of the console log and counting separators.

      KRuins - Show Text is a text display node. Wire a string into it, and it renders that string inside the node on the canvas - scrollable, resizable, and formatted so the per-image breakdown from a wildcard batch is readable at a glance. That's all it does. It's the least dramatic node in the pack and probably the one you'll leave in a workflow permanently.

      How it works

      Two halves. Backend: a single required input named text of type STRING, declared with forceInput, and a show_text() method that returns {"ui": {"text": [text]}, "result": ()}. No outputs, terminal node, OUTPUT_NODE = True.

      Frontend: js/kr_show_text.js patches onExecuted, pulls message.text[0], splits it into lines, and builds DOM. Any line matching IMAGE 1:, IMAGE 2: becomes a bold heading; everything else becomes a body item. Selectable text, scrollable, and the panel resizes with the node. If you've hand-rolled this with a STRING primitive and the console, you know why it's nice.

      That ui return is the standard mechanism for a custom node pushing arbitrary data to its own frontend - same plumbing described in the knowledge base's node-plumbing doc, just used for text instead of images.

      Inputs and outputs

      One input: text, a STRING. No outputs - nothing flows through it.

      Because it's forceInput, you cannot type into it. There's no text widget, just a socket. This trips up nearly every first-time user: the node drops onto the canvas looking empty and inert, and there's nothing to click. Connect a string source - KRuins - Wildcard Batch's resolved_prompts output is the intended one, but any STRING output works, including a core Primitive String node if you just want a scratch pad for notes.

      How to install it

      It's one of five nodes in the pack. ComfyUI Manager → search KRuins ComfyUI Node Suite, or:

      cd ComfyUI/custom_nodes
      git clone https://github.com/Rampart187/KRuins-ComfyUI-Node-Suite.git
      

      Restart ComfyUI; the nodes show up under KRuins. Dependencies are numpy and Pillow only, both of which ComfyUI already ships, so there's nothing heavy to install and no model to download.

      Why bother instead of a preview node

      Because the format of the string is the point. Wildcard Batch emits a report block per image - the wildcard label followed by the resolved final value - separated by a line of underscores. Show Text turns those into headings and rows. So what you read is Haircolor: auburn, Eyecolor: green, not the full four-line prompt with all the boilerplate around it.

      The practical workflow: batch of 4, look at the images, see which one you like, glance at its block in Show Text, and you know exactly which wildcard entries to force. It's the readout that turns random sampling into a reel you can edit.

      Where people get burned

      The box stays empty. Almost always nothing wired into text, or an upstream node that produced an empty string. The node runs fine with an empty input and shows nothing.

      It's showing the previous run's text. Text displays update when the workflow executes, not while you click around. If you changed a wildcard file and want to see new picks, queue again - the display reflects the last completed run.

      The heading parsing looks weird. Headings only appear for lines shaped exactly like IMAGE 3: (the regex tolerates the trailing colon being missing). Feed it arbitrary prose and you get an undifferentiated wall of text - perfectly readable, just not organized. If you're wiring your own formatter output, keep that heading shape.

      Long reports run off the node. The panel scrolls, but you may need to drag the node bigger to read more than a couple of images at once. Four images fit comfortably; sixteen in one batch is a scrolling session.

      No node appears after install. The pack's __init__.py loads a V3-API module at import time; on a ComfyUI build without that API, the whole pack fails to register and you get nothing at all. Check the console for an import error, then update ComfyUI.

      CategoryKRuins

      Inputs (1)

      NameTypeDefaultDescription
      textSTRING—

      Outputs (0)

      No outputs