CivArchive
    ← All articles
    Published July 15, 2025by buckrogers

    Announcing: The ComfyUI PNG to JPG Converter - Reclaim Your Hard Drive!

    74 views0 reactions0 comments on CivitAI4 collected
    png2jpg_jsontool guide

    Hey everyone!

    Are you tired of your ComfyUI outputs folder eating up your storage? Do you have gigabytes of massive PNG files, each one hoarding a nearly identical workflow?

    It's time to clean house. I've created a new tool to solve this exact problem. There is a project for this here: https://github.com/BuckRogers1965/ComfyUI-PNG-to-JPG-Converter

    The Problem: PNGs are Bloated! 😩

    We all know the pain:

    • Massive Files: A single PNG can be 10-50MB, sometimes more.

    • Wasted Space: Hundreds of images with the same workflow (just a different seed) means tons of duplicated data.

    • Sharing is a Hassle: You can't easily post your images on social media without losing the embedded workflow.

    • Storage Costs: Your collection grows, and your hard drive (or cloud storage bill) weeps.

    ✨ The Solution: Convert, Extract, and Deduplicate!

    My ComfyUI PNG to JPG Converter is a smart batch tool that does it all:

    • Converts PNGs to high-quality JPGs, slashing file sizes by 80-90%.

    • Extracts your precious workflows into separate, tiny .json files.

    • 🧠 It's SMART! The tool detects when a workflow is a duplicate (ignoring seed changes) and only saves a new JSON when the workflow is actually different.

    • 🔄 Preserves Everything: Just drag and drop the .json file back into ComfyUI to load your exact workflow, perfectly intact.

    • 🗂️ Processes your entire outputs folder in one go.

    📊 The Results Don't Lie

    See the difference for yourself:

    • Before: 1000 PNGs = ~25-45 GB

    • After: 1000 JPGs + a handful of JSONs = ~2-5 GB

    That's a potential saving of over 40GB for every 1000 images!

    How It Works (In a Nutshell)

    Your cluttered folder...

    BEFORE:

    outputs/
    ├── ComfyUI_12345_.png (45MB, workflow embedded)
    ├── ComfyUI_12346_.png (44MB, same workflow, different seed)
    └── ComfyUI_12347_.png (46MB, new workflow)

    Becomes a clean, organized collection...

    AFTER:

    outputs/
    ├── ComfyUI_12345_.jpg (3MB)
    ├── ComfyUI_12345_.json (workflow data)
    ├── ComfyUI_12346_.jpg (3MB)  <-- No new JSON needed!
    └── ComfyUI_12347_.jpg (3MB)
    └── ComfyUI_12347_.json (new workflow data)

    🔧 How to Get Started

    This is a simple command-line script that requires Python and ImageMagick.

    1. Download/Clone the Repository:
      git clone [email protected]:BuckRogers1965/ComfyUI-PNG-to-JPG-Converter.git

    2. Install the prerequisites (full instructions are in the README).

    3. Run it on your outputs folder! The -d removes the png file after jpg and json files have been generated. The default quality is 85

      Generated bash

      python convert_png_jpg_json.py /path/to/outputs -d -q 90

    This tool is perfect for power users, AI artists, workflow collectors, and anyone who wants to manage their ComfyUI collection efficiently.

    Stop letting PNGs eat your hard drive. Transform your collection today—your storage will thank you!

    Check it out, give it a star on GitHub if you find it useful, and let me know what you think!