Nodes/ComfyUI-TextureAlchemy/PBR Pipe to Batch
ComfyUI Node

PBR Pipe to Batch

Flatten a PBR_PIPE Into a Batch (To Process Every Map at Once)

By amtarr·Created 9 months ago·Updated 4 months ago· 58
PBR Pipe to Batch
  • pbr_pipe
  • image_batch
include_albedotrue
include_normaltrue
include_aotrue
include_heighttrue
include_roughnesstrue
include_metallictrue
include_transparencytrue
include_emissiontrue

Some operations are just easier on a stack. You want to upscale every map of a material the same way, resize them all to match, or feed the whole material through one filter - and doing that eight times, once per map output, is exactly the kind of tedium that makes people abandon PBR workflows. PBR Pipe to Batch flattens a PBR_PIPE into a single image batch so one operation can hit every map at once.

It's the "flatten" half of a round-trip. The pack's PBRBatchToPipe reassembles a batch back into a pipe, and this node does the forward direction: pipe in, batch out.

How it works

One required input - pbr_pipe - and eight boolean toggles that decide which maps make it into the output batch: include_albedo, include_normal, include_ao, include_height, include_roughness, include_metallic, include_transparency, include_emission, all defaulting to on. The node collects the included maps (skipping any that are missing from the pipe) and concatenates them along the batch dimension.

Output is a single image_batch. The order follows the pack's canonical sequence - albedo, normal, AO, height, roughness, metallic, transparency, emission - which is exactly the order PBRBatchToPipe's map_order expects by default, so the round-trip just works.

The toggles you'll actually use

By default everything is on, and that's usually fine. The toggles matter when you don't want the whole set: batch-processing only the maps that need it (there's no point upscaling an emission map that's a flat black), or keeping a batch lightweight for a preview. Turning off what you don't need also keeps batch operations fast and prevents weirdness from maps that are missing anyway.

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. No extra dependencies.

Where it shines

The canonical pattern: split your pipe into a batch, run one resize/upscale/filter on the whole stack, then feed the result back through PBR Batch to Pipe with the default map_order to reconstruct the material. It's also the fastest way to eyeball a whole material - wire the batch into a Preview or grid and you see every map at once. The one thing to watch: some downstream nodes treat batch elements positionally, so if you've excluded maps, remember the batch is no longer the full canonical set when you reassemble it.

CategoryTexture Alchemist/Pipeline

Inputs (9)

NameTypeDefaultDescription
pbr_pipePBR_PIPE
include_albedooptBOOLEANtrueInclude albedo map in batch
include_normaloptBOOLEANtrueInclude normal map in batch
include_aooptBOOLEANtrueInclude AO map in batch
include_heightoptBOOLEANtrueInclude height map in batch
include_roughnessoptBOOLEANtrueInclude roughness map in batch
include_metallicoptBOOLEANtrueInclude metallic map in batch
include_transparencyoptBOOLEANtrueInclude transparency map in batch
include_emissionoptBOOLEANtrueInclude emission map in batch

Outputs (1)

NameTypeDescription
image_batchIMAGE