Downscale 32-bit
Downscale without destroying the float range
- image
- downscaled_image
- width
- height
Resizing a regular image is a solved problem - any of a dozen ComfyUI nodes will do it. Downscaling HDR footage is where the stock nodes quietly lie to you: most of them clamp to 8-bit or at least to [0,1] on the way through, which turns your scene-linear highlights into a flat white smear. Radiance Downscale 32-bit is the node for when the thing being shrunk is worth more than 8 bits - it scales in float32 and can do the whole operation in linear light, which is the difference between a correct reduction and a muddy one.
Here's the mechanism worth understanding, because it's the same trap that bites upscaling in reverse: resizing math behaves differently depending on the colorspace you run it in. Scale an sRGB-encoded image with a plain average and the bright areas shrink wrong - the average of two bright pixels in gamma space isn't the average of their actual light. This node defaults to process_in_linear: it converts to linear, resizes, converts back, so the reduced pixels are the real average of their neighbors. That's the "32-bit" in the name earning its keep.
The knobs
- scale_factor - 0.01 to 1, the shrink amount. 0.5 = half size.
- method - seven kernels: lanczos, lanczos4, bicubic, mitchell, catrom, gaussian, bilinear. Lanczos is the sharp default for downscaling; mitchell/catrom are smoother and friendlier to already-noisy footage. bilinear is the fast-and-soft option.
- antialiasing - 0 to 1, default 0.5. How hard the filter fights aliasing (moiré, shimmer on fine detail). If your footage crawls with interference patterns when shrunk, raise it.
- pre_blur - 0 to 2. A little blur before the scale kills high-frequency noise that aliases worse when shrunk. Especially worth it on AI-video frames.
- process_in_linear - on by default. Leave it on for HDR or scene-linear work; if your input is already linear, the node detects it and skips the round-trip.
- input_color_space - sRGB, Linear, or Auto. Set to Linear to skip the sRGB↔linear conversion entirely when your data is already linear; Auto lets the node guess.
- use_gpu - on by default for speed.
Outputs: downscaled_image, plus width and height INTs - handy to wire into a layout or save node so everything downstream adapts to the new size.
Where it fits
The obvious use is the standard "downscale for preview" move - shrink a 4K frame to check the grade without burning VRAM - done without nuking the float range. It's also the front end of a real pipeline: downscale a plate for a fast ControlNet pass, or feed the reduced frame into a DoF or grain pass that you'll later composite back at full res. For plain 8-bit PNGs there's no advantage over the stock nodes; this earns its place only when the values above 1.0 matter.
Install
In fxtdstudios/radiance - Manager search "Radiance", or:
cd ComfyUI/custom_nodes
git clone https://github.com/fxtdstudios/radiance.git
cd radiance
pip install -r requirements_linux.txt # or windows/mac_silicon
Restart after; Linux needs libopenexr-dev before pip, and the heavy dependency set (OpenEXR, OpenColorIO, colour-science, transformers) makes first boot slow. If Manager's security level blocks the install, clone manually per the README.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Image or batch to downscale, display-encoded sRGB or linear float (see input_color_space). Values above 1.0 are kept. | |
| scale_factor | FLOAT | 0.500.01–1 | Output size as a fraction of the input (rounded down, minimum 1 px). |
| method | COMBO | Resampling kernel, run exactly as named on CUDA and CPU alike: lanczos, lanczos4, bicubic (Catmull-Rom), mitchell, catrom, gaussian, bilinear. | |
| antialiasingopt | FLOAT | 0.500–1 | Width of the downscaling prefilter. 0.5 = the kernel's textbook width (stretched by the scale factor), 0 = no prefilter (sharpest, aliases and moires), 1 = twice as wide (softest). pre_blur adds a Gaussian on top. |
| pre_bluropt | FLOAT | 0.00–2 | Gaussian sigma in input pixels applied before downscaling to suppress aliasing and moire. 0 = off. |
| process_in_linearopt | BOOLEAN | true | Decode sRGB to linear before resampling and re-encode after, for gamma-correct filtering. Only acts when input_color_space is sRGB; linear/HDR input is never converted. |
| use_gpuopt | BOOLEAN | true | Run on CUDA when available (MPS is not used). Falls back to the CPU path, which uses the exact resampling kernels. |
| input_color_spaceopt | COMBO | sRGB | Colour space of the input image. Linear skips the sRGB-linear conversion for HDR or already-linear input. Auto: Linear when any value is outside 0-1, else sRGB. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| downscaled_image | IMAGE | — |
| width | INT | — |
| height | INT | — |