Nodes/SSParallaxX/πŸ‘€ 3D Parallax Animation by SamSeen
ComfyUI Node

πŸ‘€ 3D Parallax Animation by SamSeen

The node that turns flat images into living photos, depth map included

By SamSeenXΒ·Created about a year agoΒ·Updated 9 months agoΒ· 0
πŸ‘€ 3D Parallax Animation by SamSeen
  • base_image
  • external_depth_map
  • frames
  • depth_map
β—„num_frames120β–Ί
β—„horizontal_shift20.0β–Ί
β—„vertical_shift3.0β–Ί
β—„blur_radius3β–Ί
β—„invert_depthfalseβ–Ί
β—„clockwisetrueβ–Ί
β—„loop_typeForwardβ–Ί
β—„edge_fix_methodCrop and Zoomβ–Ί

This is the node the whole SSParallaxX pack exists for. You drop in one flat image, it hands you a sequence of frames where the foreground rocks gently against the background - the "living photo" effect that's all over social media. The genuinely nice part: it estimates its own depth, so you don't have to source a depth map or run a separate preprocessor first. It's a complete 2.5D parallax machine in one box. And with zero impressions on comfy.icu, it's also a node nobody's heard of - which is fine, that just means you get to be the person who tries it first.

How it works

The depth comes from Depth-Anything-V2-Small, pulled from HuggingFace on your first run (internet required; ~25M params and Apache 2.0, so no licensing trap). It returns a relative depth map where light = close, dark = far - exactly the thing that drives "all those animated 'living photo' effects" in the depth-estimation world. If you wire in your own external_depth_map instead, it uses the red channel and resizes it to match your image.

The parallax itself is gloriously low-tech. The node sorts every pixel by depth, then paints them closest-first so nearer objects land on top, displacing each pixel along an ellipse by an amount proportional to its depth. Closer stuff moves more, far stuff barely moves, and the illusion comes from that differential. The shift is driven by cos/sin through a full circle, so Forward mode loops cleanly on its own. Empty spots left by the motion get filled with a nearest-neighbor pass - which is also why big shifts start to look mushy.

The inputs that matter

  • num_frames (default 120, up to 1200): total frames out. More = smoother, but the cost is real (below).
  • horizontal_shift / vertical_shift (defaults 20 / 3): the size of the elliptical sweep. Keep it modest - parallax tears when you push it too far, because there's no pixel data behind objects the moving camera reveals. vertical_shift can stay small.
  • blur_radius: smooths the depth map. Higher = softer depth boundaries, less crisp object separation.
  • invert_depth: if the scene looks "inside out" - background moving more than foreground - flip this.
  • loop_type: Forward or Bounce. Bounce generates half the frames and mirrors them, so you get a natural back-and-forth.
  • edge_fix_method: None keeps the raw edge holes, Crop and Zoom trims the margins and rescales back, Ease-In fades depth near the borders so the edges barely move. Leave it on Crop and Zoom unless it annoys you.

Outputs are frames (an IMAGE batch - wire it into SS_Images_to_Video_Combiner, or a VHS/SaveAnimated node) and depth_map (the grayscale map, handy to eyeball before committing to a long render).

The honest warning: it's slow

Where people get burned. The frame generator is pure Python - per-pixel loops, a sort, and a hole-fill, all on CPU. At 512Γ—512 and 120 frames that's tens of millions of pixel operations, so a full render takes a while. Run a quick pass at a low num_frames or small resolution before you commit to the 1200-frame version.

Install

Same as the rest of the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/MrSamSeen/SSParallaxX.git
cd SSParallaxX
pip install -r requirements.txt

Or search "SSParallaxX" in ComfyUI Manager and restart. It pulls a heavy stack - torch, transformers, timm, accelerate, opencv - and the depth model downloads on first use. One caveat worth knowing: the author migrated the repo to SamSeenX in late 2025 and main is currently stripped of code, so if a fresh clone comes back empty, that's the migration fallout, not you - pin an older commit or grab it through Manager's snapshot.

Troubleshooting

  • Depth download fails on first run: you need internet access to depth-anything/Depth-Anything-V2-Small-hf. If the import itself fails there's a fallback heuristic estimator, but it's clearly worse - worth fixing the model load.
  • Everything moves, but backwards: invert_depth.
  • Edges tearing: lower the shifts, or switch edge_fix_method to Ease-In.
  • Out of memory on big images: resize down with SS_Image_Uploader before animating.
CategoryπŸ‘€ SamSeen

Inputs (10)

NameTypeDefaultDescription
base_imageIMAGEβ€”
num_framesINT1205–1200β€”
horizontal_shiftFLOAT20.00–100β€”
vertical_shiftFLOAT3.00–100β€”
blur_radiusINT31–51β€”
invert_depthBOOLEANfalseβ€”
clockwiseBOOLEANtrueβ€”
loop_typeCOMBOForward2 options: Forward, Bounce
edge_fix_methodCOMBOCrop and Zoom3 options: None, Crop and Zoom, Ease-In
external_depth_mapoptIMAGEβ€”

Outputs (2)

NameTypeDescription
framesIMAGEβ€”
depth_mapIMAGEβ€”