ComfyUI Node

GR Counter

An animated countdown/counter frame generator — check the default paths before you run it

By GraftingRayman·Created 2 years ago·Updated 3 months ago· 76
GR Counter
  • background_image
  • FileDetails
  • FrameImages
◄start0►
◄finish10►
◄counter_duration1000►
◄fps30►
◄resolutionHD 1280x720►
◄use_background_image_sizefalse►
◄use_background_imagefalse►
◄countdownfalse►
◄clock_typefalse►
◄video_pathh:\counter\counter_video.mp4►
◄save_imagesfalse►
◄image_output_folderh:\counter\images\►
◄background_colourblack►
◄font_path/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf►
◄font_size_min100►
◄font_size_max200►
◄font_colorwhite►
◄font_opacity100►
◄font_shadowfalse►
◄font_shadow_dist5►
◄font_controlconstant►
◄outlinefalse►
◄outline_size5►
◄outline_colorblack►
◄outline_opacity100►
◄rotatefalse►
◄rotate_typeclockwise►
◄rotate_freq1.00►
◄processing_devicecpu►
◄start_x0►
◄start_y0►
◄end_x0►
◄end_y0►
◄movementconstant►
◄upscale1.0►

This node generates a sequence of frames counting between two numbers - up, down as a countdown, or formatted as a clock - with enough styling controls to build a genuinely polished intro/outro counter for a video: font animation, movement across the frame, rotation, an optional background image, shadows and outlines. Feed the resulting frames into a video-combine node and you've got an actual countdown or number-reveal video without touching a separate motion-graphics tool.

One thing to flag before you run it: two of the inputs, video_path and image_output_folder, default to Windows-style paths (h:\counter\counter_video.mp4 and h:\counter\images\) - clearly the author's own machine. If you're running ComfyUI on Linux, which covers most cloud and server setups, those defaults are meaningless and you need to override both before enabling save_images or anything that writes to them, or you'll get a write error rather than the output you expected.

How it works

start and finish set the count range, counter_duration (in milliseconds) and fps determine how the count is spread across frames, and countdown/clock_type change the counting behavior (down instead of up, or clock-formatted instead of a raw number). resolution picks from seven common presets (4K down to SD, portrait and landscape variants), or use_background_image_size derives the resolution from a supplied background_image instead. Everything else is styling: font choice and size range (font_size_min/font_size_max, which work together with font_control - decrease, constant, increase, pulse - to animate the number's size across the count rather than holding it static), color and opacity, an optional drop shadow, an optional outline, and motion controls (start_x/start_y/end_x/end_y plus movement to slide the number across the frame as it counts, and rotate/rotate_type/rotate_freq for spin).

The inputs and outputs that matter

  • start, finish, countdown, clock_type - the core counting behavior.
  • fps and counter_duration - together these set total frame count; get the pacing you want by adjusting these rather than guessing at frames_per_transition-style controls, since this node doesn't have one.
  • resolution or background_image (optional) plus use_background_image_size - pick your canvas.
  • video_path and image_output_folder - check these before enabling save_images; the defaults are Windows paths that won't resolve on Linux.
  • processing_device (cpu/gpu) - worth switching to gpu for a long, high-fps sequence.

Two outputs: FileDetails (a string, presumably describing what was generated/saved) and FrameImages - the actual frame batch, wire this into your video-combine node.

How to install it

ComfyUI Manager, search GraftingRayman. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/GraftingRayman/ComfyUI_GraftingRayman

Restart afterward. This pack needs OpenAI's CLIP installed separately or nothing imports - portable ComfyUI: .\python_embeded\python.exe -m pip install git+https://github.com/openai/CLIP.git; system Python: pip install git+https://github.com/openai/CLIP.git.

Common issues & troubleshooting

Pack won't load. Check your startup console for the CLIP import error and run the pip install above.

Save fails or errors on a path. This is almost certainly the Windows-style default paths mentioned above. Set video_path and image_output_folder to real, writable paths on your actual system before turning save_images on.

Frame count is way higher or lower than expected. Total frames comes from fps × (counter_duration in seconds) roughly, times the number range covered - check counter_duration first if a run takes far longer or shorter than you planned.

Number size looks static when you wanted it animated. font_control defaults to constant. Switch it to increase, decrease, or pulse if you want the size to change across the count, and make sure font_size_min/font_size_max are actually different values.

CategoryGraftingRayman/Video

Inputs (36)

NameTypeDefaultDescription
startINT0-1000–1000—
finishINT10-1000–1000—
counter_durationINT1000100–10000—
fpsINT301–120—
resolutionCOMBOHD 1280x7207 options: 4K 3840x2160, Full HD 1920x1080, HD 1280x720, Portrait 4K 2160x3840, Portrait Full HD 1080x1920, Portrait HD 720x1280, +1
use_background_image_sizeBOOLEANfalse—
use_background_imageBOOLEANfalse—
countdownBOOLEANfalse—
clock_typeBOOLEANfalse—
video_pathSTRINGh:\counter\counter_video.mp4—
save_imagesBOOLEANfalse—
image_output_folderSTRINGh:\counter\images\—
background_colourCOMBOblack30 options: amethyst, black, blue, cyan, diamond, emerald, +24
font_pathCOMBO/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf10 options: /usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf, /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf, /usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf, /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf, /usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf, /usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf, +4
font_size_minINT10010–1000—
font_size_maxINT20010–1000—
font_colorCOMBOwhite30 options: amethyst, black, blue, cyan, diamond, emerald, +24
font_opacityINT1000–100—
font_shadowBOOLEANfalse—
font_shadow_distINT51–50—
font_controlCOMBOconstant4 options: decrease, constant, increase, pulse
outlineBOOLEANfalse—
outline_sizeINT51–50—
outline_colorCOMBOblack30 options: amethyst, black, blue, cyan, diamond, emerald, +24
outline_opacityINT1000–100—
rotateBOOLEANfalse—
rotate_typeCOMBOclockwise5 options: clockwise, anticlockwise, flip, rocker, rockerflip
rotate_freqFLOAT1.000.01–50—
processing_deviceCOMBOcpu2 options: cpu, gpu
start_xINT0-4000–4000—
start_yINT0-4000–4000—
end_xINT0-4000–4000—
end_yINT0-4000–4000—
movementCOMBOconstant3 options: move left, constant, move right
upscaleFLOAT1.01–10—
background_imageoptIMAGE—

Outputs (2)

NameTypeDescription
FileDetailsSTRING—
FrameImagesIMAGE—