Nodes/ComfyUI/Set CLIP Hooks
ComfyUI Node Runs on cloud

Set CLIP Hooks

Apply your LoRA's text-encoder patch to the encoder itself

By Comfy-Org·Created 4 years ago·Updated about 3 hours ago· 129,870
Set CLIP Hooks
  • clip
  • hooks
  • CLIP
apply_to_condstrue
schedule_clipfalse

The hook family mostly rides on conditioning - you stamp a HOOKS group onto a cond and the sampler applies it to the model. SetClipHooks ("Set CLIP Hooks") is the exception: it takes a CLIP model and applies hooks to it, directly to the text encoder, before a single token is encoded. It's how you patch a LoRA's CLIP half into the encoding step itself rather than smuggling it through the sampler, and it's the node to reach for when your hook needs to change how the prompt is read, not just how the model draws.

What it does

Hooks are weight patches, and a weight patch can target the diffusion model or the CLIP text encoder. Normal hook workflows apply both through the sampler. This node instead clones the CLIP model, registers the hook's patches on the CLIP's own model patcher, and hands you back a CLIP you can wire into your text encoder. From then on, encoding runs with the patch live - the LoRA's CLIP weights affect every prompt you encode through it, unconditionally and up front.

The two toggles decide how far that reach goes:

  • apply_to_conds (default true) - when on, every conditioning the CLIP produces also carries the hooks, so the sampler-side effect happens automatically. When off, the hooks affect only the encoding, and the conditioning stays hook-free for later manual attachment.
  • schedule_clip (default false) - whether the CLIP patch follows the hook's keyframe schedule. Turn this on and your keyframes (built with CreateHookKeyframesInterpolated etc.) animate the CLIP strength across the run just like they animate model strength. Off, and the CLIP patch runs at its base strength throughout.

The inputs

  • clip - the CLIP model to hook. Usually the CLIP output from your checkpoint or model loader.
  • apply_to_conds / schedule_clip - the two toggles above.
  • hooks - the HOOKS group to apply. From CreateHookLora or CreateHookModelAsLora, same as anywhere else.

Output: a single CLIP, ready for CLIPTextEncode or the model-specific encoders.

When you'd actually use it

This is the niche end of the family, and it's mostly for three situations: you want a LoRA's CLIP patch to affect encoding even though you're attaching the model half elsewhere; you're scheduling CLIP strength with keyframes and want the schedule driven at encode time; or you're working with a workflow shape (custom sampler, unusual conditioning paths) where the normal "hooks on conditioning" route doesn't reach. The schedule_clip feature exists because of a subtlety: when the schedule is off, keyframes are cleared from the hooks before registering, so a CLIP hook is a fixed-strength patch unless you explicitly animate it.

The honest caveat

Because this patches the encoder itself, the effect is global - there's no masking a CLIP patch to a region the way you mask model weights. If your goal is regional LoRA, this isn't the node; that's the Set Props family. If your goal is "make every prompt through this CLIP read with this LoRA's text understanding," this is exactly it. And it's experimental, like everything in the hooks family - core ComfyUI, no install, under advanced → hooks → clip.

Categoryadvanced/hooks/clip

Inputs (4)

NameTypeDefaultDescription
clipCLIP
apply_to_condsBOOLEANtrue
schedule_clipBOOLEANfalse
hooksoptHOOKS

Outputs (1)

NameTypeDescription
CLIPCLIP