Nodes/comfyui-character-prompt-builder/Character Prompt Builder - Render Prompt
ComfyUI Node

Character Prompt Builder - Render Prompt

The one node where you can actually fix the prompt before it hits CLIP

By euan-gwd·Created 8 months ago·Updated 29 days ago· 4
Character Prompt Builder - Render Prompt
      text

      Every other node in this pack generates a prompt behind your back. Character Prompt Builder - Render Prompt is where you get to see it, edit it, and send the fixed version onward - which makes it the most useful node in the pack if you actually care about your output. It's essentially ComfyUI's "Show Text" with a serious upgrade: the text box on the node is editable, and your edits survive re-runs.

      Here's the honest pitch. The pack's Scene node produces good prose, but "good" is not "what I wanted" - you'll want to tweak a phrase or kill a comma-separated run-on. With a plain Show Text node you'd have to copy the output, paste it into a text-edit node, and rewire. This node lets you edit in place.

      How it works

      It's a tiny output node - is_output_node: true, no outputs at all. Wire the Scene node's prompt into text (it's forceInput, so the field is always fed by a wire, not typed in) and run. The node displays the prompt on its widget, and then the clever bit: it remembers what you last typed and what it last received, and it decides what to show based on the diff.

      • Input changed → it shows the new input (your edits are stale now, correctly).
      • Input unchanged but you edited the widget → it keeps your edit and preserves it across re-runs.
      • Input unchanged and widget unchanged → it resets to the input.

      In practice: tweak the text, run again, your fix sticks; change something upstream, and the node quietly syncs back to the fresh prompt. This "preserve edits, sync on change" behavior is done with a module-level cache keyed by node id, reading the workflow's widget state - which is why it works even though the node has no state of its own.

      What you don't get here: this node does not encode anything. Its whole job is display-and-edit, so the pipeline still needs a CLIP Text Encode after you've copied your final prompt out, or you can grab the displayed text and wire it forward yourself. The node returns no outputs, so you read it, not chain it.

      Installing

      ComfyUI Manager → search Character Prompt Builder → Install → restart. Or:

      cd ComfyUI/custom_nodes
      git clone https://github.com/euan-gwd/comfyui-character-prompt-builder
      

      No pip dependencies (the pack is pure Python standard library), no model files. Restart ComfyUI after install or the node won't appear.

      Troubleshooting

      • Edits keep resetting - the cache is keyed by node id; if you duplicate the node, edits on the copy may not behave. Also, if the input genuinely changes (e.g. you tweak a Person dropdown), the node intentionally drops your old edit. That's the sync behavior, not a bug.
      • Nothing shows on the node - confirm the Scene node is wired into text; the input is forceInput, so an unwired text field stays empty. Run once after wiring.
      • Prompt not updating - if the Scene node's settings didn't change, the prompt legitimately didn't either. Change something upstream, then re-run.
      CategoryCharacterPromptBuilder

      Inputs (1)

      NameTypeDefaultDescription
      textSTRING

      Outputs (0)

      No outputs