UniVidX • Decode (Intrinsic)
Your video, split into albedo, light and normals
- result
- rgb
- albedo
- irradiance
- normal
This is where UniVidX stops being an opaque pipeline and becomes four ordinary green IMAGE sockets you can wire into anything. UniVidXDecodeIntrinsic takes the pink UNIVIDX_RESULT from the sampler and splays it into rgb, albedo, irradiance, and normal frame batches. If you've ever wanted a video's lighting separated from its surface color, this is the node you're looking for.
Why this decomposition is useful
Intrinsic decomposition - splitting a frame into albedo (surface color with lighting stripped out), irradiance (the incoming light field), and normals (surface orientation) - is one of those things that unlocks a pile of downstream tricks:
- Relighting. Since albedo is lighting-independent, you can swap the irradiance channel, re-multiply, and get a plausibly re-lit clip without re-rendering anything. That's the same principle IC-Light popularized for stills, now temporal.
- Normal maps as conditioning. The README's framing is the right one: feed normals as ControlNet-style guidance into other video/image models that consume them.
- 3D reconstruction pipelines that want albedo and normals as input.
The pack's demo is R2AIN: one RGB clip in, albedo + irradiance + normal out, in a single pass, at 24 fps.
How it works
The decoder knows which modalities were targets for your mode (from the mode string) and which were conditions. For every modality that was a condition - say RGB, if you ran R2AIN - there's no generated output, so the node emits a black placeholder IMAGE of the right shape. Your graph never breaks on a missing socket; you just get a black stream where you fed the input in. Modalities that were actual targets come through as real frame batches, video_tensor_to_image_batch converting UniVidX's tensor format into standard ComfyUI IMAGE batches you can pipe into VHS video combine, compositing, or anything else.
It also refuses to decode the wrong family: feed it an alpha-family result and it raises a ValueError pointing you at UniVidXDecodeAlpha instead. One input (result), four outputs. That's the whole node.
The "rgb is black" moment
The #1 question this node will generate is "why is my RGB output black?" If RGB was your condition - the clip you fed in - then black is correct behavior, not a bug. The placeholder is there to keep the graph wired, not to be useful. It's worth remembering which modality you conditioned on before you start debugging a "broken" output that's actually doing exactly what you asked.
Install
It ships with the pack - no separate install:
cd ComfyUI/custom_nodes
git clone --recurse-submodules https://github.com/dreamrec/UniVidX_ComfyUI.git
cd UniVidX_ComfyUI
python -m pip install -r requirements.txt
python install.py
Then restart ComfyUI. And be aware of what you're signing up for: this whole graph needs the 69 GB Wan2.1-T2V-14B base model, the UniVidX LoRAs, and at least 24 GB of VRAM (32 GB if you're on the BF16 path). The decomp is beautiful, but it is not cheap, and a single 21-frame clip is minutes of sampling on a top-tier card.
Common issues
ValueError: Mode X is not intrinsic- you wired an alpha-family result into the intrinsic decoder. Swap inUniVidXDecodeAlpha.- Black output you didn't expect - check which modalities your mode treats as conditions (left of the
2in the mode name). Any of those will be black placeholders. - Nothing arrives because the sampler never ran - this decoder only sees what the sampler produced, so the usual suspects apply upstream: family mismatch, missing condition inputs, or a run that OOM'd.
The practical takeaway: if you want the relighting workflow, decode the irradiance to its own output, replace or modify it, and multiply it back against albedo downstream. That's the entire reason the intrinsic family exists.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| result | UNIVIDX_RESULT | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| rgb | IMAGE | — |
| albedo | IMAGE | — |
| irradiance | IMAGE | — |
| normal | IMAGE | — |