mirror of
https://github.com/Comfy-Org/ComfyUI_Nvidia_VFX_Nodes.git
synced 2026-11-04 23:37:30 +00:00
[GH-ISSUE #28] NvVFX SDK does not support multiple effect types across GPUs simultaneously #22
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/ComfyUI_Nvidia_VFX_Nodes#22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bencoster on GitHub (Apr 1, 2026).
Original GitHub issue: https://github.com/Comfy-Org/ComfyUI_Nvidia_VFX_Nodes/issues/28
Summary
The NVIDIA Video Effects (NvVFX) SDK has a design limitation where GPU selection (
NvVFX_SetS32(NULL, NVVFX_GPU, whichGPU)) is a global, one-time setting — not per-instance. Running multiple effect types (e.g., denoise + super-resolution + deblur) simultaneously across multiple GPUs causesNvVFX_Runto fail with error code -7 ("invalid parameter value") or -1 ("unspecified error") on all GPUs except the first.This affects any multi-GPU implementation that creates denoise, SR, and deblur instances on different devices concurrently.
Environment
nvvfxPython package)Reproduction
Works ✅ — Single effect type across all GPUs concurrently
Works ✅ — Full pipeline on a single GPU
Fails ❌ — Multiple effect types across GPUs concurrently
Also fails ❌ — Even with serialized
run()calls (lock)Also fails ❌ — Even with identical GPUs (3× RTX 3090 only)
Root Cause
The NvVFX SDK Programming Guide states:
GPU selection is a global SDK-wide state, not per-instance. When creating instances on different GPUs, each creation overwrites the global GPU setting. The TensorRT engines for different effect types end up internally bound to the wrong GPU context, causing
NvVFX_Runto fail.An unanswered forum post from another developer asked the same question about multiple CUDA contexts — no response from NVIDIA.
Workaround: Phased Processing
Process one effect type at a time across all GPUs — create instances, process all frames, close instances, then move to the next effect type:
This ensures only one effect type exists globally at any time, matching the SDK's single-GPU design. Intermediate results are stored in CPU tensors between phases.
Performance cost: ~1-2s fixed overhead per run (3× instance creation/TensorRT engine loading instead of 1×), plus 2× additional CPU↔GPU data transfer for intermediate frames. For small frames (e.g., 428×240) and 150+ frame batches, the overhead is modest (~5-10% of total processing time).
Tested Confirmation