ComfyUI Node

FloweR Predict

See what FloweR thinks your animation looks like before SD renders a single frame

By pxl-pshr·Created 5 months ago·Updated 5 months ago· 13
FloweR Predict
  • flower_model
  • frames
  • predicted_frame
  • occlusion_mask
  • flow_visualization

FloweR Predict is the pack's debugging window. The SDCNTxt2Vid node runs FloweR internally on every frame, but you never get to see what it produced - the model's next-frame guess gets immediately painted over by SD's inpaint pass. This node runs the same model standalone so you can actually look at the three things FloweR emits: its predicted next frame, its occlusion mask, and a color-coded visualization of the optical flow it computed. If you're tuning a Txt2Vid workflow and can't tell whether weird output is SD's fault or FloweR's, this is how you find out.

What it does

Give it a flower_model (from Load FloweR Model) and a batch of frames - at least 4 of them. FloweR is a window-of-4 model, so it takes the last four frames and predicts what comes after. The outputs:

  • predicted_frame - FloweR's raw guess at the next frame, before any SD sampling. Often a bit soft and dreamy; that's expected.
  • occlusion_mask - where FloweR thinks things are covered or revealed, i.e., where the next frame genuinely can't be predicted from motion alone. This is the mask the Txt2Vid node feeds to its inpaint pass, amplified by 10x internally.
  • flow_visualization - the optical flow painted as an HSV color map (hue = direction, brightness = magnitude). This is the most useful one for debugging: it shows you at a glance whether the model thinks your scene is panning, zooming, or swirling.

There are no other knobs. Feed it frames, read the outputs, that's the whole node.

Wiring it up

Load any video frames into an IMAGE batch - grab a few frames out of a VHS loader or stack images with ImageBatch - and wire flower_model from the loader. The three outputs plug into any preview node. A nice trick: compare predicted_frame against the actual next frame in your source video to see how trustworthy FloweR's guess was before you commit a long, slow Txt2Vid render to it.

Install

Same pack, same drill:

cd ComfyUI/custom_nodes
git clone https://github.com/pxl-pshr/ComfyUI-SD-CN-Animation

or ComfyUI Manager (search "ComfyUI-SD-CN-Animation"), then restart. It uses the FloweR weights from ComfyUI/models/FloweR/, which auto-download on first launch.

Gotchas

Two hard requirements baked into the code. First, you need at least 4 input frames - fewer and the node raises a clear error ("FloweR requires at least 4 input frames"). Second, frame dimensions must be at least 128px and get rounded down to multiples of 128 internally (512x512 and 1024x1024 are fine; sub-128 inputs are rejected outright). The flow visualization is normalized to the largest vector in the frame, so it's a relative picture, not absolute pixels-per-frame - great for spotting motion patterns, not for measuring exact displacement. And note this is a debug tool, not part of the main loop: it runs FloweR once on whatever batch you hand it, so there's nothing to connect into Txt2Vid here.

CategorySD-CN-Animation

Inputs (2)

NameTypeDefaultDescription
flower_modelFLOWER_MODEL
framesIMAGE

Outputs (3)

NameTypeDescription
predicted_frameIMAGE
occlusion_maskMASK
flow_visualizationIMAGE