mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2026-03-16 14:27:05 +08:00
Merge pull request #441 from Ken-g6/main
Allow SomethingToString to accept a string
This commit is contained in:
commit
a69d7c1a95
@ -669,7 +669,7 @@ Converts any type to a string.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def stringify(self, input, prefix="", suffix=""):
|
def stringify(self, input, prefix="", suffix=""):
|
||||||
if isinstance(input, (int, float, bool)):
|
if isinstance(input, (int, float, bool, str)):
|
||||||
stringified = str(input)
|
stringified = str(input)
|
||||||
elif isinstance(input, list):
|
elif isinstance(input, list):
|
||||||
stringified = ', '.join(str(item) for item in input)
|
stringified = ', '.join(str(item) for item in input)
|
||||||
@ -2622,4 +2622,4 @@ class LazySwitchKJ:
|
|||||||
|
|
||||||
def switch(self, switch, on_false = None, on_true=None):
|
def switch(self, switch, on_false = None, on_true=None):
|
||||||
value = on_true if switch else on_false
|
value = on_true if switch else on_false
|
||||||
return (value,)
|
return (value,)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user