CLIP Text Encode PS Regional
Regional prompting with masks you drew in Photoshop
- clip
- masks
- CONDITIONING
This is the flagship SD-PPP node, and honestly the reason most people install the pack at all: you brush a selection in Photoshop, and that selection becomes the region where a prompt applies. "The person in the foreground is a red-haired knight, the background is a misty forest" - except instead of hoping the sampler figures out the layout, you've literally drawn the boundary in your image editor. It's regional prompting the way a working designer would want it: the mask is a shape, not a region-of-a-crop you fought with in the node graph.
How it works
Under the hood it's the same trick as ComfyUI's ConditioningSetMask nodes. For each text+mask pair you feed in, it tokenizes the text with your CLIP model, encodes it, and then stamps the mask onto the conditioning with set_area_to_bounds and a per-region mask_strength. Each masked region becomes its own conditioning entry, and the node concatenates them all into one CONDITIONING output that goes straight into your sampler's positive input.
Inputs
- clip - your CLIP model. If you feed a list, only the first is used.
- texts - the prompt for each region, one string per mask. This is a list input, so line up the order with your masks.
- masks - one
MASKper text. These typically come from the SD-PPP Get nodes -SDPPP Get Selectionif you drew a marquee selection, or a layer boundary mask if you want the region to be exactly a layer's shape. - strengths (optional) - a float per region, 0 to 10, default 1.0. This is the "how hard does this region bite" dial: above 1 pushes the region harder, below 1 lets the surrounding prompt bleed in. This is the knob you'll actually tune when one region won't behave.
The output is a single CONDITIONING you can wire to KSampler positive, or splice with more conditioning if you want global prompts on top.
Pair it with a mask workflow
The classic graph: SDPPP Get Document → SDPPP Get Selection (or a layer boundary mask) → this node. Draw a selection in Photoshop, hit run, and the prompt applies only there. It plays especially well with inpainting-style workflows where you want a different subject in a specific part of the canvas - the mask keeps the rest of the image stable in a way that full-frame generation can't.
Install and the version trap
Install through ComfyUI Manager (search sd-ppp or Photoshop) or git clone https://github.com/zombieyang/sd-ppp into ComfyUI/custom_nodes, then restart. Dependencies (python-socketio, jsonpatch) install themselves on first import. You still need the Photoshop plugin from sdppp.zombee.tech - a .ccx file, double-click to install (Creative Cloud) or rename to .zip and extract into the Plug-ins folder.
The recurring trap with this pack: the plugin and the node pack must be on the same version, or Photoshop refuses to connect with "version mismatch, please reinstall PS plugin" and every mask input stays empty. Update both halves together. Also keep in mind the maintainer's 2.0 beta moved toward a plugin-driven UI where you don't build these graphs - the node still works, but don't expect it to get new features.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | The CLIP model used for encoding the text. only use the first one. | |
| texts | STRING | The text to be encoded. | |
| masks | MASK | — | |
| strengthsopt | FLOAT | 1.000–10 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |