mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-01-21 07:17:57 -05:00
fix(nodes): inverted switch logic
This commit is contained in:
@@ -553,8 +553,10 @@ class AnyOutput(BaseInvocationOutput):
|
||||
class SwitcherInvocation(BaseInvocation):
|
||||
a: Any = InputField(description="The first input", ui_type=UIType.Any)
|
||||
b: Any = InputField(description="The second input", ui_type=UIType.Any)
|
||||
switch: bool = InputField(description="Switch between the two inputs")
|
||||
switch: bool = InputField(
|
||||
description="Switch between the two inputs. If false, the first input is returned. If true, the second input is returned."
|
||||
)
|
||||
|
||||
def invoke(self, context: InvocationContext) -> AnyOutput:
|
||||
value = self.a if self.switch else self.b
|
||||
value = self.b if self.switch else self.a
|
||||
return AnyOutput(value=value)
|
||||
|
||||
Reference in New Issue
Block a user