Nodes/comfy_Pond_Nodes/🐳GIF合成
ComfyUI Node

🐳GIF合成

The node that promises a GIF and hands you a frame batch instead

By Pondowner857·Created about a year ago·Updated 21 days ago· 45
🐳GIF合成
  • image_1
  • image_2
  • images
input_count2
frame_duration100
loop_count0
resize_mode
custom_width512
custom_height512
optimizetrue
reversefalse
ping_pongfalse

Here's the honest pitch: 🐳GIF合成 (Images To GIF) doesn't actually write a .gif file. The name is a lie. What it does is take a bunch of images, make them the same size, optionally reverse or ping-pong them, and hand you back a single IMAGE batch. The real file-writing happens in the pack's separate SaveGIF node. That's not a scam - it's a sensible split, because the frame assembly is the fiddly part, and this node is where you do it.

Where you'd use it: you generated a 16-frame animation as individual images (say, from an AnimateDiff or Wan video workflow), and you want to turn them into a looping animation, or feed the frames back through img2img for a consistency pass. It's also how you make those before/after or multi-step "progress" GIFs without leaving ComfyUI.

How it works

Set input_count to how many images you're feeding (2 to 50), wire image_1, image_2, and so on, and the node collects them into a list. GIFs are strict about frame sizes, so it then forces every frame to a common size via resize_mode:

  • 保持原尺寸 (keep original size) / 统一到第一张 (match first) - uses the first frame's dimensions.
  • 统一到最小 (match smallest) / 统一到最大 (match largest) - pick the bounding box you prefer.
  • 自定义尺寸 (custom) - use custom_width / custom_height.

RGBA frames get flattened onto white (a full-res transparent GIF is a trap nobody needs). Then reverse flips the order and ping_pong plays it forward then backward - that's the "smooth loop" trick that makes short animations feel endless.

The inputs that matter

  • input_count - how many image slots to use.
  • frame_duration - milliseconds per frame, 20 to 5000. This is the playback speed.
  • loop_count - 0 means loop forever, which is what you want for basically every GIF.
  • resize_mode + custom_width/custom_height - the size-unification controls above.
  • optimize, reverse, ping_pong - toggles for compression and playback tricks.

Here's the subtle bit: frame_duration, loop_count, and optimize don't change the IMAGE batch this node outputs at all - they're the values the downstream SaveGIF (and PreviewGIF) node uses when it finally writes the file. If you wire this straight to a Save Image, your timing settings are silently ignored. Pair it with the pack's SaveGIF node to get an actual .gif on disk, and set the timing there.

The single output, images, is an IMAGE batch - one tensor of N frames, ready for anything that eats a batch.

Install

Part of the Pond Nodes pack, so:

ComfyUI Manager → search "Pond Nodes" (comfy_Pond_Nodes)

or:

cd ComfyUI/custom_nodes
git clone https://github.com/Pondowner857/comfy_Pond_Nodes
cd comfy_Pond_Nodes
pip install -r requirements.txt

Restart after. This node only needs Pillow and numpy - ignore the ultralytics and mediapipe in that requirements file unless you use the pack's detection nodes. The usual pack footnote: if the console starts endlessly spamming, the README points at a conflict with comfyui_HiDream-Sampler.

Category🐳Pond/GIF

Inputs (11)

NameTypeDefaultDescription
input_countINT22–50
frame_durationINT10020–5000
loop_countINT00–100
resize_modeCOMBO5 options: 保持原尺寸, 统一到第一张, 统一到最小, 统一到最大, 自定义尺寸
custom_widthINT51264–4096
custom_heightINT51264–4096
optimizeBOOLEANtrue
reverseBOOLEANfalse
ping_pongBOOLEANfalse
image_1optIMAGE
image_2optIMAGE

Outputs (1)

NameTypeDescription
imagesIMAGE