Nodes/MKRShift_Nodes/Photoshop Export Plan
ComfyUI Node

Photoshop Export Plan

Decide where your result lands in Photoshop, before anyone writes a pixel

By criskb·Created 7 months ago·Updated 5 months ago· 0
Photoshop Export Plan
    • photoshop_export_plan_json
    • manifest_line
    • summary_json
    asset_path
    target_layer_nameMKRShift Result
    placement_modenew_layer
    transport_plan_json

    MKRPhotoshopExportPlan builds the plan that tells the Photoshop bridge how to bring a generated result back into a document: what file to place, what to call the layer it lands on, and how to place it. It's a pure builder - no filesystem, no pixels - and its output drives MKRPhotoshopExportOutput, which does the actual writing, and ultimately the Photoshop UXP plugin, which does the actual placement.

    The reason this split exists is that it makes the "where does it go in Photoshop" decision inspectable and swappable. You can retarget the entire export lane by editing one plan node's fields, and you can log the manifest_line for delivery or review nodes without any runtime side effects. Plans are cheap; file writes and layer operations are not.

    The inputs that matter

    • asset_path - where the generated file will be written. Shared filesystem reachable by both ComfyUI and Photoshop, please. This is the field that must be right.
    • target_layer_name - the name the layer gets in Photoshop (MKRShift Result default). Reusing the same name across runs lets the plugin update that layer instead of stacking new ones.
    • placement_mode - the three real ways Photoshop can consume a file:
      • new_layer - drop it in as a brand-new layer. Default, and what you want for iterative looks.
      • smart_object - place it as a smart object, so Photoshop keeps the file link and you can re-render without re-importing.
      • replace_layer - swap the pixels of an existing named layer. The one for compositing-in-place roundtrips.

    Optional transport_plan_json attaches a transport/endpoint plan to the same payload - most graphs leave it empty.

    The outputs

    • photoshop_export_plan_json - the plan, schema mkrshift_photoshop_export_plan_v1. Wire it into MKRPhotoshopExportOutput's photoshop_export_plan_json.
    • manifest_line - a compact target_layer_name,placement_mode,asset_path string for manifests and logs.
    • summary_json - target layer, whether a path exists, whether a transport plan is attached, warnings.

    Installing

    The pack install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/criskb/MKRShift_Nodes
    

    restart, or Manager → "MKRShift". Nothing extra to download.

    Gotchas

    Because this node is pure, "it ran with no warnings" doesn't mean Photoshop will be happy - it means the plan is well-formed, not that the path is reachable or the layer name matches anything. The replace_layer mode especially: the plugin looks for a layer with exactly the name in target_layer_name. Misspell it and the plugin has nothing to replace, which usually surfaces as "nothing happened" rather than an error. And like the whole Photoshop lane, remember the plugin is the last mile - the plan only gets you to a file on disk.

    CategoryMKRShift Nodes/Addons/Photoshop

    Inputs (4)

    NameTypeDefaultDescription
    asset_pathSTRING
    target_layer_nameSTRINGMKRShift Result
    placement_modeCOMBOnew_layer3 options: new_layer, smart_object, replace_layer
    transport_plan_jsonoptSTRING

    Outputs (3)

    NameTypeDescription
    photoshop_export_plan_jsonSTRING
    manifest_lineSTRING
    summary_jsonSTRING