Nodes/Nukomfy Suite/Nukomfy Multilayer Unpack
ComfyUI Node

Nukomfy Multilayer Unpack

Pull depth, normals, and masks back out of a multilayer EXR

By francescolorussi·Created 3 months ago·Updated 2 months ago· 1
Nukomfy Multilayer Unpack
  • extra_layers
  • layer_1
  • layer_2
  • layer_3
  • layer_4
  • layer_5
  • layer_6
  • layer_7
  • layer_8
  • layer_9
  • layer_10
  • layer_11
  • layer_12
  • layer_13
  • layer_14
  • layer_15
  • layer_16
layer_count

Everything in ComfyUI wants a plain image tensor. Multilayer EXRs don't give you one - they give you a pile of named channel groups, and the only way to work with them is to pull each pass out and hand it to the nodes that can actually use it. Nukomfy MultiLayer Unpack is the inverse of Nukomfy MultiLayer Pack: it takes a multilayer bundle and exposes each layer you name as its own IMAGE output.

Where does the bundle come from? Two places. If you read a multilayer EXR with Nukomfy Read, its extra_layers output is already a bundle - Read parses the file's channel names and detects the depth, normal, position, motion layers automatically. Or you can build your own with a Pack. Either way, Unpack is how you turn that bundle into usable tensors.

The workflow this unlocks is the good one: read a plate with a depth pass, unpack the depth, and drive a depth-aware ControlNet or an upscaler with it. No manual EXR surgery, no clipping things into grayscale by hand.

How it works

Set Layer Count (1 to 16) and you get that many slots, each with a Layer N Name field. Type the name of the layer you want - depth, normal, mask, whatever - and the corresponding output socket layer_N carries that pass as an IMAGE tensor. Lookup is case-insensitive, so Depth finds depth. The node exposes 16 static output sockets (layer_1 through layer_16); slots beyond your chosen count just sit there as tiny placeholders, and you leave them unconnected.

Two behaviors worth knowing before they confuse you. A missing or misnamed layer doesn't crash - it falls back to a 3-channel black image, and the node logs a warning listing the layers that actually exist in the bundle. That log line is your best friend when a layer comes back black for no visible reason; it's almost always a typo in the name. And single-channel layers (depth.Z, mask.a) get promoted to 3 channels with the data in the R channel, so Preview Image and ordinary AI nodes can consume them directly instead of choking on a 1-channel tensor.

Inputs and outputs

  • extra_layers - the bundle, from Nukomfy Read's extra_layers output or a Nukomfy MultiLayer Pack
  • Layer Count - how many slots to show
  • Layer N Name - the layer to extract, e.g. depth

Outputs are the layer_N sockets, one IMAGE per slot. Wire them anywhere a normal image goes.

Install

It's the same pack as everything else here. ComfyUI Manager → search Nukomfy Suite, or:

cd ComfyUI/custom_nodes
git clone https://github.com/francescolorussi/ComfyUI-Nukomfy-Suite
cd ComfyUI-Nukomfy-Suite && pip install -r requirements.txt

Dependencies are OpenImageIO>=3.1.10 and fileseq; no model files to download. If the Nukomfy nodes don't appear and the sidebar shows a red "Graph nodes unavailable" banner, the deps aren't installed in the ComfyUI Python environment - install and restart ComfyUI.

The trap to remember

Unpack is lenient by design - bad names give you black, not errors. So the black-image debugging loop is always: check the log warning to see what's actually in the bundle, then fix the name. And if you built the EXR yourself with a Pack, remember names are matched case-insensitively there too; keep one spelling across the whole workflow and you won't be chasing ghosts.

CategoryNukomfy/Channels

Inputs (2)

NameTypeDefaultDescription
extra_layersNUKOMFY_MULTILAYERMultilayer bundle to unpack. Comes from Nukomfy Read (extra_layers output) or Nukomfy Multilayer Pack.
layer_countCOMBOHow many extra layers to extract. Add one slot per layer you want to read out of the multilayer bundle. The output socket layer_N exposes the layer matched by Layer N Name.

Outputs (16)

NameTypeDescription
layer_1IMAGE
layer_2IMAGE
layer_3IMAGE
layer_4IMAGE
layer_5IMAGE
layer_6IMAGE
layer_7IMAGE
layer_8IMAGE
layer_9IMAGE
layer_10IMAGE
layer_11IMAGE
layer_12IMAGE
layer_13IMAGE
layer_14IMAGE
layer_15IMAGE
layer_16IMAGE