This repository was archived by the owner on Jun 2, 2025. It is now read-only.
Replies: 3 comments
-
I thought the switches were converted to use normal bools? I may have
missed some. It should accept normal book output of the other nodes (which
shouldn't be Number now).
…On Sat, Feb 24, 2024, 5:47 AM curious.jp ***@***.***> wrote:
I am interested if anyone has a more elegant solution to this problem. Say
I have two strings, and I want to switch between them depending on whether
one of them contains a certain control sequence. *Text Contains* provides
a method for detecting the sequence and provides a BOOLEAN in response, but *Text
Input Switch* requires a boolean number instead of a boolean. (Similarly,
nodes like ImpactPack's *Switch (Any)* want an index number.)
As far as I can tell, the approach is to use *Boolean to Text*, then use
that text representation as a key for *Text Dictionary Get* to retrieve
an index from a dictionary as a string, then use *Text to Number*, and
then use this for something like *Text Input Switch*. Is there a better,
more direct method, for converting BOOLEAN to an index/boolean number?
workflow.png (view on web)
<https://github.com/WASasquatch/was-node-suite-comfyui/assets/48515264/971a4273-3f8c-409c-9870-6dc25d98ddee>
—
Reply to this email directly, view it on GitHub
<#349>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIZEZKCQ72D6HYEZQS4TELYVHVPTAVCNFSM6AAAAABDYAZFX2VHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZWGI3DGNBZHE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I think this one might have been overlooked - if you have a look at line 13096 of WAS_Node_Suite.py, it still lists "boolean_number": ("NUMBER",) as a required input to WAS_Text_Input_Switch. WAS_Text_Contains on line 13131 still has a return type of ("BOOLEAN",). |
Beta Was this translation helpful? Give feedback.
0 replies
-
Is this issue related? #364 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am interested if anyone has a more elegant solution to this problem. Say I have two strings, and I want to switch between them depending on whether one of them contains a certain control sequence. Text Contains provides a method for detecting the sequence and provides a BOOLEAN in response, but Text Input Switch requires a boolean number instead of a boolean. (Similarly, nodes like ImpactPack's Switch (Any) want an index number.)
As far as I can tell, the approach is to use Boolean to Text, then use that text representation as a key for Text Dictionary Get to retrieve an index from a dictionary as a string, then use Text to Number, and then use this for something like Text Input Switch. Is there a better, more direct method, for converting BOOLEAN to an index/boolean number?
Beta Was this translation helpful? Give feedback.
All reactions