Support CR Apply ControlNet conditioning passthrough

This commit is contained in:
CyberShadowX
2026-05-28 11:41:55 +08:00
parent f82ac946fa
commit b51e6d22bb
2 changed files with 78 additions and 3 deletions
@@ -4,12 +4,16 @@ from ..models import NodeRecord
ROLE_FIELD_ORDER = {
"positive": ("positive", "positive_conditioning", "base_positive"),
"negative": ("negative", "negative_conditioning", "base_negative"),
"positive": ("conditioning", "positive", "positive_conditioning", "base_positive"),
"negative": ("negative", "negative_conditioning", "base_negative", "conditioning"),
}
KNOWN_CONDITIONING_MARKERS = (
"controlnetapply",
"controlnet",
"control_net",
"apply controlnet",
"comfyroll",
"inpaintmodelconditioning",
"conditioningcombine",
"conditioningconcat",
@@ -24,7 +28,9 @@ KNOWN_CONDITIONING_MARKERS = (
class ConditioningAdapter:
def matches(self, node: NodeRecord) -> bool:
lowered = node.class_type.lower()
return any(marker in lowered for marker in KNOWN_CONDITIONING_MARKERS)
if any(marker in lowered for marker in KNOWN_CONDITIONING_MARKERS):
return any(_is_conditioning_field(field) for field in node.inputs)
return False
def fields_for_role(self, node: NodeRecord, role: str) -> list[str]:
role_fields = [