-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add Lita, Vila and Vita TRTLLM export #9734
Conversation
Signed-off-by: Vivian Chen <[email protected]>
Signed-off-by: Vivian Chen <[email protected]>
Signed-off-by: Vivian Chen <[email protected]>
Signed-off-by: Vivian Chen <[email protected]>
Signed-off-by: xuanzic <[email protected]>
nemo/export/multimodal/run.py
Outdated
return image | ||
|
||
def process_image(self, image_file, image_processor, nemo_config, image_folder): | ||
image_processor = image_processor |
Check failure
Code scanning / CodeQL
Redundant assignment Error
nemo/export/multimodal/run.py
Outdated
from torchvision import transforms | ||
from transformers import CLIPImageProcessor | ||
from transformers import AutoModel, AutoProcessor, CLIPImageProcessor |
Check notice
Code scanning / CodeQL
Unused import Note
dtype, | ||
image_size=image_size, | ||
num_frames=lita_num_frames if model_type == "lita" or model_type == 'vita' else None, |
Check failure
Code scanning / CodeQL
Potentially uninitialized local variable Error
else: | ||
image = image.expand(batch_size, -1, -1, -1).contiguous() | ||
if self.model_type not in ['vila', 'lita', 'vita']: | ||
if image.dim() == 5: |
Check failure
Code scanning / CodeQL
Potentially uninitialized local variable Error
Signed-off-by: Vivian Chen <[email protected]>
Signed-off-by: Vivian Chen <[email protected]>
Signed-off-by: xuanzic <[email protected]>
elif isinstance(video_path, np.ndarray): | ||
frames = torch.tensor(video_path, dtype=torch.float32) | ||
|
||
return self.preprocess_frames(frames, config, processor) |
Check failure
Code scanning / CodeQL
Potentially uninitialized local variable Error
.unsqueeze(0) | ||
.to(self.device, dtype=torch.bfloat16) | ||
) | ||
return image |
Check failure
Code scanning / CodeQL
Potentially uninitialized local variable Error
Signed-off-by: Vivian Chen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* modify vision encoder config Signed-off-by: Vivian Chen <[email protected]> * add lita, vila engine build support and fix export api bugs Signed-off-by: Vivian Chen <[email protected]> * add run example for vila, lita and vita Signed-off-by: Vivian Chen <[email protected]> * couple of changes for exporter Signed-off-by: Vivian Chen <[email protected]> * Apply isort and black reformatting Signed-off-by: xuanzic <[email protected]> * address code scanning issues Signed-off-by: Vivian Chen <[email protected]> * add triton deployment for lita/vila/vita Signed-off-by: Vivian Chen <[email protected]> * Apply isort and black reformatting Signed-off-by: xuanzic <[email protected]> * fix code scan Signed-off-by: Vivian Chen <[email protected]> --------- Signed-off-by: Vivian Chen <[email protected]> Signed-off-by: Vivian Chen <[email protected]> Signed-off-by: xuanzic <[email protected]> Co-authored-by: Vivian Chen <[email protected]> Co-authored-by: xuanzic <[email protected]>
* modify vision encoder config Signed-off-by: Vivian Chen <[email protected]> * add lita, vila engine build support and fix export api bugs Signed-off-by: Vivian Chen <[email protected]> * add run example for vila, lita and vita Signed-off-by: Vivian Chen <[email protected]> * couple of changes for exporter Signed-off-by: Vivian Chen <[email protected]> * Apply isort and black reformatting Signed-off-by: xuanzic <[email protected]> * address code scanning issues Signed-off-by: Vivian Chen <[email protected]> * add triton deployment for lita/vila/vita Signed-off-by: Vivian Chen <[email protected]> * Apply isort and black reformatting Signed-off-by: xuanzic <[email protected]> * fix code scan Signed-off-by: Vivian Chen <[email protected]> --------- Signed-off-by: Vivian Chen <[email protected]> Signed-off-by: Vivian Chen <[email protected]> Signed-off-by: xuanzic <[email protected]> Co-authored-by: Vivian Chen <[email protected]> Co-authored-by: xuanzic <[email protected]> Signed-off-by: Alexandros Koumparoulis <[email protected]>
* modify vision encoder config Signed-off-by: Vivian Chen <[email protected]> * add lita, vila engine build support and fix export api bugs Signed-off-by: Vivian Chen <[email protected]> * add run example for vila, lita and vita Signed-off-by: Vivian Chen <[email protected]> * couple of changes for exporter Signed-off-by: Vivian Chen <[email protected]> * Apply isort and black reformatting Signed-off-by: xuanzic <[email protected]> * address code scanning issues Signed-off-by: Vivian Chen <[email protected]> * add triton deployment for lita/vila/vita Signed-off-by: Vivian Chen <[email protected]> * Apply isort and black reformatting Signed-off-by: xuanzic <[email protected]> * fix code scan Signed-off-by: Vivian Chen <[email protected]> --------- Signed-off-by: Vivian Chen <[email protected]> Signed-off-by: Vivian Chen <[email protected]> Signed-off-by: xuanzic <[email protected]> Co-authored-by: Vivian Chen <[email protected]> Co-authored-by: xuanzic <[email protected]>
* modify vision encoder config Signed-off-by: Vivian Chen <[email protected]> * add lita, vila engine build support and fix export api bugs Signed-off-by: Vivian Chen <[email protected]> * add run example for vila, lita and vita Signed-off-by: Vivian Chen <[email protected]> * couple of changes for exporter Signed-off-by: Vivian Chen <[email protected]> * Apply isort and black reformatting Signed-off-by: xuanzic <[email protected]> * address code scanning issues Signed-off-by: Vivian Chen <[email protected]> * add triton deployment for lita/vila/vita Signed-off-by: Vivian Chen <[email protected]> * Apply isort and black reformatting Signed-off-by: xuanzic <[email protected]> * fix code scan Signed-off-by: Vivian Chen <[email protected]> --------- Signed-off-by: Vivian Chen <[email protected]> Signed-off-by: Vivian Chen <[email protected]> Signed-off-by: xuanzic <[email protected]> Co-authored-by: Vivian Chen <[email protected]> Co-authored-by: xuanzic <[email protected]> Signed-off-by: Hainan Xu <[email protected]>
* modify vision encoder config Signed-off-by: Vivian Chen <[email protected]> * add lita, vila engine build support and fix export api bugs Signed-off-by: Vivian Chen <[email protected]> * add run example for vila, lita and vita Signed-off-by: Vivian Chen <[email protected]> * couple of changes for exporter Signed-off-by: Vivian Chen <[email protected]> * Apply isort and black reformatting Signed-off-by: xuanzic <[email protected]> * address code scanning issues Signed-off-by: Vivian Chen <[email protected]> * add triton deployment for lita/vila/vita Signed-off-by: Vivian Chen <[email protected]> * Apply isort and black reformatting Signed-off-by: xuanzic <[email protected]> * fix code scan Signed-off-by: Vivian Chen <[email protected]> --------- Signed-off-by: Vivian Chen <[email protected]> Signed-off-by: Vivian Chen <[email protected]> Signed-off-by: xuanzic <[email protected]> Co-authored-by: Vivian Chen <[email protected]> Co-authored-by: xuanzic <[email protected]>
What does this PR do ?
Collection: [Note which collection this PR will affect]
Changelog
Usage
# Add a code snippet demonstrating how to use this
GitHub Actions CI
The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.
The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
To re-run CI remove and add the label again.
To run CI on an untrusted fork, a NeMo user with write access must first click "Approve and run".
Before your PR is "Ready for review"
Pre checks:
PR Type:
If you haven't finished some of the above items you can still open "Draft" PR.
Who can review?
Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.
Additional Information