CLIP Text Encode SDXL (Cutoff Region Enhanced)
Cutoff prompt isolation in one node — plugin-free, unless you want the original
- clip
- latent
- conditioning
- upscaled_conditioning
- reference_full_prompt
Two subjects in one prompt, and their attributes smear into each other - the girl picks up the background's moody lighting, the background picks up her hair. That's prompt context bleeding, and it's the reason the Cutoff algorithm exists. Cutoff measures each phrase's influence on the global CLIP embedding, then confines that influence back to the phrase's own tokens so regions don't contaminate each other.
This node is a single-node prompt builder that implements Cutoff from scratch, self-contained, under MIT license. That's the important part: you don't need the ComfyUI_Cutoff plugin for the default behavior. The author reimplemented the algorithm in cutoff_per_stream_isolation.py specifically so it can run independently per CLIP stream - something the original plugin can't do.
How it works
The node has a section_count you can expand or collapse (1..16). Each section gets:
section_N_text- the prompt chunk.section_N_isolate(default on) - registers the section as a Cutoff region withregion_text == target_text == section text. Off, and the section is still in the prompt but isn't isolated.section_N_weight(-10..10) - with isolate on, it's the Cutoff region weight; with isolate off, the text gets wrapped in(text:weight)attention syntax instead.section_N_clip-Pass L+G(default) /Pass L/Pass G/Classic. This is the stream-routing trick.Pass Lsends the section only to CLIP-L and encodes the empty prompt for CLIP-G - using CLIP-G's natural empty embedding, not a zero-masked tensor, which would be out-of-distribution. Sections sharing a choice are grouped into one encoding pass, then emitted as a multi-entry (combine-style) conditioning.
Classic is the one mode that routes through the actual BlenderNeko ComfyUI_Cutoff plugin - it is the upstream plugin's code, so it reproduces its exact behavior, and it requires ComfyUI_Cutoff installed. The other three modes have no external dependency.
Size metadata, because it's an SDXL node
Like the rest of the enhanced encoder family, it bundles the crop-zoom math: an optional latent input determines target W/H (defaults to 1024×1024), and zoom/offset_x/offset_y compute the SDXL size/crop fields on every output entry. There's also upscaled_conditioning_multiplier (min 1.0, default 1.0), which scales the target W/H for a second upscaled_conditioning output - matching a hires-fix latent upscale so the upscale-stage sampler sees target sizes that reflect the larger working resolution. The author reports this gives a subtle but real bump in fine detail and sharpness, most visible on photoreal models and with more second-stage steps.
Outputs: conditioning (final, through Cutoff), upscaled_conditioning (same prompt, upscaled metadata), and reference_full_prompt (STRING - the joined text CLIP actually encoded; wire to ShowText).
Install
ComfyUI Manager → search "Unified Conditioning", or:
cd ComfyUI/custom_nodes
git clone https://github.com/RandyHaylor/unified-conditioning-combine-with-timestep-range.git unified-conditioning-merge
Restart ComfyUI; it's under unified-conditioning-merge. No models, no pip deps. Only if you want Classic mode, also install ComfyUI_Cutoff.
Troubleshooting
Classicerrors if ComfyUI_Cutoff isn't installed - that's the expected dependency, not a bug.- Empty sections are skipped even inside the active range, so leaving slots blank is safe.
- If a section seems to have no effect, check
section_N_isolate- isolation off makes it plain text. - Use
reference_full_promptto confirm the prompt you think you built is the one that got encoded.
Inputs (78)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| upscaled_conditioning_multiplier | FLOAT | 1.00 | — |
| section_count | INT | 31–16 | — |
| join_separator | STRING | , | — |
| mask_token | STRING | — | |
| strict_mask | FLOAT | 1.000–1 | — |
| start_from_masked | FLOAT | 1.000–1 | — |
| support_a1111_style_embedding_text | BOOLEAN | true | — |
| remove_text_for_unsupported_embeddings | BOOLEAN | true | — |
| filter_known_a1111_embedding_tags_not_installed_locally | BOOLEAN | true | List can be modified in custom node folder: known_a1111_embedding_names_to_filter_when_not_installed_locally.txt |
| zoom | FLOAT | 1.001–100 | — |
| offset_x | FLOAT | 0.00-1–1 | — |
| offset_y | FLOAT | 0.00-1–1 | — |
| section_1_text | STRING | — | |
| section_1_isolate | BOOLEAN | true | — |
| section_1_weight | FLOAT | 1.00-10–10 | — |
| section_1_clip | COMBO | Pass L+G | 4 options: Pass L+G, Pass L, Pass G, Classic |
| section_2_text | STRING | — | |
| section_2_isolate | BOOLEAN | true | — |
| section_2_weight | FLOAT | 1.00-10–10 | — |
| section_2_clip | COMBO | Pass L+G | 4 options: Pass L+G, Pass L, Pass G, Classic |
| section_3_text | STRING | — | |
| section_3_isolate | BOOLEAN | true | — |
| section_3_weight | FLOAT | 1.00-10–10 | — |
| section_3_clip | COMBO | Pass L+G | 4 options: Pass L+G, Pass L, Pass G, Classic |
| section_4_text | STRING | — | |
| section_4_isolate | BOOLEAN | true | — |
| section_4_weight | FLOAT | 1.00-10–10 | — |
| section_4_clip | COMBO | Pass L+G | 4 options: Pass L+G, Pass L, Pass G, Classic |
| section_5_text | STRING | — | |
| section_5_isolate | BOOLEAN | true | — |
| section_5_weight | FLOAT | 1.00-10–10 | — |
| section_5_clip | COMBO | Pass L+G | 4 options: Pass L+G, Pass L, Pass G, Classic |
| section_6_text | STRING | — | |
| section_6_isolate | BOOLEAN | true | — |
| section_6_weight | FLOAT | 1.00-10–10 | — |
| section_6_clip | COMBO | Pass L+G | 4 options: Pass L+G, Pass L, Pass G, Classic |
| section_7_text | STRING | — | |
| section_7_isolate | BOOLEAN | true | — |
| section_7_weight | FLOAT | 1.00-10–10 | — |
| section_7_clip | COMBO | Pass L+G | 4 options: Pass L+G, Pass L, Pass G, Classic |
| section_8_text | STRING | — | |
| section_8_isolate | BOOLEAN | true | — |
| section_8_weight | FLOAT | 1.00-10–10 | — |
| section_8_clip | COMBO | Pass L+G | 4 options: Pass L+G, Pass L, Pass G, Classic |
| section_9_text | STRING | — | |
| section_9_isolate | BOOLEAN | true | — |
| section_9_weight | FLOAT | 1.00-10–10 | — |
| section_9_clip | COMBO | Pass L+G | 4 options: Pass L+G, Pass L, Pass G, Classic |
| section_10_text | STRING | — | |
| section_10_isolate | BOOLEAN | true | — |
| section_10_weight | FLOAT | 1.00-10–10 | — |
| section_10_clip | COMBO | Pass L+G | 4 options: Pass L+G, Pass L, Pass G, Classic |
| section_11_text | STRING | — | |
| section_11_isolate | BOOLEAN | true | — |
| section_11_weight | FLOAT | 1.00-10–10 | — |
| section_11_clip | COMBO | Pass L+G | 4 options: Pass L+G, Pass L, Pass G, Classic |
| section_12_text | STRING | — | |
| section_12_isolate | BOOLEAN | true | — |
| section_12_weight | FLOAT | 1.00-10–10 | — |
| section_12_clip | COMBO | Pass L+G | 4 options: Pass L+G, Pass L, Pass G, Classic |
| section_13_text | STRING | — | |
| section_13_isolate | BOOLEAN | true | — |
| section_13_weight | FLOAT | 1.00-10–10 | — |
| section_13_clip | COMBO | Pass L+G | 4 options: Pass L+G, Pass L, Pass G, Classic |
| section_14_text | STRING | — | |
| section_14_isolate | BOOLEAN | true | — |
| section_14_weight | FLOAT | 1.00-10–10 | — |
| section_14_clip | COMBO | Pass L+G | 4 options: Pass L+G, Pass L, Pass G, Classic |
| section_15_text | STRING | — | |
| section_15_isolate | BOOLEAN | true | — |
| section_15_weight | FLOAT | 1.00-10–10 | — |
| section_15_clip | COMBO | Pass L+G | 4 options: Pass L+G, Pass L, Pass G, Classic |
| section_16_text | STRING | — | |
| section_16_isolate | BOOLEAN | true | — |
| section_16_weight | FLOAT | 1.00-10–10 | — |
| section_16_clip | COMBO | Pass L+G | 4 options: Pass L+G, Pass L, Pass G, Classic |
| latentopt | LATENT | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |
| upscaled_conditioning | CONDITIONING | — |
| reference_full_prompt | STRING | — |