GLIGENTextBoxApply_motorway_edition
GLIGENTextBoxApply on the Motorway
- MOTORWAY 🚌💨
- MOTORWAY 🚌💨
GLIGENTextBoxApply is the node that makes GLIGEN actually do its party trick: you give it a text prompt and a rectangle, and it produces conditioning that tells the model "draw this text inside this box." It's grounded regional-ish control the old way - one prompt, one bounding box, appended onto your existing conditioning. The _motorway_edition version from agilly1989/ComfyUI_agilly1989_motorway reads its three inputs off the Motorway pipe by key and writes the new conditioning back to a key.
The inputs that matter
The text and the box are widgets; the rest is key traffic:
- text (multiline) - the prompt for whatever lives in the box. This is the payload.
- width (default 64, step 8) and height (default 64, step 8) - box dimensions in latent-ish grid units.
- x (default 0, step 8) and y (default 0, step 8) - box position from the top-left.
- INPUT_conditioning_to_key (default
conditioning_to) - the base conditioning the GLIGEN result is appended to. - INPUT_clip_key (default
clip) - the CLIP model used to encode the box text. - INPUT_gligen_textbox_model_key (default
gligen_textbox_model) - the GLIGEN model from GLIGENLoader. - OUTPUT_CONDITIONING_key (default
CONDITIONING) - where the combined conditioning lands.
Output is the MOTORWAY pipe.
The practical bits
The box coordinates are on an 8-pixel grid in image space, and the GLIGEN model was trained around SD 1.5-style latents - so boxes are approximate. A box that's slightly off gets you the object slightly off; GLIGEN was never a pixel-perfect layout tool, it's a "roughly here, roughly this size" tool, and the community consensus has always been that the interface was the hard part more than the capability. If you want exact placement, look at modern layout-trained models or IP-adapter-ish approaches; if you want "person on the left, sign on the right" on an SD 1.5 workflow, this is the classic.
One real gotcha: the three key inputs default to lowercase names (conditioning_to, clip, gligen_textbox_model) while the output defaults to uppercase CONDITIONING. Type the keys exactly as you stored them, or you'll hit the pack's trademark error: 'MotorwayClass' object has no attribute 'hash_', which just means the key you named isn't on the bus.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway
Restart ComfyUI, or install via ComfyUI Manager under "ComfyUI_agilly1989_motorway." No extra Python deps. The real downloads are the GLIGEN model (into models/gligen) and the SD 1.5/SDXL checkpoint it was made for.
Standing pack caveat, same as every node here: v1.1.7's pyproject.toml calls itself "HOTFIX - REMOVED MONKEYPATCH AND GENERATED NODES," and the generated clones are commented out of __init__.py. Core Motorway nodes work; the _motorway_edition clones may not be in your menu until the author re-enables them. Missing? Core GLIGENTextBoxApply is the same node, and a ramp can get its conditioning onto the bus by hand.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — | |
| INPUT_conditioning_to_key | STRING | conditioning_to | — |
| INPUT_clip_key | STRING | clip | — |
| INPUT_gligen_textbox_model_key | STRING | gligen_textbox_model | — |
| text | STRING | — | |
| width | INT | 648–16384 | — |
| height | INT | 648–16384 | — |
| x | INT | 00–16384 | — |
| y | INT | 00–16384 | — |
| OUTPUT_CONDITIONING_key | STRING | CONDITIONING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — |