String from int node.
This commit is contained in:
@@ -3,8 +3,12 @@ from .nodes.string_print import StringPrint
|
||||
from .nodes.string_replace import StringReplace
|
||||
from .nodes.string_node import StringNode
|
||||
from .nodes.string_concat import StringConcat
|
||||
from .nodes.string_from_int import StringFromInt
|
||||
|
||||
from .nodes.tokenizer_vocab import TokenizerVocab
|
||||
|
||||
from .nodes.json_pick_item import JsonPickItem
|
||||
|
||||
from .nodes.model_hook import ModelHook
|
||||
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
@@ -13,6 +17,7 @@ NODE_CLASS_MAPPINGS = {
|
||||
"IW_StringReplace": StringReplace,
|
||||
"IW_StringNode": StringNode,
|
||||
"IW_StringConcat": StringConcat,
|
||||
"IW_StringFromInt": StringFromInt,
|
||||
|
||||
"IW_TokenizerVocab": TokenizerVocab,
|
||||
|
||||
@@ -28,6 +33,7 @@ NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"IW_StringReplace": "IW ReplaceString",
|
||||
"IW_StringNode": "IW StringNode",
|
||||
"IW_StringConcat": "IW StringConcat",
|
||||
"IW_StringFromInt": "IW StringFromInt",
|
||||
|
||||
"IW_TokenizerVocab": "IW TokenizerVocab",
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
import os
|
||||
import json
|
||||
|
||||
class StringFromInt:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
return {
|
||||
"required": {
|
||||
"value": ("INT",{"defaultInput": True}),
|
||||
},
|
||||
"optional": {
|
||||
},
|
||||
}
|
||||
|
||||
RETURN_TYPES = ("STRING", )
|
||||
FUNCTION = "execute"
|
||||
|
||||
CATEGORY = "iw"
|
||||
|
||||
def execute(self, value):
|
||||
return (str(value),)
|
||||
Reference in New Issue
Block a user