Nodes/FM_nodes/RealViFormer Video SR
ComfyUI Node

RealViFormer Video SR

4x video super-resolution with RealViFormer — one model, whole clips at once

By FuouM·Created 2 years ago·Updated about a year ago· 9
RealViFormer Video SR
  • src_video
  • res_video
interval50

Video super-resolution in ComfyUI is usually a tile-and-stitch ordeal with ESRGAN-type image models applied frame by frame - which flickers, because each frame is processed in isolation and the model invents slightly different detail every time. RealViFormerSR is different: it's a video super-resolution model, so it looks at a sliding window of frames together and produces consistent detail across them. Feed it a clip as an IMAGE batch and you get a 4x result that holds together temporally instead of shimmering. For old 480p footage, that's the whole ballgame.

How it works

RealViFormer comes from the paper Investigating Attention for Real-World Video Super-Resolution (Yuehan717, 2024). It's a transformer-based video SR architecture: it aligns frames with a lightweight optical-flow subnetwork (SPyNet-style), then runs attention across both spatial and temporal dimensions, with a masked-attention scheme to keep the real-world degradation handling honest. In this wrapper it's wrapped up into one node that takes a batch of frames, pads to model-friendly dimensions, and outputs each frame at 4x - the internals use pixel-shuffle upsampling, and the code handles chunking internally so you can run a clip longer than the model's context window.

The inputs that matter

  • src_video - the clip, as an IMAGE tensor (which is how ComfyUI represents video frames - load a video with VHS or similar and you get a batch of frames).
  • interval - how many frames get fed to the model in one chunk (default 50). This is your VRAM dial: lower it if the model runs out of memory on long clips. The author's own workflow uses 20, which is a safer starting point on mid-range cards than the default.

The res_video output is the upscaled clip - same frame count, every frame 4x the input dimensions. Save it with a video output node.

Installing it

FM_nodes via ComfyUI Manager (search FM_nodes) or:

cd ComfyUI/custom_nodes
git clone https://github.com/FuouM/FM_nodes

then restart. Requirements are just torch and einops; no keys. The single weight file weights.pth comes from the RealViFormer repo's usage section and goes to custom_nodes/FM_nodes/models/realviformer/weights.pth. It's one file - refreshing after the ConvIR family's model museum - but it's still a manual download; the node won't fetch it for you.

Where people get burned

VRAM is the main one: the model loads the whole chunk onto the GPU, and the default interval of 50 on a 1080p clip can blow past what a 8GB card holds. Drop interval to 20 or below rather than fighting it. Also remember the input is a batch of frames - if you feed a single image you'll get a 4x image back, not a video, which is fine but not the point. And manage expectations on genuinely wrecked sources: real-world SR models are trained on realistic degradation, not JPEG-armageddon, so extremely compressed footage comes back cleaner but not miracle-grade. For decent-but-small footage, though, this is one of the few nodes in its niche that produces temporally stable video upscales in a single pass.

CategoryFM_nodes

Inputs (2)

NameTypeDefaultDescription
src_videoIMAGE
intervalINT50

Outputs (1)

NameTypeDescription
res_videoIMAGE