After Effects Image Output
Writing your generated frame out for the AE addon to grab
- images
- written_paths_json
- primary_path
- summary_json
If MKRAfterEffectsImageImport is the "bring AE footage in" side of the bridge, After Effects Image Output is the "send your result back" side. It takes your generated image batch and a plan, and writes the files to the disk path the plan specifies - the path your After Effects addon then watches to pull the result onto the timeline. It's the runtime half of the AE image-output lane, and it shares its base class with the Photoshop/Premiere equivalents, so the behavior is deliberately identical across hosts.
Here's the shape of the loop you're building: AE exports a plate → Image Import brings it into the graph → you process it (upscale, inpaint, restyle) → Image Output writes the result to a known path → the AE addon places it. This node is the "write" step, and it's the one that actually touches disk.
How it works
Feed it images and an image_output_plan_json (from MKRAfterEffectsImageOutputPlan). It reads the plan's asset_path and saves the batch there with PIL. The details that keep you sane:
- No recognized image suffix (or a missing one) → writes PNG and adds a warning, so a typo'd extension becomes a heads-up, not a corrupt file.
- A batch of frames becomes
stem_0000.png,stem_0001.png, … - which is exactly right for a frame sequence the AE addon can interpret in order. - Directories are created on the fly.
filename_overrideredirects a single run without touching the plan.
Outputs: written_paths_json lists every file written, primary_path is the first/only one, and summary_json reports the host, apply mode, image role, count, and warnings.
Installation
cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes
Restart ComfyUI, or search "MKRShift Nodes" in ComfyUI Manager. No pip dependencies - this is PIL file writing.
Common issues
The recurring trap: this node doesn't touch After Effects. It writes files. If nothing shows up in your comp, the AE addon isn't running or isn't watching the right folder - the pack's addons/after_effects/ scaffold is the other half you must have installed. Second, no plan (or an empty {}) means no asset path, so you get the fallback mkrshift_output.png written to the working directory - a classic "where did my image go" moment; always wire the plan through first. Third, frame sequences overwrite on re-run (same zero-padded names), so if you're keeping iterations, use filename_override or a versioned path. And the suffix warning is worth reading: AE addons often expect a specific format (PNG sequence, sometimes EXR) - the node happily writes whatever suffix you give it as long as PIL knows it, so an EXR request that PIL can't handle becomes a PNG with a warning. Match the format to what your AE pipeline expects before you run, not after.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| image_output_plan_json | STRING | {} | — |
| filename_overrideopt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| written_paths_json | STRING | — |
| primary_path | STRING | — |
| summary_json | STRING | — |