Nodes/SD-PPP/SDPPP Parse Layer Info
ComfyUI Node

SDPPP Parse Layer Info

Turn layer metadata into plain numbers you can wire

By zombieyang·Created 2 years ago·Updated 7 months ago· 2,150
SDPPP Parse Layer Info
  • layer_info
  • opacity
  • bound_left
  • bound_top
  • bound_width
  • bound_height
  • name

Every SD-PPP node that returns layer data hands back a LAYER_INFO blob - a JSON object with the layer's name, opacity, and bounding box. This node is the one that unwraps it into individual, wireable outputs. Nothing glamorous, no Photoshop round trip involved: feed it the blob, get six numbers and a string out. It exists because ComfyUI can't read inside a custom object type, and if you want a layer's bounds to drive something, you need them as plain FLOAT/INT outputs.

How it works

Purely local. The LAYER_INFO object is a dict with name, opacity, and a boundary containing left, top, width, height. The node just unpacks those fields into separate outputs - it doesn't call Photoshop at all, which makes it instant and safe to rerun. That's also why it has no real inputs to configure: one LAYER_INFO in, six outputs out.

Outputs

  • opacity - FLOAT, 0–1. The layer's opacity as a fraction.
  • bound_left, bound_top - INT pixel coordinates of the layer's top-left corner.
  • bound_width, bound_height - INT dimensions of the layer's bounds.
  • name - STRING, the layer's name.

Where you'd actually use it

The classic move: feed a layer's bounds into anything positional. Want to send a generated image back into exactly the same spot a layer occupies? Send Images To Photoshop with a bound mask, or use these coordinates to build a mask or a crop region. Want a workflow that adapts to whatever you've got selected? Read a layer's width and height and feed them into a resolution or upscale calculation. It's also the natural finishing node after SDPPP Get Layer By ID, SDPPP Get Layers In Group, or SDPPP Get Linked Layers - all of them emit LAYER_INFO lists, and this parses each one.

One thing to remember: the group/list nodes return LAYER_INFO lists. If you're parsing several, you'll want to feed each element - the node takes a single blob, not a list.

Install and the pack context

Via ComfyUI Manager (search sd-ppp / Photoshop) or git clone https://github.com/zombieyang/sd-ppp into ComfyUI/custom_nodes, restart. Deps (python-socketio, jsonpatch) auto-install. The Photoshop plugin is a .ccx from sdppp.zombee.tech - double-click with Creative Cloud, or rename to .zip and extract into the Plug-ins folder. Because this node is local-only, it's the rare SD-PPP node that isn't affected by the plugin being disconnected - but the node that produced its LAYER_INFO input certainly is, so the matching-versions rule still matters for the nodes upstream of it.

CategorySD-PPP

Inputs (1)

NameTypeDefaultDescription
layer_infoLAYER_INFO

Outputs (6)

NameTypeDescription
opacityFLOAT
bound_leftINT
bound_topINT
bound_widthINT
bound_heightINT
nameSTRING