SLP Directory Contents
Turn any folder into a clickable list — including your loras
- STRING
SLP List View is great at picking from a list - but somebody has to build that list. SLP Directory Contents is the pack's answer: point it at a folder and it outputs the folder's contents as newline-separated text, which you feed straight into SLP List View's text input. Result: your loras folder (or prompt folder, or checkpoint folder) becomes a live, clickable menu with zero manual typing. It's the newest node in the pack, added in 1.3.1, and it closes the loop on "Get Lora List" by doing the same thing for any directory, on the backend, without a context-menu click.
How it works
Under the hood it's plain Python pathlib: it lists the target directory, sorts the entries, and joins them into one string. The important detail is IS_CHANGED, which always returns NaN - that tells ComfyUI the node's output never counts as "cached", so it re-reads the folder on every execution. Add a LoRA to the folder, re-run, and it shows up. No refresh button, no stale list.
The inputs you'll actually touch:
path(required STRING) - the folder to read. Absolute paths are the safe choice; relative paths resolve against wherever ComfyUI was launched.is_full_path(BOOLEAN, defaultTrue) - full absolute path per line, or just the filename. Flip toFalsewhen you want clean names.SLP_format(BOOLEAN, defaultFalse) - when on, output becomes#dict-formatted (name:pathper line), so the filename shows and the fuller value is what gets emitted.prefix(STRING) - prepended to every line, handy for rebuilding subfolder paths.
The README's example is the practical one: path = ComfyUI_models/loras/myLora, is_full_path = False, SLP_format = True, prefix = myLora/, and you get output ready for the SLP Lora Loader - relative folder/name paths, exactly what the loader expects.
The single STRING output carries the whole list; SLP List View renders it one line per entry.
Where people get tripped up
- Empty output, no error. If
pathisn't a real directory the node silently returns an empty string. There's no red badge telling you the folder name was wrong - double-check the path spelling and that it actually exists before assuming the node is broken. - Absolute vs relative. With
is_full_pathon you get machine-specific absolute paths (C:\...or/home/...), which is great for your own machine but litters workflow JSON with paths that won't exist for whoever downloads it. For shareable workflows, keep full paths off. - It's for directories. Point it at a file and you get the empty string treatment again. Folders only.
Install
Same as the rest of the pack, one install, all five nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/hetima/ComfyUI-SingleLinePicker
or search ComfyUI-SingleLinePicker in ComfyUI Manager, then restart. No pip dependencies.
The natural workflow is: Directory Contents → SLP List View → SLP Lora Loader, with SLP Filename Prefix catching the stem for your output names. It's a small pipeline, but it replaces the fiddly dance of retyping LoRA names in dropdowns every time you swap models.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| path | STRING | Path to directory | |
| is_full_path | BOOLEAN | true | Outputs as full path |
| SLP_format | BOOLEAN | false | Outputs for SLP List View |
| prefix | STRING | Prefix for each output path |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | directory contents |