Nodes/ComfyUI-GU_Nodepack/GU Save Image Info
ComfyUI Node

GU Save Image Info

A sidecar .txt that remembers what the image can't tell you

By alexguryev·Created 4 months ago·Updated 23 days ago· 2
GU Save Image Info
      tech_label
      pos_label
      neg_label
      gen_label
      file_name

      GU Save Image Info writes a plain text file next to your output - the same information you'd otherwise have to dig out of PNG metadata, stored in a human-readable .txt with the exact same base name as the image. Feed it the four text blocks from GU Image Label and a filename from GU Project Path, and every generation gets a sidecar file that says what it is, how it was made, and what prompt produced it.

      ComfyUI's PNG metadata is a great safety net, but it's a net you have to reach into. This node is the "leave a note on the fridge" version: the info is right there in your output folder, sortable, searchable, and readable by anything that isn't ComfyUI.

      What it does

      Four text inputs - tech_label, pos_label, neg_label, gen_label - plus file_name. It appends .txt to whatever path you give it and writes a formatted file:

      • hardware / tech info
      • positive prompt
      • negative prompt
      • generation parameters

      The intended wiring, per the README: feed file_name from GU Project Path so the text file and image share a name and live side by side, and feed the four labels straight from GU Image Label's matching outputs. If you're not using the label node, you can type strings directly - the fields are plain STRINGs, and everything is optional in practice.

      It's an output node (writes to disk, returns nothing), so it always executes when the Queue runs - the .txt refreshes on every generation.

      The mechanism worth knowing: path confinement

      file_name comes from the graph, which makes it a security surface, and the pack treats it seriously. The README documents the full policy: the path is confined to ComfyUI's output directory. A .. component, an absolute path, or a drive prefix (C:) is rejected outright - a console warning, and no file is written, never silently rewritten. Remaining components get sanitized (illegal and control characters, trailing dots/spaces, reserved Windows device names), and the resolved path is double-checked against the output root with realpath + commonpath, re-verified after directory creation so a symlink swap between check and write can't help either. Subfolders inside output stay fully supported - that's how (work)/<project>/<date>/<name> paths keep working. If you hit a rejection, the console warning tells you exactly which path was refused.

      Install

      ComfyUI Manager → search "GU Nodepack" → install → restart, or:

      cd ComfyUI/custom_nodes
      git clone https://github.com/alexguryev/ComfyUI-GU_Nodepack
      cd ComfyUI-GU_Nodepack
      pip install -r requirements.txt
      

      No models. Deps: psutil, requests, gu-funclib>=1.9.0. Windows-tested, single-user design.

      Where people get tripped up

      The filename must be a path to a file, not just a name - if you feed it output without a filename component, you're writing to a weird path or getting a rejection, depending on how it resolves. And the file gets de-duplicated with a unique-name reservation (the make_unique_filename call with reserve=True), so repeated runs don't clobber each other silently - but that also means two runs can produce two sidecar files rather than one tidy pair. If you want exactly one .txt per image, keep the path stable and let the dedup append a number when Comfy itself does the same for the PNG.

      CategoryGU_Nodepack

      Inputs (5)

      NameTypeDefaultDescription
      tech_labelSTRINGTech info
      pos_labelSTRINGPositive prompt
      neg_labelSTRINGNegative prompt
      gen_labelSTRINGGeneration info
      file_nameSTRING

      Outputs (0)

      No outputs