Nodes/comfyui-AGSoft/🖼️🧹AGSoft Image Strip Metadata
ComfyUI Node

🖼️🧹AGSoft Image Strip Metadata

Your PNG is quietly carrying your whole workflow — here's how to cut it out

By Art-xmaster·Created 12 months ago·Updated a day ago· 23
🖼️🧹AGSoft Image Strip Metadata
    • filepath
    • report
    file_path
    write_modeclean_copy
    subfolder
    filename_prefixclean

    Every PNG that comes out of ComfyUI's SaveImage has your entire workflow welded inside it as text chunks - the node graph, every widget value, the seed, the checkpoint name, every LoRA by name and hash. That's great for sharing: drag the file back onto the canvas and the whole pipeline rebuilds. It's also a default privacy setting you never chose, because that file also leaks your exact prompt, your negative prompt, and possibly a wildcard path with your username in it.

    🖼️🧹AGSoft Image Strip Metadata is the deliberate "no thanks" button. Point it at an image (or a whole folder), and it writes a clean copy with the metadata surgically removed - prompt, workflow, EXIF, XMP, all of it. It's part of the comfyui-AGSoft pack, which is worth knowing about on its own: a single-author collection of 100+ utility nodes, most of them pure-Python and dependency-light.

    How it works

    This is the part that makes it worth installing: no re-encoding. The node does byte-level surgery on the file container, which means your pixels are copied 1:1 - zero quality loss, no recompress, file stays the same format. For PNG it walks the chunk stream and drops tEXt/zTXt/iTXt (where the workflow and prompt live), plus eXIf, tIME, and dSIG. For JPEG it drops the EXIF/XMP/IPTC comment markers but deliberately keeps JFIF, ICC, and Adobe segments so your colors don't shift. WebP and GIF are handled the same way. No ffmpeg, no exiftool, no extra dependencies - it's pure Python that the pack already ships.

    One thing it will not do: modify the original. Ever. The clean copy lands in your ComfyUI output/ folder (or a subfolder you name), and the source file stays untouched. That's a deliberate safety choice, and it's the right one.

    The inputs that matter

    Only four, and two of them are optional:

    • file_path - absolute path to one image or a folder; a folder processes every supported image inside (PNG/JPG/WebP/GIF).
    • write_mode - clean_copy writes the clean file; scan_only just reports what each file contains and writes nothing. Run scan_only first if you're unsure what's in your files - it's a free dry run.
    • subfolder - optional, auto-created inside output/; nested paths like a/b work.
    • filename_prefix - default clean gives you clean_<name>.png; leave it empty and you get <name>_clean.png.

    Outputs are filepath (the written file, or the source when scanning) and report - a per-file STRING line like pic.png: was [prompt, workflow] -> [clean] · metadata stripped -> /path/clean_pic.png. Wire report into a Show Text and you get a nice little log.

    Installing it

    cd ComfyUI/custom_nodes
    git clone https://github.com/Art-xmaster/comfyui-AGSoft
    

    then restart - or search comfyui-AGSoft in ComfyUI Manager. The pack declares numpy, opencv-python, and translators, but this node needs none of them.

    Gotchas and honest caveats

    Stripping is destructive by design: once the workflow chunk is gone, dragging the image back into ComfyUI rebuilds nothing. Keep the original if you might want it back - that's exactly why the node never touches your source. Folders with zero supported files raise an error, and unsupported formats get a clear message rather than a silent pass. And know what it's for: this is the privacy/clean-release tool, the opposite of the custom save nodes people install to add CivitAI-friendly metadata. If you post images publicly and care about what your files broadcast, this is the node that puts the disclosure back under your control.

    CategoryAGSoft/Utils

    Inputs (4)

    NameTypeDefaultDescription
    file_pathSTRINGAbsolute path to an image file or a folder (all supported images inside). --- Абсолютный путь к файлу изображения или папке (все поддерживаемые картинки внутри).
    write_modeCOMBOclean_copyclean_copy = write a clean copy into OUTPUT (original untouched); scan_only = report only, no writes. --- clean_copy = чистая копия в OUTPUT (оригинал не трогается); scan_only = только отчёт, без записи.
    subfolderSTRINGOptional subfolder inside OUTPUT (created automatically; nested 'a/b' allowed). --- Опциональная подпапка внутри OUTPUT (создаётся автоматически; можно 'a/b').
    filename_prefixSTRINGcleanPrefix for the clean copy: '<prefix>_<name><ext>'. Empty -> '<name>_clean<ext>'. --- Префикс чистой копии: '<префикс>_<имя><ext>'. Пусто -> '<имя>_clean<ext>'.

    Outputs (2)

    NameTypeDescription
    filepathSTRING
    reportSTRING