PSD → Smart Object Info
Find the layer names before you paste anything into that PSD
- STRING
This node is the flashlight you hold up before you go poking around inside a Photoshop file. It's the companion to the PSD Mockup Embedder from the same pack, and its whole job is one thing: tell you what smart-object layers a PSD actually has, so you don't guess layer names and get a silent miss later.
The problem it solves is real. Mockup PSDs from Envato or Creative Market are rarely named "smart_object" - they're called Design, Front Panel, or some gibberish from 2014. When you feed a file to the embedder and tell it which layer to replace, you need the exact name. Guessing wrong means it quietly falls back to the first smart object and you get a poster on the wrong surface. The Inspector exists so that doesn't happen.
How it works
Mechanically it's simple, and that's the point. The node opens your PSD with psd-tools, walks every layer (descending into groups, because smart objects love living inside groups), and collects anything that is a SmartObjectLayer. For each one it reports:
- the layer name and id
- whether it's visible
- its bounding box
- its transform_box - the perspective/rotation data that defines the replaceable area
That output is a single STRING containing formatted JSON, so it's a node you run, read the result widget on, and then delete or bypass. You're using it for information, not pixels.
The inputs
Only two, both required, and neither is mysterious:
- psd_file - a path to the .psd or .psb file. The same frontend upload button as the embedder works here too, or you can just paste a path and point it at
ComfyUI/input. - include_hidden - a boolean, default
false. Set it to true if you want to list smart objects on hidden layers too. Mockup files often keep alternate smart objects hidden for later, so this is the "show me everything" switch.
Installing and running it
Same story as the whole pack - no models, no heavy deps for the Inspector itself (the OpenCV requirement only bites when you actually warp):
cd ComfyUI/custom_nodes
git clone https://github.com/leafiy/comfyui_psd_smart_object
or grab it through ComfyUI Manager by searching for comfyui_psd_smart_object, then restart. Since it's a utility with a JSON string output, you don't wire it into anything downstream - run it, read the output, move on.
Where people get burned
The JSON output can be genuinely long on a big mockup with a dozen smart objects, and the node's own widget will happily truncate it. That's fine - you're looking for names, and the display order matches the layer order in the PSD. One thing to keep in mind: names are compared case-insensitively in the embedder, but otherwise verbatim - no fuzzy matching, no partial match. What the Inspector prints is exactly what you type. It's ten seconds of work that saves you the classic "why is my image on the wrong panel" debugging session.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| psd_file | STRING | — | |
| include_hidden | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |