Nodes/ComfyUI-ZhiHui/🎬 时间轴编辑器 (Timeline Editor)
ComfyUI Node

🎬 时间轴编辑器 (Timeline Editor)

Drag segments on a real timeline, and feed your video model per-shot prompts

By zhuyungen·Created 8 months ago·Updated 3 months ago· 0
🎬 时间轴编辑器 (Timeline Editor)
  • image
  • audio
  • timeline_info
  • images
  • audio
timeline_data
fps24
total_frames121
prompt_override

Video generation is where a single prompt stops being enough. You want shot one to be the sunrise, shot two the close-up, shot three the wide - each with its own prompt and possibly its own reference frame, all on one timeline. ZH_TimelineEditor ("🎬 时间轴编辑器") is ComfyUI-ZhiHui's answer: a node with a real, draggable timeline panel in the frontend, where you slice the video into segments, type a prompt per segment, and assign each one a reference image slot. The node then packs all of that into structured data your video pipeline can consume.

This is the pack's most ambitious node - it ships its own JavaScript extension (zh_timeline_editor.js) to draw the panel, and it's the only node here with a custom output type (ZH_TIMELINE_INFO). The pack is Chinese-language and basically unknown in the English community, so you're mostly on your own with the UI labels - but the mechanics are readable.

How it works

The node itself is a thin backend; the panel is the real interface. On the node you'll see a "open timeline editor" button. The panel shows a track split into segments with draggable dividers; each segment gets a prompt box and an image-slot selector. When you hit confirm, the panel serializes everything - segments, each with start frame, prompt, image index, and type - into JSON and writes it into the hidden timeline_data widget.

At execution, the node parses that JSON, and optionally layers in prompt_override (pipe-separated prompts, |, that replace each segment's prompt in order). It then builds a timeline_info bundle carrying the segments, total frames, fps, a |-joined prompt string, per-segment start-frame indexes, and segment types. Connected upstream image and audio inputs pass through: frames are pulled from the image batch by slot index into the images output, and audio passes to the audio output (a blank waveform if nothing's connected). The panel also shows live thumbnails from your upstream image input so you can pick reference frames by eye.

The inputs and outputs that matter

  • timeline_data - the JSON the panel writes; you don't type this by hand (it's hidden in the UI).
  • fps (24), total_frames (121) - the timeline's clock; defaults give a 5-second clip at 24fps.
  • prompt_override - optional, quick per-segment prompt swap without reopening the panel.
  • image, audio - optional IMAGE/AUDIO passthroughs for reference frames and audio.

Outputs: timeline_info (ZH_TIMELINE_INFO - feed this to video-generation nodes that understand the type), images (the per-segment reference frames as a batch), and audio (passed through).

Install

cd ComfyUI/custom_nodes
git clone https://github.com/zhuyungen/ComfyUI-ZhiHui.git

Restart ComfyUI - the JS extension loads from the pack's js/ directory, so a hard restart (not just a graph reload) matters. Base deps only, no models. ComfyUI Manager search "ComfyUI-ZhiHui" also works.

Where people get burned

Three things. First, you must hit "确认输出" (confirm) in the panel - edits you make in the timeline don't reach the node until you confirm, and unconfirmed edits silently vanish on the next run. Second, the ZH_TIMELINE_INFO output type is custom to this pack, so it only plugs into other nodes that understand it - don't expect generic video nodes to eat it; if a node wants separate prompt/frame-index strings, you'll find those inside timeline_info. And third, if a segment references an image slot with no connected image, that segment's frame just doesn't appear in the output - no error, which can produce a shorter-than-expected batch. Check the output before assuming all segments made it.

CategoryZhiHui/video

Inputs (6)

NameTypeDefaultDescription
timeline_dataSTRING
fpsINT241–120
total_framesINT1212–9999
prompt_overrideoptSTRING
imageoptIMAGE
audiooptAUDIO

Outputs (3)

NameTypeDescription
timeline_infoZH_TIMELINE_INFO
imagesIMAGE
audioAUDIO