Magic Hour: AI GIF Generator
Magic Hour: AI GIF Generator
- image
- image_paths
- credits_charged
This is the simplest node in the entire pack. It has exactly one input. prompt, multiline, empty by default. No duration slider, no size, no seed, no model choice. Type a thing, run it, get an animated GIF's worth of frames back.
If you're used to node packs where every tool has twelve knobs, this feels underwhelming. It's also honest: the tool is a prompt-to-GIF endpoint and there genuinely isn't anything else to configure.
What comes back - and this is the part to understand
The GIF itself is downloaded to ComfyUI/output/magic_hour/, and the image_paths output gives you its path. But the image output is not a single image and it isn't a video. It's an IMAGE batch - one frame per frame of the animation.
The loader in this pack opens the file, iterates it as a sequence, converts each frame to RGB, resizes any frame that doesn't match the first, and stacks the lot into one tensor batch. It caps at 64 frames, so a long GIF is truncated to the first 64. Animated content stacked into a batch is exactly how ComfyUI's own AnimateDiff workflows represent motion, which is why this is useful rather than annoying: any node that expects frames will take it.
What that means in practice:
- To keep the GIF, use
image_paths- the file is already on disk, alpha and all. - To make a video out of it, feed
imageinto Video Combine or SaveAnimatedWEBP. That's the local route to an mp4 or webp where the API only gave you a GIF. - To post-process frames,
imageis what you want: batch in, per-frame effects, batch out.
Do not expect transparency in the batch. Same trap as the Background Remover: the tensor is RGB, so the GIF's alpha channel stays in the file and not in your graph.
Why you'd use it at all
A prompt-only GIF generator is a genuinely weird thing to have in a ComfyUI graph, and the honest use case is a single step in something bigger: generating a little looping reaction image, a sticker, a UI asset, or a placeholder animation to drop into a video you're editing elsewhere. It's also the cheapest way in this pack to see what Magic Hour's image models do with a text prompt before you spend anything on the video tools.
The alternative - AnimateDiff or a Wan/SVD image-to-video pass - gives you vastly more control and costs nothing per run, but takes real setup time and real VRAM. For a ten-second "I need a little animated thing" job, one prompt and a small credit charge wins.
Inputs and outputs, briefly
| | |
| --- | --- |
| prompt (required) | the only knob. Multiline, so write a sentence, not a keyword salad |
| image (output) | IMAGE batch of frames, up to 64, RGB, all resized to the first frame's size |
| image_paths (output) | STRING path to the saved GIF, newline-joined if several files came back |
| credits_charged (output) | INT, the cost of the run |
Install
cd ComfyUI/custom_nodes
git clone https://github.com/magichourhq/comfyui-magic-hour
pip install -r comfyui-magic-hour/requirements.txt
Restart ComfyUI and look under Magic Hour. The dependency list is a single line - magic-hour>=0.87.1 - so no models to download, no GPU required. ComfyUI Manager users can search "Magic Hour".
export MAGIC_HOUR_API_KEY=your_key_here
before launching, or put the bare key in comfyui-magic-hour/api_key.txt. The author keeps it out of the node on purpose: widget values are saved inside the workflow file, so a key in a field goes wherever the graph goes.
Friction points
Frame count surprises. You ask for a GIF, you get a batch whose length you didn't choose. Nodes downstream that assume a single image will do something odd with 30 frames - that's on your wiring, not the node.
The 64-frame cap. Long animations get cut. If you need the whole thing, read the file from image_paths.
All frames resized to the first. Mixed-size frames get scaled to match frame zero, which is fine for a real GIF and worth knowing if your pipeline cares about exact dimensions.
Waiting. It's an API round trip plus polling, so seconds to a minute, not instant. And if the prompt hits a content filter, you get an error rather than a result - no local model to argue with here, and no way to talk it round.
One practical note: this node is a nice cheap smoke test for the pack. If a GIF comes back, your key, your network, and your ComfyUI version all work - and then you can go spend real credits on the video nodes.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| image_paths | STRING | — |
| credits_charged | INT | — |