Nodes/SnJake_Baikal_Swin_Anime/😎 Anime Upscale
ComfyUI Node

😎 Anime Upscale

The anime upscaler that actually does the work β€” tiling, AMP, and one fixed x2

By SnJakeΒ·Created 8 months agoΒ·Updated 27 days agoΒ· 0
😎 Anime Upscale
  • upscale_model_custom
  • image
  • image
β—„tile0β–Ί
β—„overlap16β–Ί
β—„ampautoβ–Ί
β—„deviceautoβ–Ί

SnJakeAnimeUpscaleInference (display name "😎 Anime Upscale") is the node that makes the pixels. It takes the model loaded by the pack's checkpoint loader, applies it to your image, and returns it at exactly 2Γ—. Not 4Γ—, not configurable - x2, fixed. That's actually the right call for a restoration model: the Baikal-Swin-Anime weights were trained to add one clean 2Γ— step, and chaining it twice beats asking it for one giant jump.

Where it fits

On the upscaling ladder from the KB, this is the "more detail / restoration" rung - but for flat art, not photos. RealESRGAN anime variants and 4x-AnimeSharp are the fast, no-surprise interpolation option; this is the heavier Swin-transformer restoration model trained on ~50k Danbooru2024 images that rewrites line work and cleans up soft edges. Use it when a source is soft, low-res, or slightly mushy and you want it back to crisp cell-shaded form. Don't use it on photographs - it's an anime model and it will happily anime-ify a face.

How it works

Mechanically it's straightforward under the hood: it moves the image to the chosen device as NCHW, runs the model in inference mode, clamps to 0–1, and returns a [B,H,W,C] tensor. Two things you'll actually feel:

  • Tiling. tile (default 0, disabled) splits large images into overlapping chunks, runs each, and blends them with weighted averaging so seams don't show. This is what keeps a big image from blowing your VRAM.
  • AMP. amp (auto/bf16/fp16/none) runs the pass in reduced precision. auto picks bf16 if your card supports it, else fp16. On a Swin net this is basically free speed; leave it on auto unless you're chasing artifacts.

The inputs that actually matter for a beginner:

  • upscale_model_custom - must come from the 😎 Anime Upscale Loader node. This is a custom ANIME_UPSCALE_MODEL type; a plain UPSCALE_MODEL from ComfyUI's built-in loader won't plug in.
  • image - your source. Must be 3-channel RGB; the node raises ValueError on anything else, so strip alpha before feeding it.
  • tile - 0 for small images; 256–512 for anything large, per the tooltip. Start at 256 if a big image OOMs.
  • overlap - tile overlap for smooth blending; the tooltip recommends 32–64 (note the default is 16, lower than recommended - bump it for big tiles).
  • amp and device - leave both on auto. device falls back to CPU if no CUDA, which will be slow but functional.

The one output, image, is your x2 result. Save it, feed it to a VAE, or chain it into a second pass for 4Γ—.

Install and first run

Same as the loader - it's one pack, one install:

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

(That requirements.txt is a single line: huggingface_hub.) Or install via ComfyUI Manager, then restart. On the first run the loader auto-downloads the weights to ComfyUI/models/anime_upscale/; if that download stalls, grab the .safetensors from SnJake/Baikal-Swin-Anime manually and drop it in the same folder.

Troubleshooting

Most failures here are wiring, not physics:

  • "Upscale model is missing." You fed something that isn't the custom ANIME_UPSCALE_MODEL output from SnJake's own loader. Fix the connection, not the node.
  • "expects 3-channel RGB images." Your image has an alpha channel or is grayscale. Run it through a Remove Background / RGB conversion node first.
  • Crunchy edges or noise. The model is explicitly experimental. The V1 checkpoint had edge-noise artifacts (V2 fixed them), and the V3.1 ..._x2_v31.safetensors is the author's "current best." If you're on an old weights_name in the loader, that's your first suspect.
  • First-run freeze. It's downloading the checkpoint over the network. Watch the console; it prints the download progress there.

This pack has almost no community footprint yet, so you're partly in uncharted territory - but the workflow is genuinely only two nodes long. Loader β†’ Anime Upscale β†’ Save, and you're done.

Category😎 SnJake/Upscale

Inputs (6)

NameTypeDefaultDescription
upscale_model_customANIME_UPSCALE_MODELβ€”
imageIMAGEβ€”
tileINT00–4096Recommended tile size: 256-512 (0 disables tiling).
overlapINT160–1024Recommended overlap: 32-64.
ampCOMBOauto4 options: auto, bf16, fp16, none
deviceCOMBOauto3 options: auto, cuda, cpu

Outputs (1)

NameTypeDescription
imageIMAGEβ€”