From 4413057a3396b2a96bf62d6403ecef0ce06ba13a Mon Sep 17 00:00:00 2001 From: samizdat Date: Tue, 10 Jun 2025 06:20:58 -0400 Subject: [PATCH] Fix function name resolution for different preprocessors Use getattr to dynamically call the correct function name for each preprocessor (e.g. 'estimate_pose' for DWPose, 'execute' for others). This resolves the 'object has no attribute execute' error. --- nodes.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nodes.py b/nodes.py index 624fa00..e7e516c 100644 --- a/nodes.py +++ b/nodes.py @@ -47,9 +47,10 @@ class MultiGPUPreprocessorWrapper: # Temporarily override with consistent device model_management.get_torch_device = lambda: torch.device(self.target_device) - # Create and execute original preprocessor + # Create and execute original preprocessor using its specific function name preprocessor = self.preprocessor_class() - result = preprocessor.execute(**kwargs) + function_name = getattr(self.preprocessor_class, 'FUNCTION', 'execute') + result = getattr(preprocessor, function_name)(**kwargs) return result except Exception as e: