Nodes/ComfyUI-PainterNodes/Painter Long Video
ComfyUI Node

Painter Long Video

Chaining shots into one long take

By princepainter·Created 7 months ago·Updated 5 days ago· 194
Painter Long Video
  • positive
  • negative
  • vae
  • previous_video
  • initial_reference_image
  • clip_vision_output
  • start_image
  • end_image
  • positive
  • negative
  • latent
width832
height480
length81
batch_size1
motion_frames5
motion_amplitude1.15

Video models have a native context window, and "long video" is what you get when you refuse to accept it. PainterLongVideo is PainterNodes' answer: a conditioning-and-latent builder that chains clips by feeding the previous video back in as context, extending the timeline up to 1000 frames instead of the usual 81. It's the node you reach for when a single shot isn't enough and you'd rather the model continue a scene than cut to a new one.

What it is

A video/painter category node that produces positive, negative, and latent for a sampler - same shape as the other builders in this pack, but with the extension plumbing built in. The key inputs are previous_video (the tail of the last clip you generated) and initial_reference_image (a shot-anchor to keep identity stable across the chain). Feed both, set a long length, and the model continues rather than restarts.

How it works

It builds an empty latent at your resolution - internal shape [batch, 16, latent_timesteps, h/8, w/8], with the frame count compressed by the VAE's temporal factor - and then populates the conditioning with what it's given. The genuinely useful rule is in the code: you must connect at least one of previous_video, start_image, or end_image, or it raises a clear error rather than silently generating from nothing. motion_frames (default 5, 1–20) is how many context frames of the previous clip get carried forward; motion_amplitude (default 1.15) is how much motion freedom the continuation gets. Lower the amplitude for a calmer, more continuous feel; raise it if the chain looks stiff.

clip_vision_output is the optional identity anchor - if you're running CLIP Vision on your reference, feed the output here so the extended shot keeps the same subject.

Inputs and outputs that matter

  • previous_video - the clip to continue from. This is what makes it a "long video" instead of a single generation.
  • initial_reference_image / clip_vision_output - identity anchors for the continuation.
  • start_image / end_image - alternate/extra endpoints.
  • length - target total frames, up to 1000.
  • motion_frames / motion_amplitude - how much context and how much motion freedom.
  • Outputs: positive / negative / latent straight into your sampler.

Install

Part of the PainterNodes pack. ComfyUI Manager → search "PainterNodes" → install → restart, or:

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

Common issues

  • "At least one of previous_video, start_image, or end_image must be connected" - the node refuses to work blind. That's a feature; connect a previous clip or an anchor.
  • Identity drifts across the chain - the classic long-video failure. The fix is more anchor, not more steps: connect initial_reference_image and clip_vision_output, and keep motion_amplitude modest.
  • Longer = slower, obviously - 1000 frames is a lot of denoising. On a mid-range card this is a background job, not an interactive toy.

Long video is one of those features that sounds trivial and turns out to be all about consistency. This node gives you the mechanism - previous clip in, anchored continuation out - and leaves the art (where to chain, how much motion) to you.

Categoryvideo/painter

Inputs (14)

NameTypeDefaultDescription
positiveCONDITIONING
negativeCONDITIONING
vaeVAE
widthINT83216–8192
heightINT48016–8192
lengthINT811–1000
batch_sizeINT11–4096
motion_framesINT51–20
motion_amplitudeFLOAT1.151–2
previous_videooptIMAGE
initial_reference_imageoptIMAGE
clip_vision_outputoptCLIP_VISION_OUTPUT
start_imageoptIMAGE
end_imageoptIMAGE

Outputs (3)

NameTypeDescription
positiveCONDITIONING
negativeCONDITIONING
latentLATENT