wiki and more (#4)

* add main README
* add the node list
* improve wiki: XY Plot node references, various adjustments
* ...
This commit is contained in:
Bug, Ltd.
2025-01-22 17:51:37 +01:00
committed by GitHub
parent cc6775802d
commit 24910e33a6
93 changed files with 321 additions and 98 deletions
@@ -1,8 +1,8 @@
# Node reference / XY Plot: 00 - Core concepts
# Node reference / XY Plot: 0 - Core concepts
As a minimum, to use the `XY Plot`, you need to integrate 2 nodes, `XY Plot: Queue` and `XY Plot: Render`: the first one will organize the queue, the second one will render the grid(s).
![standard nodes](./images/nodes.jpg)
<img src="./images/queue_render.jpg" alt="XY Plot standard nodes" width="80%">
They must be connected by the specific `XY plot data` link : that is the way the queue can inform the render node about the current processing state.
@@ -10,7 +10,7 @@ What is processed between them (from `dim1 value` / `dim2 value` outputs of `Que
## XY Plot: Queue
As you can see in the screenshot, there is no concept of row / column or X / Y here, as in many other plot / grid implementations:
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
@@ -1,21 +0,0 @@
# Node reference / XY Plot: 01 - Queue and Render
**Work in Progress**
## Node overview
![standard nodes](./images/nodes.jpg)
### XY Plot: Render
As per the widgets:
- `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
@@ -1,3 +0,0 @@
# Node reference / XY Plot: 02 - Config nodes
**Work in Progress**
@@ -0,0 +1,84 @@
# Node reference / XY Plot: 1 - Queue and Render
## Node overview
<img src="./images/queue_render.jpg" alt="XY Plot standard nodes" width="80%">
## 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**
For more detailed explanations, please check the [core concepts](./0%20-%20core%20concepts.md).
### Inputs / Widgets / Outputs
#### Inputs
| input name | type | description | comment |
| :--------: | :--: | :---------------------: | :------ |
| dim1 | LIST | input list #1 | |
| dim2 | LIST | optional: input list #2 | |
#### Widgets
| widget name | type | description | comment |
| :----------------: | :--: | :------------------------: | :------------- |
| dim1: max per page | INT | pagination for dim1 values | `0` to disable |
| dim2: max per page | INT | pagination for dim2 values | `0` to disable |
#### Outputs
| output name | type | description | comment |
| :----------: | :---------: | :-------------------------------: | :-------------------------- |
| XY Plot data | XYPLOT_DATA | queue processing data | linked to `XY Plot: Render` |
| dim1 value | ANY (`*`) | list element from dim1 input list | |
| dim2 value | ANY (`*`) | list element from dim2 input list | |
## XY Plot: Render
Note:
- `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
### Inputs / Widgets / Outputs
#### Inputs
| input name | type | description | comment |
| :----------: | :--------------: | :-----------------------------------------------: | :--------------------------------------- |
| XY Plot data | XYPLOT_DATA | queue processing data | linked from `XY Plot: Queue` |
| image | IMAGE | image generated by the subprocess (KSampler, ...) | |
| config: grid | PLOT_CONFIG_GRID | optional: grid configuration | linked from `Plot Config: Grid` |
| config: grid | PLOT_CONFIG_HF | optional: page header configuration | linked from `Plot Config: Header/Footer` |
| config: grid | PLOT_CONFIG_HF | optional: page footer configuration | linked from `Plot Config: Header/Footer` |
#### Widgets
| widget name | type | description | comment |
| :-----------------: | :-----: | :-----------------------------: | :---------------------------------------------------- |
| dim1: header format | STRING | dim1 template string | use placeholder `{dim1}` to insert current dim1 value |
| dim2: header format | STRING | dim2 template string | use placeholder `{dim2}` to insert current dim2 value |
| direction | BOOLEAN | display dim1 as rows or columns | |
#### Outputs
| output name | type | description | comment |
| :---------: | :---: | :---------------------: | :--------------------------------------------- |
| grid | IMAGE | generated grid(s) | outputs when enough images have been collected |
| image | IMAGE | image received in input | individual image as received in input |
@@ -0,0 +1,76 @@
# Node reference / XY Plot: 2 - Config nodes
<img src="./images/config.jpg" alt="XY Plot config nodes" width="70%">
## Overview
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/).
While some configuration options are specfic, they share some similarities:
### Font
You can specify the font type, as well as its size and color.
The font type can be either:
- one of the 4 fonts shipped with the extension: _Roboto-Regular.ttf_ / _Roboto-Bold.ttf_ / _Roboto-Italic.ttf_ / _Roboto-BoldItalic.ttf_,
- or the full path to a locally-installed TTF font
The color can expressed either as RGB hex notation (e.g. `#e9e9e9`), or by name (e.g. `blue`).
### Background color
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 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
## Plot Config: Grid
### Widgets / Outputs
#### Widgets
| input name | type | description | comment |
| :-------------------------------------------: | :----: | :-------------------------------------------------------------------------------: | :------------------------------------------------------------------------------- |
| gap | INT | gap between grid cells (pixels) | |
| background colot | STRING | background color | use `transparent` to render the grid as RGBA |
| font | STRING | font type | either one the 4 standard fonts<br/>or full path to a locally-installed TTF font |
| font size | INT | font size (pixels) | |
| font color | STRING | font color | either RGB hex notation or color name |
| col headers: padding<br/>row headers: padding | INT | padding to apply to row/col headers<br/>vertically and horizontally, respectively | |
| col headers: wrap<br/>row headers: wrap | INT | number of characters before wrapping (new line) | "smart wrap" when possible (break on hyphens) |
#### Outputs
| output name | type | description | comment |
| :----------: | :--------------: | :---------: | :-------------------------- |
| config: grid | PLOT_CONFIG_GRID | grid config | linked to `XY Plot: Render` |
## Plot Config: Header/Footer
### Widgets / Outputs
#### Widgets
| input name | type | description | comment |
| :--------------------------------------------: | :----: | :-------------------------------------------------------------------------------: | :------------------------------------------------------------------------------- |
| text (left)<br/>text (center)<br/>text (right) | STRING | text to include in the header or footer<br/>at left / center / right respectively | also aligned depending on position |
| background colot | STRING | background color | use `transparent` to use the same as grid |
| font | STRING | font type | either one the 4 standard fonts<br/>or full path to a locally-installed TTF font |
| font size | INT | font size (pixels) | |
| font color | STRING | font color | either RGB hex notation or color name |
| padding | INT | vertical padding above and below text | |
#### Outputs
| output name | type | description | comment |
| :---------------------: | :------------: | :--------------------------: | :-------------------------- |
| config: header / footer | PLOT_CONFIG_HF | page header or footer config | linked to `XY Plot: Render` |
+3 -1
View File
@@ -1,3 +1,5 @@
# Node reference / XY Plot
[00 - Core concepts](./00%20-%20core%20concepts.md)
[0 - Core concepts](./0%20-%20core%20concepts.md)\
[1 - Queue and Render](./1%20-%20queue%20and%20render.md)\
[2 - Config nodes](./2%20-%20config%20nodes.md)
Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB