Nodes/radiance/Linear Check
ComfyUI Node

Linear Check

A smoke alarm for wrongly-tagged colour, not a truth detector

By FXTD-Studios·Created 8 months ago·Updated about 18 hours ago· 246
Linear Check
  • image
  • shot_metadata
  • image
  • shot_metadata
◄actionLog Warning►

Half of all bad grades are a colour-space mistake that nobody notices for an hour. Something in the chain took sRGB data, assumed it was scene-linear, and did maths that's only valid on linear light. The result isn't catastrophic - it looks slightly wrong, which is much harder to debug than looking broken.

Linear Check is a tripwire for exactly that. Drop it in front of a linear-only node and it complains if the shot metadata doesn't tag the image as linear. It passes pixels through untouched, so it costs you nothing but a wire.

What it actually checks - and what it doesn't

Read the tooltip twice: it reads the metadata tag only, not the pixel values. It does not measure your image, it does not sniff the histogram, it does not notice that your "linear" data is obviously gamma-encoded. If the tag says Linear, it passes. If the tag says something else - or is missing, which it reads as Unknown - it fails.

The pass conditions are literal: a colorspace tag containing Linear, or exactly ACEScg. Anything else is a fail. That's precise enough to be predictable and blunt enough to catch the real cases, which is the right trade for a validation node.

Consequence worth internalising: a PNG loaded with a stock Load Image node has no Radiance shot metadata, so it gets read as Unknown and fails this check. That's not a false positive, that's the node telling you the truth - untagged data is untagged data, and you cannot know it's linear. If you're piping ordinary images through Radiance's linear nodes, tag them properly upstream or accept the warning.

Inputs and outputs

Three inputs, no outputs that change anything:

  • image - passed straight through.
  • shot_metadata - the RADIANCE_SHOT object whose colorspace tag is tested. This is a typed input, so you need a node upstream that produces shot metadata; it isn't inferred.
  • action - what happens on a fail. Log Warning writes to the ComfyUI console and continues (the default, and what you want while building). Strict Error raises and stops the graph - use this on a production graph where a colour mistake is worse than a failed run. Ignore does nothing at all, which is genuinely useful for parking the node in a chain while you work on something else.

Outputs are image and shot_metadata: the same two things that went in. It's a passthrough with an opinion.

That passthrough design is the reason to actually use it rather than reading logs. A validation node that changes the data has to be spliced in and out; this one sits in the chain permanently and you toggle action when you want it loud.

Installing Radiance

Manager → search Radiance → install → restart → refresh. Manual:

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

Windows portable users install with python_embeded\python.exe. No model downloads. Radiance is GPL-3.0, ~147 visible nodes from FXTD Studios, and it's a heavy install: OpenEXR, OpenImageIO, OpenColorIO, diffusers and accelerate all go into ComfyUI's Python environment.

Troubleshooting

It warns constantly on everything. Your source images have no Radiance metadata. That's expected and it's not a bug in the node - either tag upstream or set action to Ignore and stop reading the console.

It passes and my grade is still wrong. Of course. The tag lied, or the tag was right and the problem is elsewhere. This node catches mislabelled data, not misdescribed data. For a real check, look at the pixels: inspect a patch of known grey, or use Radiance's diagnostics node, which reports actual values rather than metadata.

"Strict Error killed my batch run." Working as configured. Switch to Log Warning and go look at what the console said - it names the offending colour space in the message, which is more useful than the stack trace.

Nothing is connected to shot_metadata. The check can't run without it. If your chain has no shot metadata source, this node isn't doing anything for you and you should remove it rather than leave a node that silently passes.

The honest framing. This is a linter, not a test suite. It's cheap, it catches one specific genre of mistake across a whole graph, and it's the kind of thing production pipelines have had for decades and node graphs usually don't. Use it where the mistake is plausible, don't expect it to save you from anything clever.

CategoryFXTD STUDIOS/Radiance/Pipeline

Inputs (3)

NameTypeDefaultDescription
imageIMAGEImage passed through unchanged. Its pixels are not inspected; only the shot metadata's colorspace tag is checked.
shot_metadataRADIANCE_SHOTShot metadata whose 'colorspace' tag is tested. Tags containing 'Linear', or exactly 'ACEScg', pass; anything else (or a missing tag, read as 'Unknown') fails.
actionCOMBOLog WarningWhat to do when the tag is not linear: Log Warning writes to the console and continues, Strict Error stops the graph, Ignore does nothing.

Outputs (2)

NameTypeDescription
imageIMAGE—
shot_metadataRADIANCE_SHOT—