Upscale node (ONNX)
The first upscale takes half an hour. The rest take seconds — Remacri on ONNX, explained
- image
- upsampled
If you've ever asked "which upscaler should I use" and gotten a wall of arguments, it's because the word covers three different jobs. This node does the unglamorous one: more pixels, not more detail. Remacri is an ESRGAN-family 4x model that turns a sharp image into a bigger sharp image. No invented pores, no rewritten faces, no diffusion pass per frame. It can't hallucinate because it doesn't generate anything - which is exactly why it's the right tool when your source is already clean and you just need it larger.
What this node adds over the usual ComfyUI UpscaleModelLoader + ImageUpscaleWithModel pair is that it runs Remacri through ONNX Runtime (onnxruntime-gpu), so you get to pick the execution backend: TensorRT, CUDA, ROCm, or CPU, with automatic fallback in that order. And it ships the model with it - the 71 MB 4x_foolhardy_Remacri.onnx is bundled in the repo's upscale_models/ folder. That's a real convenience, because the original Remacri weights have been scattered across mirrors ever since the author's original download link died in 2022. You don't have to track any of that down here.
How it works
Under the hood it's a session wrapper plus a resize. Each image in the batch gets converted to NCHW float, run through the ONNX session, and comes out 4x larger (Remacri is a 4x model - the "no downscaling" option is the model's native output). Then, if you asked for it, the result is hard-resized to a target resolution.
The interesting machinery is all in the TensorRT path. TensorRT needs an engine per input shape, so the first run at each resolution spends a long time benchmarking kernels - the README quotes 30 minutes for 1280×720 on a 5090. To make that pain one-time, the node keeps a per-resolution timing cache (trt_timing_cache_HxW.bin) and an engine cache, so the second run at the same resolution is near-instant. It also nukes both caches if your torch, CUDA, or onnxruntime version changes, since stale tactics would just break. If TensorRT isn't installed or has no VRAM headroom, it logs a message and keeps going on CUDA, then ROCm, then CPU.
The inputs that matter
- image - the IMAGE tensor. A video loaded as frames is just a batch here; each frame is processed independently.
- model_file - dropdown of
.onnxfiles found in ComfyUI'smodels/upscale_models/folders. It defaults to the bundled Remacri model once it's in the right place. - provider -
TensorrtExecutionProvider,CUDAExecutionProvider,ROCmExecutionProvider, orCPUExecutionProvider. Pick TensorRT for speed, CUDA if you don't want to sit through engine builds, CPU if you must. - final_resolution - and here's the trap. The options are
hd(1280×720),fhd(1920×1080),2k,4k,8k, orno downscaling, and they're all fixed 16:9 dimensions applied with a hard cv2.resize. A portrait or square image gets stretched to 1280×720, not scaled proportionally. Unless you're targeting broadcast-size 16:9 output, set this tono downscalingand resize yourself.
The output is a single upsampled IMAGE, ready to wire into Save Image, a VAE decode, or the next step of your pipeline. The node is marked as an output node, so it shows a preview too.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/Austat/ComfyUI-RemacriScale
cd ComfyUI-RemacriScale
pip install -r requirements.txt
It's also in ComfyUI Manager if you search "RemacriScale". Two gotchas before you restart: requirements.txt pulls onnxruntime-gpu (make sure it matches your CUDA version - the pip wheel can fight an existing torch build on Windows) and torch (fine, it'll reuse the one ComfyUI already has). And the bundled model sits in the repo's own upscale_models/ folder, but ComfyUI's dropdown reads from models/upscale_models/. Copy it over:
cp custom_nodes/ComfyUI-RemacriScale/upscale_models/*.onnx models/upscale_models/
Common issues
- Dropdown says "(no .onnx models found)" - that's this exact problem. The model isn't in
models/upscale_models/; the placeholder is what the file picker shows when it finds nothing. - First run looks hung for ages - that's the TensorRT engine build, not a freeze. It's one-time per resolution, then cached.
- Output looks squashed -
final_resolutionstretched a non-16:9 image to a fixed size. Switch tono downscaling. - TensorRT silently not used - check the console; the node falls back to CUDA and logs which provider it actually ended on.
- Everything recompiles after an update - expected, the cache is invalidated whenever torch/CUDA/onnxruntime versions change.
One note on the README's "upscale a video" framing: the input is an IMAGE batch, and frames are processed one at a time with no temporal logic. For a deterministic pixel upscaler that's usually fine - no shimmering the way generative per-frame upscalers cause - but it's not a video model. It's a niche tool, but for "make this sharp image bigger without any surprises," it's a solid, hallucination-free way to do it in ComfyUI. Keep no downscaling as your default and budget for that first TensorRT coffee break.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| model_file | COMBO | 1 options: (no .onnx models found) | |
| provider | COMBO | 4 options: TensorrtExecutionProvider, CUDAExecutionProvider, ROCmExecutionProvider, CPUExecutionProvider | |
| final_resolution | COMBO | 6 options: hd, fhd, 2k, 4k, 8k, no downscaling |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| upsampled | IMAGE | — |