new banner and better README files (#10)
* set the new repo banner and icon * improve the README files by using github md alerts
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 150 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 94 KiB |
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
"path": ".",
|
||||
},
|
||||
],
|
||||
"settings": {},
|
||||
}
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
<h1 align="center">
|
||||
ComfyLab Pack
|
||||
</h1>
|
||||
|
||||
<p align="center">
|
||||
<img src=".images/repo_banner.jpg" width="70%" title="welcome to ComfyLab Pack!">
|
||||
<img src="static/repo_banner.png" title="welcome to ComfyLab Pack!">
|
||||
<br/>
|
||||
<span style="color:#787878; font-size: large; font-style: italic">A collection of carefully experimented nodes, to improve your Comfy UX.</span>
|
||||
<span>A collection of carefully experimented nodes, to improve your Comfy UX.</span>
|
||||
</p>
|
||||
|
||||
<h2 align="center"><a href="#️node-overview">Node overview</a> | <a href="#documentation">Documentation</a> | <a href="#installation">Installation</a></h2>
|
||||
@@ -41,6 +37,7 @@
|
||||
- ...
|
||||
</details>
|
||||
|
||||
> [!NOTE]
|
||||
> For a quick start, it is advised to read the [core concepts](./wiki/node%20reference/xy%20plot/00%20-%20core%20concepts.md).\
|
||||
> More information in the [XY Plot node reference](./wiki/node%20reference/xy%20plot/) and the [dedicated tutorials](./wiki/tutorials/XY%20Plot/), from simple to advanced.\
|
||||
> You can also check the [examples](./wiki/examples/), they will be frequently extended.
|
||||
@@ -60,6 +57,7 @@ Very **useful to standardize your workflows**, and keep a collection of configur
|
||||
- strictly validated with a **JSON Schema**, with **detailed visual report** in case of errors
|
||||
</details>
|
||||
|
||||
> [!NOTE]
|
||||
> More information in the [Output Config node reference](./wiki/node%20reference/output%20config.md) and the [dedicated tutorials](./wiki/tutorials/Output%20Config/).\
|
||||
> You can also check the [examples](./wiki/examples/), they will be frequently extended.
|
||||
|
||||
@@ -71,13 +69,14 @@ Very useful for many operations: **insert / prefix / append, concatenate, pad, t
|
||||
Compatible with **integers, floats, booleans.**\
|
||||
Exist in 2 flavors: **simple string and multiline**.
|
||||
|
||||
> [!NOTE]
|
||||
> More information in the [Format String node reference](./wiki/node%20reference/format.md) and the [dedicated tutorials](./wiki/tutorials/Format/).\
|
||||
> You can also check the [examples](./wiki/examples/), they will be frequently extended.
|
||||
|
||||
## Queue - _efficient and simple to use_
|
||||
|
||||
Exist in 3 flavors: **Generic**, **File**, **Image**.\
|
||||
Very simple to use: **auto-queuing** (with error / interruption detection), no counter to reset or batch size to set.
|
||||
Very simple to use: **auto-queuing** (with error / interruption detection), no counter to reset or queue size to set.
|
||||
|
||||
## List utilities - _make lists as you want_
|
||||
|
||||
@@ -91,8 +90,9 @@ Please check the [node list](./wiki/node_list.md).
|
||||
|
||||
# Documentation
|
||||
|
||||
<ins>Important note:</ins> all nodes in this extension has been adjusted with custom tooltips.\
|
||||
By simply **moving the mouse pointer over** a node or its inputs / widgets / outputs, you can get useful **contextual information**.
|
||||
> [!TIP]
|
||||
> All nodes in this extension has been adjusted with custom tooltips.\
|
||||
> By simply **moving the mouse pointer over** a node or its inputs / widgets / outputs, you can get useful **contextual information**.
|
||||
|
||||
In addition, more detailed information in the [wiki](./wiki/):
|
||||
|
||||
|
||||
+1
-1
@@ -18,4 +18,4 @@ Changelog = "https://github.com/bugltd/ComfyLab-Pack/blob/main/CHANGELOG.md"
|
||||
[tool.comfy]
|
||||
PublisherId = "bugltd"
|
||||
DisplayName = "ComfyLab Pack"
|
||||
Icon = "https://github.com/bugltd/ComfyLab-Pack/blob/main/.images/repo_icon.jpg"
|
||||
Icon = "https://github.com/bugltd/ComfyLab-Pack/blob/main/static/repo_icon.png"
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 230 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 319 KiB |
+4
-2
@@ -6,9 +6,11 @@ Here you will find plenty of information / tricks to help you discover the nodes
|
||||
|
||||
Please take the time to read the pages if you face difficulties, and before [creating an issue](https://github.com/bugltd/ComfyLab-Pack/issues).
|
||||
|
||||
Apart from these pages, I also customized most of the labels and tooltips.\
|
||||
You can get **useful contextual information in tooltips**, by just hovering (putting the mouse pointer over) the node title, or its inputs / widgets / outputs. It's not perfect, but should be enough in the most standard cases.
|
||||
> [!TIP]
|
||||
> You can get **useful contextual information in tooltips**, by just hovering (putting the mouse pointer over) the node title, or its inputs / widgets / outputs.\
|
||||
> It's not perfect, but should be enough in the most standard cases.
|
||||
|
||||
> [!NOTE]
|
||||
> If you can, do not hesitate to propose a Pull Request to improve this wiki, and benefit to the community:\
|
||||
> English is not my native language, so there is certainly a lot to do to improve it.
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ Here you will find some examples demonstrating how to use the Comfy Lab XY Plot:
|
||||
- [LoRA testing](./XY%20Plot/LoRA%20testing/)
|
||||
- [Epochs vs Seeds](./XY%20Plot/LoRA%20testing/Epochs%20vs%20Seeds/)
|
||||
|
||||
For more detailed information / explanations, please check the XY Plot [tutorials](../tutorials/XY%20Plot/) and [node references](../node%20reference/xy%20plot/).
|
||||
> [!TIP]
|
||||
> For more detailed information / explanations, please check the XY Plot [tutorials](../tutorials/XY%20Plot/) and [node references](../node%20reference/xy%20plot/).
|
||||
|
||||
> [!NOTE]
|
||||
> Of course, we cannot cover each and every use cases, but if you think that one in particular could benefit to the community, feel free to propose it in the [discussions](https://github.com/bugltd/ComfyLab-Pack/discussions) or the [issues](https://github.com/bugltd/ComfyLab-Pack/issues).
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# Examples / XY Plot / LoRA testing / Epochs vs Seeds
|
||||
|
||||
> [!NOTE]
|
||||
> As always, we use the following convention for node color:
|
||||
>
|
||||
> - Green: input node you surely want to customize
|
||||
@@ -15,7 +16,8 @@ Sections:
|
||||
- [Epochs vs Fixed seeds](#epochs-vs-fixed-seeds)
|
||||
- [Epochs vs Fixed seeds (with Output Config)](#epochs-vs-fixed-seeds-with-output-config)
|
||||
|
||||
> Note: Here we do not customize the grid look, but it can easily be done by plugging the `OutputConfig: Grid` node to `XY Plot: Render`.
|
||||
> [!TIP]
|
||||
> Here we do not customize the grid look, but it can easily be done by plugging the `OutputConfig: Grid` node to `XY Plot: Render`.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -38,15 +40,15 @@ First, we define the LoRA prefix, without the epoch: we build the filename later
|
||||
We also define the epochs we want to test, separated by commas.\
|
||||

|
||||
|
||||
> Notes:
|
||||
>
|
||||
> - we can of course use a different separator, simply adjust the `separator` to your needs
|
||||
> - no need to pad the epochs to 6 characters, we do that later
|
||||
> [!NOTE]
|
||||
> We can of course use a different separator, simply adjust the `separator` to your needs.\
|
||||
> No need to pad the epochs to 6 characters, we'll do that later.
|
||||
|
||||
We build the LoRA model file name thanks to the `Format String` node. Here specifically, we prefix with the LoRA name, followed by the epoch (padded to 6 digits), then finally add the file extension.\
|
||||

|
||||
|
||||
> Note: check the [node reference](../../../../node%20reference/format.md) for more details, and also visit [this guide](https://pyformat.info/) for different techniques applicable to Python string `format()` method
|
||||
> [!NOTE]
|
||||
> More details in the [node reference](../../../../node%20reference/format.md), you can also visit [this guide](https://pyformat.info/) for different techniques applicable to Python string `format()` method
|
||||
|
||||
Finally, we pipe the resulting string to `Load LoRA`, after converting it to type Any (`*`). More explanations in the [XY Plot tutorial: 3 - advanced techniques](../../../../tutorials/XY%20Plot/3%20-%20advanced%20techniques/).
|
||||
|
||||
@@ -72,6 +74,7 @@ Here we have replaced the 3 input nodes by a single `Output Config` node, and lo
|
||||
- no need to convert the seed values to integers: that is automatically deducted, as the values are not quoted, so the `Output Config` node understands they are integers
|
||||
- we also added the prompt, we could have defined the CFG, steps, sampler, ... the same way
|
||||
|
||||
More details about the `Output Config` node in the [node reference](../../../../node%20reference/output%20config.md) and [tutorials](../../../../tutorials/Output%20Config/).
|
||||
> [!TIP]
|
||||
> More details about the `Output Config` node in the [node reference](../../../../node%20reference/output%20config.md) and [tutorials](../../../../tutorials/Output%20Config/).
|
||||
|
||||
Feel free to adjust the values, create a different file, ...
|
||||
|
||||
@@ -4,6 +4,8 @@ Here you will find some examples demonstrating how you can test your LoRAs:
|
||||
|
||||
- [Epochs vs Seeds](./Epochs%20vs%20Seeds/)
|
||||
|
||||
For more detailed information / explanations, please check the XY Plot [tutorials](../../../tutorials/XY%20Plot/) and [node references](../../../node%20reference/xy%20plot/).
|
||||
> [!TIP]
|
||||
> For more detailed information / explanations, please check the XY Plot [tutorials](../../../tutorials/XY%20Plot/) and [node references](../../../node%20reference/xy%20plot/).
|
||||
|
||||
> [!NOTE]
|
||||
> Of course, we cannot cover each and every use cases, but if you think that one in particular could benefit to the community, feel free to propose it in the [discussions](https://github.com/bugltd/ComfyLab-Pack/discussions) or the [issues](https://github.com/bugltd/ComfyLab-Pack/issues).
|
||||
|
||||
@@ -5,6 +5,8 @@ Here you will find some examples demonstrating how to use the Comfy Lab XY Plot:
|
||||
- [LoRA testing](./LoRA%20testing/)
|
||||
- [Epochs vs Seeds](./LoRA%20testing/Epochs%20vs%20Seeds/)
|
||||
|
||||
For more detailed information / explanations, please check the XY Plot [tutorials](../../tutorials/XY%20Plot/) and [node references](../../node%20reference/xy%20plot/).
|
||||
> [!TIP]
|
||||
> For more detailed information / explanations, please check the XY Plot [tutorials](../../tutorials/XY%20Plot/) and [node references](../../node%20reference/xy%20plot/).
|
||||
|
||||
> [!NOTE]
|
||||
> Of course, we cannot cover each and every use cases, but if you think that one in particular could benefit to the community, feel free to propose it in the [discussions](https://github.com/bugltd/ComfyLab-Pack/discussions) or the [issues](https://github.com/bugltd/ComfyLab-Pack/issues).
|
||||
|
||||
@@ -7,8 +7,10 @@
|
||||
The `Format` nodes are very simple yet powerful nodes, that are based on the **standard Python string `format()` method**.\
|
||||
They exist in 2 flavors: `String` or `Multiline`.
|
||||
|
||||
They are useful to create a string from a template, and **any number of inputs**.\
|
||||
Inputs can be of the following ComfyUI types: `STRING`, `INT`, `FLOAT`, `BOOLEAN`.
|
||||
They are useful to create a string from a template, and **any number of inputs**.
|
||||
|
||||
> [!NOTE]
|
||||
> Inputs can be of the following ComfyUI types: `STRING`, `INT`, `FLOAT`, `BOOLEAN`.
|
||||
|
||||
## How to use
|
||||
|
||||
@@ -23,7 +25,8 @@ Given the following template: `first arg by name: {arg0}, second by index: {1}`,
|
||||
Here we see that **we can reference the inputs either by their name (`argN`), or by their index (starting at 0)**.\
|
||||
Straightforward, isn't it?
|
||||
|
||||
This way, it's **very simple to concatenate 2 strings, append text to a string, ... many operations in one single node!**
|
||||
> [!TIP]
|
||||
> This way, it's **very simple to concatenate 2 strings, append text to a string, pad / truncate, ... many operations in one single node!**
|
||||
|
||||
And last but not least: at stated above, it can take **other types than strings: integer, float, boolean** (and surely others).
|
||||
|
||||
@@ -32,7 +35,7 @@ And last but not least: at stated above, it can take **other types than strings:
|
||||
For more details and advanced techniques, you can check:
|
||||
|
||||
- [the tutorials of the `Format` nodes](../tutorials/Format/)
|
||||
- [a guide with different possible techniques (padding, ...)](https://pyformat.info/)
|
||||
- [a guide with different techniques (padding, ...)](https://pyformat.info/)
|
||||
- [format specification mini-language (python.org)](https://docs.python.org/3/library/string.html#format-specification-mini-language)
|
||||
|
||||
## Inputs / Widgets / Outputs
|
||||
|
||||
@@ -9,7 +9,11 @@ The `Output Config: Load` (and its backend counterpart, `Output Config: Retrieve
|
||||
It opens a whole range of use cases: whether you need to standardize tests (LoRA, ...), store a collection of usual use cases, or just share your configs with others, this node can certainly prove very useful.\
|
||||
**You can define any number of outputs in it, to match your specific needs**.
|
||||
|
||||
A config file is a simple text file in one of the following formats: **JSON, JSON5 or YAML** (and also the unofficial JSONC, aka 'json with comments').
|
||||
A config file is a simple text file in one of the following formats: **JSON, JSON5 or YAML**.
|
||||
|
||||
> [!TIP]
|
||||
> The `YAML` and `JSON5` formats allow comments, which can be very handy, especially if you need to share your configs and document them.\
|
||||
> While `JSON` doesn't allow them (by design), you can also use the unofficial `JSONC` (aka "JSON with comments") with the ComfyLab `Output Config` node.
|
||||
|
||||
A config can be very simple:
|
||||
|
||||
|
||||
@@ -12,36 +12,52 @@ What is processed between them (from `dim1 value` / `dim2 value` outputs of `Que
|
||||
|
||||
As you can see in the screenshot, there is no concept of row / column or X / Y in the `Queue` node, as in many other plot / grid implementations:
|
||||
|
||||
- instead, we talk about `dim1` and `dim2` (dimensions 1 & 2)
|
||||
- this is intended, to improve performance: but we'll talk about that later
|
||||
- just remember this rule: **for a given `dim1` value, we process all values of `dim2` before switching to the next `dim1` value**
|
||||
- whether `dim1` and `dim2` are rows or columns is configured later, in the `Render` node (`direction` toggle)
|
||||
- `dim1` and `dim2` (optional) **take lists as inputs**
|
||||
- in ComfyUI, a LIST is a LIST, but we cannot know if it's a list of strings, numbers, images, ...
|
||||
- so another important rule: **what you send is what you get**
|
||||
- said differently: if you send a list of numbers, you will get number values in output
|
||||
- or one could say: sh\*t in, sh\*t out...
|
||||
- for the reason above, the `Queue` node cannot determine what it will get in input, so the type of the outputs is set to `"*"` (Any)
|
||||
- this makes the `dim1 value` and `dim2 value` outputs very flexible, as you can basically connect them anywhere
|
||||
- but it comes at a price: **you must ensure that the data in input correspond to the expected data in output**
|
||||
- for example: if you connect `dim1 value` to the `cfg` input of `KSampler`, you must ensure that the input list is a list of floats. If you send strings, you will obviously get an error when running the workflow
|
||||
- one of the main features of the `Queue` node is **auto-queuing**
|
||||
- no need to reset a counter, or manually increase the batch size
|
||||
- **the `Queue` node will take care of that for you**
|
||||
- in fact, you should definitely **not set the batch size to anything else than `1`**
|
||||
Instead, we talk about `dim1` and `dim2` (dimensions 1 & 2): this is intended, to improve performance: but we'll talk about that later.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Just remember this rule: **for a given `dim1` value, we process all values of `dim2` before switching to the next `dim1` value**.\
|
||||
> Whether `dim1` and `dim2` are rows or columns is configured later, in the `Render` node (with the `direction` toggle).
|
||||
|
||||
`dim1` and `dim2` (optional) **take lists as inputs**:
|
||||
|
||||
- in ComfyUI, a LIST is a LIST, but we cannot know if it's a list of strings, numbers, images, ...
|
||||
- so another important rule: **what you send is what you get**
|
||||
- said differently: if you send a list of numbers, you will get number values in output
|
||||
- or one could say: sh\*t in, sh\*t out...
|
||||
|
||||
For the reason above, the `Queue` node cannot determine what it will get in input, so **the type of the outputs is set to `"*"` (Any)**.\
|
||||
This makes the `dim1 value` and `dim2 value` outputs very versatile, as you can basically connect them anywhere.
|
||||
|
||||
But it comes ar a price:
|
||||
|
||||
> [!WARNING]
|
||||
> You must ensure that the **data in input correspond to the expected data in output**\
|
||||
> For example: if you connect `dim1 value` to the `cfg` input of `KSampler`, you must ensure that the input list is a list of floats.\
|
||||
> If you send strings, you will obviously get an error when running the workflow
|
||||
|
||||
One of the main features of the `Queue` node is **auto-queuing**
|
||||
|
||||
- no need to reset a counter, or manually increase the queue size
|
||||
- **the `Queue` node will take care of that for you**
|
||||
- in fact, you should definitely **not set the queue size to anything else than `1`**
|
||||
|
||||
## XY Plot: Render
|
||||
|
||||
The `Render` node, in its default configuration is easier to understand:
|
||||
|
||||
- it takes an `image` as input, for example the result of the `KSampler` processing
|
||||
- <ins>important</ins>: you are not limited to KSampler
|
||||
- in fact **you can do what you want between the `Queue` node and the `Render` one**
|
||||
- it could be loading the image from a folder, doing some image transformations... you decide
|
||||
- it has 2 outputs:
|
||||
- `image` is the single image, as received in input
|
||||
- `grid` is the generated grid, when it has received enough images
|
||||
- obviously, you can generate multiple grids, if you configure pagination in the `Queue` node
|
||||
It takes an `image` as input, for example the result of the `KSampler` processing
|
||||
|
||||
> [!IMPORTANT]
|
||||
> You are not limited to KSampler:
|
||||
>
|
||||
> - in fact **you can do what you want between the `Queue` node and the `Render` one**
|
||||
> - it could be loading the image from a folder, doing some image transformations... you decide
|
||||
|
||||
This node has 2 outputs:
|
||||
|
||||
- `image` is the single image, as received in input
|
||||
- `grid` is the generated grid, when it has received enough images
|
||||
- obviously, you can generate multiple grids, if you configure pagination in the `Queue` node
|
||||
|
||||
## dim1 vs dim2, which one should I choose? (or the Performance Question)
|
||||
|
||||
@@ -68,6 +84,8 @@ So let's switch, connecting the list of checkpoints to `dim1`, and the list of s
|
||||
- **keep** checkpoint #1, get seed #3 > _do not load checkpoint #1_ (it's in memory) > render image
|
||||
- ...
|
||||
|
||||
By doing so, we optimize the performance as much as possible.\
|
||||
So as a general rule: **if you need to vary models (checkpoint, LoRA, ...), ensure these values are connected to `dim1`**.\
|
||||
(And if you vary 2 lists of models, obviously choose the slowest as `dim1`).
|
||||
By doing so, we optimize the performance as much as possible.
|
||||
|
||||
> [!TIP]
|
||||
> So as a general rule: **if you need to vary models (checkpoint, LoRA, ...), ensure these values are connected to `dim1`**.\
|
||||
> (And if you vary 2 lists of models, obviously choose the slowest as `dim1`).
|
||||
|
||||
@@ -6,15 +6,16 @@
|
||||
|
||||
## XY Plot: Queue
|
||||
|
||||
Important notes:
|
||||
|
||||
- `dim` and `dim2` take lists as inputs, and sends each combination of values in outputs
|
||||
- as the node cannot anticipate what is the type of input list values, the outputs are set to type Any (`"*"`)
|
||||
- it means that you can connect the outputs everywhere
|
||||
- but you must ensure that the type of data in input correspond to the expected in destination node
|
||||
- **what you send is what you get**
|
||||
- `dim1` and `dim2` are processed following the rule: **for a given `dim1` value, we process all values of `dim2` before switching to the next `dim1` value**
|
||||
- the node will manage auto-queuing: ensure set **the batch size is set to 1**
|
||||
> [!IMPORTANT] > `dim` and `dim2` take lists as inputs, and sends each combination of values in outputs
|
||||
>
|
||||
> - as the node cannot anticipate what is the type of input list values, the outputs are set to type Any (`"*"`)
|
||||
> - it means that you can connect the outputs everywhere
|
||||
> - but you must ensure that the type of data in input correspond to the expected in destination node
|
||||
> - **what you send is what you get**
|
||||
>
|
||||
> `dim1` and `dim2` are processed following the rule: **for a given `dim1` value, we process all values of `dim2` before switching to the next `dim1` value**
|
||||
>
|
||||
> the node will manage auto-queuing: ensure set **the queue size is set to 1**
|
||||
|
||||
For more detailed explanations, please check the [core concepts](./0%20-%20core%20concepts.md).
|
||||
|
||||
@@ -44,17 +45,17 @@ For more detailed explanations, please check the [core concepts](./0%20-%20core%
|
||||
|
||||
## XY Plot: Render
|
||||
|
||||
Note:
|
||||
`dim1: header format` and `dim2: header format`:
|
||||
|
||||
- `dim1: header format` and `dim2: header format`
|
||||
- enter here a template string, following the syntax of Python string `format()` method
|
||||
- the `{dim1}` and `{dim2}` placeholders will be replaced by the current dim1 / dim2 value
|
||||
- very handy if you want to prefix the row / column headers, for example:
|
||||
- if you have CFG values in dim1, by default the headers will be `7.5`, `8`, ...
|
||||
- just change the dim1 header format to `CFG: {dim1}` and you will get: `CFG: 7.5`, `CFG: 8`, ...
|
||||
- there are plenty of advanced techniques, but you will probably not use them here
|
||||
- however if you want to learn more, you can check the [`Format` node reference](../format.md)
|
||||
- `direction`: whether dim1 values are displayed as rows, or columns
|
||||
- enter here a template string, following the syntax of Python string `format()` method
|
||||
- the `{dim1}` and `{dim2}` placeholders will be replaced by the current dim1 / dim2 value
|
||||
- very handy if you want to prefix the row / column headers, for example:
|
||||
- if you have CFG values in dim1, by default the headers will be `7.5`, `8`, ...
|
||||
- just change the dim1 header format to `CFG: {dim1}` and you will get: `CFG: 7.5`, `CFG: 8`, ...
|
||||
- there are plenty of advanced techniques, but you will probably not use them here
|
||||
- however if you want to learn more, you can check the [`Format` node reference](../format.md)
|
||||
|
||||
`direction`: whether dim1 values are displayed as rows, or columns
|
||||
|
||||
### Inputs / Widgets / Outputs
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
In addition to the standard [Queue and Render nodes](./1%20-%20queue%20and%20render.md), you can customize many visual aspects of the grid, thanks to 2 optional nodes, `Plot Config: Grid` and `Plot Config: Header/Footer`, than can be plugged into `XY Plot: Render`.\
|
||||
They allow you to customize the grid, and either the page header or footer (or both), all configurable separately.
|
||||
|
||||
To see them in action, please refer to [tutorial #2 - pimp my grid](../../tutorials/XY%20Plot/2%20-%20pimp%20my%20grid/).
|
||||
> [!TIP]
|
||||
> To see them in action, please refer to [tutorial #2 - pimp my grid](../../tutorials/XY%20Plot/2%20-%20pimp%20my%20grid/).
|
||||
|
||||
While some configuration options are specfic, they share some similarities:
|
||||
|
||||
@@ -26,12 +27,15 @@ The color can expressed either as RGB hex notation (e.g. `#e9e9e9`), or by name
|
||||
|
||||
As for the font color, you can use either the RGB hex notation, or a color name.
|
||||
|
||||
In addition, you can also use the special value `transparent`:
|
||||
In addition, **you can also use the special value `transparent`**:
|
||||
|
||||
- in the `Plot Config: Header/Footer`, it means the header / footer will use the same bg color as the grid
|
||||
- while in `Plot Config: Grid`, it will make the grid RGBA
|
||||
- useful if you want to add a background image
|
||||
|
||||
> [!TIP]
|
||||
> To see how to use a custom background image, please check the [XY Plot tytorial: 2 - pimp my grid (Part 3)](../../tutorials/XY%20Plot/2%20-%20pimp%20my%20grid/)
|
||||
|
||||
## Plot Config: Grid
|
||||
|
||||
### Widgets / Outputs
|
||||
|
||||
@@ -23,7 +23,8 @@ At this point, you should see something like this (example with the `.yaml` conf
|
||||
|
||||

|
||||
|
||||
> Note: the label for the 4th output has been customized according to our config
|
||||
> [!NOTE]
|
||||
> The label for the 4th output has been customized according to our config
|
||||
|
||||
### Connect the dots and run the workflow
|
||||
|
||||
@@ -42,6 +43,7 @@ Run the prompt: click the main blue `Queue` buttom.
|
||||
|
||||
Modify the config files, change the prompt, or any value as you wish. Enjoy, there is plenty to do at this stage already!
|
||||
|
||||
> [!TIP]
|
||||
> You can use any text editor to modify the files. I personally use VSCode, with the `JSON5 KIT` extension (but it's probably overkill for many).
|
||||
|
||||
## Part 2 - understanding the config
|
||||
@@ -59,6 +61,7 @@ We can see that all connections except `seed` have been dropped. Why? There are
|
||||
- note the quotes: the value is now a string, not a number anymore
|
||||
- the label for `prompt` has been changed
|
||||
|
||||
> [!IMPORTANT]
|
||||
> This is intended, to restrict ambiguity when opening a new file. **There are 3 reasons for a connection to be dropped:**
|
||||
>
|
||||
> 1. the output name has changed -> drop
|
||||
@@ -71,6 +74,7 @@ Now, reconnect the outputs to the `KSampler` node. **It will work for all but `s
|
||||
The reason is simple: the `steps` input in `KSampler` is designed to accept numbers (integers, actually), which seems totally logical. \
|
||||
By putting our value in quotes, we made it a string, which is not accepted by KSampler / steps.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> It's highly important to respect the type expected by the destination node inputs / widgets: a number is a number, a string is a string. \
|
||||
> And there's no way the `Output Config: Load` can magically guess, because it cannot predict where the outputs will be connected.
|
||||
|
||||
|
||||
@@ -28,8 +28,9 @@ The available options are:
|
||||
- `color_off` / `color_on`: color when disconnected / connected
|
||||
- color values can be expressed in the traditional RGB hex way (`#dcb21a`), or by name (`blue`, `red`, ...)
|
||||
|
||||
Another option is available, `type`: it allows you to enforce the output type to any of the valid types, as described in [the official docs](https://docs.comfy.org/custom-nodes/custom_node_datatypes), including any custom type (like `CHEESE`). \
|
||||
It is probably only useful for quite advanced and specific use cases. But please note it exists, if you need it.
|
||||
> [!NOTE]
|
||||
> Another option is available, `type`: it allows you to enforce the output type to any of the valid types, as described in [the official docs](https://docs.comfy.org/custom-nodes/custom_node_datatypes), including any custom type (like `CHEESE`). \
|
||||
> It is probably only useful for quite advanced and specific use cases. But please note it exists, if you need it.
|
||||
|
||||
However, we are going to make use of it, in a kind of 'hacky' way, just below.
|
||||
|
||||
@@ -58,8 +59,10 @@ This time it works, and we can run the workflow. Why?
|
||||
We have enforced typing by setting `type: "*"`, which means "Any" in ComfyUI. By doing this, we bypass the type checks and say "don't worry, it will be fine".\
|
||||
Indeed it was fine, because we have set values that are valid for these inputs. Otherwise, we would have faced an error during workflow execution.
|
||||
|
||||
For this reason, my humble piece of advice: **use `"*"` as a last resort**, and prefer standard types whenever you can.\
|
||||
And also, obviously: **review and understand your config before applying it**, especially if you downloaded it from someone else. While it cannot do anything harmful (the config is strictly validated), you may encounter unexpected results if you don't.
|
||||
> [!IMPORTANT]
|
||||
> For this reason, my humble piece of advice: **use `"*"` as a last resort**, and prefer standard types whenever you can.\
|
||||
> And also, obviously: **review and understand your config before applying it**, especially if you downloaded it from someone else.\
|
||||
> While it cannot do anything harmful (the config is strictly validated), you may encounter unexpected results if you don't.
|
||||
|
||||
However, as you can see, in some cases it can open locked doors, and make your config extremely versatile, covering many different use cases. You can apply this to virtually any sort of combo widgets: LoRA, ... as long as you ensure the values are valid.
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ Tutorial sections:
|
||||
|
||||
To keep it simple, we will not detail the core concepts here. But if you are interested, now or later, you can check the [dedicated page](../../../node%20reference/xy%20plot/0%20-%20core%20concepts.md).
|
||||
|
||||
> [!TIP]
|
||||
> As for all nodes in this extension, you can get useful contextual information, by just **moving the mouse pointer over a node or its inputs / widgets / outputs**. This should help you understand some details, without reading the more detailed wiki pages (yet).
|
||||
|
||||
And as always, if you do not want to follow all the steps, you can jump directly to [the conclusion](#tldr--conclusion).
|
||||
@@ -21,7 +22,7 @@ And as always, if you do not want to follow all the steps, you can jump directly
|
||||
## Part 1 - Our first grid (and some useful explanations)
|
||||
|
||||
**Load either `workflow - part 1.json` or `workflow - part 1.png` into ComfyUI.**\
|
||||
**Ensure that the batch size is set to 1 (default)**.\
|
||||
**Ensure that the queue size is set to 1 (default)**.\
|
||||
Adjust the checkpoint to one available in your ComfyUI instance.\
|
||||
Execute the workflow.
|
||||
|
||||
@@ -40,7 +41,8 @@ What do we see?
|
||||
The `Queue` node takes lists as inputs. For this we use the nodes `List: from Multiline` and `List: from String`, available in the ComfyLab extension.\
|
||||
Of course, you can choose nodes from other extensions, as long as they provide lists.
|
||||
|
||||
> There are other list-related nodes in the ComfyLab collection if you need
|
||||
> [!NOTE]
|
||||
> There are other list-related nodes in the ComfyLab collection if you need (see the [node list](../../../node_list.md).)
|
||||
|
||||
Let's focus a bit:
|
||||
|
||||
@@ -60,12 +62,17 @@ Just remove the `#` and you will get an astronaut!
|
||||
|
||||
<img src="./details/detail%20-%20part%201%20-%20float.jpg" alt="float conversion" hspace="20"/>
|
||||
|
||||
- we have set the values in a string, separated by `, `: `5.5, 7, 10.5`
|
||||
- the separator is configured accordingly, you can use any character you want: `/`, `|`, `&`, ...
|
||||
- and we have configured the conversion: `convert: float`
|
||||
- that is a very important [core concept](../../../node%20reference/xy%20plot/0%20-%20core%20concepts.md):
|
||||
- the `Queue` node cannot determine to which input you will connect the dim values
|
||||
- that is why the output type is `*` (Any): you can connect them anywhere, but **you must ensure the type of input values corresponds to where you will use them**
|
||||
We have set the values in a string, separated by `, `: `5.5, 7, 10.5`
|
||||
|
||||
- the separator is configured accordingly, you can use any character you want: `/`, `|`, `&`, ...
|
||||
|
||||
And we have configured the conversion: `convert: float`
|
||||
|
||||
> [!IMPORTANT]
|
||||
> that is a very important [core concept](../../../node%20reference/xy%20plot/0%20-%20core%20concepts.md):
|
||||
>
|
||||
> - the `Queue` node cannot determine to which input you will connect the dim values
|
||||
> - that is why the output type is `*` (Any): you can connect them anywhere, but **you must ensure the type of input values corresponds to where you will use them**
|
||||
|
||||
<br/>
|
||||
|
||||
@@ -80,11 +87,14 @@ The `Queue` and `Render` nodes are connected by the specific `XY plot data` link
|
||||
During processing, the `Queue` node informs you about the current state: `Processing: 2 / 9` for example
|
||||
|
||||
- you can re-run, you will see that the queue is reinitialized automatically:
|
||||
- the `Queue` node is designed for **auto-queuing**: you don't have to reset a counter or adjust the batch size, **it takes care of everything for you**
|
||||
|
||||
> [!IMPORTANT]
|
||||
> The `Queue` node is designed for **auto-queuing**: you don't have to reset a counter or adjust the queue size, **it takes care of everything for you**.\
|
||||
> In fact, the queue size should always be set to 1.
|
||||
|
||||
## Part 2 - String templating
|
||||
|
||||
Let's do our first customizations, that will be short:
|
||||
Let's do our first customizations, it will be quick:
|
||||
|
||||
- in the dim1 multiline input, you can see that all lines start with `a photograpgy of`
|
||||
- that's redundant, and make row headers too long: let's optimize this
|
||||
@@ -123,7 +133,7 @@ Execute the workflow.
|
||||
|
||||
What we have changed:
|
||||
|
||||
- the astronaut is back into business (we have removed the `#`, see Part 1)
|
||||
- the astronaut is back into business (we have removed the `#`, see [Part 1](#part-1---our-first-grid-and-some-useful-explanations))
|
||||
- in the `XY Plot: Queue` node, we have set `dim1: max per page` to 2
|
||||
- this where we set the pagination (0 to disable it)
|
||||
- in the `XT Plot: Render` node, the `direction` was changed to `dim1 as cols`
|
||||
|
||||
@@ -13,6 +13,7 @@ Tutorial sections:
|
||||
- [TL;DR / Conclusion](#tldr--conclusion)
|
||||
- [Going further (advanced)](#going-further-advanced)
|
||||
|
||||
> [!TIP]
|
||||
> As for all nodes in this extension, you can get useful contextual information, by just **moving the mouse pointer over a node or its inputs / widgets / outputs**. This should help you understand some details, without reading the more detailed wiki pages (yet).
|
||||
|
||||
And as always, if you do not want to follow all the steps, you can jump directly to [the conclusion](#tldr--conclusion).
|
||||
@@ -66,8 +67,10 @@ Some of the configuration options are similar to the `Plot Config: Grid` (font,
|
||||
- `background color`: set a color (as in header), or use the special value `transparent` (as in footer) to keep the grid bg color
|
||||
- `padding`: add vertical space above and below the header / footer text
|
||||
|
||||
> a note about colors (either font or background, in all the `Plot Config` nodes):\
|
||||
> as you can see in the footer, you can specify them by name (eg `white`), instead of the traditional RGB hex notation
|
||||
> [!NOTE]
|
||||
> About colors (either font or background, in all the `Plot Config` nodes):\
|
||||
> As you can see in the footer, you can specify them by name (eg `white`), instead of the traditional RGB hex notation.\
|
||||
> And for the RGB hex notation, you can use the standard 6-character one (`#a2a2a2`) or the short one (`#aaa`).
|
||||
|
||||
With just these 3 `Plot Config` nodes, we now have access to a bunch of configuration options.\
|
||||
But there's maybe something more we can do: what about adding a custom background image?
|
||||
@@ -91,7 +94,7 @@ Then, we pipe the `grid` output from `XY Plot: Render` to the standard node `Spl
|
||||
|
||||
Finally, we add a `Load Image` node to load the background, and connect it to `source` in `ImageCompositeMasked`.
|
||||
|
||||
All that with ComfyLab and a few Comfy Core nodes. That wasn't too difficult, don't you think?
|
||||
All that with ComfyLab and a few ComfyUI Core nodes. That wasn't too difficult, don't you think?
|
||||
|
||||
## Part 4 - Display 'page X / Y'
|
||||
|
||||
@@ -130,8 +133,10 @@ What we have covered:
|
||||
With these 2 tutorials, **we have seen how to create grids, and make them unique**.\
|
||||
It's now your turn to use your creativity and aesthetic talent (surely better than mine), to make them as beautiful as you wish!
|
||||
|
||||
That being said, I hope you have found these tutorials interesting and easy to follow.\
|
||||
If you have any suggestion to improve them (content, features, better English, shorter sentences, ...), feel free to open [an issue](https://github.com/bugltd/ComfyLab-Pack/issues), [a discussion](https://github.com/bugltd/ComfyLab-Pack/discussions), or even a Pull Request if you can.
|
||||
That being said, I hope you have found these tutorials interesting and easy to follow.
|
||||
|
||||
> [!NOTE]
|
||||
> If you have any suggestion to improve them (content, features, better English, shorter sentences, ...), feel free to open [an issue](https://github.com/bugltd/ComfyLab-Pack/issues), [a discussion](https://github.com/bugltd/ComfyLab-Pack/discussions), or even a Pull Request if you can.
|
||||
|
||||
Thank you for reading, and enjoy your beautiful grids my friends!
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@ Here we are going to see a few advanced techniques you may find useful.\
|
||||
Of course, I cannot anticipate all the use cases, but by following this tutorial, I hope you will see the versatility of the ComfyLab XY Plot nodes, and understand how to adapt for your scenario.\
|
||||
Here, no frills, we'll go straight to the point, to focus of the functionalities rather than fancy grid customization.
|
||||
|
||||
If you haven't yet, I highly recommend you follow (at least read) the first 2 tutorials ([1](../1%20-%20the%20basics/) & [2](../2%20-%20pimp%20my%20grid/)), and read the [XY Plot core concepts](../../../node%20reference/xy%20plot/0%20-%20core%20concepts.md).
|
||||
> [!IMPORTANT]
|
||||
> If you haven't yet, it is recommended to follow (at least read) the first 2 tutorials ([1](../1%20-%20the%20basics/) & [2](../2%20-%20pimp%20my%20grid/)), and read the [XY Plot core concepts](../../../node%20reference/xy%20plot/0%20-%20core%20concepts.md).\
|
||||
> You will probably need them in this advanced tutorial.
|
||||
|
||||
Tutorial sections:
|
||||
|
||||
@@ -15,6 +17,7 @@ Tutorial sections:
|
||||
- [Part 3 - Using the Output Config node](#part-3---using-the-output-config-node)
|
||||
- [TL;DR / Conclusion](#tldr--conclusion)
|
||||
|
||||
> [!TIP]
|
||||
> As for all nodes in this extension, you can get useful contextual information, by just **moving the mouse pointer over a node or its inputs / widgets / outputs**. This should help you understand some details, without reading the more detailed wiki pages (yet).
|
||||
|
||||
And as always, if you do not want to follow all the steps, you can jump directly to [the conclusion](#tldr--conclusion).
|
||||
@@ -37,28 +40,34 @@ Here we build a grid with 2 different checkpoints, vs a list of predefined seeds
|
||||
|
||||
What should be noticed:
|
||||
|
||||
- checkpoints:
|
||||
- we have chosen not to include the `.safetensors` extension in the input
|
||||
- it would have been displayed in the row headers, making them too long
|
||||
- instead, we have used a `Format: String` node, to append `.safetensors` to the `dim1 value` output of the `Queue` node
|
||||
- but by simply doing so, we cannot pipe the text output to the `Load Checkpoint` node, why?
|
||||
- the `chkpt_name` widget does not accept any string, but a string that exists in the list
|
||||
- so to bypass this limitation we simply convert the text output to Any, thanks to the `Convert to Any` node
|
||||
- 
|
||||
- you can read more about the Any output in the [XY Plot core concepts](../../../node%20reference/xy%20plot/0%20-%20core%20concepts.md), and the [2nd tutorial of the `Output Config` node](../../Output%20Config/2%20-%20more%20options)
|
||||
- seeds:
|
||||
- theoritically, we should have converted the list values to integers, thanks to the `convert` combo widget
|
||||
- but it also works (for seeds only AFAIK)
|
||||
<ins>Checkpoints:</ins>
|
||||
|
||||
Lessons learned:
|
||||
- we have chosen not to include the `.safetensors` extension in the input
|
||||
- it would have been displayed in the row headers, making them too long
|
||||
- instead, we have used a `Format: String` node, to append `.safetensors` to the `dim1 value` output of the `Queue` node
|
||||
- but by simply doing so, we cannot pipe the text output to the `Load Checkpoint` node, why?
|
||||
- the `chkpt_name` widget does not accept any string, but a string that exists in the list
|
||||
- so to bypass this limitation we simply convert the text output to Any, thanks to the `Convert to Any` node
|
||||
- 
|
||||
|
||||
> [!NOTE]
|
||||
> You can read more about the Any output in the [XY Plot core concepts](../../../node%20reference/xy%20plot/0%20-%20core%20concepts.md), and the [2nd tutorial of the `Output Config` node](../../Output%20Config/2%20-%20more%20options)
|
||||
|
||||
<ins>Seeds:</ins>
|
||||
|
||||
- theoritically, we should have converted the list values to integers, thanks to the `convert` combo widget
|
||||
- but it also works (for seeds only AFAIK)
|
||||
|
||||
### Lessons learned
|
||||
|
||||
- combo widgets (as `chkpt_name` in `Load Checkpoint`) do not accept simple strings
|
||||
- a workaround is to use an output with type Any (`"*"`)
|
||||
- should we have included the `.safetensors` in the first input, we could have dropped the `Format: String` and `Convert to Any` node, because the type of `Queue` outputs is Any
|
||||
- but this wouldn't be great in terms of display in the grid
|
||||
- the checkpoint list is connected to `dim1`, not `dim2`, for a performance reason
|
||||
- if you want: just switch dim1 / dim2 and check the processing time _(more in the core concepts page)_
|
||||
- if you want: just switch dim1 / dim2 and check the processing time _(more in the [core concepts page](../../../node%20reference/xy%20plot/0%20-%20core%20concepts.md))_
|
||||
|
||||
> [!TIP]
|
||||
> You can basically use this approach for any combo widget, in particular when loading models (LoRA, ...).\
|
||||
> But be **very cautious** about the values you set in input: by using the Any type, we bypass the standard ComfyUI type checks, so the workflow may fail if the values are incorrect.
|
||||
|
||||
@@ -105,7 +114,8 @@ What should be noticed:
|
||||
- for example, `cfg` is written without quotes, so it's detected as a string
|
||||
- but for more combo widgets (sampler, scheduler), we have to force type to be Any (`*`)
|
||||
|
||||
We won't go into details here about the configuration file itself, but you can find more information in the corresponding [node reference](../../../node%20reference/output%20config.md) and the [dedicated tutorials](../../../tutorials/Output%20Config/).
|
||||
> [!TIP]
|
||||
> We won't go into details here about the configuration file itself, but you can find more information in the corresponding [node reference](../../../node%20reference/output%20config.md) and the [dedicated tutorials](../../../tutorials/Output%20Config/).
|
||||
|
||||
## TL;DR / Conclusion
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ The `XY Plot` nodes allow you to create the grids you want, with virtually no li
|
||||
- padding, wrap, ...
|
||||
- mix any image resolution / aspect ratio
|
||||
|
||||
If needed, you can also check the [node references](../../node%20reference/xy%20plot/) for the [core concepts](../../node%20reference/xy%20plot/0%20-%20core%20concepts.md) and detailed node information.
|
||||
> [!NOTE]
|
||||
> If needed, you can also check the [node references](../../node%20reference/xy%20plot/) for the [core concepts](../../node%20reference/xy%20plot/0%20-%20core%20concepts.md) and detailed node information.
|
||||
|
||||
## Tutorial 1 - the basics
|
||||
|
||||
|
||||
Reference in New Issue
Block a user