Nodes/ComfyUI_CivitAI_ImagePlus/CivitAI Prompt Editor
ComfyUI Node

CivitAI Prompt Editor

Steal the prompt, change the prompt, generate — all without leaving the canvas

By CovertBannana·Created 8 months ago·Updated about a month ago· 4
CivitAI Prompt Editor
    • Positive
    • Negative

    You found an image in the CivitAI gallery that's 90% of the way to what you want. The CivitAI Prompt Editor is the node that bridges that last 10%: it loads the image's positive and negative prompts into an editable panel, lets you tweak them on the canvas, and hands the results to your graph as clean STRING outputs. Steal → change → generate, all inside ComfyUI.

    That's the whole point of the pack's layout. The CivitAI Gallery node feeds it, the Info Display shows you the recipe, and this editor is the one you actually do something with - its two outputs wire directly into the CLIP Text Encode nodes feeding your KSampler. In the pack's recommended txt2img flow you select an image, edit its prompts here, and generate. In the img2img flow you do the same and use the Image Preview node's output as your init image.

    How it works

    The trick that makes it feel instant: it doesn't wait for your workflow to run. When you select an image, the pack's JavaScript posts the extracted prompts to a backend route (/civitai_gallery/set_prompt) keyed to this node's ID, and ComfyUI is told the node's output changed via a revision counter in IS_CHANGED. The node itself is a thin reader over that store - on execution it just returns whatever string the frontend last pushed in. Which is exactly what you want: pick an image and the text flows downstream without you queuing anything first.

    The buttons are where the editor earns its keep:

    • Edit Positive / Edit Negative - open each prompt in an editable box.
    • Restore - revert to the prompts from the last gallery selection, after you've butchered them and changed your mind.
    • Clear - wipe both, for when you're building from scratch.

    For CivitAI-sourced images the prompts come out of the gallery's metadata parsing. The pack also parses sampler, scheduler, steps, model, and CFG for the info panel (v0.2.1 specifically stopped LoRA and embedding names from overwriting the checkpoint name in that metadata - a real quirk of CivitAI's resource lists that used to trip people up).

    The inputs and outputs that matter

    The node has no input sockets - it's output-only, driven by the gallery. What you care about:

    • Positive (STRING) - wire this into your positive CLIP Text Encode.
    • Negative (STRING) - same, into the negative encoder.

    That's it. Both come back as plain text your existing text-encoder nodes already understand.

    Installing it

    Standard custom-node install, via ComfyUI Manager (search CivitAI ImagePlus) or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/CovertBannana/ComfyUI_CivitAI_ImagePlus.git
    

    Restart after. Dependencies are only aiohttp, numpy, Pillow - no models, nothing heavy.

    Where people get burned

    • The prompts won't change when you edit them. This node's whole magic is the frontend-to-backend push. If edits appear but don't flow to the sampler, restart ComfyUI and hard-refresh the browser (Ctrl+F5). Stale JS is the usual suspect, and it's the README's own first troubleshooting step.
    • Standalone, it outputs empty strings. Nothing sets the store except the gallery's JS, so a bare Prompt Editor on a fresh canvas gives you nothing until you select an image in the gallery or drop a local image into the Local Image Info node. That's by design, not a bug.
    • Prompt text doesn't persist across tab switches was a real bug fixed in v0.3.0 - if you're seeing it, you're on an old version; update and restart.

    One last thing: the README says this pack is being superseded by the author's unified ComfyUI-ImagePlus pack. The nodes here still work and are tested against current stable ComfyUI, but it's worth a glance at the successor before you build something long-lived on this layout.

    CategoryAsset Gallery/Civitai

    Inputs (0)

    No inputs

    Outputs (2)

    NameTypeDescription
    PositiveSTRING
    NegativeSTRING