Nodes/JPS Custom Nodes for ComfyUI/Generation TXT IMG Settings (JPS)
ComfyUI Node

Generation TXT IMG Settings (JPS)

The two-knob version of the txt2img/img2img switch

By JPS-GER·Created 3 years ago·Updated 2 years ago· 100
Generation TXT IMG Settings (JPS)
    • gen_mode
    • img_strength
    mode
    img_percentage50

    Of all the "Settings" nodes in this pack, this is the smallest one, and it's exactly what its name says: a switch between plain text-to-image and image-to-image, plus the one number that actually matters for the img2img side. If Generation Settings (JPS) is the warehouse node holding every mode's parameters at once, this is the opposite instinct - the minimum viable version, for a workflow that only ever needs to flip between two modes and doesn't want ControlNet sections or inpainting or unsampling riding along for no reason. It's also one of the few nodes in this batch that's actually documented in the pack's own README, word for word: "menu node to switch between TXT2IMG and IMG2IMG."

    The inputs that matter

    • mode - "Txt2Img" or "Img2Img." Comes out the other side as gen_mode, an integer, meant to drive one of this pack's switch nodes (Model Switch, Latent Switch, whichever branch logic your graph uses to route between a fresh-noise txt2img path and an image-conditioned img2img path).
    • img_percentage (0–100, default 50, step 5) - how much of the original image survives when you're in img2img mode. This comes out as img_strength, a float, and the framing as a percentage rather than a raw 0–1 float is a nice touch for anyone newer to the concept: denoising strength controls how much a sampler is allowed to deviate from your source image, and thinking of it as "what percentage of this image am I keeping" is a more intuitive mental model than "0.5 denoise" for a lot of people. 50% is a sensible middle-ground default - low enough to meaningfully redraw, high enough not to just reproduce the source.

    Two outputs total, no bundling into a BASIC_PIPE here - this node is small enough that it just exposes gen_mode and img_strength directly, no separate Pipe node needed to unpack anything.

    Installing it

    ComfyUI Manager, search "JPS Custom Nodes for ComfyUI," or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/JPS-GER/ComfyUI_JPS-Nodes.git
    

    Restart, find it under JPS Nodes/Settings. No models, no extra dependencies - pure logic, and one of the few nodes in this pack simple enough to not need a matching Pipe counterpart.

    Where people get tripped up

    The main decision this node forces on you is whether you even need it, versus reaching for something bigger. If your workflow only ever needs "am I doing txt2img or img2img, and how strong" - nothing about inpainting, ControlNet preprocessing, or unsampling - this is genuinely the right-sized tool, and pulling in Generation Settings (JPS) or ImageToImage Settings (JPS) instead would just mean carrying a bunch of unused fields. Go the other direction once your workflow actually needs those extra modes.

    The other thing worth knowing: gen_mode is an integer, not a boolean, and it's not documented anywhere what number maps to which mode - treat it as an opaque selector meant specifically to drive this pack's own switch nodes (which are also 1-indexed integers) rather than something you inspect and branch on with your own logic. And img_strength only does anything once it's actually wired into a sampler's denoise input on the img2img branch of your graph - this node computes the number, it doesn't apply it.

    CategoryJPS Nodes/Settings

    Inputs (2)

    NameTypeDefaultDescription
    modeCOMBO2 options: Txt2Img, Img2Img
    img_percentageINT500–100

    Outputs (2)

    NameTypeDescription
    gen_modeINT
    img_strengthFLOAT