Ⓜ️ Text Constant
A text node is a text node — but this one exists so a value can come from a wire
- text
Let's be honest up front: this is the simplest node in the pack, and arguably in ComfyUI. The Mithril Text Constant takes a string you type into its text widget and outputs the same string. That's the entire job. No parsing, no wildcards, no templating - just (text,) handed straight back.
So why would you reach for it when ComfyUI already has core text primitives and a hundred fancier prompt/string nodes? One reason, and it's a good one: every node that needs text should be able to get it over a wire, not just from a widget.
What it's for
In ComfyUI, a widget value gets baked into the workflow JSON. That's usually fine. But when you're driving a workflow from the API, or when a downstream node's behavior needs to change based on what another node computed, you want the value flowing as data, not sitting in a widget. Text Constant gives you a fixed string as a proper STRING output you can connect anywhere - into a text concat, into the select input of a multiplexer, into a filename prefix builder, wherever the graph expects a wire.
In that sense it's the connective tissue for the rest of this pack. The Mithril Multiplexer's select input is marked forceInput, which means you literally cannot type the selection into a widget - you have to feed it a string from somewhere. Text Constant is the obvious something. A reusable "selection key" that you can swap in one place and have it drive the whole graph is genuinely handy.
The one input that matters
text- multiline string widget, default empty. Type whatever constant you want to emit. The output, also calledtext, is aSTRINGyou can wire into anything that takes a string.
That's the whole schema, and honestly that's the right size for it. If you need templating or file IO, this isn't the node you're looking for - this is a rock you build on.
Install
Part of MithrilNodes: ComfyUI Manager → Install Custom Nodes → search Mithril ("Mithril-Nodes for ComfyUI"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/MithrilMan/ComfyUI-MithrilNodes
Restart after installing. There's no requirements.txt and nothing to download - the whole pack is dependency-free.
Worth knowing
The pack is young - version 0.1.0, essentially one commit - and its README is a placeholder that describes nodes that don't exist yet. Don't let that put you off: the shipped code is simple and readable. But if you're looking for a power string toolkit, this node (and this pack, so far) isn't that. It's a primitive, and it knows it.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |