Nodes/ComfyUI-RGT/RGT_Upscale
ComfyUI Node

RGT_Upscale

The fast transformer upscaler that redraws nothing

By viperyl·Created 2 years ago·Updated 2 years ago· 8
RGT_Upscale
  • image
  • IMAGE
model_type
upscale
use_chop

RGT_Upscale runs the Recursive Generalization Transformer, a 2023 super-resolution paper (arXiv 2303.06373), as a single ComfyUI node. If you've been living in the SeedVR2/SUPIR world, this is the other side of the upscaling ladder: it doesn't generate detail, it reconstructs it. Feed it a clean image and you get a crisp, faithful upscale that keeps the subject exactly as-is - no rewritten faces, no contrast lift, no "human to lizard" moments. On clean sources that's a feature, not a downgrade.

Where it actually sits: the classic-SR rung between plain ESRGAN models and the diffusion restorers. It beats the older ESRGAN community models at fine texture and structure (that's what the transformer attention buys you), and it's dramatically cheaper than SeedVR2 - milliseconds-to-seconds instead of minutes. What it will never do is invent detail that isn't in the source, so don't point it at a blurry 512px render expecting magic. Use it when you have a decent image that just needs to be bigger and sharper, without paying the generative-rewrite tax.

How it works

The underlying RGT model is a transformer built from the same family as CAT and HAT - the code is visibly descended from Zheng Chen's earlier CAT, with windowed attention, dynamic relative position bias, and a gated MLP. The "recursive generalization" trick is the interesting part: it generalizes attention from small windows to larger ones by reusing learned patterns, which is why a relatively small model holds up at x3 and x4 where older SR nets soften into mush. RGT and RGT_S are the same architecture; RGT is the full 8-stage stack, RGT_S is a pruned 6-stage variant for speed.

The use_chop toggle is where the VRAM battle is won. Enabled (the sane default), the node cuts the image into roughly 200px tiles with a 16px overlap, upscales each tile, then stitches them back with the overlaps shaved off - standard tiled SR, exactly the approach the multidiffusion/Ultimate SD Upscale crowd uses, minus the diffusion. It's slower but lets a 6GB card chew on large images. Disabled, the whole image goes through the model in one shot: faster on small inputs, guaranteed OOM on anything big.

Inputs and outputs

Four inputs, and only three of them are choices:

  • model_type - RGT or RGT_S. Take RGT unless you're speed-limited; the README says the same.
  • upscale - x2, x3, or x4. Each scale is a separate model file, so pick before you download.
  • use_chop - enable (tiled, VRAM-friendly) or disable (whole-image, faster, OOM-prone).
  • image - any IMAGE tensor. Wire this from whatever generated or loaded your picture.

Output is a single IMAGE at the scaled resolution, ready for Save Image or any downstream node. That's the whole node - one pack, one class.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/viperyl/ComfyUI-RGT.git
cd ComfyUI-RGT
pip install -r requirements.txt

You can also grab it by searching "ComfyUI-RGT" in ComfyUI Manager. Note what that requirements.txt actually contains: nothing - it's empty. The code needs timm, einops, opencv-python (cv2), and loguru; most ComfyUI installs already have torch and torchvision, but if the node refuses to register with a ModuleNotFoundError, pip install timm einops opencv-python loguru fixes it.

The part everyone forgets: the model weights. They're not bundled. Clone the author's HuggingFace repo into your models folder:

cd ComfyUI/models
git clone https://huggingface.co/ViperYX/RGT

The node expects models/RGT/<model_type>/<model_type>_<scale>.pth - so RGT/RGT_x4.pth, RGT_S/RGT_S_x2.pth, and so on. If you only downloaded the x4 weights and flip the node to x2, it'll fail with a missing-file error, not a graceful warning.

Where people get burned

  • Missing weights is the number one failure - the node runs, the console says FileNotFoundError, and the culprit is almost always skipping the HuggingFace download or putting it in the wrong subfolder.
  • use_chop off on a big image OOMs instantly. It's there for a reason; leave it enabled until you know your card's headroom.
  • Wrong expectations. RGT is a faithful upscaler, not a restorer. On genuinely damaged or soft sources it preserves the damage, where SeedVR2 or SUPIR would repair it. Match the tool to the job.

It's a niche pack - roughly zero community discussion, a handful of Google impressions - and the author's category name of 114514 is a Japanese internet meme number, which tells you the vibe. But if you want deterministic, identity-safe upscaling that's a clear step up from ESRGAN and a tenth of SeedVR2's cost, this is a quietly good single-node answer.

Category114514

Inputs (4)

NameTypeDefaultDescription
model_typeCOMBO2 options: RGT, RGT_S
upscaleCOMBO3 options: x2, x3, x4
use_chopCOMBO2 options: enable, disable
imageIMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE