Photoshop Image Import
Load a Photoshop layer's pixels — and its alpha — straight into the graph
- image
- mask
- payload_json
- asset_path
- summary_json
MKRPhotoshopImageImport is the pixel-level door into the Photoshop bridge. While MKRPhotoshopDocumentImport brings in document metadata, this node actually loads image data: it reads a payload from the Photoshop UXP plugin, finds the asset path it points at, and hands you an IMAGE tensor, a MASK tensor, and the resolved path - all at once.
Here's the part people like: the mask. The loader opens the image as RGBA and returns the alpha channel as the MASK output. So if your Photoshop layer has transparency - and in real comp work it usually does - you get the cutout for free, ready to feed into compositing, inpaint, or mask-conditioned nodes. That single behavior makes layer roundtrips dramatically less fiddly than loading a flat PNG and praying.
The inputs
- payload_json - the plugin payload, which needs to carry an image asset path somewhere in it (the loader scans for
path/asset_pathfields). No path → a cleanValueError, not silent garbage, which is honestly the right failure mode. - preferred_slot (optional) - a hint for which image in the payload you want when the payload could point at several.
The outputs
- image (IMAGE) - the loaded pixels.
- mask (MASK) - the alpha channel as a mask. No alpha in the file, you get a solid-opaque mask.
- payload_json - the normalized payload that was used, so downstream nodes can see context.
- asset_path - the exact file path that got loaded. Great for logging or for passing to output lanes.
- summary_json - host, path, size, candidate count, warnings.
Where this fits
Retouch roundtrips, texture paintovers, composite handoff - anywhere you want to pull real layer art into the graph, work on it, and push it back out through the output/export lanes. Because you get the mask alongside, you can do masked inpaint or background work and hand the compositor back a cleaner result.
Installing and gotchas
Pack install, the usual:
cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes
restart, or Manager → "MKRShift". No dependencies, no models.
The gotchas are worth one paragraph. First, this loads from a file the plugin exports - if the plugin isn't connected or the path it sent is stale, you get a FileNotFoundError, not a graceful empty image. Second, the mask is the alpha channel, not layer transparency in the Photoshop sense: a layer that's fully opaque but has a soft-edge selection will import with a solid mask. If your downstream expects a selection-based mask, flatten/export with alpha that reflects what you need. And keep in mind this is a raster handoff - no PSD layer structure survives; that's what the document-import lane is for.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| payload_json | STRING | — | |
| preferred_slotopt | STRING | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| payload_json | STRING | — |
| asset_path | STRING | — |
| summary_json | STRING | — |