Nodes/radiance/SDR → HDR AI Fill (RUDRA v3)
ComfyUI Node

SDR → HDR AI Fill (RUDRA v3)

8 GB of downloads to invent plausible pixels

By FXTD-Studios·Created 11 months ago·Updated 9 days ago· 264
SDR → HDR AI Fill (RUDRA v3)
  • image
  • reconstructed_mask
  • image
  • generated_mask
  • reconstructed_mask
  • report
◄image_encodingLinear (Rec.709)►
◄prompt_highlight►
◄brightness_offset0.00►
◄fill_shadowsfalse►
◄prompt_shadow►
◄highlight_context_code250►
◄max_gain_stops3.00►
◄shape_gain1.00►
◄use_brightness_estimatortrue►
◄steps30►
◄seed0►
◄guidance1.0►
◄negative_prompt►
◄window33►
◄overlap8►
◄max_area399360►
◄base_model►
◄fill_package►
◄allow_downloadtrue►
◄keep_loadedtrue►
◄prompt_strength1.00►
◄focusframe►
◄fallbacknone►

What it does, and what it doesn't

Your SDR clipped: a white sky with no clouds in it, a lamp with no shape, a window that's a rectangle of paper. RUDRA's analytic route can rebuild the brightness of those areas from what survived, but it can't put anything in them. AI Fill can. It runs Wan2.1-VACE-1.3B with a FXTD LoRA, draws a shape inside the fully clipped regions, and sets the brightness with RUDRA's estimator rather than the model's.

The word the pack keeps using is the right one: plausible, not recovered. There is no data there. What you get is a sky that reads as a sky. If you need it to be the sky that was over there, you can't have it and no tool can give it to you.

What does hold up is the containment. No 8-bit code of the master's ACES 2.0 SDR view changes, and untouched pixels are bit-identical. That's a stronger guarantee than most generative passes manage - you can hand this to a colourist without a re-QC of the whole frame.

How it works

Windows of window frames (33 by default, 4k+1), joined with overlap frames re-read from the previous window so the joins don't seam, at a working size of max_area pixels (399,360 ≈ 832 × 480) and brought back to full res. Flow matching with UniPC, 30 steps, guidance at 1 - RUDRA's gates were run at 1, so raising it means twice the compute for a behaviour nobody validated.

use_brightness_estimator is the v3 headline: brightness comes from the estimator plus brightness_offset (±3 stops), capped at max_gain_stops over the master. Turn it off and you get RUDRA v1–v2 behaviour, where the model's own brightness ruled. shape_gain decides how much the generated shape modulates brightness inside a region - 0 gives you a flat patch at the estimate, which is honest and looks like a flat patch.

focus is the parameter nobody notices: frame sees the whole frame at max_area, region boxes everything the shot fills so a sky gets more of the budget, and areas runs the model once per group of clipped regions (two lamps at opposite corners of a 4K frame, each at full detail). More areas, more time.

Inputs and outputs

Required: image (the HDR master - this expects the learned RUDRA ACES 2 route, so SDR → HDR Universal or Recover), image_encoding, prompt_highlight, brightness_offset.

Optional and worth knowing: reconstructed_mask from the upstream node (the output becomes max of the two), fill_shadows plus prompt_shadow (off by default, because the registered gates only covered highlights), highlight_context_code (tau_high), max_gain_stops, shape_gain, use_brightness_estimator, steps, seed, guidance, negative_prompt, window, overlap, max_area, base_model, fill_package, allow_download, keep_loaded, prompt_strength, focus, fallback.

Out: image, generated_mask (exactly what was invented - wire it into RUDRA Master Write so the sidecar records it), reconstructed_mask, and report, which flags frames where the fill adds flicker.

Install and the download hit

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

Manager → Radiance → Install, restart, refresh. Windows portable: python_embeded\python.exe.

Then the real cost. First run on a frame with clipped highlights pulls the AI fill v3 package (271 MB) and Wan2.1-VACE-1.3B (7.7 GB). The first custom prompt pulls the 11.4 GB umT5 text encoder. All pinned and hash-checked, resumable, and RADIANCE_ALLOW_DOWNLOADS=0 overrides everything if you'd rather place files by hand in models/radiance/. diffusers and accelerate come from requirements.txt because this node needs them.

Roughly 16 GB of VRAM. keep_loaded defaults on, which is right for a run of many frames and wrong for a graph you're iterating on one frame at a time.

Where people get burned

Under 16 GB and it's out of memory, not slow. max_area and window down is the lever - 17 frames instead of 33 halves the temporal context in exchange for fitting.

Forgetting fallback: spikes on long clips. At none (the v3 default) every fill is kept, and the report is the only warning you get. On a 300-frame shot, set spikes and let the frames that misbehave revert to the master.

Typing a new prompt inside a loop, then wondering why the first run took minutes: that's the text encoder loading once, as documented.

And the expectation trap the pack's own community thread shows - people assuming an HDR node pack conjures detail that was never captured. This one is a LORA'd 1.3B video model drawing a plausible sky. Review every frame, especially the joins.

CategoryFXTD STUDIOS/Radiance/HDR

Inputs (25)

NameTypeDefaultDescription
imageIMAGEThe HDR master from SDR → HDR Universal or Recover running RUDRA ACES 2 (scene-linear, 1.0 = diffuse white). A batch is read as ordered frames of one shot.
image_encodingCOMBOLinear (Rec.709)How the master is encoded: the Universal/Recover Linear output, their AP0 output, or ACEScg. The result leaves in the same encoding.
prompt_highlightSTRINGWhat to draw inside clipped highlights (e.g. 'soft clouds in a bright blue sky'). Empty uses RUDRA's base prompt. A new prompt loads the 11 GB umT5 text encoder on the CPU once; its embedding is cached.
brightness_offsetFLOAT0.00-3–3Stops added to every clipped area's estimated brightness (RUDRA's Highlight brightness). Still capped at max_gain_stops over the master.
reconstructed_maskoptMASKThe reconstructed_mask from Universal/Recover; the reconstructed_mask output becomes max(it, generated).
fill_shadowsoptBOOLEANfalseAlso fill fully crushed shadows (code 0). Off by default, as in RUDRA 1.0: the registered gates covered highlights.
prompt_shadowoptSTRINGWhat to draw inside crushed shadows, when fill_shadows is on.
highlight_context_codeoptINT250200–2558-bit code from which the model sees a highlight as context (tau_high). The fill is still blended only at code 255.
max_gain_stopsoptFLOAT3.000–6The fill is never more than this many stops brighter than the master (0 = no cap).
shape_gainoptFLOAT1.000–2How strongly the generated shape varies the brightness inside a clipped area (0 = flat at the estimate).
use_brightness_estimatoroptBOOLEANtruev3: brightness from the estimator plus the offset. Off: the model's own brightness (RUDRA v1-v2 behaviour).
stepsoptINT304–80Denoising steps per window (flow matching, UniPC). RUDRA uses 30.
seedoptINT00–4294967295Noise seed. The same seed and settings give the same fill.
guidanceoptFLOAT1.01–8Above 1: classifier-free guidance against negative_prompt (twice the compute). RUDRA's gates were run at 1.
negative_promptoptSTRINGWhat to steer away from; used only when guidance is above 1.
windowoptCOMBO33Frames per generation window (4k+1). RUDRA uses 33.
overlapoptINT80–16Frames the next window re-reads from the previous one, so windows join without a seam. Must be below window.
max_areaoptINT39936065536–921600Working size in pixels (aspect kept); the fill is brought back to full size. RUDRA uses 832 x 480.
base_modeloptSTRINGWan2.1-VACE-1.3B-diffusers folder. Empty searches RADIANCE_WAN_VACE, models/radiance/ and models/diffusers/.
fill_packageoptSTRINGRUDRA AI fill v3 folder (rudra_genfill.safetensors, brightness.json, prompt_cache). Empty searches models/radiance/rudra_genfill_v3 and RADIANCE_RUDRA_GENFILL.
allow_downloadoptBOOLEANtrueDownload what is missing on first use, into models/radiance: the AI fill v3 package (271 MB) and the Wan2.1-VACE-1.3B base model (7.7 GB; its 11.4 GB text encoder only when a custom prompt is first used). Pinned and hash-checked; resumes if interrupted. RADIANCE_ALLOW_DOWNLOADS=0 always wins.
keep_loadedoptBOOLEANtrueKeep Wan VACE on the GPU between runs. Off frees it after this node.
prompt_strengthoptFLOAT1.000–2How strongly prompt_highlight / prompt_shadow steer their region. 1 = as RUDRA's gates (the region's prediction replaces the base one); 0 = the prompt is ignored; above 1 pushes further from the base prompt (experimental).
focusoptCOMBOframeWhat the model sees. frame: the whole frame at max_area (v3). region: one box round everything the shot fills, so a sky that is part of the frame gets more detail. areas: one box per group of clipped areas, each drawn at up to max_area (two lamps at opposite edges of a 4K frame each at full detail; one model run per box). Nothing is generated outside the boxes.
fallbackoptCOMBOnonespikes: a frame whose fill flickers (more than 0.25 stops beyond the master's own change, both into it and out of it) is returned as the master's own frame. none: every fill is kept (v3). A fill that is not finite always falls back.

Outputs (4)

NameTypeDescription
imageIMAGE—
generated_maskMASK—
reconstructed_maskMASK—
reportSTRING—