Model3D widget refreshes for events of unrelated slider widget

This is likely not a bug, but rather a funny behaviour I observed with the Model3D widget.

I have developed a very simple demo which enables people to test our pretrained deep learning models for different segmentation tasks from head MRIs. The tool is deployed here. Source code is also accessible from the link above.

The widget contains an extremely simple implementation of a 2D and 3D view widget to enable the user to interact with the generated segmentation either by scrolling through 2D slices in the MRI volume and showing the segmentation as overlay, or just playing around with the surface model in 3D. Both these widgets live inside one gr.Blocks, which I guess means that they live within the same context.

For the 2D view scroller, I have added a simple slider, which enables the user to choose which 2D slice to render. However, for each slider update event, it seems like the Model3D is being refreshed. Locally, I don’t see why that should be necessary, as the two renderers could be completely independent. Could be that both live in the same context which is causing this issue.

Maybe it requires me to have two separate gr.Interface and then using gr.Parallel to enable these two widgets to be independent and not update based on the other’s events? Any ideas?

Below is a snapshot of the current state of the software.