invoke-ai / invoke-ai/InvokeAI
[enhancement]: Add video duration in seconds with automatic frame count calculation
- Dominant language
- Python
- Stars
- 28.2k
- Forks
- 3k
- Avg merge
- 6d 5h
- Merged PRs (30d)
- 19
Description
### What should this feature add?
Add a **Duration (seconds)** field to the video generation workflow forms, including the built-in Wan 2.2 Image-to-Video Lightning workflow. Calculate a supported frame count automatically from the requested duration and FPS.
Currently, the workflow exposes Frames and FPS. To request a six-second clip at 16 FPS, users need to calculate the frame count themselves and account for Wan's supported frame counts (4n + 1), resulting in 97 frames. A duration field would make this much easier to understand.
### Suggested behavior
- Let users enter the desired duration in seconds, such as 6 or 10.
- Convert the duration and FPS to the nearest frame count supported by the selected model, respecting its limits.
- Show the resulting frame count and actual duration when rounding is required.
- Keep Frames available as an advanced control for users who need it.
- Keep duration and frame count consistent when FPS changes.
For example, entering 6 seconds at 16 FPS in a Wan workflow could select 97 frames and display approximately 6.06 seconds.
### Alternatives
A calculated duration readout beside Frames would help, but entering seconds directly would be more intuitive.
### Additional context
Using InvokeAI 6.14.0 and the built-in Image to Video - Wan 2.2 Lightning workflow.
I searched open and closed issues for duration, video length, frames, and Wan. #8903 mentions duration for an API-driven remote video generation node; this request is for duration controls in local video workflow forms.
Contributor guide
No contributing guide indexed for this repository
Research direction
No files, tests, or entry points are named. Start by locating the video generation workflow forms and the built-in Wan 2.2 Image-to-Video Lightning workflow, then trace how Frames, FPS, model limits, and supported frame counts are represented. Done means duration input, automatic supported-frame rounding, actual-duration feedback, and consistent updates when FPS changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- frontend, machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100