Nodes/ComfyWarp/Load Frame
ComfyUI Node

Load Frame

The 'give me the frame the counter says' node

By Sxela·Created 3 years ago·Updated 2 months ago· 49
Load Frame
  • file_paths
  • Image
  • Frame number
seed0
total_frames0

ComfyWarp's whole trick is that you diffuse one frame, then the next frame, and the previous stylized output gets warped forward by optical flow so the style stays put. To pull that off you need a node that just hands you "the frame at the current position" whenever the queue ticks. That's this one. LoadFrame takes the list of source frames your dataset produced and returns the single image at whatever frame number you feed it - nothing fancier.

It's the older half of the frame-loading family, wired to LoadFrameSequence's Frames output (a FRAMES type, which is just a list of file paths with a frame count). You give it file_paths, a seed (used as the frame number, don't let the name fool you - this is not random), and total_frames so it knows how long the clip is. It clamps the request into range, so asking for frame 999 on a 30-frame clip quietly gives you frame 29 instead of erroring. Outputs are the Image and the Frame number it actually used, which is handy because the clamped value is the one that came out.

Where people get burned: this node has a known grumpy edge. The source literally carries a comment that validation "fails here for some reason," and because it expects a FRAMES list wired through INPUT_IS_LIST, a freshly dropped-in workflow can refuse to validate until the sequence node upstream has run once. If that happens, don't fight it - LoadFrameFromDataset does the same job against a FRAME_DATASET and is the path the sample workflows moved to. Think of LoadFrame as the legacy loader and LoadFrameFromDataset as the one that got maintained.

Why you'd use it: the classic loopback chain. LoadFrameSequence lists your extracted frames → LoadFrame picks the current one → that becomes the init image for the sampler → you save the result and step the counter. It's also the simplest possible way to preview a single frame from a sequence while you tune the prompt.

Installing ComfyWarp

The pack is Sxela/ComfyWarp - in ComfyUI Manager, search ComfyWarp and hit install, or do it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/Sxela/ComfyWarp

Then restart ComfyUI. The pack's own requirements.txt pulls in opencv-python and scikit-image; Manager handles those, and there are no checkpoint files to place - the RAFT optical-flow weights download themselves on first use. One warning: the repo's README describes an old Windows install.bat flow that installs a whole separate Python 3.10 and ComfyUI into a folder. That's legacy from 2023 - ignore it unless you specifically want a sandboxed copy. For a normal install, custom_nodes is the way.

Getting it running

  1. Point LoadFrameSequence at your extracted-frames folder and wire its Frames output into file_paths.
  2. Drive seed with your frame counter (a FixedQueue node's current output is the usual source).
  3. Plug total_frames from the sequence node's Total_frames output.
  4. The Image goes to your sampler as init, the Frame number goes to anything that needs to know where you are (like SaveFrame).

If it validates and returns the right frame, you've got the core of every ComfyWarp workflow standing. If it won't validate, swap in LoadFrameFromDataset and move on with your life.

CategoryWarpFusion

Inputs (3)

NameTypeDefaultDescription
file_pathsFRAMES
seedINT00–9999999999
total_framesINT00–9999999999

Outputs (2)

NameTypeDescription
ImageIMAGE
Frame numberINT