ComfyUI-DLSS5-NR README

The project's README from github.com/lisitskyaa/ComfyUI-DLSS5-NR. As one markdown file: README.md.

ComfyUI-DLSS5-NR

Unofficial, experimental ComfyUI integration for NVIDIA DLSS 5 Neural Rendering (NGX feature 18).

The node runs Neural Rendering in-process inside ComfyUI through a small native D3D12 bridge. It does not launch a helper executable and it does not write temporary image files.

[!WARNING] This project targets an undocumented / pre-release Neural Rendering interface and is not affiliated with, endorsed by, or supported by NVIDIA or Comfy Org. Runtime behavior may change with NVIDIA driver or nvngx_dlssnr.dll versions. Native driver/runtime failures can crash the ComfyUI process.

What it does

ComfyUI IMAGE
    -> Python/ctypes
    -> dlss5nr_bridge.dll
    -> D3D12 + NGX
    -> nvngx_dlssnr.dll (feature 18)
    -> ComfyUI IMAGE

Current v0.3.0 still uses CPU staging for the ComfyUI tensor transfer:

Torch IMAGE -> CPU float32 -> D3D12 RGBA16F -> DLSS NR -> CPU float32 -> Torch IMAGE

There is no subprocess or disk round-trip. CUDA/D3D12 interop is planned as a later optimization.

ComfyUI receives frame-by-frame progress updates while an IMAGE batch is processed.

Temporal mode: NVIDIA Optical Flow

v0.3.0 uses an explicit motion-vector temporal path and adds per-frame motion estimation through the NVIDIA Optical Flow Accelerator (NVOFA).

Only two batch modes remain:

still images
    Reset=1 for every image
    no temporal history
    no motion-vector resource

temporal
    frame 0: Reset=1 + explicit zero R16G16_FLOAT MV
    frame 1+: Reset=0 + NVIDIA Optical Flow MV from raw previous/current input frames

Temporal flow is estimated from the raw input frames, never from the DLSS-processed output:

previous raw frame ----\
                        > NVIDIA Optical Flow -> current-to-previous MV -> DLSSNR.MVec
current raw frame -----/                                      |
                                                              + DLSS temporal history

Implementation details in v0.3.0:

The first frame has no previous frame, so temporal mode bootstraps it with an explicit zero-MV field.

Requirements

NVIDIA Optical Flow hardware is available on Turing-generation NVIDIA GPUs and newer; all GeForce RTX generations satisfy that hardware-generation requirement. GPU support for Neural Rendering itself is still determined by the specific nvngx_dlssnr.dll you provide.

A 0xBAD00001 result means the Neural Rendering runtime rejected the feature on the current GPU/runtime/driver combination.

Installation — normal users

Do not download GitHub's automatically generated Source code.zip if you do not want to compile anything.

  1. Open Releases for this repository.

  2. Download ComfyUI-DLSS5-NR-vX.Y.Z-windows-x64.zip.

  3. Extract the contained ComfyUI-DLSS5-NR folder to:

    ComfyUI/custom_nodes/ComfyUI-DLSS5-NR
    
  4. Supply your own compatible NVIDIA Neural Rendering runtime:

    ComfyUI-DLSS5-NR/runtime/nvngx_dlssnr.dll
    
  5. Restart ComfyUI.

  6. Add experimental -> DLSS 5 NR -> DLSS 5 Neural Rendering (Unofficial).

The release ZIP already contains the project-owned native files:

native/bin/dlss5nr_bridge.dll
runtime/caller/nvngx.dll_comfy.dll

Visual Studio / MSVC is not required for normal installation.

The prebuilt Windows release ZIP intentionally contains only the files needed to run the node. Developer tools, native source code, workflows and extended documentation remain in the repository and GitHub source archives.

_nvngx.dll

Do not normally copy _nvngx.dll yourself. The bridge attempts, in order:

  1. runtime/_nvngx.dll as an explicit local override;
  2. normal Windows DLL search;
  3. automatic discovery in NVIDIA DriverStore packages matching nv*.inf_*.

The project does not redistribute _nvngx.dll.

nvofapi64.dll

Do not download or bundle nvofapi64.dll. It is supplied by the NVIDIA display driver and is loaded from the normal Windows driver installation when batch_mode = temporal.

still images does not initialize NVOFA.

Developer build

Only developers building from source need Visual Studio Build Tools.

Requirements:

Run from a normal cmd.exe or PowerShell window:

build_native.bat

The builder locates MSVC and the Windows SDK directly; a Developer Command Prompt is not required.

Outputs:

native/bin/dlss5nr_bridge.dll
runtime/caller/nvngx.dll_comfy.dll

The bridge now links the standard Windows d3d11.lib in addition to D3D12/DXGI. nvofapi64.dll is loaded dynamically at runtime and is not linked or redistributed.

Node parameters

Parameter Purpose
style Neural Rendering style selector (natural, cinematic, default, numeric experimental styles).
preset Internal render preset. 3 is the current default.
intensity Overall Neural Rendering strength.
tone Local tone / lighting strength (DLSSNR.LocalToneStrength).
structure Local structure / micro-detail strength (DLSSNR.LocalStructureStrength).
skin Skin-specific structure strength. -1 leaves the runtime's default behavior.
auto_mask Enables the runtime's automatic mask path.
batch_mode still images processes independent frames; temporal keeps history and supplies zero/NVIDIA Optical Flow motion vectors.
gpu_index NVIDIA DXGI adapter index. The private NVOFA D3D11 device is created on the same adapter.
channel_order auto, RGBA, or BGRA; useful because different runtime builds have exposed different R/B ordering.

Output resolution is identical to input resolution. This node is Neural Rendering/post-processing, not DLSS Super Resolution.

Runtime Info node

DLSS 5 NR Runtime Info reports:

Use it first when diagnosing a new runtime/GPU combination.

Troubleshooting

Native bridge is missing

If you are a normal user, you probably installed GitHub's Source code archive instead of the prebuilt Windows release ZIP. Download the release asset. Developers can run build_native.bat.

nvngx_dlssnr.dll not found

Place your compatible runtime at:

runtime/nvngx_dlssnr.dll

This repository intentionally does not provide download links or mirrors for proprietary/leaked NVIDIA binaries.

Could not load NVIDIA NGX core _nvngx.dll

The bridge searches NVIDIA DriverStore automatically. As a diagnostic fallback:

Get-ChildItem "$env:SystemRoot\System32\DriverStore\FileRepository" -Filter _nvngx.dll -Recurse -ErrorAction SilentlyContinue |
  Sort-Object LastWriteTime -Descending |
  Select-Object FullName, LastWriteTime, Length

A matching driver copy can be placed at runtime/_nvngx.dll as a local override. Do not rename nvngx_dlss.dll; it is a different component.

NVIDIA Optical Flow: could not load nvofapi64.dll

This only affects temporal mode. Verify that a recent NVIDIA display driver is installed. Run diagnose_runtime.bat; it reports the driver copy under %SystemRoot%\System32 when present.

Do not download nvofapi64.dll from third-party DLL sites.

NVIDIA Optical Flow: nvOFInit / nvOFExecute failed

Attach the complete ComfyUI exception and DLSS 5 NR Runtime Info output to an issue. The native bridge includes the driver's own NVOF last-error text when available.

CreateFeature(18) failed: 0xBAD00001

Feature not supported by the supplied Neural Rendering runtime on the selected GPU/driver combination. Use a runtime that legitimately supports your configuration.

0xBAD00002

The observed Neural Rendering snippet rejected the caller. The release includes the project-owned thin caller helper expected by this integration. If this occurs with an untouched release ZIP, open an issue and attach the full ComfyUI error log plus the Runtime Info output.

Wrong / blue colors

Try channel_order = RGBA or BGRA. auto compares both interpretations against the source and normally selects the plausible one.

Old workflow says batch_mode is invalid

v0.3.0 uses only still images and temporal; the older temporal sequence / temporal sequence (legacy no MV) values are no longer valid. Delete and re-add the node, or change the saved widget to one of the two current values:

still images
temporal

GitHub Releases

Tags matching v* trigger the Windows release workflow. GitHub Actions:

  1. checks that NVIDIA proprietary DLLs were not committed;
  2. builds the native bridge, NVIDIA Optical Flow integration and caller helper on windows-latest;
  3. assembles a clean user ZIP with the prebuilt project-owned DLLs;
  4. writes a SHA-256 checksum;
  5. creates the GitHub Release.

See docs/PUBLISHING.md.

References / implementation notes

Useful references include:

The NVOF D3D11 function-table integration and measured flow-direction/normalization behavior were informed by the MIT-licensed NIGos dlss5-bridge; attribution is retained in THIRD_PARTY_NOTICES.md.

No NVIDIA runtime DLLs or NVIDIA SDK headers are vendored in this repository.

The project's original source code is MIT licensed. NVIDIA trademarks, SDK/API names and proprietary binaries are owned by NVIDIA and are not covered by this project's MIT license.

This project does not redistribute:

The integration uses undocumented/pre-release Neural Rendering behavior, including a thin caller-forwarding helper and observed project/application identifiers. Before distributing or using this project, review the terms that apply to the NVIDIA software/runtime you use. See THIRD_PARTY_NOTICES.md and docs/LEGAL_NOTES.md.

Status

v0.3.0 is the first stable project release with the explicit motion-vector temporal path and NVIDIA Optical Flow for real frame-to-frame motion. The integration remains unofficial and experimental with respect to the NVIDIA Neural Rendering interface.

ComfyUI-DLSS5-NR (lisitskyaa/ComfyUI-DLSS5-NR)

Searching Database…

这是什么?这是一个非官方的实验性 ComfyUI 自定义节点,将 NVIDIA DLSS 5 神经渲染(NGX 功能 18)直接集成到图像生成工作流中。
它是独立应用还是 ComfyUI 插件?它是一个 ComfyUI 自定义节点,通过原生 D3D12 桥接在进程内运行神经渲染,没有辅助可执行文件,也不向磁盘写入临时文件。
怎么在 ComfyUI 里安装它?从 Releases 页面下载预构建的 ComfyUI-DLSS5-NR-vX.Y.Z-windows-x64.zip(不要下载 GitHub 自动生成的源码 zip),解压到你的 custom_nodes 文件夹,自行提供 NVIDIA Neural Rendering 运行时 DLL,重启 ComfyUI,然后从「experimental -> DLSS 5 NR」菜单添加该节点。
除 ComfyUI 本身外还需要什么?一台装有 NVIDIA RTX 显卡的 Windows 10/11 x64 电脑、较新的 NVIDIA 显卡驱动,以及一个兼容且合法获取的 nvngxdlssnr.dll 运行时(本项目不提供);时序模式还需要驱动自带的 nvofapi64.dll。
它用起来稳定性和安全性如何?它面向的是没有公开文档的 NVIDIA 预发布接口,驱动或运行时出错可能导致整个 ComfyUI 进程崩溃,且 GPU 支持完全取决于用户自行提供的 nvngxdlssnr.dll,并无保证。
它能在 Linux 上运行,还是仅限 Windows?仅限 Windows:它需要 Windows 10/11 x64 和 NVIDIA RTX 显卡,因为它依赖 D3D12/D3D11 原生桥接和 NVIDIA 驱动 DLL。
这里的 MIT 许可证实际覆盖什么?仅项目自身的原创源代码采用 MIT 许可;NVIDIA 商标、SDK/API 名称以及 nvngxdlssnr.dll 等专有二进制文件不在许可范围内,项目也不会对其进行再分发。
它需要特定世代的 NVIDIA 显卡吗?就光流(Optical Flow)硬件要求而言,任何 GeForce RTX 显卡(Turing 及更新世代)都可以,但实际的神经渲染支持仍取决于你提供的具体 nvngxdlssnr.dll。
时序模式是什么?它和静态图像模式有什么区别?时序模式使用 NVIDIA 光流加速器从原始输入帧(绝不从 DLSS 输出)估计每帧的运动向量,并跨帧保留历史信息;而静态图像模式则独立处理每一帧,不做运动估计。
DLSS 5 NR Runtime Info 节点显示什么?它会报告插件和原生桥接版本、所选 GPU、NVIDIA 光流是否可用、时序 NVOFA 设置、运行时目录以及所提供 nvngxdlssnr.dll 的 SHA-256——作为新 GPU/驱动组合的第一步诊断很有用。
它会改变输出图像的分辨率吗?不会,输出分辨率与输入分辨率完全一致;该节点执行的是神经渲染后处理,而不是 DLSS 超分辨率放大。
如果颜色看起来不对该怎么办?在 RGBA 和 BGRA 之间切换 channelorder 参数,或者保持 auto——它会将两种解释与源图像对比并选择合理的一种。
Creator
lisitskyaa
Size
0.1 MB
Stars
172
Age
1mo
Commits · 90 Days