Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/streamdiffusion/stream_parameter_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down Expand Up @@ -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
Expand Down