CRZ Map Custom Dropdown
The node that gives each dropdown option its own data payload
- custom_dropdown
- option_0
- option_1
- option_2
- option_3
- option_4
- option_5
- option_6
- option_7
- option_8
- option_9
- output
CRZ Map Dropdown answers the question that hits you the moment you start using CRZ Custom Dropdown: the dropdown hands you a label, but what if you want each label to do something different? "Cinematic" as a prompt fragment is just a string; "Cinematic" as a choice that switches a different value, a different LoRA, a different whole pipeline into the graph - that's a map. This node is that map. It watches a custom dropdown, then passes through whatever data you've attached to the selected option.
It's part of ComfyUI-CRZnodes, and the README sells it exactly right: "It will autodetect your custom dropdown choices. And it will pass through the data you want for each option." You configure once, and the mapping follows the dropdown around.
How it works
The node takes a custom_dropdown input (any type) and reads the currently selected value out of it. Meanwhile, its own frontend pulls the option list off the connected dropdown - from its properties, its options, or its combo widget - and exposes a set of ten option_0 through option_9 inputs, one per slot in the list. Wire whatever data belongs to option N into option_N, and when the dropdown selects that option, the map node outputs that data.
The output is typed * (any), so each option's payload can be a string, a number, a model, an image - whatever you hung off that input. It's effectively a lookup table with the dropdown as its key.
The inputs and outputs that matter
custom_dropdown(required input,*) - the dropdown node whose selection is the key. Feed it a CRZ Custom Dropdown (or any combo output).dropdown_options(optional, STRING) - the option list, normally filled in automatically by the frontend. You rarely touch this.option_0…option_9(optional inputs,*) - one data payload per dropdown choice. Wire the value for the first option intooption_0, and so on.output(output,*) - the payload for whichever option is currently selected.
The ten option slots cap you at ten choices per dropdown - plenty for a camera-angle or lighting selector, and the node's honest limit if your list runs longer.
Installing it
Standard pack install: ComfyUI Manager → search ComfyUI-CRZnodes → install → restart. No requirements, no models.
cd ComfyUI/custom_nodes
git clone https://github.com/CoreyCorza/ComfyUI-CRZnodes.git
What's under the hood, and what to watch for
Two implementation details are worth knowing. First, the Python side has a pile of print() debug statements left in - MapDropdown Debug - Selected value: ... - so every execution of this node spams your ComfyUI console. Harmless, but if you see the noise in your terminal, that's what it is.
Second, the selected option is matched against the option list by exact value, and if it doesn't match it falls back to option_0. So if your dropdown's options and the map node's copy of the options ever get out of sync (editing the dropdown after wiring the map, for instance), you'll silently get the wrong payload - the node prints which option it picked, which is your best debugging clue. Keep the map node wired after you've finished editing the dropdown, and check the console output once when you set up a new mapping to confirm the match is landing where you expect.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| custom_dropdown | * | — | |
| dropdown_optionsopt | STRING | [] | — |
| option_0opt | * | — | |
| option_1opt | * | — | |
| option_2opt | * | — | |
| option_3opt | * | — | |
| option_4opt | * | — | |
| option_5opt | * | — | |
| option_6opt | * | — | |
| option_7opt | * | — | |
| option_8opt | * | — | |
| option_9opt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | * | — |