Upscale Model Loader with Filename
Upscale, and stop guessing which output came from which model
- upscale_model
- model_name_clean
- image_filename_prefix
- video_filename_prefix
Upscale Model Loader with Filename is the boring ComfyUI UpscaleModelLoader you already know, with one addition that fixes a very real annoyance: it also hands you a ready-made filename prefix containing the upscaler's name.
Here's the problem it solves. You're testing upscalers - the KB's upscaling guide is basically one long argument that "which upscaler" is three different questions, and everyone ends up side-by-side-ing a couple of ESRGAN variants like 4x-UltraSharp against RealESRGAN_x4plus_anime_6B. Do that for an afternoon with ComfyUI's default Save Image and you get forty files all named ComfyUI_00042_.png, and no way to tell which was which. This node names the output after the model, so the file literally tells you.
How it works
Peek at the source and it's honest work: model_name is a dropdown fed from models/upscale_models, the model loads through spandrel's ModelLoader exactly like the built-in node (including the module. prefix compatibility for weird checkpoints, and the CoreModelPatcher wrapper ComfyUI 0.30+ expects). So it's a drop-in swap - you lose nothing by replacing the stock loader with this one.
Then it does three string operations. model_name_clean strips the extension and replaces anything outside A-Za-z0-9._- with an underscore. The two prefixes are just image_base + _ + clean name, and video_base + _ + clean name. Folder-style prefixes survive, so RealESRGAN_x4plus.pth becomes RealESRGAN_x4plus, UpscalerFilename/Image_RealESRGAN_x4plus, and UpscalerFilename/Video_RealESRGAN_x4plus. Empty names fall back to upscaler, so it can't crash on a weird filename.
The inputs and outputs that matter
You really only set one thing:
model_name- the upscaler, from yourmodels/upscale_modelsfolder. This is the whole point.image_baseandvideo_base- text prefixes, defaulting toUpscalerFilename/ImageandUpscalerFilename/Video. The tooltip is the author's own word: the model name is appended automatically. Leave them unless you want a different folder structure.
Outputs:
upscale_model- the UPSCALE_MODEL, wired intoImageUpscaleWithModellike any other loader.model_name_clean- the sanitized model name, if you want it in a filename yourself.image_filename_prefix/video_filename_prefix- the strings you feed into thefilename_prefixinputs ofSave ImageandVHS Video Combine.
Installing it
Through ComfyUI Manager, search "Upscaler Filename" and install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/giusparsifal/ComfyUI-Upscaler-Filename.git
Restart ComfyUI. The pyproject.toml declares zero dependencies - it rides on spandrel, which ComfyUI already ships - so there are no model files to download beyond the upscaler you're already using.
Using it
- Add the node, pick your upscaler.
- Wire
upscale_modelintoImageUpscaleWithModel. - Right-click the
filename_prefixwidget onSave Image(orVHS Video Combine) and choose Convert widget to input. - Connect
image_filename_prefixorvideo_filename_prefixto the new input.
Change the upscaler in the dropdown and the saved filenames change with it. No prompt edits, no remembering.
Where people get bitten
Two small traps. First, that slash in the default prefix is a subfolder, so your files land in output/UpscalerFilename/Image_RealESRGAN_x4plus_00001_.png. That's usually what you want for A/B testing - change image_base if it isn't. Second, converting the widget on Save Image removes the text box, so if you convert and don't actually wire the string, you're saving under an empty prefix. Convert only when you're ready to connect.
One more honest note: the video prefix only pays off if you have VideoHelperSuite (VHS) installed to actually save video - this pack doesn't install it for you. And yes, a purist will point out that filename_prefix already supports %NodeName.widget% templating - but there's no stock node that exposes "the name of the loaded upscaler," which is exactly the gap this fills.
For a single-purpose utility it's well-made, zero-risk, and the exact thing you want when the upscale comparison starts to blur. Reach for it.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | 0 options: | |
| image_base | STRING | UpscalerFilename/Image | Base prefix for image outputs. The model name will be appended automatically. |
| video_base | STRING | UpscalerFilename/Video | Base prefix for video outputs. The model name will be appended automatically. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| upscale_model | UPSCALE_MODEL | — |
| model_name_clean | STRING | — |
| image_filename_prefix | STRING | — |
| video_filename_prefix | STRING | — |