Nodes/Comfyui-Segment-Queue-Runner/🎬分段队列 v3.7@肥猴🐵@wuwu🚂@雪子❄️
ComfyUI Node

🎬分段队列 v3.7@肥猴🐵@wuwu🚂@雪子❄️

The controller that turns long WanAnimatePlus videos into a queue that runs itself

By FX-FeiHou·Created 5 months ago·Updated 2 months ago· 79
🎬分段队列 v3.7@肥猴🐵@wuwu🚂@雪子❄️
      帧率16.00
      总帧数0
      分段数2
      从第几段开始1
      执行false
      启用续跑false
      参考视频节点ID
      输出节点ID
      动作嵌入节点ID
      姿态模型节点ID
      脸部模型节点ID
      参考图节点ID
      分段参考图
      续跑视频路径
      本地姿态视频路径
      本地人脸视频路径
      sqr_save_pngtrue
      sqr_min_seg_frames41
      sqr_frame_offset-1
      sqr_pre_segments
      sqr_segment_modeaverage
      sqr_trim_merge_modesplit21
      sqr_manual_splits
      sqr_execution_scopestart_to_end
      sqr_resume_kind
      sqr_real_total_frames-1
      sqr_real_fps-1.0

      If you've ever tried to animate a long driving video with WanAnimatePlus, you know the wall: the model chokes past its frame budget, your VRAM gives up, and the only fix is slicing the video by hand, regenerating each chunk, and stitching it all back with ffmpeg until your eyes bleed. SegmentQueueRunner is the node that does that loop for you. Point it at your video, pick a segment count, flip one switch, and it renders every segment in sequence, merges them, and reattaches the audio while you go do something else. It's built for the "long video stitching" and "smooth outfit change" workflows you see on Bilibili - the display name is literally "🎬分段队列" (segmented queue), with emoji crediting the three authors, 肥猴/wuwu/雪子.

      Fair warning: this isn't a general-purpose "segment any workflow" tool, and it isn't a model. It's a controller node written around the WanAnimatePlus stack - pose-driven motion transfer for Wan. The pack's co-author wuwukaka is also the author of ComfyUI-WanAnimatePlus, so this is tooling for its own ecosystem, not a bolt-on.

      How it actually works

      SegmentQueueRunner is an output node with zero sockets - it orchestrates by reading your workflow and re-submitting it. It takes the node IDs you give it (your Load Video node, your VHS_VideoCombine output, the WanAnimatePlus AnimateEmbeds node, pose/face model nodes, reference images), then for each segment it clones the current workflow, rewires the frame counts and reference inputs, and queues the whole thing through ComfyUI's own /prompt API. It waits for each segment to finish before starting the next, then merges them with ffmpeg.

      The frame math is why it behaves the way it does. WanAnimatePlus wants 4n+1 frames, so the node aligns every segment to that and enforces a minimum of 41 frames per chunk - a shorter segment gets auto-resized or refused. Between segments it reserves 21 transition frames so an outfit change lands as a fade rather than a hard cut. That's the "smooth" in the marketing, and it's real: this is the part people hand-roll and get wrong.

      The inputs that matter

      Most of the schema is behind-the-scenes wiring, but a few fields are what you'll actually touch:

      • 帧率 and 总帧数 - the author's tooltips are blunt: these must connect to Load Video's fps and frame_count outputs. Since v3.6 they auto-detect as a fallback, but wire them anyway.
      • 分段数 - how many chunks to split into. In fixed-frames mode this becomes frames per segment.
      • 从第几段开始 - start from segment N. This is your resume dial.
      • 执行 - the famous one. Off means preview the plan only; on means run. If you hit queue and "nothing happens," check this.
      • 启用续跑 - resume from a previously rendered video as the transition source for the first segment.

      Then there are the node-ID fields (参考视频节点ID, 输出节点ID, 动作嵌入节点ID, 姿态模型节点ID, 脸部模型节点ID, 参考图节点ID). These are the fiddly part. In the shipped example workflow they're prefilled; if you build your own graph, the ⚙️ Settings and 🔧 Set Node IDs buttons on the node open a dialog that can auto-detect them from your connections. If the fields are empty you'll get "参考视频节点ID 不能为空" and it'll refuse to run.

      Installing it

      ComfyUI Manager can install it - search Comfyui-Segment-Queue-Runner. Or manually:

      cd ComfyUI/custom_nodes
      git clone https://github.com/FX-FeiHou/Comfyui-Segment-Queue-Runner.git
      cd Comfyui-Segment-Queue-Runner
      pip install -r requirements.txt
      

      Then restart ComfyUI and hard-refresh the browser with Ctrl+F5 - it ships a big JS extension (settings dialog, progress UI, resume buttons) that only loads after the refresh. Its requirements.txt is just opencv-python, but two real system dependencies matter: ffmpeg/ffprobe must be on your PATH (the node shells out to them constantly), and the workflow needs WanAnimatePlus plus VideoHelperSuite installed too. No model files come from this pack - the heavy weights are the Wan/WanAnimatePlus ones you already have.

      Where people get burned

      • "It did nothing" - you queued in preview mode. 执行 off intentionally prints the segment plan and interrupts so it doesn't render. Flip it on.
      • ffmpeg errors - "未找到 ffmpeg" is the node telling you ffmpeg isn't installed or isn't on PATH. On Windows this was worse: non-UTF-8 system code pages made it misread Chinese paths and falsely report "no audio track." v3.7 fixed that by mapping non-ASCII paths to safe temp paths, so update if you're stuck on an older version.
      • Segments shorter than 41 frames - the node auto-adjusts your segment count up to respect the WanAnimatePlus minimum rather than silently producing broken output.

      Honest take: the README says this "solves the VRAM limit" for ultra-long video. It solves the boredom of stitching - the underlying limits (windowed context, drift at boundaries) are the same ones every Wan chunker lives with. For its niche - unattended long-form WanAnimatePlus renders with smooth transitions - it's the thing that finally finishes the job.

      Categoryvideo/utils

      Inputs (27)

      NameTypeDefaultDescription
      帧率FLOAT16.001–120视频帧率,必须连接 Load Video 的帧率输出。 Frame rate: must connect to Load Video fps output.
      总帧数INT00–99999参考视频总帧数,必须连接 Load Video 的 frame_count 输出。 Total frames: must connect to Load Video frame_count output.
      分段数INT21–1001分几段处理(可在设置处更改最大分段数)。固定每段帧数模式下此值为每段帧数。 Number of segments (max adjustable in settings). In fixed mode this is frames per segment.
      从第几段开始INT11–100从第几段开始生成,续跑时填写实际起始段。 Start from which segment. Set accordingly when resuming.
      执行BOOLEANfalse关闭=预览分段规划;开启=正式执行。 Off=preview plan only; On=start execution.
      启用续跑BOOLEANfalse开启后使用上方选择的视频作为首段过渡起点。 Enable resume: use selected video as transition source for first segment.
      参考视频节点IDSTRING
      输出节点IDSTRING
      动作嵌入节点IDSTRING
      姿态模型节点IDSTRING
      脸部模型节点IDSTRING
      参考图节点IDSTRING
      分段参考图STRING
      续跑视频路径STRING
      本地姿态视频路径STRING
      本地人脸视频路径STRING
      sqr_save_pngSTRINGtrue
      sqr_min_seg_framesSTRING41
      sqr_frame_offsetINT-1
      sqr_pre_segmentsSTRING
      sqr_segment_modeSTRINGaverage
      sqr_trim_merge_modeSTRINGsplit21
      sqr_manual_splitsSTRING
      sqr_execution_scopeSTRINGstart_to_end
      sqr_resume_kindSTRING
      sqr_real_total_framesSTRING-1
      sqr_real_fpsSTRING-1.0

      Outputs (0)

      No outputs