Nodes/radiance/RUDRA Master Write
ComfyUI Node

RUDRA Master Write

The EXR master, its mattes, its brackets and a sidecar that survives a re-encode

By FXTD-Studios·Created 11 months ago·Updated 9 days ago· 264
RUDRA Master Write
  • image
  • mattes
  • generated_mask
  • master_path
  • sidecar
◄filename_prefixrudra_master►
◄image_spaceFrom the mattes►
◄bit_depth16-bit Half Float►
◄write_mattestrue►
◄write_bracketstrue►
◄source_path►
◄checkpoint_path►
◄output_path►
◄frame_index1►

It's a deliverable, not a save button

Every other output in ComfyUI is a picture. This one is a package. RUDRA Master Write emits a 16- or 32-bit EXR stamped with rudra:* provenance, a mattes EXR with the highlight/shadow/changed/region/class/confidence channels, a colour-coded regions.png, three EV brackets read back from the EXR as written, and a sidecar JSON carrying source and checkpoint SHA-256s, build, settings and pixel-class shares.

That read-back is the part that matters and the part most people miss. The brackets aren't generated from the tensor you fed in - they're generated from the file on disk. Which means a bracket that looks wrong is telling you the export itself went wrong, not the grade.

There's a knowledge-base angle here that's worth internalising: ComfyUI's whole metadata culture relies on the workflow living inside a PNG text chunk, and it evaporates on re-encode (which is why the honest place for provenance is a file beside the image, not a chunk inside it). EXR carries none of that, so a sidecar on disk is the correct answer - it's a file another tool can read in ten years when the graph is long gone. Provenance via hashes in a plain JSON is boring, and boring is what a deliverable needs to be.

How it works

Frame numbering comes from filename_prefix and frame_index: <prefix>.<frame, 4 digits>.exr plus the files beside it. image_space set to From the mattes takes the analytic node's output_encoding - so a Rec.709 master stays Rec.709 without you restating it, and with no mattes connected it falls back to linear Rec.709. If you've converted to ACEScg downstream, say so explicitly.

bit_depth is 16-bit half or 32-bit float, and it applies to the mattes too. Half is what most people actually need, and the sidecar records how far the brackets drifts from the preview because of its rounding - an honest note rather than a silent difference.

write_mattes and write_brackets toggle the extras; brackets are SDR views (−2 / 0 / +2 EV) with 203 nits at code 255 at zero, which is what you hand a director who doesn't have an HDR display.

The inputs that earn their place

mattes comes from SDR → HDR Analytic's mattes output. Wire generated_mask from an AI fill and those pixels get class generated, with rudra.generated split into highlight and shadow channels. That's how a reviewer can see exactly which pixels were invented - which is the difference between a review and an argument.

source_path and checkpoint_path are plain strings: point them at the SDR file and at the model weights, and their SHA-256s land in the sidecar. Cheap, and the only thing standing between you and "which LoRA was this?" six months later. output_path empty means ComfyUI's output folder, relative goes inside it, absolute is taken literally.

Out: master_path (first frame's EXR) and sidecar (the JSON as written).

Install

cd ComfyUI/custom_nodes
git clone https://github.com/fxtd-studios/radiance
cd radiance
python -m pip install -r requirements.txt

Manager → Radiance → Install, then restart and refresh. This is one node where the dependency list genuinely matters: EXR writing comes from OpenEXR, falling back to OpenImageIO and then OpenCV. On Python 3.14 there's no OpenEXR wheel, which is why the requirements pin it behind a version check - so a bare-bones install still writes EXRs, just via a different library. If EXR output fails entirely, that chain is the thing to inspect.

Where people get burned

PQ or HLG gets refused. Deliberately. The master is scene-linear, 1.0 = 203 nits, written unchanged; delivery encodings go through the delivery writers. If you set the analytic node to PQ and wired it here, go back.

Same prefix, same frame numbers, same files. Two runs overwrite each other quietly. Name per take.

It's an output node, so it runs whenever you queue - and ComfyUI's cache works backwards from outputs like this, which is fine, but it also means a half-finished graph will happily write a half-finished master to disk. Test the graph before you point output_path at the folder the client is watching.

Matted pixels aren't a mask for your grade. They describe what the conversion did; they don't retroactively limit it. If you want the reconstruction limited, that's RUDRA Region, before the write.

CategoryFXTD STUDIOS/Radiance/HDR

Inputs (12)

NameTypeDefaultDescription
imageIMAGEThe HDR master, scene-linear, 1.0 = 203 nits (diffuse white). Written unchanged. PQ and HLG are refused: write those with the delivery writers.
filename_prefixSTRINGrudra_masterFile stem. Frames are <prefix>.<frame, 4 digits>.exr and the files beside them.
image_spaceCOMBOFrom the mattesWhat the image is. 'From the mattes' takes the Analytic node's output_encoding (linear Rec.709 when no mattes are connected).
bit_depthCOMBO16-bit Half FloatThe master's and the mattes' pixel type. A half master's brackets differ from the preview by its rounding; the sidecar records by how much.
write_mattesBOOLEANtrue<name>.mattes.exr and <name>.regions.png, from the mattes input; without it the sidecar records that none were written.
write_bracketsBOOLEANtrue<name>.ev-2.png, .ev+0.png and .ev+2.png: SDR views with 203 nits at code 255 at 0 EV, from the EXR read back.
mattesoptRUDRA_MATTESFrom ◎ SDR → HDR Analytic (RUDRA).
generated_maskoptMASKSDR → HDR AI Fill generated_mask: those pixels become class 'generated' and rudra.generated is written.
source_pathoptSTRINGThe SDR file the frame came from; its SHA-256 is recorded. Empty: not recorded.
checkpoint_pathoptSTRINGA model file used upstream (the AI fill's, say); its SHA-256 is recorded. Empty: none.
output_pathoptSTRINGOutput folder. Empty: the ComfyUI output folder; relative: inside it; absolute: as it is.
frame_indexoptINT10–9999999The first frame's number in the file names.

Outputs (2)

NameTypeDescription
master_pathSTRINGThe first frame's master EXR.
sidecarSTRINGThe first frame's sidecar JSON, as written.