Skip to content

modify encode_video() / encode_audio() API design #58

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 4 commits into
base: main
Choose a base branch
from

Conversation

awkrail
Copy link
Contributor

@awkrail awkrail commented May 18, 2025

This PR is on WIP. Modifying encode_video and encode_audio API design because the current code sets video_feats/mask to the Predictor, which is buggy in gradio demo. We make the models stateless, which makes us more easier to use.

@awkrail awkrail changed the title [WIP] modify encode_video API design [WIP] modify encode_video() / encode_audio() API design May 19, 2025
@awkrail
Copy link
Contributor Author

awkrail commented May 19, 2025

@h-munakata Could you review PR?

@awkrail awkrail changed the title [WIP] modify encode_video() / encode_audio() API design modify encode_video() / encode_audio() API design May 19, 2025
@h-munakata
Copy link
Contributor

I found an unexpected behavior.
When we change the model and the model extract the video feature showing Processing the video. Wait for a minute..., pushing the retrieve moments button leads AttributeError: 'XXPredictor' object has no attribute 'inputs'.
I think this is caused model object does not have inputs before running model.encode_video()
Therefore, error handling is required when the button is pressed immediately after the model is loaded and model do not hold inputs.

In addition, I found a line that should be fixed [Link].(https://github.com/awkrail/lighthouse/blob/5b5d14e5394e5615b63b7e8e3d5820fa3f7da757/lighthouse/common/tr_detr_transformer.py#L141)
This line requires CUDA, and thereby, the inference does not work without GPU.

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