ComfyUI Node

PBR Saver

Saving a Complete PBR Material Set With Auto-Named Files

By amtarr·Created 9 months ago·Updated 4 months ago· 58
PBR Saver
  • pbr_pipe
  • images
base_namematerial
output_pathpbr_materials
file_formatpng
enumeration_modeenumerate
starting_number1

The end of every good PBR workflow is a folder full of correctly-named map files that a game engine or DCC tool can actually import. PBRSaver is that end: you hand it a PBR_PIPE and a base name, and it writes out every map as its own file - bricks_albedo_001.png, bricks_normal_001.png, bricks_roughness_001.png, and so on - with enumeration so you never overwrite a previous material by accident.

This is the node the whole pack builds toward. The README's example output is exactly that folder structure, and it's the payoff for everything upstream: extraction, adjustment, mixing, all of it lands here as files a renderer recognizes without you renaming anything by hand.

How it works

For each map in the pipe it builds a filename from base_name, the map type, and a number, then writes it into output_path. The path defaults to a pbr_materials folder inside ComfyUI's output directory (the node auto-detects portable vs. standard installs, per the README), or you can give an absolute path to write anywhere.

The knobs:

  • base_name - the prefix (e.g. bricks).
  • output_path - folder in ComfyUI/output, or an absolute path.
  • file_format - png (8-bit, default), png16 (16-bit), jpg, exr (32-bit precision for displacement/height work), or tiff. The tooltip's note to reach for png16/exr when you need high bit depth is the right instinct for height maps.
  • enumeration_mode - enumerate (001, 002…) or overwrite. Enumerate is the safe default; overwrite is for iterating on the same material in place.
  • starting_number - where enumeration starts.

The single output, images, is a batch of everything it saved, so you can wire it into a Preview Image node and eyeball the whole set as it lands.

Installing it

Part of TextureAlchemy:

cd ComfyUI/custom_nodes
git clone https://github.com/amtarr/ComfyUI-TextureAlchemy

or ComfyUI Manager (search "TextureAlchemy"), then restart. Under Texture Alchemist → Pipeline. It's an output node, so it properly marks the end of your graph. No extra dependencies.

Gotchas

Two things to watch. First, JPG doesn't support alpha, so if your pipe has a transparency map and you save as jpg, the saver has to adapt - don't be surprised if alpha gets flattened. Second, the classic confusion is where the files actually went: pbr_materials is inside ComfyUI/output, not your custom_nodes folder, and the node prints the resolved path to the console. If you can't find your files, read the console line. And because enumerate mode scans for the next free number, re-running the same material repeatedly produces _002, _003… - that's a feature, but if you wanted to replace a material, switch to overwrite.

CategoryTexture Alchemist/Pipeline

Inputs (6)

NameTypeDefaultDescription
pbr_pipePBR_PIPE
base_nameSTRINGmaterialBase name for saved files (e.g., 'bricks')
output_pathSTRINGpbr_materialsFolder name inside ComfyUI/output (or full path if absolute)
file_formatCOMBOpngImage format (png16/EXR for high bit depth)
enumeration_modeCOMBOenumerateEnumerate (001, 002...) or overwrite existing files
starting_numberINT10–9999Starting number for enumeration

Outputs (1)

NameTypeDescription
imagesIMAGE