Nodes/ComfyUI-LoaderUtils/Load GLIGEN (Any)
ComfyUI Node

Load GLIGEN (Any)

Bounding-box layout control from the SD 1.5 era

By lrzjason·Created 8 months ago·Updated 8 months ago· 88
Load GLIGEN (Any)
  • any
  • GLIGEN
gligen_name

GLIGEN - Grounded-Language-to-Image Generation - is a layout-control technique that predates a lot of what people now reach for regional prompting or ControlNet to do. You give it a set of bounding boxes, each paired with a phrase ("a dog" in this box, "a cat" in that one), and it steers the model to actually put those things there through gated self-attention, rather than hoping the prompt implies the right positions on its own. GLIGENLoader_Any loads the GLIGEN checkpoint file itself; the box-placement work happens in a downstream node (a text-box-apply style node) that this loader feeds into.

The input and output

One field: gligen_name, picked from your models/gligen folder. Output is a single GLIGEN model, which on its own does nothing - it needs to be paired with a node that actually applies the bounding boxes and phrases before it affects generation.

Where this sits today

Worth being upfront: this is an SD 1.5-era technique, and the models available for it reflect that - nothing here is trained for SDXL, Flux, or any newer base. If you're trying to control where things go in a modern workflow, ControlNet (with a pose or depth condition) or regional prompting are the tools people reach for now, and they cover more architectures.

That said, GLIGEN clearly struck a chord with a real slice of the community: one of the highest-scoring threads in the entire regional-control space on r/StableDiffusion is from someone who built a dedicated GUI for it specifically because they "couldn't find an intuitive GUI for GLIGEN" - the ComfyUI node-graph approach to placing bounding boxes and phrases is fiddly enough that people wanted a purpose-built frontend for it. That's a genuine signal: the capability had real appetite even when the raw workflow to use it was awkward. If precise box-and-phrase layout is exactly what you need and you're working in SD 1.5, this is still a legitimate tool, not a dead one - just a specialty one.

The any input

Same mechanism as every other loader in this pack: an optional any input that accepts anything and is never actually used - its only job is to delay this node until whatever feeds it finishes, since ComfyUI would otherwise load it as soon as nothing blocks it, typically right at graph start regardless of when it's consumed downstream.

Installing it

ComfyUI Manager: search ComfyUI-LoaderUtils, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/lrzjason/ComfyUI-LoaderUtils

No extra dependencies - it wraps ComfyUI's own GLIGEN loader class.

Where people get burned

Empty dropdown: no GLIGEN checkpoint in models/gligen, or no restart since it landed there - GLIGEN models aren't bundled with ComfyUI by default and need to be sourced separately.

Beyond that, this is niche enough that most confusion traces back to one of two things: pairing a GLIGEN checkpoint trained for a different base than the one it's being used with, or forgetting that this loader alone does nothing - nothing happens visually until you've wired its output into a box-and-phrase apply node downstream and actually defined some regions. If your generation looks completely unaffected by GLIGEN, check that second part first; it's the more common miss.

Categoryloaders

Inputs (2)

NameTypeDefaultDescription
gligen_nameCOMBO0 options:
anyopt*

Outputs (1)

NameTypeDescription
GLIGENGLIGEN