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

Support multiple instances of a model in the same Nuke script #21

Open
ldmoser opened this issue Jan 22, 2021 · 0 comments
Open

Support multiple instances of a model in the same Nuke script #21

ldmoser opened this issue Jan 22, 2021 · 0 comments

Comments

@ldmoser
Copy link

ldmoser commented Jan 22, 2021

I just realized that if I instantiate more than one MLClient node for my custom class it seems that both Nuke nodes will talk to the a single instance of my BaseModel-derived class on the server side.
I was hoping that each instance of my BaseModel class would somehow be associated with one nuke node, so I could do things like, keep a reference to a pre-trained model and re-use it for each new input.
But now, it seems like I would have to keep in my BaseModel-derived class some notion of cache that keeps alive any model that the user is using in that same Nuke script.. For example, let's say the user is comparing the outputs of two pre-trained models.
Would it be possible to send messages to the server when nodes are removed/added so that cache can purge some items?
Or better yet, would it be possible for the Server to instantiate one BaseModel object per nuke node?

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

No branches or pull requests

1 participant