Upscaler Filename
A ComfyUI custom node that names saved outputs after the selected upscale model.
ComfyUI-Upscaler-Filename
A small utility custom node for ComfyUI that loads an upscale model and automatically generates clean filename prefixes based on the selected upscaler name.
It is useful when testing multiple upscalers because saved images and videos can be named after the model used, avoiding confusion between outputs.
Node
Upscale Model Loader with Filename
The node behaves like an upscale model loader, but also outputs strings that can be connected to filename fields.
Inputs
| Input | Description |
|---|---|
| model_name | Upscale model from models/upscale_models |
| image_base | Base output prefix for images |
| video_base | Base output prefix for videos |
Outputs
| Output | Description |
|---|---|
| upscale_model | Connect to ImageUpscaleWithModel |
| model_name_clean | Sanitized model filename without extension |
| image_filename_prefix | Prefix for Save Image |
| video_filename_prefix | Prefix for VHS Video Combine or compatible video save nodes |
Example:
RealESRGAN_x4plus.pth
becomes:
RealESRGAN_x4plus
UpscalerFilename/Image_RealESRGAN_x4plus
UpscalerFilename/Video_RealESRGAN_x4plus
Installation
Manual install
- Download this repository as a ZIP.
- Extract it into your ComfyUI custom nodes folder:
ComfyUI/custom_nodes/ComfyUI-Upscaler-Filename/
- Restart ComfyUI.
Git install
From your ComfyUI custom_nodes folder:
git clone https://github.com/giusparsifal/ComfyUI-Upscaler-Filename.git
Then restart ComfyUI.
Usage
- Add Upscale Model Loader with Filename.
- Choose your upscale model.
- Connect
upscale_modeltoImageUpscaleWithModel. - Convert the
filename_prefixwidget ofSave ImageorVHS Video Combineto an input. - Connect:
image_filename_prefixtoSave Image / filename_prefixvideo_filename_prefixtoVHS Video Combine / filename_prefix
Now, when you change the selected upscaler, the output filename prefix changes automatically.
Notes
- The node sanitizes model names so they are safe for filenames.
- It removes the model extension, such as
.pthor.safetensors. - It preserves folder-style prefixes, for example
UpscalerFilename/Image. - No external dependencies are required beyond ComfyUI's normal upscale model dependencies.
Example workflow
See example_workflows/upscaler_filename_example.json.
License
MIT License. See LICENSE.