Power Puter (rgthree)
Power Puter (rgthree)
- *
Power Puter is the one genuinely advanced node in the rgthree pack, and it's a bit of a Swiss Army knife: it evaluates Python-like expressions right inside your graph and outputs the result as an INT, FLOAT, STRING, or BOOLEAN. Simple string concatenation, a quick bit of math, grabbing an image's width, or something properly clever like pulling the list of enabled LoRAs out of another node - this is the node that does it, and it replaces a whole drawer of single-purpose utility nodes you'd otherwise install from three different packs.
Why you'd reach for it
Most workflows eventually need a computed value: a resolution that's the input's width times two, a filename that stitches together a couple of strings, a step count derived from something upstream. ComfyUI's answer is usually to install a math node, a string node, and a "get dimension" node from wherever. Power Puter absorbs all of that. rgthree built it specifically to stop depending on a scatter of tiny nodes from other packs - and the community reaction when it dropped was, roughly, "you just rendered half my nodes obsolete."
A few of the things it can do, escalating in ambition:
- Basic math on connected inputs:
a + b,ceil(1 / 2). - String work: formatting, joining, concatenation.
- Reach into a connected image and read its shape:
a.shape[2]for the width. - Reach across the graph by node id or title and read another node's widgets - for example, pulling a comma-joined list of the enabled LoRAs out of a Power Lora Loader.
That last trick is the headline. There's a worked example in the Power Puter wiki, and it's the feature that got the node its own announcement post.
"Is this an arbitrary-code hole?" - no, and here's why
Running Python-ish expressions in a graph raises the obvious eyebrow. rgthree answered it directly: the input isn't eval'd. It's parsed to an abstract syntax tree and stepped through against an allowlist of built-ins, so open, file writes, network calls, and arbitrary imports simply aren't available. It's an expression evaluator with the dangerous surface removed, not a shell.
The caching trap - the one thing to internalize
Here's the gotcha that matters. When Power Puter uses the node() lookup or the random built-ins, the node becomes uncacheable - ComfyUI can't know its result is stable, so it (and everything downstream of it) reruns every single queue. On a heavy workflow that's a nasty surprise. If you need randomness, feed it a rgthree Seed node instead of Power Puter's own random functions, so the value has a stable, cacheable source. Reach for node() deliberately, knowing it forces recomputation.
Inputs and outputs
The inputs are dynamic - you connect whatever your expression references (an image, another node's output, some numbers), and the node adds slots for them, so there's no fixed named-input list. You write the expression in the node's text field.
The output is a single * (any) slot: it takes on whichever type your expression produces - INT, FLOAT, STRING, or BOOLEAN - and wires into whatever consumes that type.
Installing it
Power Puter ships in rgthree-comfy. Install through ComfyUI Manager (search rgthree's ComfyUI Nodes) or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/rgthree/rgthree-comfy.git
Restart ComfyUI. No models, no heavy dependencies - the pack is all graph and UI code.
Common issues
The big one is the caching behavior above: if your workflow suddenly reruns everything on every queue, check whether a Power Puter is using node() or a random built-in. That's the cause, and a Seed node is the fix for the random case.
Second, expression errors: this is code, so a typo in a.shape[2] or a bad reference throws. Tap a Display Any on the output to see exactly what it produced while you're debugging.
Third, the pack-wide caveat: if the node renders wrong, check whether ComfyUI's Nodes 2.0 frontend is enabled - the Vue rewrite broke several rgthree nodes and the standing workaround is to keep it off.
Inputs (0)
No inputs
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |