When running Video Upscale 4K in Pro mode (this also affects the Quick/Enhance image modes, which share the same worker), the ONNX Runtime Web session is created successfully with the webgpu execution provider and a real GPU adapter is confirmed available — but inference throws on a Clip node during the actual run:
[E:onnxruntime:, sequential_executor.cc:572 ExecuteKernel] Non-zero status code returned while running Clip node. Name:'/Clip' Status Message: Failed to run JSEP kernel
pro-worker.js's per-strategy try/catch swallows this exception and silently retries with wasm, so the app reports [WASM] as the active backend with no visible indication that WebGPU was attempted and failed. The "WebGPU ready" badge in the top-right corner is unaffected by this — it only reflects a one-time navigator.gpu.requestAdapter() check on the main thread at page load and never reflects what actually happens inside the worker on a given run.
To reproduce
- Confirm
await navigator.gpu.requestAdapter() resolves to a real GPUAdapter in DevTools console (i.e. WebGPU genuinely works in this browser).
- Start a Pro mode video upscale (or Quick/Enhance image upscale).
- Open DevTools Console — the ORT warning/error above appears.
- Check the progress label — it shows
[WASM], never [WEBGPU].
Expected behavior
Either WebGPU inference succeeds, or — if a fallback is genuinely necessary — the fallback and its cause are surfaced somewhere visible (at minimum a console.warn) instead of being caught and hidden silently.
Environment
- OS: Windows 10/11 (desktop build)
- NextGenUp version: 1.2.0
- Browser/webview: WebView2, [your Chrome/Edge version here]
- GPU: [your GPU model here]
- Pinned onnxruntime-web version (in
pro-worker.js): 1.21.0, loaded from jsDelivr
Likely cause
This matches a known category of upstream ONNX Runtime Web WebGPU/JSEP bugs, where specific operators fail at runtime on certain model graphs even though session creation succeeds. A near-identical Clip/JSEP failure was reported against a different super-resolution model on onnxruntime-web 1.17.0 (microsoft/onnxruntime#19402) — the same model ran fine on wasm but never worked on webgpu. It's likely the Clip node in realesr-general-x4v3.onnx (probably the final 0–1 pixel clamp) combined with the pinned onnxruntime-web release.
Suggested fixes
- Try bumping the pinned
onnxruntime-web version in pro-worker.js to a newer release to see if this specific Clip/JSEP kernel issue has been fixed upstream.
- Alternatively, re-export the ONNX model with the final clamp done as
Min+Max instead of Clip, or move the clamp into JS after session.run() rather than inside the graph.
- At minimum, add
console.warn(err) in the strategy-loop catch block in pro-worker.js so this failure is visible in the console instead of only showing up as an unexplained [WASM] label.
When running Video Upscale 4K in Pro mode (this also affects the Quick/Enhance image modes, which share the same worker), the ONNX Runtime Web session is created successfully with the
webgpuexecution provider and a real GPU adapter is confirmed available — but inference throws on aClipnode during the actual run:[E:onnxruntime:, sequential_executor.cc:572 ExecuteKernel] Non-zero status code returned while running Clip node. Name:'/Clip' Status Message: Failed to run JSEP kernel
pro-worker.js's per-strategy try/catch swallows this exception and silently retries withwasm, so the app reports[WASM]as the active backend with no visible indication that WebGPU was attempted and failed. The "WebGPU ready" badge in the top-right corner is unaffected by this — it only reflects a one-timenavigator.gpu.requestAdapter()check on the main thread at page load and never reflects what actually happens inside the worker on a given run.To reproduce
await navigator.gpu.requestAdapter()resolves to a realGPUAdapterin DevTools console (i.e. WebGPU genuinely works in this browser).[WASM], never[WEBGPU].Expected behavior
Either WebGPU inference succeeds, or — if a fallback is genuinely necessary — the fallback and its cause are surfaced somewhere visible (at minimum a
console.warn) instead of being caught and hidden silently.Environment
pro-worker.js): 1.21.0, loaded from jsDelivrLikely cause
This matches a known category of upstream ONNX Runtime Web WebGPU/JSEP bugs, where specific operators fail at runtime on certain model graphs even though session creation succeeds. A near-identical
Clip/JSEP failure was reported against a different super-resolution model on onnxruntime-web 1.17.0 (microsoft/onnxruntime#19402) — the same model ran fine onwasmbut never worked onwebgpu. It's likely theClipnode inrealesr-general-x4v3.onnx(probably the final 0–1 pixel clamp) combined with the pinned onnxruntime-web release.Suggested fixes
onnxruntime-webversion inpro-worker.jsto a newer release to see if this specificClip/JSEP kernel issue has been fixed upstream.Min+Maxinstead ofClip, or move the clamp into JS aftersession.run()rather than inside the graph.console.warn(err)in the strategy-loopcatchblock inpro-worker.jsso this failure is visible in the console instead of only showing up as an unexplained[WASM]label.