Nodes/Nukun_ComfyUI_Nodes/Wan 2.2 Frame Sequence Assembler (Nukun)
ComfyUI Node

Wan 2.2 Frame Sequence Assembler (Nukun)

Turn a thousand saved Wan frames into one MP4

By OnekoSL·Created 3 months ago·Updated 11 days ago· 1
Wan 2.2 Frame Sequence Assembler (Nukun)
    • video_path
    • total_frames
    • duration
    • manifest_json
    • report
    run_idwan_run_001
    fps16
    filename
    codeclibx264
    quality8
    overwritetrue

    Once your Wan 2.2 continuation run is done you have a folder of hundreds of numbered PNGs and no video. Stitching them with a manual ffmpeg command is doable, but it's exactly the kind of thing you want a node for - and this one also checks your work. Nukun Wan 2.2 Frame Sequence Assembler reads the frames a NukunWan22SegmentStore run wrote, verifies the count against the run manifest, and writes a single MP4 using the imageio/imageio-ffmpeg stack that ships inside ComfyUI's environment. It's the closing node of the pack's segmented workflow.

    How it works

    Point it at a run_id and it finds that run's frames/ directory, sorts the frame_*.png files, and - here's the part people skip - compares the number of frames against the run manifest's expected total. Mismatch, and it refuses to encode rather than ship you a 800-frame video that's actually 760. It then writes an MP4 with imageio's writer, forcing yuv420p and a macro_block_size of 1 (so odd dimensions don't break encoding). Frame sizes are checked mid-write: if any frame has different dimensions than the first, you get a clear error instead of a corrupted video. Outputs include video_path, total_frames, duration, an assembly_manifest.json (written next to the video, with the source run manifest embedded), and a report.

    The inputs that matter

    • run_id - which run to assemble.
    • fps - playback rate for the output; default 16, matching the pack's Wan settings.
    • filename - the output name (defaults to the run_id, sanitized).
    • codec - libx264 (default) or mpeg4.
    • quality - 1–10, default 8, passed to the encoder.
    • overwrite - default on; if you turn it off and the video exists, it errors instead of replacing.

    The honest take

    Two things to flag. First, the dependency: the README calls imageio-ffmpeg "bundled," and it sort of is - ComfyUI ships it for its own video nodes, but it's not in this pack's requirements.txt. If you run into "No module named imageio," the fix is installing it into the same Python environment ComfyUI uses, not the pack's install. Second, this node validates hard - the frame-count and size checks are deliberate, because a continuation with a dropped segment would otherwise silently produce a short or broken video. Annoying when it errors, but that's the feature.

    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. Pack deps are numpy, Pillow, scipy, and PyWavelets; make sure imageio and imageio-ffmpeg are present in the ComfyUI environment.

    CategoryNukun/Video/Wan 2.2/Segments

    Inputs (6)

    NameTypeDefaultDescription
    run_idSTRINGwan_run_001
    fpsFLOAT161–120
    filenameSTRING
    codecCOMBOlibx2642 options: libx264, mpeg4
    qualityINT81–10
    overwriteBOOLEANtrue

    Outputs (5)

    NameTypeDescription
    video_pathSTRING
    total_framesINT
    durationFLOAT
    manifest_jsonSTRING
    reportSTRING