ComfyUI Node

Move Up_Or_Down

Fake a camera pan without generating a single frame of video

By Isi-dev·Created 2 years ago·Updated 10 months ago· 33
Move Up_Or_Down
  • foreground_images
  • background_image
  • IMAGE
  • MASK
move_downfalse
speed1
fg_x_offset0
fg_y_offset0
view_height768

Want a cheap camera move without burning GPU time generating one? Move Up_Or_Down fakes "the camera is descending" by sliding a tall background image behind your subject. It's the vertical member of Isi-dev's move_foreground family - the same trick as Move In_Or_Out and Move Left_Or_Right, just pointed up and down instead of toward and sideways.

What it's for

You feed it a cutout of your subject plus a background that's taller than the view, and it outputs a batch of composited frames where the scene visibly pans while the subject stays planted. The classic use: cut a person out of a photo with any background-removal node, drop them on a taller street or landscape, and get a "character walking through a moving scene" clip with zero temporal generation. Video models are overkill for this - it's pure affine compositing, fast, and deterministic.

Mechanically it's a sliding crop window. view_height defines the visible window, distance = background height − view_height is the total travel, and each frame the window moves by speed pixels while the subject is alpha-blended back on top at a position that keeps it grounded in the scene. Give it a single foreground frame and it repeats that frame enough times to fill the whole pan - that's how the demo turns one still into a clip.

Inputs that matter

  • foreground_images (required): a batch of cutouts. They need an alpha channel - no transparency, no compositing, your subject becomes a sticker over the background.
  • background_image (required): a single image, ideally noticeably taller than view_height. Same height as the view means distance = 0 and nothing moves.
  • move_down: default false pans up (background slides down, scene rises). Flip it to pan down.
  • speed: pixels per frame, 1–50. Small gives a slow stately pan, big is a whip move.
  • fg_x_offset / fg_y_offset: nudge the subject left/right or up/down within the frame. Defaults center it horizontally and anchor it at the bottom - or the top when moving down.
  • view_height: the visible window, default 768.

Outputs are IMAGE (the composited frames, ready to save as video) and MASK. Honest catch from the source: that mask output is all zeros, a placeholder. Don't wire it into anything that expects a real cutout.

Install

Part of Isi-dev's animation pack. Install via ComfyUI Manager (search ComfyUI-Animation_Nodes_and_Workflows) or:

cd ComfyUI/custom_nodes
git clone https://github.com/Isi-dev/ComfyUI_Animation_Nodes_and_Workflows
cd ComfyUI-Animation_Nodes_and_Workflows
pip install -r requirements.txt

Dependencies are torch, torchaudio, numpy, opencv-python, and mediapipe - nothing exotic, and no model files to download for this node. Restart ComfyUI after.

Common issues

  • Nothing moves. Your background isn't taller than view_height, so there's zero travel. Give the background more height.
  • Subject looks like a card. This is a fake pan with no perspective and no motion blur, so it reads as parallax, not 3D. Keep pans modest and it looks intentional.
  • Foreground covers the whole frame. You fed it an opaque cutout. Run it through a proper background-removal node first so it actually has an alpha channel.
  • Out of bounds or clipped. If the background is too narrow or the offsets push the subject off the visible window, you'll get hard edges. Keep fg_x_offset/fg_y_offset small relative to the frame.
Categoryimage

Inputs (7)

NameTypeDefaultDescription
foreground_imagesIMAGE
background_imageIMAGE
move_downBOOLEANfalse
speedINT11–50
fg_x_offsetINT0-16384–16384
fg_y_offsetINT0-16384–16384
view_heightINT768-16384–16384

Outputs (2)

NameTypeDescription
IMAGEIMAGE
MASKMASK