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

PBR Batch to Pipe

Turning a Stack of Map Images Into a PBR_PIPE

By amtarr·Created 9 months ago·Updated 4 months ago· 58
PBR Batch to Pipe
  • image_batch
  • existing_pipe
  • pbr_pipe
map_orderalbedo,normal,ao,height,roughness,metallic,transparency,emission

The PBR_PIPE is the pack's connective tissue: one wire that carries albedo, normal, AO, height, roughness, metallic, transparency, and emission all at once. PBR Batch to Pipe is the way in for the other direction of data - when you have your maps as a stacked batch of images rather than individual wires.

Where does a stacked batch come from? Real workflows, mostly: a batch of map images loaded from a folder, a Batch output from an upscaler or processor, or an earlier PBR Pipe to Batch that you're re-assembling after doing something to the whole stack. If you've got a pile of map images in a known order, this node turns that pile into a proper PBR_PIPE in one step.

How it works

Two inputs, one output. The image_batch is your stack of images; the map_order string tells the node which slot each one goes to:

albedo,normal,ao,height,roughness,metallic,transparency,emission

That's the default order and it's the pack's canonical map sequence - the same order PBR Pipe to Batch and PBR Splitter emit. If your batch is in a different order, you rewrite the comma-separated list to match your stack (you can even list fewer maps, or repeat one). There's an optional existing_pipe input too, so you can merge a batch onto a pipe that already has some maps - useful when a batch holds just normals+height and you want to drop them into a pipe built from something else.

The output pbr_pipe then behaves like any other pipe: wire it into the Pipeline Adjuster, the Mixer, the Saver, or the Splitter.

The one input that bites

map_order is a freeform string, so it's on you to keep it consistent with what you actually feed in. Get the order wrong and the "roughness" you meant to brighten is actually your AO, and nothing will tell you until the material looks wrong in a render. If you assembled the batch yourself, count the images and count the names; they need to line up. When in doubt, run the batch through PBR Pipe Preview afterward and eyeball the maps in order.

Installing it

Part of TextureAlchemy:

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

or ComfyUI Manager (search "TextureAlchemy"), then restart. It's under Texture Alchemist → Pipeline. No models, no extra dependencies.

The bigger picture

This node is the mirror image of PBR Pipe to Batch - that one flattens a pipe into a batch, this one re-stacks a batch into a pipe. Put them together and you can run whole-material operations (a batch-level filter, a shared resize, a single upscale applied to every map) on the flattened stack, then reconstruct the pipe on the other side. That round-trip is the cleanest way to apply one operation to every map of a material without wiring eight separate nodes.

CategoryTexture Alchemist/Pipeline

Inputs (3)

NameTypeDefaultDescription
image_batchIMAGE
map_orderSTRINGalbedo,normal,ao,height,roughness,metallic,transparency,emissionComma-separated list of map names in batch order
existing_pipeoptPBR_PIPE

Outputs (1)

NameTypeDescription
pbr_pipePBR_PIPE