Commit Graph
4 Commits
Author SHA1 Message Date
samizdat 4413057a33 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.
2025-06-10 06:20:58 -04:00
samizdat 08130f179c Fix imports to use NODE_CLASS_MAPPINGS from comfyui_controlnet_aux
Import preprocessor classes from the dynamically loaded NODE_CLASS_MAPPINGS
dictionary rather than trying to import directly from module paths.
This matches how comfyui_controlnet_aux actually exports its classes.

Verified correct node names:
- DepthAnythingV2Preprocessor ✓
- DWPreprocessor ✓
- CannyEdgePreprocessor ✓
- OpenposePreprocessor ✓
- MiDaS-DepthMapPreprocessor ✓
2025-06-10 06:04:55 -04:00
samizdat 799b35cea6 Fix import paths for comfyui_controlnet_aux preprocessors
Import directly from comfyui_controlnet_aux module instead of
node_wrappers submodules to match actual package structure.
2025-06-10 05:48:25 -04:00
samizdat d112928e44 Initial implementation of ComfyUI GPU Preprocessor Wrapper
Implements wrapper nodes that solve multi-GPU device conflicts for ControlNet
preprocessors by temporarily overriding device placement during model loading.

Core features:
- MultiGPUPreprocessorWrapper base class with device override logic
- 5 specific wrapper instances (DepthAnything, DWPose, Canny, OpenPose, Midas)
- Graceful ImportError handling with conditional registration
- Try/finally blocks ensuring device function restoration
- Drop-in replacements maintaining identical INPUT_TYPES/RETURN_TYPES
2025-06-10 05:12:35 -04:00