UpscaleModelName
Name the Upscaler, Wire the Name Into Your Filenames
- model_name
Upscaling is the step everyone runs and nobody remembers the details of. You dropped 4x-UltraSharp.pth into an Ultimate SD Upscale pass, the image came out great, and three weeks later you can't tell whether that sharpness came from the model or the tile overlap. UpscaleModelName (class UpscaleModelName) is the tiny utility that fixes the forgetting: a dropdown of every upscale model in your models/upscale_models folder, and its only output is the name you selected, as a string.
Same pattern as the pack's other name nodes: the upscaler loader gives you an UPSCALE_MODEL object, not a filename, so when you want the name as text - in an output filename, a metadata string, or a log - you'd otherwise retype it. Wire this node into a String Format template, and your saved files start carrying the upscaler's name automatically. Compare two upscalers across a batch and your filenames tell you which is which without you keeping notes.
Mechanically it's the same trivial enum-plus-return as the rest of the family: the dropdown comes from folder_paths.get_filename_list("upscale_models"), and the output is typed * so it plugs into any text-accepting socket.
The inputs that matter
model_name- the dropdown of upscale models inmodels/upscale_models. That's the entire input list.
Output: model_name, the selected file as a string (e.g. 4x-UltraSharp.pth).
Where it fits
This node shines in the upscaling workflows the KB's upscaling doc covers - the tiled, two-pass setups where the choice of upscaler genuinely changes the result and you want that choice recorded. Pair it with the pack's String Format node to build a save prefix like {model}_{upscaler}_x4 and suddenly every output file is self-documenting. It also belongs to the pack's matching set - LoraName, UNETName, VAEName, CLIPName, ControlNetName all work identically - so if you've used one, you know this one cold.
One small gotcha: the dropdown lists whatever is in upscale_models, so if your ESRGAN-style .pth isn't there, that's a folder question, not a node question. And remember it's a name node, not a loader - it doesn't prepare anything for sampling; pair it with your actual upscale node and use its string downstream.
Installing it
Part of lhaoyun6/ComfyUI-lhyNodes. Install via ComfyUI Manager by searching for lhyNodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/lihaoyun6/ComfyUI-lhyNodes.git
python -m pip install -r ComfyUI-lhyNodes/requirements.txt
Restart ComfyUI. The pack's shared requirements are ultralytics, opencv-python, numpy, and yarl; no models or downloads needed.
If you've ever lost track of which upscaler you used, this is the one-line fix. It's boring, it's tiny, and it's exactly the kind of node you appreciate the first time it saves you from guessing.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | 0 options: |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model_name | * | — |