Nodes/comfyui-magic-hour/Magic Hour: Audio to Video
ComfyUI Node

Magic Hour: Audio to Video

Magic Hour: Audio to Video

By magichourhq·Created about 16 hours ago·Updated about 15 hours ago· 0
Magic Hour: Audio to Video
  • audio
  • image
  • video
  • video_path
  • credits_charged
◄resolution720p►
◄start_seconds0.0►
◄end_seconds0.0►
◄prompt►

Most video nodes in ComfyUI start with an image or a prompt. This one starts with a waveform - the audio is the required input and the video is derived from it. That's a different pipeline shape from anything local, and it's why the node is more useful than it first looks: you're usually generating audio yourself in the same graph.

Why you'd reach for it

The local version of this problem is a two-model chain. The KB's audio doc lays it out: a TTS or music model produces a track (Chatterbox, Kokoro, ACE-Step), then an audio-driven avatar model like InfiniteTalk or Wan S2V consumes it and produces moving pixels. That chain works, and it's three node packs and a transformers dependency fight.

Audio to Video collapses it into one node that takes your AUDIO and hands back a VIDEO. No local model, no dependency conflict, and no GPU time. The cost is credits and the fact that your track leaves the machine. For a talking-head or a lyric-video clip you intend to publish anyway, that's a reasonable trade. For audio you can't upload, it isn't.

How it works

The AUDIO input arrives as a ComfyUI waveform dict, gets written to a temp 16-bit WAV, and is uploaded. Optional image is converted to a temp PNG and sent alongside as a visual anchor. Then the job runs remotely, the node polls until it's finished, and the result is downloaded into ComfyUI/output/magic_hour/ and wrapped as a VIDEO.

Two implementation details you'll actually feel:

The window is clamped to 60 seconds of audio. The audio-length value the node uses for end_seconds is min(clip length, 60). So leaving end_seconds at 0 - which means "to the end of the clip" - gives you the first minute, not the whole song. If you have a four-minute track, you're making it in four passes and stitching, or you're trimming upstream.

end_seconds must be greater than start_seconds. Zero is the sentinel for "to the end"; anything else has to be a real, larger number, and the node raises a clear error if not. Cheap mistake, easy to avoid.

Inputs and outputs

Required audio is the driver. resolution is 720p (default), 480p or 1080p - go down, not up, when a job is expensive. start_seconds and end_seconds carve the window as above. prompt is a text field that gets sent only when non-empty; it steers the visual content, so "slow dolly through rain-soaked neon alley" is doing real work here, not decoration.

Optional image: connect one and the video is anchored to it rather than invented. That's the difference between a lyric video with a fixed subject and a wandering abstract clip.

Outputs are the pack's standard trio. video wires into Save Video or Preview. video_path is a STRING with the saved file - the escape hatch when your ComfyUI is too old to have a VIDEO type in its API helpers. credits_charged is an INT and is the honest price tag per run: same everything except resolution, and you can watch the number move.

Install

Manager route: search "Magic Hour" in ComfyUI Manager. Manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/magichourhq/comfyui-magic-hour
pip install -r comfyui-magic-hour/requirements.txt

Restart ComfyUI. The only requirement is magic-hour>=0.87.1; there are no model files to download and nothing to put in models/. You do need a ComfyUI recent enough to know the VIDEO type.

Set the key before launching, not inside a node:

export MAGIC_HOUR_API_KEY=your_key_here

or write the bare key into comfyui-magic-hour/api_key.txt. It's git-ignored, and it's not a widget on purpose - widget values are stored in the workflow file.

Things that go wrong

  • "API key not found" - the variable was set in a different shell than the one that launched ComfyUI. Export it, then start ComfyUI from that same shell.
  • 401 Unauthorized - wrong or revoked key. Make a new one at magichour.ai/developer.
  • Only the first minute came back - that's the 60-second window, not a bug. Slice your audio upstream and run it in segments.
  • Long silent wait - video jobs take tens of seconds to minutes and the node waits synchronously. The whole queue is held while it does.
  • 422 - the model/resolution/duration combination isn't supported on your plan. Drop to 480p and retry.

My advice: wire this after your TTS node, not instead of it. Generating the voice locally and renting only the pixels is the cheapest sensible split, and it keeps your audio - the part with your own voice or your own music in it - on your machine.

CategoryMagic Hour

Inputs (6)

NameTypeDefaultDescription
audioAUDIO—
resolutionCOMBO720p3 options: 720p, 480p, 1080p
start_secondsFLOAT0.00–3600—
end_secondsFLOAT0.00–36000 = to the end of the clip
promptSTRING—
imageoptIMAGE—

Outputs (3)

NameTypeDescription
videoVIDEO—
video_pathSTRING—
credits_chargedINT—