Nougan Image Converter πΌοΈ
Nougan Image Converter
- images
- images
- file_paths
- report
ComfyUI's stock SaveImage writes a PNG, always, and by month three your output/ folder is a pile of 4β12 MB files you never look at. Nougan Image Converter is the node people install instead: one save node that writes PNG, WebP, JPEG, AVIF, TIFF, BMP or GIF, and - this is the interesting part - decides the quality number for you by comparing the compressed result against the original.
That's the whole pitch. You don't guess "is WebP 85 enough?" You pick a tier from 5 to 10 and it binary-searches the lowest quality setting that still hits the similarity target for that tier.
How Smart Squeeze actually works
The mechanism is SSIM, measured between your original pixels and the compressed-then-decoded result. Each tier has a target: 5 "Compact" is 0.93, 8 "Crisp" is 0.975 (the default), 10 "Pristine" is 0.995. For JPEG, WebP and AVIF the node runs a binary search over quality, keeping the smallest encode that clears the bar. WebP additionally tries true lossless and keeps whichever file is smaller - which is why flat-colour illustrations sometimes come out lossless and tiny.
Lossless formats take a different path entirely. PNG, TIFF and BMP are always bit-exact: it reduces the mode where it can (RGBA to RGB, RGB to grayscale, β€256 colours to palette), maxes out deflate, and - if you installed the optional pyoxipng - runs an oxipng pass, with a Zopfli pass at tier 10. So on PNG the quality_scale slider isn't quality at all, it's how hard the node is allowed to try. Worth knowing before you wonder why tier 5 and tier 10 look identical.
The inputs you'll actually touch
Three matter: format, smart_squeeze and quality_scale.
format lists png, webp, jpeg, jpg, tiff, bmp and gif. AVIF only appears in the list if your Pillow build can write it - the node checks at import time, so a missing AVIF isn't an error, it's just absent from the dropdown.
filename_prefix is the folder and name inside your output dir (Nougan/image by default). embed_workflow decides whether the ComfyUI graph gets written into the file - leave it on if you share images, because the metadata is the artwork in ComfyUI culture and stripping it is how "workflow included" posts become screenshots. Turn it off when you want the smallest possible file or you're publishing something with prompts in it.
save_mode has two values: save to output writes to ComfyUI/output/, preview only writes to temp. And load_path turns the node into a converter: leave images unconnected, point it at a file or folder, and it converts what's there in one run. If an image is connected, the connection wins and load_path is ignored.
Outputs are images (pass-through, or the loaded images, resized to match the first if sizes differ), file_paths (one path per line, hand it to a text node) and report, which tells you the savings against a standard export. That report is the most honest "did this help" signal you'll get short of opening the files.
Install
It ships inside the Nougan pack, so there's nothing extra to install:
cd ComfyUI/custom_nodes
git clone https://github.com/Winnougan/Nougan_Nodes
# restart ComfyUI
ComfyUI Manager works too - search Nougan. For the extra lossless PNG pass:
pip install pyoxipng
Use the same Python ComfyUI runs on (python_embeded\python.exe -m pip install pyoxipng on the Windows portable build). Notably, the pack's pyproject.toml declares no dependencies at all, so nothing is installed for you - every "optional" in this pack is genuinely manual.
Where people get burned
Folder conversion only scans one level. load_path with a directory converts the files directly in it; subfolders aren't walked. Point it at the leaf folder.
A folder of mixed sizes gets resized to the first image. The images output normalises to the first file's dimensions, so converting a batch of different aspect ratios through one pass will letterbox your day.
Tier 10 on JPEG doesn't mean lossless. It means SSIM 0.995, which is still a lossy encode. If you need bit-exact, use PNG - and if you need both small and exact, that's WebP lossless, which Smart Squeeze will find on its own.
preview only is not a save. Files land in temp/, which ComfyUI is free to clear. If you liked the result, flip the mode before you close the tab.
My take: leave Smart Squeeze on, run WebP at tier 8 for anything headed to a gallery or a Discord post, and keep PNG (tier 10, oxipng installed) for the handful of images you'll edit again later. That single change cut my output folder by about 70% and I stopped being able to see the difference at 100%.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| filename_prefix | STRING | Nougan/image | Folder/prefix inside the output directory. |
| format | COMBO | webp | 8 options: png, webp, jpeg, jpg, avif, tiff, +2 |
| smart_squeeze | BOOLEAN | true | Finds the smallest file that still meets the quality tier. PNG/TIFF/BMP stay bit-exact. |
| quality_scale | INT | 85β10 | 5 Compact Β· 6 Lean Β· 7 Balanced Β· 8 Crisp Β· 9 Fine Β· 10 Pristine |
| embed_workflow | BOOLEAN | true | β |
| save_mode | COMBO | save to output | 2 options: save to output, preview only |
| imagesopt | IMAGE | Connect an image to save/convert it. | |
| load_pathopt | STRING | Used when no image is connected: a file or a folder to load and convert. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | β |
| file_paths | STRING | β |
| report | STRING | β |