ComfyUI Node

AE Animation

ComfyUI's After Effects, squeezed into one node

By wallen0322·Created 10 months ago·Updated 9 months ago· 58
AE Animation
    • frames
    • mask_frames
    width1280
    height720
    fps16
    total_frames81
    mask_expansion0
    mask_feather0
    layers_keyframes[]
    start_frame0
    end_frame-1
    cam_enable0
    pano_enable0
    cam_pos_x0.00
    cam_pos_y0.00
    cam_pos_z1000.00
    cam_yaw0.00
    cam_pitch0.00
    cam_roll0.00
    cam_fov90.00

    The name is accurate and that's the whole pitch: this node is a mini After Effects living inside your ComfyUI graph. One AE Animation node, one floating timeline editor, and you get keyframed, multi-layer, camera-moving motion graphics out the other side as a batch of frames you can hand to a video model. If you've ever sighed at building "pan the image left" with a handful of crop-and-lerp nodes, this is the node that makes it a two-minute job.

    It's the kind of thing ComfyUI is historically bad at. You can animate in the graph - chains of TransformImage nodes, video interpolation, AnimateDiff - but a real timeline with keyframes, layers, masks, bezier paths and a 3D camera is a category of tool the ecosystem mostly lacks. This pack is one of the few that just builds it. The author, wallen0322, is the same person behind the ComfyUI-Wan22FMLF workflow that powered a flagship SVI generation in early 2026, so the credentials are real even if this pack is younger.

    How it actually works

    The node itself is deceptively simple Python. All the authoring happens in a browser UI (a Vue 3 app served as a frontend extension) - that's the floating "AE Timeline" window you get after restarting ComfyUI. Everything you do there - layers, keyframes, masks, paths, camera - is serialized into one JSON blob and stuffed into the layers_keyframes widget. When you hit Run, the backend reads that JSON, interpolates the keyframes (straight linear lerp between keys), applies bezier path animation, composits the layers in order, and renders each frame with numpy/torch into a single batched IMAGE tensor. No API calls, no keys, no GPU inference required for the render itself - the frontend only uses WebGPU for a fast preview.

    The inputs that matter

    You'll barely touch most of these widgets because the UI writes them for you:

    • width, height, fps, total_frames - the project parameters. Set them in the UI toolbar and hit "保存到节点" (Save to node) so the node widgets match. Mind the total_frames cap of 9999 and fps range of 1–120.
    • layers_keyframes - the JSON timeline blob. Don't hand-edit this; it's the UI's scratch space.
    • start_frame / end_frame - render a slice of the timeline instead of the whole thing. end_frame of -1 means "to the end".
    • mask_expansion / mask_feather - node-level mask cleanup applied to the mask output.
    • cam_enable, pano_enable, cam_pos_x/y/z, cam_yaw/pitch/roll, cam_fov - the 3D camera. Camera off means plain 2D compositing; flip it on and layers' Z-depth plus FOV give you real perspective, parallax pushes and dolly moves. The preview is a 2D approximation, so trust the render, not the preview.

    The outputs

    • frames (IMAGE) - a batched sequence, one per rendered frame, at width×height. This is your money output: wire it into a video model like Wan I2V, LTX, or AnimateDiff as the conditioning/motion source, or straight into a Save Video node.
    • mask_frames (MASK) - the per-layer foreground masks as a batch, handy when you want to composite the rendered motion over a separate background later.

    The single most common real-world use right now is generating animated control videos for workflow like Wan 2.2 Time-to-Move - the timeline gives you precise, controllable motion to steer a video model, which is exactly the job a bare crop-lerp chain can't do well.

    Installing it

    ComfyUI Manager: search "AE Animation" (or ComfyUI-AE-Animation) and install. Or the manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/wallen0322/ComfyUI-AE-Animation.git
    

    Then restart ComfyUI. Dependencies are light - the render code wants cv2, numpy, torch, PIL, all of which you already have. One genuine extra: rembg. It's optional and only used for the in-UI background extraction tool (Extract), and the code degrades gracefully if it's missing - but if you want the one-click cutout that turns a background plate into a new foreground layer, install it:

    pip install rembg
    

    No model downloads, no weights to fetch.

    Where people get burned

    • The UI is Chinese by default. That's the author's language and the README lives in Chinese. The community fix is a well-known English fork, Verolelb/ComfyUI-AE-Animation-English-Mod, which shows up in workflow threads whenever someone asks how to make TTM control videos without owning After Effects.
    • UI layout chaos on RTX 40-series cards. A known WebGPU driver quirk. Fix is in the pack's own troubleshooting doc: open the browser console and run localStorage.setItem('timeline_disable_gpu', 'true'), then refresh - it falls back to Canvas 2D. Update the driver or browser and you can remove the flag.
    • Forgetting to sync the node. If your output resolution or frame count looks wrong, you changed settings in the UI but didn't hit Save-to-node. The node only knows what's in its widgets.
    • It's a preview release. Version 3.x, actively developed, with the expected rough edges. Preview rendering is capped at 1920×1080 and the 2D preview isn't pixel-accurate for camera work - judge the final frames, not the viewport.
    • Big projects will eat RAM. Images are auto-compressed to project resolution and there's a Clear Cache button for a reason - use it when layers pile up.

    It's not going to replace actual After Effects for serious comp work, and you shouldn't expect it to. But for "make this image glide, rotate, and zoom over 4 seconds, then feed it to a video model," nothing else in the ecosystem is this direct.

    CategoryAE Animation

    Inputs (18)

    NameTypeDefaultDescription
    widthINT128064–8192
    heightINT72064–8192
    fpsINT161–120
    total_framesINT811–9999
    mask_expansionINT0-50–50
    mask_featherINT00–50
    layers_keyframesSTRING[]
    start_frameINT0
    end_frameINT-1
    cam_enableoptINT00–1
    pano_enableoptINT00–1
    cam_pos_xoptFLOAT0.00
    cam_pos_yoptFLOAT0.00
    cam_pos_zoptFLOAT1000.00
    cam_yawoptFLOAT0.00
    cam_pitchoptFLOAT0.00
    cam_rolloptFLOAT0.00
    cam_fovoptFLOAT90.00

    Outputs (2)

    NameTypeDescription
    framesIMAGE
    mask_framesMASK