Select Diffusion Model
CKPT_NAME and UNET_NAME, Both Fed
- CKPT_NAME
- UNET_NAME
If you've built a workflow around rgthree's Context nodes, you've met this annoyance: the context bundle wants a ckpt_name and a unet_name, and if you're running a diffusion model as a separate UNET file, you want them to be the same file under two different labels. MarSelectDiffusionModel does exactly that - one dropdown, and the filename comes out both ways.
This is a routing node in the purest sense: it loads nothing, converts nothing, and touches no pixels. Its whole existence is to feed a filename into nodes that expect it under a particular socket name. For the model-testing workflow this pack was built around, where you swap diffusion models constantly while comparing outputs, being able to point a single dropdown at both context slots is a genuine time-saver - one change instead of two, and no chance the names drift apart.
How it works
The input unet_name is populated from folder_paths.get_filename_list("diffusion_models"), which in current ComfyUI covers both models/diffusion_models and models/unet. Pick a file and the node's single function returns that same string twice: once labeled CKPT_NAME and once labeled UNET_NAME, both typed * so they'll mate with wildcard and combo inputs.
That's it. Two outputs, identical content, different labels. The downstream loader - the rgthree context node, a UNET loader, whatever the graph is built around - does the actual heavy lifting.
The two outputs
CKPT_NAME(*) - the filename for sockets that expect a checkpoint-style name, like theckpt_nameinput on anRGTHREE_CONTEXTnode.UNET_NAME(*) - the same filename for sockets expecting a UNET/diffusion name.
If you only need the checkpoint-named output, this pack's MarUNetNameToCKPTName is the leaner version with a single output. This one is for the common case where the context wants both.
Installing it
Part of MarwanDSAI/comfyui-mdsnodes. ComfyUI Manager: search "ComfyUI-MDSNodes", install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/MarwanDSAI/comfyui-mdsnodes
Restart after either route. No pip install - the pack's requirements.txt is empty and it declares zero dependencies.
Gotchas
The dropdown is fed from diffusion_models, so checkpoints in models/checkpoints won't appear - if you're loading a merged checkpoint rather than a separate UNET, this isn't the node you want. And because both outputs are wildcards, they won't connect to strictly-typed STRING sockets; if you need the name as plain text for metadata or a save filename, route it through a Convert to String style node first. Beyond that there's nothing to trip over: pick a file, both sockets get fed, done.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| unet_name | COMBO | Select the diffusion / UNET model file whose filename you want to extract. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| CKPT_NAME | * | The selected model filename passed forward as CKPT_NAME (wildcard/string). |
| UNET_NAME | * | The selected model filename passed forward as UNET_NAME (wildcard/string). |