Nodes/ComfyUI_agilly1989_motorway/SetClipHooks_motorway_edition
ComfyUI Node

SetClipHooks_motorway_edition

Attaching timing hooks to your CLIP, Motorway edition

By agilly1989·Created 2 years ago·Updated about a year ago· 7
SetClipHooks_motorway_edition
  • MOTORWAY 🚌💨
  • MOTORWAY 🚌💨
INPUT_clip_keyclip
INPUT_hooks_keyhooks
apply_to_condstrue
schedule_clipfalse
OUTPUT_CLIP_keyCLIP

If you've never touched ComfyUI's hooks system, SetClipHooks_motorway_edition is going to look like it's from another planet, and that's fair - it kind of is. It's the clone of ComfyUI's built-in SetClipHooks, which belongs to the advanced "hooks" subsystem: a way to inject small callbacks at defined points during sampling, conditioning, and scheduling so you can alter behavior mid-pipeline without swapping whole nodes. This specific one operates on the CLIP - the text encoder - letting you attach a hooks object that fires at points in the text-encoding path.

The honest framing: this is deep-end ComfyUI. The hooks system is where you go to implement things like per-token conditioning tricks, custom attention patches, or schedule-driven behavior changes that no off-the-shelf node exposes. If your workflow has never needed a "hook," this node is not about to change that. If you're already playing with SetNodeHooks and SetHookKeyframes, then SetClipHooks is the piece that targets the CLIP instead of the sampler.

What it needs from you:

  • apply_to_conds (default true) - whether the hooks get applied to the conditioning outputs the CLIP produces. On by default, which is what you want unless you're building something precise.
  • schedule_clip (default false) - whether the hooks should fire on a schedule (linked to the keyframes system). Off by default; flip it on once you're combining with keyframed scheduling.

Plumbing: it reads a CLIP from the bus via INPUT_clip_key (default clip) and the hooks object via INPUT_hooks_key (default hooks), then writes the hooked CLIP back under OUTPUT_CLIP_key (default CLIP). The rest of your conditioning chain picks it up from there.

Installing it

Part of ComfyUI_agilly1989_motorway. ComfyUI Manager: search ComfyUI_agilly1989_motorway, install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway

No extra dependencies, no model files.

The catch

Two layers of "advanced" to respect here. First, the hooks system itself is a power-user feature of ComfyUI - if the concept is new, start with ordinary conditioning nodes and come back to this later. Second, the pack is a beta: release 1.1.7 ships with the clones disabled (uncomment the two ClonedNodeMapping lines in custom_nodes/ComfyUI_agilly1989_motorway/__init__.py and restart), and the README's first line - "BIG BROKEN WITH ASYNC WILL FIX WHEN I GET THE TIME/MOTIVATION" - is the author's own warning that the async stuff this touches is exactly what's on the fix list. Combining an advanced subsystem with an explicitly beta pack is double jeopardy; fine to experiment, not the place to build a production pipeline.

Categoryagilly1989 Nodes/Motorway-ed/advanced/hooks/clip

Inputs (6)

NameTypeDefaultDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨
INPUT_clip_keySTRINGclip
INPUT_hooks_keySTRINGhooks
apply_to_condsBOOLEANtrue
schedule_clipBOOLEANfalse
OUTPUT_CLIP_keySTRINGCLIP

Outputs (1)

NameTypeDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨