Cutoff Set Regions
Tell the model which color belongs to which thing
- clip_regions
- CLIPREGION
This is the node that does the actual thinking in the ComfyUI Cutoff pack. The Base Prompt node just feeds in your prompt; this one is where you tell the model that "blue" belongs to "hair" and "green" belongs to "tie" - and nowhere else. It's the heart of the whole technique, and the one you'll spend your time fiddling with.
It sits between Cutoff Base Prompt and Cutoff Regions To Conditioning, and you'll usually string several of these together, one per attribute you want to pin down.
What the inputs mean
- clip_regions - the
CLIPREGIONfrom your Base Prompt node (or from another Set Regions, if you're chaining). This is how regions accumulate. - region_text (multiline) - the slice of the prompt that should be the target's area of influence. It must be a substring of your base prompt. One region per line - newlines are the separator, so you can define multiple regions in a single node.
- target_text - the words to confine. Space-separated. Want to match a multi-word sequence? Use underscores instead of spaces (
a_series_of_tokens). Got a word that genuinely contains an underscore? Escape it (the\_target\_tokens). You can also target textual-inversion embeddings with the normalembedding:namesyntax - but escape any underscores in the name. - weight - how hard to push. Default 1.0, range −10 to 10. Cranking it up forces the attribute onto its region harder; negative weights push in the opposite direction, which is occasionally useful for unbinding something.
The mental model
Say your prompt is a cute girl, white shirt with green tie, red shoes, blue hair, yellow eyes, pink skirt. You'd add a Set Regions node with region_text = blue hair and target_text = blue. The node finds where "blue hair" lives in the prompt's token stream and builds a mask that says: this is blue's domain. Wire several of these together - one for green→tie, one for red→shoes, one for yellow→eyes - and each token only gets to color its own corner of the image.
Under the hood it's pure token bookkeeping: the node matches your region text against the base prompt's tokens, builds a region mask and a target mask, and stores them in the CLIPREGION object. The actual embedding math happens later, in the Regions To Conditioning node.
Gotchas
- Silent no-op if the text doesn't match. If your
region_textisn't actually in the base prompt - say you typo'd it, or it tokenizes differently because you left weighting syntax in there - the node finds no match and quietly contributes nothing. No error, no warning. It'll just look like cutoff isn't working. - Underscores are special.
multi_wordmeans a token sequence;\_means a literal underscore. Forget the escape and embedding names with underscores will never match. - Keep region text short. It has to match the prompt's tokenization exactly, so a long phrase is easier to break than a short one. Match the smallest unique chunk that pins the meaning.
Install
Search "Cutoff" in ComfyUI Manager, or clone the repo into ComfyUI/custom_nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/BlenderNeko/ComfyUI_Cutoff
Restart ComfyUI and it's live. No dependencies, no model downloads - BlenderNeko ships this as pure Python. Find it under conditioning > cutoff.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| clip_regions | CLIPREGION | — | |
| region_text | STRING | — | |
| target_text | STRING | — | |
| weight | FLOAT | 1.00-10–10 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CLIPREGION | CLIPREGION | — |