denoise¶
Path-tracer output denoising (Open Image Denoise’s RT filter, in torch).
The samples_per_pixel > 1 renderer produces Monte Carlo noise wherever
transport is actually stochastic (lit surfaces, GGX, GI); this package reduces
it with the pre-trained U-Net from Intel Open Image Denoise – the
rt_hdr_alb_nrm filter: linear HDR color guided by albedo and normal
auxiliary images – re-implemented as a handful of torch.nn.functional
calls so no native OIDN dependency exists.
Pieces:
tzaParser for OIDN’s
.tzatensor-archive format (the official weight files).weightsResolves the weight file: an explicit path (
denoise_weights), the on-disk cache underSETTINGS.paths.cache_directory/oidn/, or a one-time download of the official file (sha256-pinned). Every failure path degrades to “denoising off” with one warning, never an error – an offline machine still renders.oidn_unetThe RT U-Net itself, built from the parsed tensors (plain functional convolutions; no
nn.Module, so the process-globaltorch.inference_modecannot trip over parameter registration).denoiseThe end-to-end filter: autoexposure, the PU transfer function, 16-pixel alignment padding, tiled inference with overlap, and the inverse transform back to linear HDR.
get_denoiser() is the one entry point the render loop calls; it caches
the loaded network per (process, device) and returns None when weights
cannot be had.