Introduction

The Super Resolution node upscales video frames with pre-trained models. The process leverages GPU acceleration through OpenCV compiled with CUDA support, ensuring exceptional speed ideal for real-time applications. When using workflows with base Stable Diffusion models optimized for 512x512, higher resolutions can compromise efficiency and FPS. In these scenarios, a dedicated super-resolution node allows upscaling without significantly affecting performance or quality.

Setup Method

Adding the Node

An example upscaling workflow using the Super Resolution node is available here.

1

Install the StreamPack Nodes

Ensure the StreamPack custom nodes are installed in your ComfyUI setup. Follow the installation instructions for a step-by-step guide.

2

Open the ComfyUI Graph Editor

Right-click on an empty area of the canvas and choose Add Node.

3

Find the Super Resolution Nodes

Search for SuperResolution under the StreamPack/ category.

4

Place it in the Workflow

There are two nodes under SuperResolution: SR Model Loader and SR Upscale. You need both to upscale, so place them on the canvas.

5

Connect Inputs and Configure Parameters

  • In SR Model Loader, you’ll see widgets to select the upscaling model and scale factor.
  • Connect the output of SR Model Loader to the input of SR Upscale.
  • In the SR Upscale node, toggle the use CUDA widget to true to enable CUDA acceleration.
  • Connect an image to the input of SR Upscale and a preview node to the output.

Minimal Super Resolution Node Implementation

Parameters

The following parameters control how the Super Resolution models behave:

SR Model Loader Node

model_type
string

Model Type: Select the upscaling model to use. The quality and performance vary by model. Models are downloaded and loaded automatically when selected in the canvas. Below is a basic comparison of the models.

ModelArchitectureFeaturesBest ForSpeedQuality
FSRCNN-smallLightweight CNNFast, minimal memory useReal-time processing, mobile★★★★★★★
FSRCNNCNN with larger featuresGood balance of speed/qualityGeneral purpose★★★★★★★
ESPCNSub-pixel convolutionsEfficient upscaling at endText/line drawings★★★★★★★
VDSRVery deep CNNBetter edge reconstructionDetailed images with edges★★★★★★★
LapSRNLaplacian pyramidProgressive upscalingSharp edges, details★★★★★★★
EDSRDeep residual networkMost parameters, best qualityMaximum detail★★★★★★★
scale_factor
integer

Scale Factor: Select the upscaling factor. The image will be upscaled by this factor. For example, if the input image is 512x512, the output will be 1024x1024 with a scale factor of 2.

SR Upscale Node

use_CUDA
boolean

Use CUDA: Toggle to true to enable CUDA acceleration for upscaling.

Strengths and Limitations

While the Super Resolution node offers significant performance benefits compared to other upscaling methods, it also introduces a few trade-offs depending on your use case.

Strengths

  • Wide suite of supported models – Option to choose from multiple models (FSRCNN, ESPCN, LapSRN, EDSR) with different quality/speed tradeoffs.
  • Modular Design – Once a model is loaded, it can be reused across multiple upscaling operations.
  • Fast performance via CUDA – Configurable CUDA acceleration for optimal performance.
  • Multiple Scale Factors – Support for 2x, 3x, and 4x upscaling.

Limitations

  • Setup Complexity – The node requires a version of OpenCV with CUDA support, which may require additional setup, since the CUDA is only available for NVIDIA GPUs, it will not work on other GPUs.

Acknowledgments