Nodes/ComfyUI-DAELab-Custom-Nodes-Library/Badge 8.7 Auxiliary Image (DAELab)
ComfyUI Node

Badge 8.7 Auxiliary Image (DAELab)

Saving a working image without publishing it

By TeutonicMepheles·Created 4 months ago·Updated 6 days ago· 0
Badge 8.7 Auxiliary Image (DAELab)
  • images

    What it is and why you'd reach for it

    This is the most niche node in the pack, and it's a small plumbing trick with a specific job: write an image to disk as a normal ComfyUI save, but return it under a private UI key so it doesn't show up as that workflow's gallery output.

    In the DAELab 8.7 badge app, the Color ID Map - the coloured region map the model generates so the frontend can pick source colours from it - needs to exist as a real file. Both halves of the app have to be reading the same bytes: the browser panel draws its colour picker from it, and the backend resolves region masks from it. Deriving the colours twice from two separate in-memory copies is how you get a picker that's one quantisation step off from the mask that gets generated. So the map gets saved, and the frontend loads that exact file.

    But you don't want a working artifact masquerading as a deliverable in the output gallery. Hence the separate node.

    How it works

    It has one input, images, and no outputs at all - it's an output node, so it always runs. Under the hood it instantiates ComfyUI's core SaveImage and calls its save_images with a hardcoded prefix:

    SaveImage().save_images(images, 'Badge87/auxiliary/color_map', prompt, extra_pnginfo)
    

    That means PNGs with the workflow and prompt chunks embedded, landing in ComfyUI/output/Badge87/auxiliary/, numbered by the usual counter. Because it goes through core SaveImage, everything you know about filename_prefix templating and metadata embedding applies unchanged - except you can't change the prefix, it isn't a widget.

    Then the difference: instead of returning {"ui": {"images": ...}}, which is what tells ComfyUI to render a gallery entry, it returns {"ui": {"badge87_auxiliary_images": ...}}. The frontend script in the pack's web/ directory reads that custom key. Nothing else in ComfyUI does, so the image is on disk and invisible to the output panel.

    The practical side effect: this is a file write, not a preview. If you put it in a loop that runs every queue, you're accumulating PNGs in output/Badge87/auxiliary/ - each one embedding the full workflow JSON. Cheap, but not free.

    Inputs and outputs that matter

    Just images. One thing, honestly. Wire whatever intermediate you want persisted - in the pack's own use it's the Color ID Map, but nothing stops you pointing it at a mask preview or a QA overlay.

    No outputs. Not a placeholder output socket - genuinely none. That means it can't be used mid-graph; it's a terminal side effect that other nodes can't build on.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/TeutonicMepheles/ComfyUI-DAELab-Custom-Nodes-Library
    

    Restart ComfyUI - the pack's web/ scripts that consume badge87_auxiliary_images only load on restart, and a stale frontend cache is the usual reason this node "doesn't do anything" (the file exists, no panel appears). Manager install by pack title is equivalent. No special dependencies beyond core ComfyUI; OpenCV is used by sibling modules in the same pack, so pip install opencv-python-headless if badge nodes generally are missing from the menu.

    Common issues

    • Files pile up. Expected - one PNG per run, with embedded workflow metadata, in output/Badge87/auxiliary/. Clear it periodically, or you'll have a directory of near-identical maps.
    • Nothing appears in the UI. Correct. This node produces no gallery entry by design; look in the file system, or in whatever pack panel is supposed to consume the key.
    • Outside the 8.7 workflow, it's a curiosity. Unless you're extending the pack's frontend, use a normal Save Image or Preview Image node; it behaves like a save node with a private UI channel and no configurability.
    • Don't expect a path out. There's no state_path-style string output, so you can't feed the saved filename into a loader node. If you need that round-trip, Badge Edit State Save is the node that does it.
    CategoryDAELab/Badge

    Inputs (1)

    NameTypeDefaultDescription
    imagesIMAGE—

    Outputs (0)

    No outputs