Nodes/ComfyUI_Face_similarity/Report Text (to /history)
ComfyUI Node

Report Text (to /history)

Strings That Vanish? ReportText Puts Them in /history

By phobod·Created 3 months ago·Updated 2 days ago· 0
Report Text (to /history)
    • text
    • is_json
    text
    label
    require_jsonfalse

    Plenty of ComfyUI nodes hand you a STRING - a caption, a model's verdict, a score breakdown - and then, if they're not output nodes, that string dies inside the graph. It exists on the wire, nothing downstream reads it, and when you're driving ComfyUI over the API there's no file to go pick up. ReportText is the fix: a string goes in, the same string comes out, and because it's an output node its ui payload lands in /history/<prompt_id> where anything calling the API can read it back.

    Think of it as the escape hatch for the pack's own QA tools. VLMJudge is already an output node so it reports on its own, but any non-output node that produces text - a custom captioner, an image-metadata reader, a prompt checker - can be wired into ReportText to make its result reachable. It does nothing to the text. That's the whole point; the author describes it as an adapter and nothing more.

    The inputs that matter

    • text (STRING) - the one required input, marked forceInput, so it has to come from a wire rather than being typed in. That's deliberate: this node exists to pass through something another node produced.
    • label (optional) - a tag shown alongside the text in the UI. With several of these in a graph, labels keep them straight. Doesn't change what's reported.
    • require_json (optional, default false) - when on, the node parses the text as JSON and reports whether it succeeded. It doesn't fix bad output; it tells you how often the model ignored your "answer as JSON" instruction, which is the thing you actually need to count during a big batch run.

    Two outputs: text (the unchanged string) and is_json (a boolean - meaningful only when require_json is on; otherwise it's just true). If an upstream node hands you a one-item list, it quietly takes the first element so you don't see "['...']" in your results.

    One small piece of intelligence: when checking JSON it strips markdown code fences first, because models wrap their answers in ``` more often than not. A perfectly valid JSON blob inside a fence counts as valid.

    Install and gotchas

    It ships in phobod's ComfyUI_Face_similarity pack - search ComfyUI_Face_similarity in ComfyUI Manager, or git clone https://github.com/phobod/ComfyUI_Face_similarity.git into custom_nodes. Pure Python, no dependencies beyond the standard library, so this node can't be the thing breaking your install.

    Two things catch people. First, "nothing appears" usually means the workflow never reached the node - output nodes run at the end, and if an upstream branch errored or was bypassed, there's no report. Check the console and the /history payload for the node id. Second, if require_json is on and is_json comes back false, the full text still flows through the text output - the failure is reported, not swallowed, which is exactly what you want when a batch of 500 runs finished and you need to know how many answers you can trust.

    Categoryutils

    Inputs (3)

    NameTypeDefaultDescription
    textSTRING
    labeloptSTRING
    require_jsonoptBOOLEANfalse

    Outputs (2)

    NameTypeDescription
    textSTRING
    is_jsonBOOLEAN