Styles · 13:47
iTools and custom styles
YAML style files.
- Install the iTools custom node.
- Styles live in YAML files.
- Add your own styles.
| Item | Use |
|---|---|
| iTools | Style nodes |
| YAML | Style definitions |
Do this in your own tools, step by step. Ticks are saved on this device.
Node?
iTools.
Styles in?
YAML.
0:00 welcome to episode 15 of our comfy UI tutorial Series today I am talking about Styles and how to add your own and use them more easily in your workflows then I will discuss running multiple prompts from a file loading batch images from a folder adding text overlays to your generations and more cool stuff first we need a custom note go to manager then custom node manager search for ey tools and you'll find this comfy UI I tools custom node made by a member of the pixaroma Discord Community click install and wait for it to finish installing then click restart and okay you can use the clear button to clear your workflow uh double click on the canvas and search for ey tools here you can see all the nodes available in this custom node let's start with this one it tools prompt Styler if I hover the mouse over the title you can see it says that it helps you populate your prompt quickly using a template stored in a yaml file so let's see how it actually works let's
1:11 add some show any nodes these are part of comfy UI easy use custom nodes and you should have them by now if you followed the other episodes I will connect the positive and negative outputs to the show any node now if I run the workflow you can see that there is nothing there because we didn't select any template instead of none I can select a different template like art deco for example and then add a prompt like a cat and when I run the workflow you can see that our prompt is inserted into a different prompt that gives that art deco art style so we have a positive and a negative prompt that comes from that art style selection if I select something else like a comic book art style and run the workflow you can see how our prompt changed all those styles are stored in a file in this case the basic yaml file you can see here we have some that come with the the custom nodes if you go to the comfy UI folder then to the custom nodes folder you can find all your installed nodes here we have the it
2:21 tools we just installed go inside and look for the Styles folder and here are all the five files you saw in that drop- down box they are all here if I select a different file like the camera you can see here I have different camera names if I run it you can see that the camera was added to the prompt which is our cat I can select something else like mood and play around with different options if we go back to the Styles folder you can see here even more Styles here are the styles that I created and used in previous episodes plus a few extra ones that I added this week and asked the node Creator to include here so you don't have to download them right now they are not active if you read the redmi file you can see it says to move the files you want into the Styles folder in order to activate them and then restart the comfy UI by the way here are all the Styles split by category and the pixaroma file has them all in one to be able to test it I will just copy all and paste them in the Styles folder I go to manager restart and click okay
3:33 after the restart if I go to the Styles folder I can see all of them here use the mouse wheel to scroll up and down if I select photography I can find only photography Styles if I select cinematic and run it you can see how the cat is added in that cinematic style along with a negative prompt if I select painting I can see different painting Styles if you select the pixaroma file you can access all over 300 art styles you can just search for a word on top for example photography will give you all photography Styles and painting will give you painting Styles and so on you get the idea now this node is for a single style if you want one with extra Styles then you can search for it tools again and select the one that has extra in the name this one has four different style options allowing you to combine up to four different styles by default fault it loads with four different files basic camera artist and mood if I select a style from those files you can see that they are added in order the first styles are more important than the second and so on it's just text that
4:45 comes one after the other if you don't want any style active you just set All To None you can load the styles that make sense for what you want to do for example I can load a painting file category and the art C category so I can choose for painting like digital Fantasy game art and for style like cyber gooth this gives me an interesting combination that will create a nice prompt uh in a few clicks which can save a lot of time but let's see how we can implement this in uh an actual workflow I am clicking on the load button and loading a basic sdxl workflow from episode 3 you can I'll find all my workflows on Discord search for it tools and let's add that prompt Styler node in order to connect our node we need to convert text to input we do that for both positive and negative prompts and now we just connect the positive to the text input on positive and the negative to the text input of negative that's all you need to do quite easy isn't it I am adding a simple prompt like a cat and to be able to compare I will use a fixed seed if we test the workflow without any style this
5:56 is what we get for the cat prompt with that fixed seed if if I choose the cyberpunk template and test it the cat will look completely different if I select a different file like drawing I can choose a drawing style from the template such as blue ballpoint uh pin and when I run it I get a nice drawing if I change to pastel I get this pastel drawing if you want to see what the prompts look like you can add that show any node for both positive and negative prompts so you have a better idea of how the prompt is com combined if I choose the illustration file I can select a cartoon character on a white background um if I want and the result looks great another style that I like is the flat cute cartoon style so what if you want to edit the style or add your own Styles if we go to the Styles folder you can see the default ones plus the ones I added my recommendation is to not edit the default ones these are the five artists basic camera mood and original instead make a copy and give it a different name or create categories or
7:06 file names that Mak sense for you you can have one like my prompts colors or different art styles depending on what you generate more save your favorite prompts into a file like that the easiest way is just to take an existing file from here paste it in the Styles folder and rename it then for example if I want to change something to the illustration file you can open it with notepad but my recommendation is to use notepad++ if you go on Google and search for notepad++ you can go to this website on the left you have the download option and you can download and install a version for your system then with a right click you can edit with notepad++ um this is how the file looks and it needs to keep this for format to work you can see it starts with a line then a space followed by by the name and then the title you see in the drop down box after that you have the negative and positive prompts
8:14 you can see the word prompt in Brackets which you can use in your positive prompt where you want to insert the prompt for example a cat was the prompt that was inserted into this text so the easiest way is just to edit an existing one like editing the title positive and negative prompts um you can also select a block copy and paste it to add your title negative and positive prompts if you don't add your prompt in the brackets like here then the prompt will be inserted at the beginning of this text so let's save this um file now we go back to manager and restart our comfy UI you can now see the style I added in the list um if I run it you can see that the cat was not inside the text at first because I didn't add the brackets and then the text from the file follows now how can you mess up the file by mistake I am speaking from experience since I messed up a few times but don't worry you can just delete and start over with a new file even if you mess up something you can see that after the column there is a space if I remove that you can see
9:27 how the word name has changed color which is easy to notice um another mistake I made when I copied and pasted was adding an extra space by mistake before the line uh this time the colors remain the same so it was harder to see if I save it and restart compy UI then select that illustration file you can see it says loading well that will load forever if you look at the command window you can see I got an invalid format error online seven and line 15 that's why it's useful to have notepad plus plus uh installed if I go to line seven all looks okay but if I go to line 15 you can see the number 15 here and this is where my problem is so I will delete that space save the file and restart comfy UI it still says loading but don't worry this time I just need to reselect that file from the list and now it says None which means it worked I can select any template from that file and all works well I am loading a flux workflow from episode 10 we do the same steps as
10:40 before we add the prompt style but this time the extra one so we have more Styles then for the positive prompt I convert it to text the flux doesn't use negative prompts so we don't need that we only connect the positive to the text input and that is all um I like to change the color of nodes to quickly see which are from the same category so I make the ones with prompts green then I add a simple prompt like aat and I am using a fixed seed now keep in mind that flux doesn't recognize all the art styles that the sdxl model recognizes but it can still create some cool images even if it's not the exact art style I like to select the category file first so uh let's say I select a photography and for the template I leave it as none for now which means it's inactive if I run the workflow I get this cat now if I select a template from that file like cinematic you can see how the image changes when I run the workflow I can try to add a camera as you can see there are some subtle changes I'm not sure if all cameras are recognized in flux but you can use them
11:53 to get subtle variations if I select another one sometimes that can be enough to fix a small mistake um I can also make the camera more important if I put it first so I change the order and place the camera first and photography as the second style um as you can see it's a little different some of my favorite styles are painting Styles like this digital Fantasy game art style then I combine it with different art styles from the art category by playing around with different combinations you can get some nice results with simple prompts and just by switching Styles um if you like to experiment a lot like me then it might be faster to have a single file instead of multiple files that contain all the Styles in one I can load all four Styles as my pixel Roma file and I don't need to touch that file anymore I only um select the styles from it um this way I can select a painting style and an art style quickly only two selections instead of four or I can select a sculpture with a craft um and get something like this if you don't
13:03 want to use any style just set them all to have the value none I have some cool Styles in the experimental one for example Divine portraiture combined with a better prompt and another style can give interesting results some of the prompts need to be adapted for the style for example if I want to do something interior related I can include an interior prompt and then select the art styles from the list for example this dreamlike style always adds clouds and grass inside Interiors creating a surreal look or this luxury interior style makes all Interiors look more luxurious I am now loading one of the saved sdxl workflows that I did earlier
Get the other 3 chapters, the exam and your certificate for LinkedIn, plus all 700+ AI courses.