Skip to content

Bug Fix I2V Frame Count Hardcoded to 81 (!!) and Optional Batch Mode #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

pftq
Copy link

@pftq pftq commented Feb 27, 2025

It turns out the Image2Video frames were hardcoded at 81! So you couldn't actually change the frame count of the video no matter what. I fixed this as well in the image2video.py file under WanI2V.generate()
First mentioned here: #73

I also added --batch_size parameter to generate multiple videos per run without reloading the model.
Saves a few minutes on reloading the model and having to re-enter the command each time.

The changes are pretty minimal and labeled with "# 20250226 pftq" - most the changes shown by github is just indenting everything else below it for the batch loop.

@pftq pftq mentioned this pull request Mar 10, 2025
@omertalmi5
Copy link

It seems the issue of generating more than 81 frames still persists. Could the PR or any other fix be merged? Thanks
@anw90

@pftq
Copy link
Author

pftq commented Apr 20, 2025

Yeah I don't know if the dev team ever saw this or will see this, but you can download the fix I did in the fork here:
https://github.com/pftq/Wan2.1-Fixes/tree/main

@omertalmi5
Copy link

Thanks! I actually need the same fix in ReCamMaster as well: https://github.com/KwaiVGI/ReCamMaster/blob/main/diffsynth/pipelines/wan_video_recammaster.py
@pftq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants