ComfyUI Node

True

The ComfyUI node that outputs... true. It's more useful than it looks.

By marco-zanella·Created about a year ago·Updated about a year ago· 0
True
    • true

    This node takes no inputs and outputs the boolean true. That's the entire spec. It's the most useless-looking node in ComfyUI-BooleanExpression, Marco Zanella's logic pack - and it's genuinely useful anyway, in the same way a constant in code is useful. You'll roll your eyes, then reach for it.

    Why a constant node exists

    ComfyUI is a graph, not a program, so there's no "hardcode a value somewhere" that isn't a node. When you want a boolean input fed from a fixed value - or you want a value you can see and rename on the canvas rather than buried in another node's widget - you use a node like this. Concretely:

    • Prototyping a branch. Build a Conditional Branch, wire True into its condition, and you can force a path while you're still building the real condition upstream. Swap it for the pack's False to test the other side. That's the workflow equivalent of commenting out an if.
    • A named constant. Label it "enable hires pass" and it reads like documentation, especially in workflows you share.
    • The seed for a toggle. Feed it into an And alongside a real condition - it changes nothing, but it makes the "on" default explicit.
    • Any BOOLEAN input with no default. Some nodes want a boolean you'd rather wire than click; True hands you a clean wire.

    Under the hood the source is embarrassing in the best way: def apply(self): return (True,). No dependencies, no models, nothing to cache - which, given some packs in this ecosystem ship megabytes of deps to do less, is part of the charm.

    The honest take

    Do you need this node? No. ComfyUI lets you toggle boolean widgets inline on most nodes, and the pack's Conditional Branch has a default condition. The value here is cosmetic and structural: a visible, named constant beats an invisible widget when you're debugging a graph you haven't touched in a month. It also pairs naturally with the pack's False node, its mirror image - together they're the "constant library" of a graph, one per thing you want to hardcode.

    One note on the category: it sits under plain Boolean Expressions (not the string subfolder), so search "True" in the node menu and you'll find it near the logic nodes rather than the text-comparison ones.

    Install

    Same as every node in this pack - it ships together. ComfyUI Manager: search ComfyUI-BooleanExpression, install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/marco-zanella/ComfyUI-BooleanExpression.git
    

    Restart ComfyUI and it's under Boolean Expressions. The pack has an empty requirements.txt and downloads no models; it's registered on the Comfy Registry, so Manager finds it by title. If it's missing after install, restart - that's the fix for almost every "where did the node go" question with this pack.

    CategoryBoolean Expressions

    Inputs (0)

    No inputs

    Outputs (1)

    NameTypeDescription
    trueBOOLEAN