SR Upscale
The real-time upscaler that actually keeps up with a stream
- image
- sr_model
- upscaled_image
SR Upscale is the business half of the Stream Pack's upscaling pair: you load a model with SR Model Loader, feed it a frame, and it returns a 2–4x larger image fast enough to sit in a real-time graph. This is the "add pixels, add no new detail" kind of upscaling - classic CNN super-resolution (FSRCNN/ESPCN/EDSR/LapSRN/VDSR) running through OpenCV's dnn_superres, not a generative restorer. That's not a weakness, it's the point: in a streaming workflow, a per-frame generative upscaler would be a slideshow. This node trades the detail-invention you get from SeedVR2-class tools for the only thing that actually works live.
How it works
It's a thin wrapper around OpenCV's DNN super-resolution. The image arrives as a ComfyUI tensor (BHWC, float 0–1); the node converts it to OpenCV's HWC BGR uint8 format, calls model.upsample(), then converts back to a Comfy tensor so everything downstream keeps working. The use_cuda toggle picks the backend: on a CUDA build of OpenCV it sets DNN_BACKEND_CUDA, otherwise it falls back to CPU. The author's own SR README claims FSRCNN at 100+ FPS for 2x on an RTX 4090 (FSRCNN-small at 200+), which is exactly the regime a stream needs - though take those numbers as marketing-flavored.
The inputs that matter
Only three, and really only two you'll touch:
image- the frame to upscale. Any IMAGE-typed output in your graph.sr_model- theSR_MODELfrom SuperResolutionModelLoader. There's no default; this connection is mandatory.use_cuda-True/False, defaultTrue. If it'sTruebut you don't have a CUDA-enabled OpenCV, the node raises rather than silently falling back, so flip this toFalseunless you know your build is CUDA-capable.
Output: upscaled_image, an IMAGE ready for the VAE preview or the next node. It's marked as an output node, so you'll get a direct preview in the UI.
Installing
Ships in livepeer/ComfyUI-Stream-Pack - install the pack once via ComfyUI Manager (search "ComfyUI-Stream-Pack") or:
cd ComfyUI/custom_nodes
git clone https://github.com/livepeer/ComfyUI-Stream-Pack
# restart ComfyUI
The dependency that bites is opencv-contrib-python>=4.8.0 from the pack's requirements.txt - dnn_superres is only in the contrib build. And if you want the use_cuda path to actually work, plain pip OpenCV won't do it: a stock pip build has no CUDA backend. The pack's own prestartup_script.py checks for cv2.cuda at startup and warns when it's missing, and one of the Livepeer team literally said in a thread that they had to compile CUDA-enabled OpenCV to make super-resolution fast - so on Windows the realistic paths are a conda build (conda install -c conda-forge opencv cudatoolkit) or running with use_cuda=False.
Where people get burned
- It upscales one image at a time. Read the source: the conversion takes
image[0]when a batch dimension exists, so a multi-frame batch (say, a video) only upscales the first frame and returns a batch of one. For video you'll need to iterate frames into it individually, not dump a whole batch. use_cuda=Truewithout CUDA OpenCV = a hard error. That's by design in the source - install the right OpenCV or setFalse.- No detail hallucination, and no detail recovery. On an already-sharp source this is clean and fast; on a soft, low-res source it's just a larger soft image. That's correct behavior for an interpolator, and the wrong tool if what you actually wanted was a generative restore - the KB's upscaling taxonomy saves you that mistake before you make it.
- First run downloads the model. The loader fetches the
.pbon first use; the upscale node itself does no downloading, so a "file not found" error points at the loader, not here.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| sr_model | SR_MODEL | — | |
| use_cuda | COMBO | True | Whether to use CUDA for acceleration (requires CUDA-enabled OpenCV build) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| upscaled_image | IMAGE | — |