PC: Configure PCTextEncode
Configure PCTextEncode — set your SDXL micro-conditioning and mask defaults once
- clip
- CLIP
The README describes a node it calls "PCSetTextEncodeSettings" that "configures PCTextEncode default values for some functions by attaching the information to a CLIP model" - this node is that feature. Rather than passing width/height/crop parameters into every single text-encode call in your graph, you set them once here on the CLIP and every PCTextEncode/PCLazyTextEncode downstream picks them up automatically.
What it does
Two groups of settings live here, and they solve two different problems.
The sdxl_* fields - sdxl_width, sdxl_height, sdxl_target_w, sdxl_target_h, sdxl_crop_w, sdxl_crop_h - are SDXL's own micro-conditioning parameters, the same ones ComfyUI's native CLIPTextEncodeSDXL node exposes per-call. SDXL was trained with these baked into every conditioning: the original image size, the crop offset, and the "target" size it was resized toward. Getting them right (or at least consistent) measurably affects output quality on SDXL checkpoints. Setting them here means you configure them once per CLIP instead of re-entering them on every positive and negative encode in the graph.
The mask_width / mask_height fields (default 512 each) set the canvas dimensions Prompt Control assumes when interpreting masks referenced via IMASK() for regional prompting, so mask coordinates resolve consistently without you having to specify a size at every masked encode call.
Inputs and outputs
Required: clip. Optional: mask_width / mask_height (default 512, range 64–16384), sdxl_width / sdxl_height / sdxl_target_w / sdxl_target_h (default 1024, range 0–16384), sdxl_crop_w / sdxl_crop_h (default 0, range 0–16384). Output: CLIP, now carrying these defaults for downstream PC text-encode nodes.
Installing it
ComfyUI Manager: search "ComfyUI Prompt Control", install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/asagi4/comfyui-prompt-control
No model downloads - this node sets numeric defaults, nothing more.
Where people get tripped up
Wire it in before your text-encode nodes, same as every other "attach settings to CLIP" node in this pack - the CLIP that flows into PCTextEncode needs to be the one that came out of this node, or the defaults won't be picked up. If you're not on SDXL, the sdxl_* fields are irrelevant and safe to leave at default; they only matter for SDXL-family checkpoints, where mismatched width/height/crop values from what the model expects is a real, if often subtle, quality regression rather than a hard failure - nothing crashes, the output just looks slightly worse. If you're only doing regional prompting and not touching SDXL micro-conditioning at all, you can use this node purely for mask_width/mask_height and leave the SDXL fields untouched.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| mask_widthopt | INT | 51264–16384 | — |
| mask_heightopt | INT | 51264–16384 | — |
| sdxl_widthopt | INT | 10240–16384 | — |
| sdxl_heightopt | INT | 10240–16384 | — |
| sdxl_target_wopt | INT | 10240–16384 | — |
| sdxl_target_hopt | INT | 10240–16384 | — |
| sdxl_crop_wopt | INT | 00–16384 | — |
| sdxl_crop_hopt | INT | 00–16384 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CLIP | CLIP | — |