import torch from collections import defaultdict, deque from typing import Dict, Any, List from comfy_integration.nodes import NODE_CLASS_MAPPINGS from utils.app_utils import get_value_at_index def _normalize_dynamic_inputs(node_class, class_type, kwargs): """Rebuild the structures ComfyUI's executor would have built for this node. Two V3 dynamic shapes need post-processing when nodes are called directly: * ``COMFY_DYNAMICCOMBO_V3`` — the widget arrives as a bare string but the node signature expects ``{id: