ComfyUI Node

I2i Toggle

A checkbox that decides txt2img vs img2img

By duckcomfy·Created about a year ago·Updated 10 months ago· 0
I2i Toggle
    • enable_i2i
    enable_i2ifalse

    I2i Toggle is a boolean you can flip. That's the whole node: one checkbox, one output, zero processing. It exists because "should this generation be img2img or txt2img?" is a question people answer by rebuilding half their workflow, and a plain boolean in a wire lets you answer it with a single click.

    The pattern it's built for is the A/B switch. You have two latent sources - an empty latent for pure txt2img, and a VAE-encoded image for img2img. A CSwitchBooleanLatent (same pack) picks between them, and the boolean feeding it comes from here. Flip the checkbox, and the graph reroutes from "start from noise" to "start from this image." You can wire the same boolean to a denoise value (img2img usually wants denoise under 1.0, txt2img wants 1.0) and to any other input that needs to change when you flip modes.

    The input and output

    • enable_i2i - a BOOLEAN, default off. Off means txt2img, on means img2img, though honestly the node doesn't care which way you read it; it just hands the boolean through.
    • Output is the same enable_i2i boolean.

    So the semantics are entirely yours. The name is the author's shorthand from their own workflows - they built this pack for their own graphs and shared it "for replicability," per the README.

    Why a dedicated node instead of a core toggle

    You could get the same boolean by converting a widget to input and using a Primitive, and for a single switch that's arguably cleaner. Where this pulls its weight is as a named, typed source that several consumers share. One checkbox feeding a latent switch, a denoise value, and a sampler's denoise or batch_size conversion is three places that stay in lockstep because they read the same socket. When you're iterating on a look, flipping one switch is faster and less error-prone than changing three widgets.

    Install

    It's part of duckcomfy personal nodes. Via ComfyUI Manager, search "duckcomfy personal nodes" and install; or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/duckcomfy/duckcomfy_personal_nodes
    

    Restart ComfyUI. The pack needs no extra pip packages and downloads no models - it's plain Python, GPL-3.0, and most of it is copied from other suites (the author's explicit move to reduce dependencies and third-party update risk). So this is a low-friction install for what is ultimately a two-widget convenience.

    Gotchas

    The only real trap is expecting it to do the img2img routing. It doesn't. It emits a boolean; you still need a switch node downstream (or a converted sampler input) that acts on it. If you wire the boolean somewhere and "nothing happens," that's the missing piece - the boolean is the instruction, not the mechanism.

    Categoryduckcomfy

    Inputs (1)

    NameTypeDefaultDescription
    enable_i2iBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    enable_i2iBOOLEAN