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:
@@ -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