Make listeners idempotent
@@ -126,6 +126,7 @@ class Transformer(Pipe):
def add_listener(self, listener: TransformerListener) -> None:
"""Add a listener for a downstream component. Usually internals."""
+ if listener not in self.listeners:
listener.set_dim("nO", self.model.get_dim("nO"))
self.listeners.append(listener)
