From 17309fefc1d012f1c63e607c14be6b4fae5fda71 Mon Sep 17 00:00:00 2001 From: RyanOnTheInside <7623207+ryanontheinside@users.noreply.github.com> Date: Tue, 23 Sep 2025 11:19:04 -0400 Subject: [PATCH] fix: use registry name to update processors --- src/streamdiffusion/stream_parameter_updater.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/streamdiffusion/stream_parameter_updater.py b/src/streamdiffusion/stream_parameter_updater.py index cc901606..b1ef0335 100644 --- a/src/streamdiffusion/stream_parameter_updater.py +++ b/src/streamdiffusion/stream_parameter_updater.py @@ -7,6 +7,7 @@ import logging logger = logging.getLogger(__name__) from .preprocessing.orchestrator_user import OrchestratorUser +from .preprocessing.processors import _preprocessor_registry class CacheStats: """Helper class to track cache statistics""" @@ -1440,7 +1441,15 @@ def _update_hook_config(self, hook_type: str, desired_config: List[Dict[str, Any logger.info(f"_update_hook_config: Modifying existing processor {i}: {current_type} -> {processor_type}") # If processor type changed, replace it - if current_type.lower() != processor_type.lower() and not current_type.lower().startswith(processor_type.lower()): + # Get the registry name for the current processor by checking the registry + current_registry_name = None + for registry_name, registry_class in _preprocessor_registry.items(): + if registry_class.__name__ == current_type: + current_registry_name = registry_name + break + + # Compare registry names directly + if current_registry_name != processor_type: logger.info(f"_update_hook_config: Type changed, replacing processor {i}") try: from streamdiffusion.preprocessing.processors import get_preprocessor