From 1730a0cd41f9be673640b455b7e9fba63a95ef3e Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 8 Mar 2025 09:06:40 +1000 Subject: [PATCH] experiment: allow Any type outputs to always pass connection validation --- .../src/features/nodes/store/util/validateConnectionTypes.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/invokeai/frontend/web/src/features/nodes/store/util/validateConnectionTypes.ts b/invokeai/frontend/web/src/features/nodes/store/util/validateConnectionTypes.ts index 835bf83af0..1eb21eb585 100644 --- a/invokeai/frontend/web/src/features/nodes/store/util/validateConnectionTypes.ts +++ b/invokeai/frontend/web/src/features/nodes/store/util/validateConnectionTypes.ts @@ -58,6 +58,7 @@ export const validateConnectionTypes = (sourceType: FieldType, targetType: Field const isSubTypeMatch = doesCardinalityMatch && (isIntToFloat || isIntToString || isFloatToString); const isTargetAnyType = targetType.name === 'AnyField'; + const isSourceAnyType = sourceType.name === 'AnyField'; // One of these must be true for the connection to be valid return ( @@ -67,6 +68,7 @@ export const validateConnectionTypes = (sourceType: FieldType, targetType: Field isGenericCollectionToAnyCollectionOrSingleOrCollection || isCollectionToGenericCollection || isSubTypeMatch || - isTargetAnyType + isTargetAnyType || + isSourceAnyType ); };