Nodes/ComfyUI/Load GLIGEN Model
ComfyUI Node Runs on cloud

Load GLIGEN Model

The forgotten way to put things exactly where you said

By Comfy-Org·Created 4 years ago·Updated about 21 hours ago· 129,495
Load GLIGEN Model
    • GLIGEN
    gligen_name

    Before ControlNet became the standard answer to "I want this object over there," there was GLIGEN - grounded language-to-image generation. Load GLIGEN Model is the loader for that approach, and it's a small piece of ComfyUI history that still does something nothing else quite replicates. It's old, it's SD1.5-only, and it's genuinely neat.

    What GLIGEN does

    The idea: instead of describing the whole image in one prompt, you tell the model what to draw and where. GLIGEN adds a grounding module on top of the diffusion model's cross-attention, and you drive it with bounding boxes - "a red car in this box, a dog in that one." The model then honors those spatial constraints while still generating freely everywhere else. In ComfyUI the application node is GLIGENTextBoxApply, which is a great name because that's literally what it does: it applies a text + box pair to your conditioning.

    How the loader fits

    This node loads the GLIGEN weights from models/gligen/ - the classic files are the gligen_sd14_textbox_pruned and gligen_sd15 checkpoints, plus a v1 variant - and outputs a GLIGEN object. That's the only output, and it has exactly one destination:

    • GLIGENTextBoxApply - takes your conditioning, your CLIP, the GLIGEN model, a text prompt, and x/y/width/height box coordinates, and returns conditioning with the grounded instruction baked in.

    The wiring is: Load GLIGEN Model → GLIGENTextBoxApply (fed by your prompt conditioning) → the sampler's positive input. One loader feeds one consumer, and you can stack several text-box applies to pin multiple objects in one image.

    Inputs and outputs

    The single input is gligen_name, a dropdown of files in models/gligen/. That's it - no strength, no dtype, no bells.

    Output: GLIGEN, into GLIGENTextBoxApply.

    The honest caveats

    GLIGEN's moment passed. It predates and was largely displaced by ControlNet, which gives you far more precise spatial control, and by regional prompting techniques. It's also strictly a Stable Diffusion 1.x thing - the models are built on SD1.4/1.5, so don't try to run one on SDXL or Flux and expect it to attach. If you're exploring old SD1.5 workflows or want the "draw this thing in this box" interaction for its own sake, this is a charming relic worth five minutes. If you want production spatial control, go ControlNet. The loader is here either way, in core, no install required.

    Categorymodel/loaders

    Inputs (1)

    NameTypeDefaultDescription
    gligen_nameCOMBO0 options:

    Outputs (1)

    NameTypeDescription
    GLIGENGLIGEN