RUDRA Fill Prompt
A prompt writer that looks at your clipped pixels first
- image
- prompt_highlight
- prompt_shadow
- report
The problem with writing prompts for a highlight fill
The AI fill draws inside your blown highlights. It needs a prompt telling it what's in there, and here's the awkward part: if you knew what was in there, the highlight wouldn't be blown. You're being asked to describe the thing the camera failed to record.
RUDRA Fill Prompt answers that by looking at the picture instead of asking you. With no model at all it inspects the fully clipped areas and works out what they probably are - a large region at the top of frame is a sky (blue, overcast or sunset, decided from the colour around it); a small round one is the sun or a lamp; a bright rectangle in a dark surround is a window; many specks are specular glints; a warm region that changes size frame to frame is a flame. Every suggestion comes with its reason, in the report output.
Honestly this is the most quietly clever node in the pack. It's ten lines of heuristics where a model would be the obvious, worse answer - and because it runs on luma and geometry, it costs nothing and can't hallucinate.
Why you'd pick it over typing
Two reasons. The first is that you may not know. The second is the prompt cache: AI Fill embeds your prompt with an 11 GB umT5 text encoder the first time it sees a new string, on the CPU, once. RUDRA's nine presets are already in the shipped prompt cache, so a preset costs you nothing. A free-typed prompt costs you a one-time encoder load and an embedding.
That's not a reason to avoid custom prompts - it's a reason not to iterate on wording casually in a loop.
Inputs and the two menus
Required: image (the SDR frames the fill will work on - the source, not the master), highlight and shadow.
highlight defaults to Suggest from the frames. Your other options are the presets - Clear blue sky, Overcast sky, Sunset sky, Sun, Lamp / practical, Window daylight, Specular glints, Flame, Shadow detail - or None. shadow is smaller: Suggest from the frames, Shadow detail, or None, and the default is None because AI Fill's fill_shadows is off by default. Match them: asking for a shadow prompt when the fill isn't filling shadows just wastes it.
Optional: highlight_context_code (200–256, default 250) which mirrors AI Fill's tau_high - clipped is code ≥ max(this, 254) - and extra, a multiline box appended after the highlight prompt for a detail of your own ("with a plane trail").
Out: prompt_highlight and prompt_shadow, straight into the AI Fill node's matching inputs, plus report.
How it works, briefly
It rounds up to eight frames spread across the batch to 8-bit codes, hands them to the suggestion pass, and ranks what it finds. Then it tells you, in the report, how much of the frame is clipped and - this is the useful line - whether your chosen prompt is already in the prompt cache or whether the fill will have to embed it. Nothing is generated. There's no model in this node's execution path at all.
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, restart, refresh. Windows portable: pip via python_embeded\python.exe. This node downloads nothing; the prompt cache it reports on belongs to AI Fill (in models/radiance/rudra_genfill_v3/prompt_cache/), so with AI Fill uninstalled or not yet run, the cache check simply has nothing to look at.
Where people get burned
It wants the SDR, not the HDR master. The heuristic looks for codes 254–255 - clipped. Feed it a scene-linear master and almost nothing is "clipped" in that sense, so it finds nothing and tells you so ("nothing fully clipped: the fill has nothing to fill here").
A few frames beats one. A flame shows itself by changing size between frames, which is impossible in a single still. Pass four to eight frames of the shot and the guesses get noticeably better.
Suggest returning empty isn't a bug. If the shot has nothing clipped, there is nothing to fill and you don't need the AI Fill node in the chain. That's the node saving you 8 GB of download.
You can override it. Suggestions are guesses about a part of the image the camera threw away. If you know the sky was overcast and it guessed sunset, pick the preset. The heuristics read colour, not intention.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | The SDR frames the fill will work on (a few frames of a shot let a flame show itself). | |
| highlight | COMBO | Suggest from the frames | The highlight prompt: RUDRA's suggestion, a preset, or none. |
| shadow | COMBO | None | The shadow prompt, for AI Fill with fill_shadows on. |
| highlight_context_codeopt | INT | 250200–256 | AI Fill's highlight_context_code (tau_high): clipped is code >= max(this, 254). |
| extraopt | STRING | Added after the highlight prompt (a detail of your own: 'with a plane trail'). |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| prompt_highlight | STRING | For AI Fill's prompt_highlight. |
| prompt_shadow | STRING | For AI Fill's prompt_shadow (empty unless asked). |
| report | STRING | What was found and why each prompt was picked. |