🗂️Dict → GLIGEN🟤
The rare GLIGEN extractor, for grounding boxes
- dict
- value
Let's be straight about this one: GLIGEN is niche. It's the "grounding" technique that lets you tell a diffusion model where things should go - "a cat in the top-left corner, a dog in the bottom-right" - via boxes attached to your prompt. It never took over the world the way ControlNet did, and if you've never touched GLIGEN, there's a good chance you never will. DictExtractGligen ("🗂️Dict → GLIGEN🟤") is the dict-bus extractor for the people who do.
The use case is exactly what every other extractor here is for, just with a rarer payload. If you're building GLIGEN-driven layouts - grounding your prompt with boxed subjects - the GLIGEN model (a GLIGEN Loader output) can ride in the dict bus like any other model, stored under a key, and extracted where the apply node needs it. The type here is the patched-model kind, so it wires into the GLIGEN apply nodes rather than a standard ControlNet apply.
What you set
- dict (required) - the dictionary to read from (non-empty).
- key - the slot where the GLIGEN model lives.
- cleanup_key (on by default) - normalizes the key.
Output: value as GLIGEN, wired into a GLIGEN apply node that takes boxed conditioning.
Fair warning
This is the most "complete only if you're already doing the thing" node in the pack. The dict bus solves the organization of GLIGEN - one loader, shared model, readable keys - but it won't make GLIGEN's finickiness go away, and it's one of the least-used node types around. If you're on a mainstream SDXL or Flux workflow, you can safely ignore this entry entirely. If you're experimenting with grounding boxes and already have a dict bus in your graph, this is the tidy way to carry the model in it. It's also grouped under Extract/Models in the menu, sitting with the other model extractors.
Install
Standard for this pack - small, one lightweight dependency (frozendict), no model downloads (your GLIGEN model comes from a GLIGEN Loader). ComfyUI Manager: search "Dict Tools". Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Lex-DRL/ComfyUI-DictTools
Restart ComfyUI. Needs 0.18.0+ (newer extension API) - if the nodes are missing after install, update ComfyUI first. Missing keys still raise "No such key in Dict", and the extractor type-checks the stored value, so a GLIGEN slot mislabeled or mis-stored fails loudly. Given how niche the whole area is, loud is exactly what you want.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| dict | DICT | A Dictionary to work with. | |
| key | STRING | Key (name) of the item extracted from the dict. | |
| cleanup_key | BOOLEAN | true | Automatically remove leading/trailing spaces and extra newlines from the key. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | GLIGEN | The actual GLIGEN-type item extracted from the Dict. |