Wan 2.2 Segment Loader (Nukun)
Pick up a Wan continuation exactly where you left it
- last_frame
- run_id
- segment_index
- total_frame_count
- original_caption
- current_caption
- run_manifest_json
- report
Continuation workflows have a dirty secret: they're rarely one sitting. You render the base, maybe two extensions, close ComfyUI, come back tomorrow, and the run's state is... somewhere in a folder. Nukun Wan 2.2 Segment Loader is the "load your save file" node - point it at a run_id and it reads the run's manifest, figures out which segment you're on, and returns the current last_frame plus the captions and seeds recorded at the last save, so the next continuation starts from the actual state instead of your memory of it.
How it works
It reads the run folder that NukunWan22SegmentStore wrote under ComfyUI/output/wan_runs/<run_id>/. With segment_index = -1 (the default) it loads the latest segment automatically; set an explicit index to load an earlier state. It returns the saved end frame as an IMAGE (ready to feed a captioner or the TI2V latent's start_image), the run's segment_index and total_frame_count, both captions (original_caption from the base run, current_caption from the last segment), the full run_manifest_json, and a report that tells you where things stand. All the per-segment seeds and prompts live inside those manifests, so the loaded state is complete - you're not reconstructing anything by hand.
The inputs that matter
run_id- which run folder to load.segment_index--1for latest (default), or an explicit index to rewind.
Outputs worth wiring: last_frame (feed it back into the I2V latent or the captioner), run_manifest_json (thread into SegmentStore so the run's manifest stays authoritative), and report for a sanity check.
The honest take
This node only makes sense inside the pack's segmented continuation system - on its own it's just a file reader. But within that system it's the difference between a workflow you can leave overnight and one you have to babysit. The manual continuation pattern is real: you render a few segments, look at them, decide the direction's good, and queue the next batch. Loader exists so that "next batch" starts from the ground truth, not from whatever frame you last screenshotted. One thing to know: it reads state that SegmentStore wrote, so the run must have been stored with this pack's store node for the load to be meaningful.
Installing it
Part of Nukun_ComfyUI_Nodes - ComfyUI Manager (search "Nukun") or:
cd ComfyUI/custom_nodes
git clone https://github.com/OnekoSL/Nukun_ComfyUI_Nodes
Restart ComfyUI. Only numpy, Pillow, scipy, and PyWavelets are required. If the loader finds nothing for a run_id you're sure exists, check you're pointing at the same output/wan_runs root your store node writes to - a changed working directory is the usual culprit.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| run_id | STRING | wan_run_001 | — |
| segment_index | INT | -1-1–999 | — |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| last_frame | IMAGE | — |
| run_id | STRING | — |
| segment_index | INT | — |
| total_frame_count | INT | — |
| original_caption | STRING | — |
| current_caption | STRING | — |
| run_manifest_json | STRING | — |
| report | STRING | — |