🔎APISR ModelLoader
The boring loader that decides whether your anime upscale works
- pipe
Every APISR workflow starts here. This node does nothing glamorous - it reads a model file from disk and hands it to the upscale node as a pipe - but it's also the most common place for things to quietly break, because of one quirk the README buries: it only accepts two model files, and they must have exactly the right names.
What it loads
The dropdown is populated from whatever .pth files are sitting in ComfyUI/models/apisr. So far so normal. Then the loader does something stricter than you'd expect - it compares the filename against two exact strings:
2x_APISR_RRDB_GAN_generator.pth- the 2x model, an RRDB architecture (Real-ESRGAN's residual dense blocks, so a familiar, proven backbone).4x_APISR_GRL_GAN_generator.pth- the 4x model, a transformer-based GRL architecture. This is the flagship one; the APISR paper's anime-aware degradation pipeline lives here.
Anything else in that folder - a renamed file, a community-tuned variant, a DAT checkpoint - raises an error rather than loading. That's the gotcha: a drop-in folder that looks like it should work, with a loader that has an allowlist.
The output is a single pipe of the custom APISRMODEL type. That type only plugs into this pack's own 🔎APISR and 🔎APISR Lterative nodes - you can't mix it into someone else's upscale workflow, which is the standard criticism of ZHO's node style. The upside is that this isn't a diffusers pipeline pretending to be ComfyUI-native; it's a fast GAN that runs in seconds on a single image.
Install (models, the part that trips people)
The node installs like any pack:
cd ComfyUI/custom_nodes
git clone https://github.com/ZHO-ZHO-ZHO/ComfyUI-APISR
cd ComfyUI-APISR
pip install -r requirements.txt
(Or just search "APISR" in ComfyUI Manager and click install.) Restart, and then you have to fetch the weights yourself - there's no auto-download. From the README's HuggingFace links:
cd ComfyUI/models/apisr
wget https://huggingface.co/camenduru/APISR/resolve/main/2x_APISR_RRDB_GAN_generator.pth
wget https://huggingface.co/camenduru/APISR/resolve/main/4x_APISR_GRL_GAN_generator.pth
The models/apisr folder doesn't exist until the pack creates it on first launch, so if the dropdown comes up empty, that's your cue that either the folder is missing or the filename has an extra character. Keep the names byte-for-byte identical to the links above.
Troubleshooting
- Empty dropdown. No files in
models/apisr, or the files don't have.pth/.safetensors-style extensions ComfyUI recognizes. Copy the two weights in and refresh. - "Error" on selection. You picked a file that isn't one of the two exact names. Rename it, or delete the extra model.
- Pack fails to import at startup with an error mentioning
cv2oromegaconf. Therequirements.txtlists onlytimmandfairscale, but the architecture code importsopencv-pythonandomegaconfat load time.pip install opencv-python omegaconf, restart.
Once the dropdown shows the two official weights, this node becomes invisible - wire pipe into an upscale node, pick the 4x model for quality or the 2x one for speed, and you're done.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| apisr_model | COMBO | 0 options: |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| pipe | APISRMODEL | — |