Skip to content
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

Server for VILA-M3 integrated to the slicer module #66

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

Conversation

diazandr3s
Copy link
Contributor

@diazandr3s diazandr3s commented Jan 29, 2025

  • Server working for NVCF functions to interact with 3D Slicer
  • This model works from images pre loaded to NVCF

@diazandr3s
Copy link
Contributor Author

@mingxin-zheng could you please review and approve? :)

@mingxin-zheng
Copy link
Collaborator

Hi @adiazpinto , thanks for the PR. Are you importing these from util.py?

from utils import ChatHistory, ImageCache, M3Generator, SessionVariables

Some of the classes above are in that file, but some are not.

Also, it worth noting that streaming mode isn't supported at the moment. I saw you have an implementation in the server, but it is unclear to me how that would be enabled for the internal NVCF function or local server setup in the repo.

Thanks!

@diazandr3s
Copy link
Contributor Author

Hi @adiazpinto , thanks for the PR. Are you importing these from util.py?

from utils import ChatHistory, ImageCache, M3Generator, SessionVariables

Some of the classes above are in that file, but some are not.

Also, it worth noting that streaming mode isn't supported at the moment. I saw you have an implementation in the server, but it is unclear to me how that would be enabled for the internal NVCF function or local server setup in the repo.

Thanks!

Thanks again, @mingxin-zheng.
I've updated the PR. I've also removed the streaming part. We may need that in the future, though :)

class ExpertVista3D():
"""Expert model for VISTA-3D."""

NIM_VISTA3D = "https://api.nvcf.nvidia.com/v2/nvcf/pexec/functions/caf65f74-1c04-4b3c-b566-5908ee950f24"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @diazandr3s
This is an internal NVCF. Having it exposed in the code is not intended.

)
logger.info(f"Model {self.model_name} loaded successfully. Context length: {self.context_len}")
elif source == "nim":
self.base_url = "https://api.nvcf.nvidia.com/v2/nvcf/pexec/functions/a2dec46a-b444-45aa-a1fc-a510ca41f186"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above. Thanks!


REMOTE_URL = "https://developer.download.nvidia.com/assets/Clara/monai/samples"

MODEL_CARDS = (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think some variables, classes and functions in this script are exactly the same as the ones in utils.py

Can we include the utils.py in the PYTHON path and import them to avoid duplicate code? Thanks!

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.

3 participants