-
Notifications
You must be signed in to change notification settings - Fork 0
Documentation for the ComfyUI Nodes in this Node Pack
Welcome to the ComfyUI-Mokkaboss1 wiki!
Node1: DoubleTextEncode (Workflow available in the workflow folder)

This node combines two ClipTextEncode nodes together and gives the option to use the text prompt for the purpose of saving this to a file if needed
Node2: HashText

This node allows you to include Comments separated by "#" that do not carry forward to the prompt.
Node3: IndoorBackgrounds

This node helps to create a text prompt describing the background of an image. The options available centre around indoor images. It provides options to select from to piece together the text. There are some special options available. For each characteristic you can select "Random" or "None" - no prizes to guess what these options mean. The seed also plays a role in how this node works. If you fix the seed, then the generated prompt can be re-used over and over again. If you select random or incremental seed, then new text is generated each time you queue the prompt. If you fix the seed on 999, it ensures the whole text is blank. There is also a pre-text and a post_text which allows you to add your own custom text before or after the generated text.
Node4: LandscapeBackgrounds

This node works in the same way as Node3 just for outdoor images.
Node5: NatureColours (deprecated)

This node provides the hex colour code for colours that are commonly present in nature.
Node 6: UrbanColours (deprecated)

This node works in the same way to Node 5 but with colours found in man made environments
Node 7:OptimalCrop

This node supports to calculate the maximum image size for the purpose of cropping that fits into another image whilst adhering to the target aspect ratio. In the example shown I have a 4K desktop background image (3840x2194) and want to crop it to ratio of 3:4. What are the dimensions of that image for passing to the Crop image node? By changing the aspect ratio and tweaking the x and y offsets, the desired final image can be cropped. The Optimal Crop node also allows the rounding value to be adjusted to ensure the dimensions of the final image are divisible by this amount. The node will automatically centre the crop around the middle of the image - so the offsets maintained will be relative to this point.
Node 8: seveninabox (deprecated) see Node 16

This node reads saved settings for steps, cfg, sampler, scheduler for a given model and passes them on for use in the workflow. The settings are saved in the file "model_data.py" in the folder "model_settings". This file can be updated individually by the user based on their settings. (...ComfyUI_MokkaBoss1\model_settings\model_data.py")
My settings are:

I have found this is a real time saver when changing models I don't need to refer back to the optimal settings for each model as they are automatically selected.
Node 9: X_In_a_Dress

This node works in the same manner to nodes 3 and 4 but has the focus on the subject. The options provided allow for fashion choices around 'female' clothing.
Node 10: X_In_a_Suit

This node works in the same manner to nodes 3,4 and 9 and helps to generate text for fashion choices around 'male' clothing.
Node 11: WrapText (Workflow available in the workflow folder)
I appreciate the screenshot will be difficult to read due to the size of the workflow. I have included it in the workflow folder

This node allows you to use the Comfyroll Overlay Text node in an extended fashion. With the exising node. You can't print on multiple lines and there is no word wrap feature. I have added this all be it with quite a few nodes as per the screenshot. To use this word wrap feature you have the ability to define how many characters of text as a maximum will fit on one line. This assumes each character has the same width (which is a simplification I know but easier to program :-)) Each line truncates at the end of the last full word that fits on the line in questions. I allowed for 7 lines in the node.
Node12: AspectRatioCondition
This node is a simple check if the image aspect ratio is within a certain tolerance and only if this is the case will the image pass to the next step in the workflow. If it is not the workflow will abort and an error message will be generated.

Node13: SDXLAspectRatioDec
This node is similar to many currently available but includes the decimal value for the aspect ratio which I find quite helpful.

Node14: ZoomCrop
This node is similar to OptimalCrop but focusses on zooming into the image rather than changing the aspect ratio. Both nodes can be used in sequence if you want to change both the aspect ratio and the zoom. see the example below 👍

Firstly the aspect ratio is set to 2:3 via OptimalCrop and then the zoom factor is set to 1.5 indicating a 50% zoom. The y offset is adjusted to ensure the head of the statue is included in the frame.
Node15: IntFloatDict

This simple node takes an integer, looks up the integer in a dictionary (created based on a multi-line text field) and returns the value from the dictionary as a float. A practical example of how this can be used is included below (workflow available in the workflow folder)

Node 16: WorkflowSettings

This is replacement for node 8 "seveninabox". Now it is nolonger needed to modify a python file to set the model settings. This can be done directly in comfy.
The data structure to be updated in the multiline text is as follows:
0,devlishphotorealism_sdxl15.safetensors,30,4.0,dpmpp_2m_sde,karras 1,sdxlUnstableDiffusers_v8HEAVENSWRATH.safetensors,30,4.0,dpmpp_2m_sde,karras 2,lovexlAllInOneMega_v20.safetensors,30,4.0,dpmpp_2m_sde,karras 3,juggernautXL_v9Rdphoto2Lightning.safetensors,5,1.5,dpmpp_sde,karras 4,dreamshaperXL_v21TurboDPMSDE.safetensors,6,2.0,dpmpp_sde,karras 5,devlish LoveXL 050.safetensors,30,4.0,dpmpp_2m_sde,karras 6,sdxlUnstableDiffusers_v11.safetensors,30,4.0,dpmpp_2m_sde,karras 7,DEVLISH LIGHTNING.safetensors,5,1.5,dpmpp_sde,karras 8,sdxlUnstableDiffusers_nihilmania.safetensors,30,4.0,dpmpp_2m_sde,karras 9,realvisxlV40_v40Bakedvae.safetensors,30,4.0,dpmpp_2m,karras 10,realvisxlV40_v40LightningBakedvae.safetensors,5,1.5,dpmpp_sde,karras 11,juggernautXL_v8Rundiffusion.safetensors,30,4.0,dpmpp_2m,karras
i.e. a simple comma separated list. If the model selected in the model selection node is not present in the multiline text field then the first line will be assumed. Once you have maintained your settings once mark the node, then click in an empty space and save the single node with the maintained data as a template (via the context menu [right mouse click]. This safeguards having to update this somewhat tedious list each time a new workflow is created. The template can be retrieved by clicking in an empty space and select load template also via the context menu.
Node 17: IntStringDict

like Node 15 but outputs strings rather than floats
Nodes 18,19,20,21,22: ConnectImage, ConnectInteger, ConnectFloat, ConnectString, ConnectLatent

This is a variant of the reroute nodes. Why create a new node? I was creating a template and my first node in the template was the reroute. As this is a generic node that supports all data types, it seems when loading the template comfy got confused about which type it should be and some of the noodles were changed. So I thought I'll create a new version for each type separately and also include a text field to support documentation purposes for example can be used to doucment how to use the template. Of course you can also collapse these nodes and they look like a regular reroute node. Bear in mind when you add the node to a workflow you'll need to convert the i_#### to an input (I have not yet worked out how to set that per default)
Node 23: TimeStamp

kudos to jamesWalker55 for this one and his datetime node. Unfortunately it seemed to be creating some error messages so I created one similar with a slightly adjusted format.
Node 24: SaveWithMetaData

I can't really take the credit for this one as it is 99% down to https://github.com/giriss/comfy-image-saver
I used his node a lot but was frustrated that it took on my machine about 20s to save an image. After debugging I localized the root cause of the delay. The line which reads the modelhash was consuming all the time. This was suitably commented out and more or less any reference to modelhash removed from the node. It now runs within a couple of seconds which is a massive improvement.
NOdes 25,26: Colours, TricolorComposition

I made a new selection of colours and incorporated them into this node - I will set the other two mentioned earlier (urbancolours, nature colours to deprecated)
The TricolorComposition node allows the easy composition of backgrounds based on black, grey and white templates (found in the TricolorComposition folder as part of the repository). You can also create your own if you like. The threshold likely does not need to be changed. This only helps to classify pixels that are nearly white or nearly black correctly.
Node 27: HueSatLum

Promise this will be the last colour selector node. I wanted the flexibility of the Hue, Saturation, Luminosity sliders I know and love from various graphics programs. This node delivers hex codes that can feed various other nodes.
update: 18th April - I added a preview color box to this node (100 pixels x 100 pixels)

Node 28: EmbeddingLoader

ability to maintain a list of downloaded embeddings and their keywords and pull them into the text prompt for further processing.
Node 29: ImageDimensions

adding aspect ratio and megapixel count to the get Image Size node.
Node 30: IntEvaluate
some of you will be familiar with the Evaluate Integers Node from the Efficiency nodes suite. However I've had a few problems with this one dur to the dependency on importing simpleeval. So to avoid any future issues on this front I created my own version. If you want me to add any new formulae considering a,b and c let me know.

Node 31:
