ae-nano-flex
Generate AI imagery inside your timeline, without breaking a single expression
Generate AI imagery without leaving After Effects — and drop it on the selected layer without breaking a single expression or mask.
replaceSource(item, true) swaps the artwork underneath everything already riding on the layer — three effects, two masks, one expression, fourteen keyframes — without ever recreating the layer itself.
The panel runs in ExtendScript, which has no HTTP client and no JSON parser, so it speaks
raw HTTP over a TCP socket to a local Node bridge. The bridge dispatches to a provider.
Providers never return a value — they write files into the job directory, and the server scans it
afterwards. That is why a shell script is a valid backend. The result comes home through
replaceSource, which swaps the artwork underneath everything attached to the layer.
The job directory is the contract, so every generation the panel ever ran is still on disk,
named by its job. A few of them, straight from bridge/outputs/ — the football comps and comic
panels are layer-replacement tests on real comps; the four aliens are one job, four generations — the spread a single click of Generate hands back to the layer.









Built and working
Auto-discovers providers by scanning providers/; all five (fal, replicate, a1111,
comfyui with a full 7-node graph and websocket progress, shell-command) implement the contract for
real; the panel UI builds itself from each provider's capability schema;
replaceSource(item,true) preserves expressions and masks; a curl-based HTTP shim
covers ExtendScript's missing client.
Honest gaps
The README claims job history and caching — neither exists. There is a mode bug:
fal, replicate and comfyui declare txt2img and img2img but never branch on
it, so Edit and Variations silently fall back to plain text-to-image on three of the five providers.
Type a prompt → watch the progress bar → hit Replace Selected Layer → show that the wiggle expression and the mask survived the swap. Then flip the provider dropdown and watch the whole parameter panel redraw itself from the new backend's schema.
Cost to bring back up: very low. cd bridge && npm install && npm start,
set FAL_API_KEY, run the .jsx. The fal provider alone needs no local GPU.
Project Elements
Have a Project in Mind?
Animation direction, VFX and creative technology. Message me on LinkedIn or get in touch.