🔎APISR Lterative
Same upscale, one frame at a time
- pipe
- image
- IMAGE
This is the low-VRAM sibling of the 🔎APISR node, and it exists for one reason spelled out in the README: the batch version feeds your whole video into the model at once, and long clips eat VRAM for breakfast. The Lterative node does the exact same upscaling, but loops over the batch one frame at a time. Same output quality, slower wall-clock speed, dramatically smaller memory footprint. If you've got a 6GB card and a 300-frame anime clip, this is the node you actually use.
(Yes, "Lterative" is a typo for "Iterative" that shipped in the class name and stuck. The node's fine.)
How it works
It takes the same inputs as its batch twin - pipe (the APISRMODEL from the ModelLoader), image, crop_for_4x (default true, trims dimensions down to a multiple of 4 so the 4x model doesn't misalign), and dtype (float32 / float16, the same VRAM-versus-fidelity knob). Pick float16 here first; on a memory-constrained box it's the difference between fitting and OOM, and line art doesn't show the loss.
The difference is internal: the batch node runs the tensor through the generator once; this one iterates over each frame, wraps every pass in torch.no_grad() so nothing accumulates gradients or held tensors, and collects the results. Output is a sequence of upscaled images, which wires into the same places a batch would - save nodes, or a Video Helper Suite Video Combine to stitch frames back into a clip.
A couple of practical notes for the video path. Because it's per-frame, a long clip turns into "start ComfyUI, go make tea, come back." That's the deal for low VRAM; on a roomier GPU the batch node is strictly faster and worth the switch. And the README flags a specific wiring gotcha: if you're feeding this output into Video Helper Suite, run it through ComfyUI's built-in Split Image with Alpha node first to strip the alpha channel - VHS's combine step chokes on it otherwise.
Install
Same pack as the rest, so if you already have the 🔎APISR nodes you have this one. Otherwise:
cd ComfyUI/custom_nodes
git clone https://github.com/ZHO-ZHO-ZHO/ComfyUI-APISR
cd ComfyUI-APISR
pip install -r requirements.txt
Or ComfyUI Manager, search "APISR". Restart, drop the two official model weights into ComfyUI/models/apisr (see the ModelLoader article - only 2x_APISR_RRDB_GAN_generator.pth and 4x_APISR_GRL_GAN_generator.pth load), and wire pipe from the loader into this node.
Troubleshooting
- Pack won't start, error mentions
cv2oromegaconf. The requirements file skips both, but the code imports them.pip install opencv-python omegaconfand restart. - Slow? Yes. That's the design, not a bug. If speed hurts, this is your sign to either batch it or split the video into shorter segments and run them separately.
- Still OOM on a huge batch. The per-frame loop helps, but if a single 4x frame at 1080p is already too much for
float32, dropdtypetofloat16before you blame the node.
It's not glamorous, but it's the version that makes APISR usable on hardware that isn't a datacenter GPU. And for a pack that's been unmaintained since 2024, that's a lot of goodwill to carry.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| pipe | APISRMODEL | — | |
| image | IMAGE | — | |
| crop_for_4x | BOOLEAN | true | — |
| dtype | COMBO | 2 options: float32, float16 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |