GIR Dir Picker
Pick a folder once, ComfyUI remembers it forever
- directory
Hardcoded paths in ComfyUI are a special kind of annoyance. You type a folder into a node, it works, then you move the folder or switch machines and the workflow quietly breaks. GIR Dir Picker is the input half of the Dir Gir pack's trick: it puts a real Select Directory button on the node, remembers what you picked on disk, and still has it after a full server restart. It exists to feed the pack's star, GIR Loopy Dir, but it's genuinely handy on its own whenever a workflow needs a folder that shouldn't be glued to one machine's file layout.
The whole node is deliberately thin - that's the point. It has no inputs at all. Its single output, directory, is a plain string you wire into anything that takes one: Loopy Dir, a loader, a save path. There's nothing else to configure, and that's why it rarely breaks.
How it works
The button doesn't do anything in your browser. Clicking it asks ComfyUI's server (via a custom /gir-dir/select-directory endpoint) to open a tkinter folder dialog on the machine actually running ComfyUI. Whatever you pick gets saved, keyed by the node's ID, into a picked_dirs.json file inside the pack's own folder - that file is the persistence. When you reopen the workflow, the node loads the saved directory back and shows it on the node face. There's also a plain text field on the node where you can type a path directly (saved via a /gir-dir/set-directory route), so you're never trapped by the dialog.
The gotchas, which are real
Because the dialog runs server-side, where ComfyUI runs matters. On your local PC it's invisible - a normal folder window pops up. But on a remote or headless box (cloud GPU instance, RunPod, a server without a display), there's no screen for tkinter to draw on, so the button may silently do nothing. The manual text field still works, so remote users aren't stuck - just plan to type.
Two more from the README and the source worth knowing:
- macOS quirk: the first directory selection works fine, but on later selections the dialog opens behind the browser window. Annoying, not broken. Windows is unaffected.
- tkinter missing: the pack tries to auto-install tkinter at startup (
sudo apt install python3-tkon Linux,brew install python-tkon macOS,pip install tkon Windows). Any of those can fail quietly, and when tkinter isn't importable the Select Directory button gets disabled - the text field remains, so the node still functions, just less pleasantly. If the button's missing, install tkinter yourself and restart.
Install
It ships in the Dir Gir pack, so it's the same install for the whole family:
cd Your_ComfyUI_Path/custom_nodes
git clone https://github.com/AshMartian/ComfyUI-DirGir
Then restart ComfyUI. Or, easier, search Dirgir in ComfyUI Manager and click install. No model downloads, no GPU dependencies - the only moving part is that tkinter auto-install attempt.
Should you use it?
If you run ComfyUI on one local machine and keep building workflows that touch a specific folder, yes - this kills a whole class of "why does the path point at nothing" moments. The persistence is the selling point: it's the only folder-picker-style node I know that remembers across restarts without you re-pointing it. If you live on remote servers, the honest take is that the text field is doing the real work for you and the button is a nice-to-have. Either way, it pairs with GIR Loopy Dir to turn "process this entire folder" into a two-node graph you queue and walk away from.
Inputs (0)
No inputs
Outputs (1)
| Name | Type | Description |
|---|---|---|
| directory | STRING | — |