Nodes Browser
ComfyDeploy: How ComfyUI-GTSuya-Nodes works in ComfyUI?
What is ComfyUI-GTSuya-Nodes?
ComfyUI-GTSuya-Nodes is a ComfyUI extension designed to add several wildcards supports into ComfyUI. Wildcards allow you to use __name__ syntax in your prompt to get a random line from a file named name.txt in a wildcards directory.
How to install it in ComfyDeploy?
Head over to the machine page
- Click on the "Create a new machine" button
- Select the
Edit
build steps - Add a new step -> Custom Node
- Search for
ComfyUI-GTSuya-Nodes
and select it - Close the build step dialig and then click on the "Save" button to rebuild the machine
ComfyUI-GTSuya-Nodes
ComfyUI-GTSuya-Nodes is a ComyUI extension designed to add several wildcards supports into ComfyUI. Wildcards allow you to use __name__ syntax in your prompt to get a random line from a file named name.txt in a wildcards directory.
Installation
To install ComfyUI-GTSuya-Nodes in addition to an existing installation of ComfyUI, you can follow the following steps:
- cd custom_nodes
- git clone https://github.com/GTSuya-Studio/ComfyUI-Gtsuya-Nodes.git
- Restart ComfyUI
How to Use
Wildcards / Simple wildcards
Create a directory named wildcards into the Comfyui root folder and put all your wildcards text files into it. Add a Simple wildcards node: Right-click > Add Node > GtsuyaStudio > Wildcards > Simple wildcards.
Enter your prompt into the text box. Wildcard words must be indicated with double underscore around them. For example, if your wildcards file is named country.txt, the corresponding wildcard word must be __country__. You can add as many wildcard as you want.
Wildcards / Simple wildcards (Dir.)
This node is pretty similar to Simple wildcards. The only difference is that you can choose any directory on your hard drive containing your wildcards files. Those wildcards files don't need to be specificaly into the Comfyui root directory. To add Simple wildcards (Dir.) node: Right-click > Add Node > GtsuyaStudio > Wildcards > Simple wildcards (Dir.).
Enter your prompt into the text box. Wildcard words must be indicated with double underscore around them. For example, if your wildcards file is named country.txt, the corresponding wildcard word must be __country__. You can add as many wildcard as you want. Then indicate the path of the directory where are stored your wildcards files.
Wildcards / Wildcards Nodes
This node allows to manage wildcards lists and values directly from ComfyUI workflows. It is not dependent anymore of external text files. This node must work in conjunction with Ramdom Line nodes from Hakkun-ComfyUI-nodes which return a ramdom string from a list. To add Wildcards Nodes node: Right-click > Add Node > GtsuyaStudio > Wildcards > Wildcards Nodes.
Enter your prompt into the text box. Wildcard entries (srt#) must be indicated with double underscore around them and must correspond to the Ramdom Line nodes linked to this entry. For example, if a Ramdom Line nodes is linked to str3, the corresponding wildcard word must be __str3__. You can actually use a maxiumum of 5 wildcards as the same time.
Dowmloads / Danbooru (ID)
This node allows to automaticaly get image url and tags list from a post hosted on Danbooru website. This node could work in conjunction with Load Image From URL node from comfyui-art-venture nodes to import the corresponding image directly into ComfyUI. The tags list could be directly used as a prompt, or part of a prompt. To add Danbooru (ID) node: Right-click > Add Node > GtsuyaStudio > Downloads > Danbooru (ID).
The node can be used by indicating the ID number of the Danbooru post website.
Dowmloads / Danbooru (Random)
This node allows to automaticaly get image url and tags list from a random post hosted on Danbooru website. It is also possible to restrict obtained results to a specific tag query. This node could work in conjunction with Load Image From URL node from comfyui-art-venture nodes to import the corresponding image directly into ComfyUI. The tags list could be directly used as a prompt, or part of a prompt. To add Danbooru (Random) node: Right-click > Add Node > GtsuyaStudio > Downloads > Danbooru (Random).
To use this node, you need a valid API key from Danbooru website. To obtain such API key, you need first to have an Danbooru account, then ask for an unique API key, and then give permission to use posts:random data. Once it is done, finaly indicate your Danbooru login and API key number. The node is ready. The node can be used directly with the default settings. If you want to restrict results and obtain a tags list containing a specific tag, indicate this tag into the tag_query field. This tag must be a valid Danbooru tag website.
Tools / Replace Strings
This node allows to automaticaly delete or replace some specific strings into a test or a prompt. To add Replace Strings node: Right-click > Add Node > GtsuyaStudio > Tools > Replace Strings.
To use this node, you need to link inputs to 2 text nodes : text entry correspond to the text where you want to replace or delete strings, and replace_list entry correspond to the list of words that would be replaced. You have to set one strings replacement per line. String replacement line must be like this: string1|string2, where string1 is the string that will be replaced, and string2 is the replacement string. If string2 is not specified, string1 will be deleted form the text.
Tools / Random File From Path
This is a simple node that return a random file path form a directory. In case of images, this node could work in conjunction with Load Image From URL node from comfyui-art-venture nodes to import the corresponding image directly into ComfyUI. To add Random File From Path node: Right-click > Add Node > GtsuyaStudio > Tools > Random File From Path.
To use this node you just have to indicate a directory path where are located the files you want to randomly select.