SLM: Model Selector
One model today, but a clean pattern for when there are more
- slm_model
- model_path
SLMModelSelector ("SLM: Model Selector") is the loader half of the pack's text-model side. You pick a model, a device and a dtype, and it hands the SLM generator a ready-to-use SLM_MODEL object plus the local path where the model lives. The generator doesn't care where the weights came from - it just consumes that object.
Right now there's exactly one choice in the model dropdown: Qwen3-0.6B, the 0.6-billion-parameter member of the Qwen3 family. That's a genuinely small model - the kind that runs comfortably on CPU-adjacent hardware and in a few gigabytes of VRAM. Calling the node a "selector" is a little generous when the menu has one item, but the pattern is the point: add entries to the pack's model table and this node picks them up.
How it works
The node does three things on execution:
- Resolves the path. Models download into the pack's own
Models/SLM/folder (inside the custom node directory), named with the HF repo slug's/swapped for__- soQwen/Qwen3-0.6BbecomesModels/SLM/Qwen__Qwen3-0.6B. - Downloads if missing. If the folder is empty and
download_if_missingis on (it is by default), it pulls the repo from Hugging Face viasnapshot_download. That first run can take a while depending on your connection. - Resolves device and dtype into the model dict.
deviceauto-pickscudawhen a GPU is available, elsecpu.dtypeauto becomesbfloat16on a bf16-capable GPU,float16otherwise, andfloat32on CPU.
The inputs that matter
- model - the enum; currently just
Qwen3-0.6B. - device -
auto(default),cuda, orcpu. - dtype -
auto(default),bfloat16,float16, orfloat32. - download_if_missing - on by default. Turn it off and the node errors instead of downloading when weights are absent.
Two outputs: slm_model (the SLM_MODEL object) and model_path (the local folder as a STRING, handy for a display node or if you want to know where the gigabytes went).
Install
Part of the comfyui_pilcothink_VisionSLM pack:
cd ComfyUI/custom_nodes
git clone https://github.com/gpdev-Pilcothink/comfyui_pilcothink_VisionSLM
Restart ComfyUI, or install via ComfyUI Manager (search comfyui_pilcothink_VisionSLM). The pack needs transformers ≥ 4.56.2 for Qwen3 support, plus torch and accelerate from its requirements.
Gotchas
The big one is where the weights land: inside the custom node folder, not ComfyUI/models/. Uninstalling or updating the pack can take your downloaded models with it. If you want to move them, you can - the folder layout is self-contained, so a symlink from Models/SLM to a big disk works.
Two more from the README. If you pick cpu as the device, the author says it only works with float16; other dtypes error out, so don't fight it, just set it. And the README's "downloads into Models/SLM_Vision/" is stale - the code actually uses Models/SLM for this node and Models/VisionSLM for the vision one. Trust the code. As with the rest of this pack, it's new with no community track record, so grab it from the official repo only.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | Qwen3-0.6B | 1 options: Qwen3-0.6B |
| device | COMBO | auto | 3 options: auto, cuda, cpu |
| dtype | COMBO | auto | 4 options: auto, bfloat16, float16, float32 |
| download_if_missing | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| slm_model | SLM_MODEL | — |
| model_path | STRING | — |