Nodes/SD-PPP/SDPPP Get Text From Layer
ComfyUI Node

SDPPP Get Text From Layer

Read the text of a Photoshop text layer

By zombieyang·Created 2 years ago·Updated 7 months ago· 2,150
SDPPP Get Text From Layer
  • layer_or_group
  • text

Small node, quietly useful: give it a LAYER handle and it returns the text content of that layer as a STRING. Yes, it's that specific - but it solves a real workflow itch, which is keeping the text of your prompts inside the design file instead of buried in a node. If your workflow's prompt genuinely lives in Photoshop (a copy deck, a headline you keep editing, a spec list), this node turns that text layer into a wire you can plug into a CLIP Text Encode.

How it works

It's one round trip over the Socket.IO bridge: the node sends the layer's handle to the PS plugin with a getText action, and Photoshop reads the text layer and returns its string. It returns a list, so multiple text layers in one run come back in order - layer[0]'s text, layer[1]'s text, and so on.

Inputs and outputs

  • layer_or_group - a LAYER handle, from SDPPP Get Layer By ID or the group/list nodes. Feed it a raster layer and you'll get back empty text - it only has something to say about actual text layers.
  • Output: text - a STRING list, one entry per layer.

Because it outputs a plain string, it plugs straight into any prompt node's text input. A neat pattern: keep your base prompt as a text layer in the PSD, pull it with this node, and wire it into your positive prompt - edit the copy in Photoshop, re-run, done. No more hunting for the prompt box in a 200-node graph.

Install and gotchas

ComfyUI Manager, search sd-ppp (or git clone https://github.com/zombieyang/sd-ppp into ComfyUI/custom_nodes), restart - python-socketio and jsonpatch install themselves on first import. The Photoshop plugin ships from sdppp.zombee.tech as a .ccx; double-click to install with Creative Cloud, or rename to .zip and extract into the Photoshop Plug-ins folder.

Pack-wide rule applies: plugin and node pack must be on matching versions or Photoshop won't connect ("version mismatch, please reinstall PS plugin"). And one honest caveat: this is a 1.x-era node in a project that's moved its energy to a 2.0 plugin-driven UI - it still works, but don't expect active development. If you just need a static caption read once, it does the job without fuss.

CategorySD-PPP

Inputs (1)

NameTypeDefaultDescription
layer_or_groupLAYER

Outputs (1)

NameTypeDescription
textSTRING