Nodes/MKRShift_Nodes/After Effects Image Import
ComfyUI Node

After Effects Image Import

Pulling an AE frame in as an actual image, mask included

By criskb·Created 7 months ago·Updated 5 months ago· 0
After Effects Image Import
    • image
    • mask
    • payload_json
    • asset_path
    • summary_json
    payload_json
    preferred_slot

    Most of the MKRShift addon import nodes deal in metadata - they normalize JSON about a document or comp. After Effects Image Import is the one that deals in pixels. It takes a payload describing an image asset (a plate or frame your AE addon exported), loads it from disk, and hands you a real IMAGE tensor, a matching MASK, and the asset's path. It's the "bring the footage in" end of the After Effects bridge, and it's the node you reach for when you want to run AE output through ComfyUI processing - upscaling, relighting, inpainting, a style pass - and then send it back.

    The After Effects ↔ ComfyUI pipeline is a real pattern in the community - people build panels that drive ComfyUI from inside AE and stack results back on the timeline. This node is the ComfyUI-side intake for that loop.

    How it works

    You give it a payload_json that points at an image asset on disk (the AE addon exports this). The node resolves the asset path, loads the image, and returns it as a properly-shaped IMAGE tensor along with its alpha or mask channel - useful because AE exports plates with alpha more often than you'd think, and a mask output means you can keep the transparency in the graph instead of flattening it away. The preferred_slot optional input lets you hint which slot/import variant you want when a payload describes multiple assets; leave it empty and the node picks the default.

    The outputs are the full handoff:

    • image - the loaded frame as an IMAGE tensor
    • mask - the matching MASK (from alpha or an explicit mask channel)
    • payload_json - the normalized payload, passed back for downstream chaining
    • asset_path - the resolved file path, so you know exactly what was read
    • summary_json - host name and warnings

    It inherits from the pack's shared BaseHostImageImport, so the load behavior is consistent across the Photoshop/Premiere/AE image-import family - learn one, and the others are the same with a different host tag.

    Installation

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

    Restart ComfyUI, or install via ComfyUI Manager ("MKRShift Nodes"). No pip dependencies - this is standard ComfyUI image loading.

    Common issues

    The failure mode is almost always the payload pointing at a path that doesn't exist - a stale export, a different machine, a filename the AE script produced with different case. The image comes back empty or errors, and the fix is on the host side (re-export), not here. Second, mask expectations: if your frame has no alpha, the mask output is a solid full-coverage mask, which is correct behavior but surprises people who expected a transparent gap. Third, remember this loads a still. If you're processing a full AE render, you're doing it frame by frame - the pack's render-plan nodes (MKRAfterEffectsRenderPlan) are the layer that sequences frames; this node feeds each one in. It's a small, focused node, and in a comp that needs ComfyUI work it's the difference between hand-dragging frames and a pipeline.

    CategoryMKRShift Nodes/Addons/After Effects

    Inputs (2)

    NameTypeDefaultDescription
    payload_jsonSTRING
    preferred_slotoptSTRING

    Outputs (5)

    NameTypeDescription
    imageIMAGE
    maskMASK
    payload_jsonSTRING
    asset_pathSTRING
    summary_jsonSTRING