-
Notifications
You must be signed in to change notification settings - Fork 67
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
OOM issue #27
Comments
Please could you share the updated code with batch processing. It will be useful. |
in inference_basic.py, first add a function
then change the pipeline call to following
|
Thank you very much. |
Cool! Thank you for your contribution! |
Appreciate your help, thank you. The existing code works fine on low VRAM with 512 x 512. If the changes contributed by Yaqing can be incorporated in the code driven by a --batch_processing True, it will help many. |
Sure, I will check whether the modified pipeline affects the performance of StableAnimator. If it maintains the original performance while reducing GPU memory consumption, I’ll incorporate it into the inference code. |
It increases the processing time by 10 fold. |
It is indeed a trade off of low memory and execution time. Many of us may have single GPU 4090 which can only run few seconds long video. The change will remove that limit. |
and here I am using this on 4060 8 GB VRAM + 8 GB shared. :) Here is the benchmark for the video I am trying Inference time After inference it does some processing which need (will post total processing time). I think this is where if each image is saved to disk will save a lot of VRAM. Total Inference Time: 0:53:49.142157 |
inference_basic.py.txt |
TQVM @Yaqing2023. Appreciate your help. |
The intention is not speeding up the process but saving memory so less powerful machine can play with this project |
The current implementation in inference_basic.py has
video_frames = pipeline(
image=validation_image,
image_pose=validation_control_images,
...
which basically handles all pose images in one pipeline, this requires significant amount of GPU memory and limits the length of the video. I tried to split the validation_control_images into smaller chunks such as 40 images in a sublist and run the pipeline in a for loop. This works well for me and the final video quality looks good to me. Not sure whether this will affect the ID consistency but at least from what i tried results are good.
The text was updated successfully, but these errors were encountered: