- image
- image
- meta
Let's get the elephant in the name out of the way first: this is a downscale-only node. There is no matching upscale half in this pack. That sounds backwards for a tool built around Invertible Image Rescaling (IRN), but the pitch is simple - a smarter downscale is the half of the equation that keeps more of your image alive, so whatever upscaler you feed later has more to work with.
The idea behind IRN comes from the "Invertible Image Rescaling" paper (ECCV 2020, the BasicSR lineage). A normal bicubic or area downscale just throws away the high-frequency detail that doesn't fit. IRN instead uses an invertible neural network - Haar downsampling plus a stack of invertible blocks, which is exactly what the vendored InvRescaleNet in this pack is - to learn a downscale that hides the lost detail inside extra latent channels. Because the operation is mathematically invertible, the downscaled image keeps more recoverable information than any fixed filter can. The visible result: a downscale that looks sharper and less "mushy" than bicubic at the same size.
So who actually reaches for this? Two real camps. First, anyone doing the "downscale a soft source before upscaling it" trick - the one Comfy Org's own SeedVR2 handbook recommends, where you drop a soft 4K image to ~0.35 megapixels so the upscaler rebuilds from a sharper-relative base. If you're already pre-downscaling, IRN is a strictly better way to pick what survives that step. Second, people shaving VRAM: feeding a batch of big images through a limited card at reduced size is a classic, and doing it with IRN instead of ImageScale costs you less of the frame.
The inputs that actually matter
Only three are required:
image- a standard IMAGE tensor. Wire it from your loader, VAE decode, or whatever produced the frame.model_key- leave it onauto_best_matchand it picksIRN_x{scale}for you (downloading it if missing), falling back to the builtin filter if the model can't be found. The dropdown also listsIRN_x2,IRN_x3,IRN_x4, any.pt/.pthyou drop in~/ComfyUI/models/invertible_rescale, andbuiltin_bicubic.scale- 2, 3, or 4. Don't set it to 5: only 2/3/4 have official models, so anything else silently resolves to the builtin.
The optional stack is mostly "set and forget." tile_size (default 0 = off) tiles the inference so low-VRAM cards can run x4 without dying; crank it down to 512–1024 if you're on 4–6GB. not_divisible_mode handles widths that don't divide cleanly - pad is the safe default, and it's why you never get the "shape mismatch" error bicubic paths love to throw. precision defaults to fp16, device to auto. keep_alpha (default on) downscales the alpha channel with area and reattaches it, which is a thoughtful touch if you're running RGBA through the pipeline.
Outputs are image and a meta DICT. Check meta when something looks off: it reports which model was actually used, whether it fell back to builtin, and any load error. That last bit is the entire troubleshooting story, honestly.
Install
Through ComfyUI Manager, search ComfyUI-DownscaleIRN and install. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/alibof96/ComfyUI-DownscaleIRN
# then restart ComfyUI
Its requirements.txt is just torch, torchvision, gdown. The first two you already have; gdown is the only real dependency and the node will try to pip-install it on its own if it's missing. Models auto-download from the official Google Drive folder to ~/ComfyUI/models/invertible_rescale - no manual model hunt.
Where people get burned
Google Drive quota. The auto-download relies on gdown pulling from a shared Drive folder, and Drive throttles popular files ("Too many users have viewed…"). The node degrades gracefully - it just falls back to builtin bicubic - but it'll do that silently, so check meta.model_used if your "IRN" downscale looks suspiciously like plain bicubic. The fix is in model_registry.json: set a direct URL (plus SHA256) for each model and the node downloads from there instead.
The import-error dead end. If the node shows up as a "load error" node telling you to check the console, it's almost always one of three things: the folder got moved mid-install, requirements.txt was installed into the wrong Python env, or the repo is stale. pip install -r requirements.txt into the same environment ComfyUI uses, restart, and it clears.
The honest framing: this is a niche, research-grade utility - barely on the community's radar compared to the SeedVR2s of the world, and most people do the same job with bicubic without noticing. But if you're already downscaling and want the last few percent of detail retention, it's a one-node upgrade that never hard-fails. There are worse things to spend a custom node on.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| model_key | COMBO | auto_best_match | 5 options: builtin_bicubic, auto_best_match, IRN_x2, IRN_x3, IRN_x4 |
| scale | INT | 42–8 | — |
| deviceopt | COMBO | auto | 4 options: auto, cuda, cpu, mps |
| precisionopt | COMBO | fp16 | 3 options: fp16, bf16, fp32 |
| tile_sizeopt | INT | 00–8192 | — |
| tile_overlapopt | INT | 160–512 | — |
| not_divisible_modeopt | COMBO | pad | 3 options: pad, crop, resize_to_multiple |
| builtin_modeopt | COMBO | bicubic | 2 options: bicubic, area |
| keep_alphaopt | BOOLEAN | true | — |
| auto_download_selectedopt | BOOLEAN | true | — |
| auto_download_allopt | BOOLEAN | false | — |
| use_google_driveopt | BOOLEAN | true | — |
| models_dir_overrideopt | STRING | — | |
| verboseopt | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| meta | DICT | — |