Maybe Load Frame From Folder
Loopback, with a safety net
- init_image
- IMAGE
Here's the loopback trick that makes ComfyWarp's style stick. After you diffuse a frame, you don't want the next generation starting from noise - you want it starting from your stylized previous frame, warped forward. That means reading back the frames you just saved. This node does that: it watches an output folder, reads the frame at the current position, and returns it. The README's phrase for it is "Maybe Load Frame From Folder" (that's the display name, and it's accurate), because it's not guaranteed to find anything.
The "maybe" is the whole design. The node checks the folder every time it's called. If the folder is empty or doesn't exist yet - which happens on frame 0, before your SaveFrame has written anything - it doesn't error. It returns your init_image instead, so the very first frame of the loop still has something to diffuse from. That fallback is what keeps the pipeline from exploding on the first iteration, and it's the first thing to understand if you're debugging why frame 0 looks like your init and frames 1+ look stylized: that's the intended behavior.
Inputs
file_path- the folder to watch. In the README's example it's thevideoFramesoutput dir. The node creates the folder if it's missing.init_image- the fallback image returned when there are no frames in the folder yet. Usually your first source frame or a placeholder you want the sequence to start from.frame_number(default 0) - which frame in the folder to load, clamped to the last one if you overshoot. Set to-1and it returnsinit_imageregardless - a documented escape hatch.fit_into(default 1280) - the loaded frame is resized to fit this box, keeping aspect ratio, multiples of 8. Same resolution control as the other loaders.
Output is a single IMAGE.
The honest caveats
Because it globs the folder fresh on every call, it picks up whatever's there - including half-written files if you're unlucky, and definitely any non-frame files. Keep the folder single-purpose. And unlike LoadFrameFromDataset, there's no total-frame clamping against a known clip length; it just reads what exists. The name "Maybe" is doing real work: it's a best-effort loopback read with a graceful fallback, not a strict frame loader. Use it when you want the pipeline to continue itself from its own output; use the dataset loaders when you want deterministic access to the source clip.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| file_path | STRING | C:\code\warp\19_cn_venv\images_out\stable_warpfusion_0.20.0\videoFrames\650571deef_0_0_1 | — |
| init_image | IMAGE | — | |
| frame_number | INT | 00–9999999999 | — |
| fit_into | INT | 12800–16392 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |