ArtVentureX / comfyui-animatediff

AnimateDiff for ComfyUI
Apache License 2.0
648 stars 41 forks source link

Frame_count #60

Open Persite007 opened 8 months ago

Persite007 commented 8 months ago

Hi, Which node to add to know the number of frames of a imported video? In load_video node there is a link for frame_count but no node for that in AnimateDiff/evolved menus. Not showed in Vid2Vid workflow sample... and no results with Google or Github about that. Thx

artventuredev commented 8 months ago

If you use the LoadVideo node from this repo, there should be a frame_count output already. Or you can use the ImageSizeAndBatchSize node. Batch size is the number of frames. Here's the example vid2vid workflow

Screenshot 2023-11-07 at 16 02 07

CalladsEssence commented 2 months ago

You have probably found the solution, but for other visitors:

Add 'Math Expression', connect 'frame_count' to 'a' and fill in a a simple 'a' (without the quotes). You will have to run 'Queue Prompt' to get the result, being the number of frames.

Screenshot 2024-04-28 092143

If you found a better solution, please let me know.