HB Text Preset Switch
The dropdown that survives a refresh (and doubles as a resolution switcher)
- string
- integer
- boolean
HB Text Preset Switch is the reason most people stumble onto this pack at all, and it's easy to see why: it's a dropdown whose choices are edited by you and remembered by the workflow file itself. No global settings file, no re-typing your resolution every time you reload, no "wait, why did my dropdown reset" moment. You pick from the menu, and the choice - and the entire menu - travels inside the workflow JSON.
Out of the box it's a resolution switcher. The shipped defaults are labeled profiles: HD (~720) through 4K (~2160), with values "1" through "7". Open the node's Manage button and you get a small dialog where you can add rows, delete them, reorder with ▲▼, or clear everything. Each row is a name and a value. Hit SAVE and your list is stored in hidden widgets that serialize into the workflow. That's the whole trick - the presets live in the node's JSON, so they survive refresh, save/load, and undo. They also survive ComfyUI's App Mode, which is the stated target: hand a non-technical person a workflow with a labeled dropdown instead of a raw number field.
How it works
The Python side is almost a no-op. It takes the preset input (a STRING, default empty) and hands you three conversions on three outputs:
- string - the raw selected value, e.g.
"7" - integer -
int(float(preset)), so"3.8"→3,"abc"→0 - boolean -
bool(integer), so0→ False, anything nonzero → True
All the real machinery is the bundled JavaScript extension (hb_text_preset_node.js), which replaces the plain text box with a combo widget and keeps your preset list in two hidden serialized widgets. Worth knowing if you're debugging: the string output is the value, not the label. Pick "FHD (~1080)" and you get "3", not the friendly name - the label is just what's displayed. Feed the integer output into a resolution-math chain or the boolean into a switch elsewhere in the graph and you can flip whole pipeline branches from one menu.
The trap
Because the dropdown is built by JS at node-creation time, a workflow that uses this node will report it as a missing/fallback node if you load it without the pack installed - you'll get a plain string field, not the menu. That's normal; install the pack and reload the workflow. Also, there's a niche gotcha with the string output: if you wire it into a CLIP text encode expecting prompt text, remember it's emitting the numeric value. Fine for resolution math, confusing for prompts. Use the output that matches what the downstream node actually wants.
Install
This ships in HB ComfyUI Nodes (HassanEclipse/comfyui-hb-party). Easiest path is ComfyUI Manager:
Manager → Install via Git URL → https://github.com/HassanEclipse/comfyui-hb-party
Or clone it manually:
cd ComfyUI/custom_nodes
git clone https://github.com/HassanEclipse/comfyui-hb-party comfyui_HB_Party
Restart ComfyUI. That's it - the pack has zero Python dependencies and downloads no models, so this is one of the quickest installs you'll do all week. The node itself is a couple of lines of Python plus one JS file; the whole pack is tiny and MIT-licensed.
Bottom line
If you maintain reusable workflows - especially ones other people run - this is a genuinely handy quality-of-life node. It's not going to change what you can generate, but it kills a real annoyance: the dropdown that forgets itself between sessions. For a $0 install that's a fair trade.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| preset | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| string | STRING | — |
| integer | INT | — |
| boolean | BOOLEAN | — |