new list utility nodes (#13)

* add List-related nodes for Checkpoints / LoRAs / Samplers/ Schedulers
* wiki: reorg XY Plot 3rd tutorial and add example
* bump version
This commit is contained in:
Bug, Ltd.
2025-01-29 11:18:14 +01:00
committed by GitHub
parent 1c6034bbcb
commit 9dcf6660de
45 changed files with 1613 additions and 400 deletions
+1
View File
@@ -7,6 +7,7 @@ Here you will find some examples demonstrating how to use the Comfy Lab XY Plot:
- [XY Plot](./XY%20Plot/)
- [LoRA testing](./XY%20Plot/LoRA%20testing/)
- [Epochs vs Seeds](./XY%20Plot/LoRA%20testing/Epochs%20vs%20Seeds/)
- [Various resolutions (and aspect ratios)](./XY%20Plot/Various%20resolutions/)
> [!TIP]
> For more detailed information / explanations, please check the XY Plot [tutorials](../tutorials/XY%20Plot/) and [node references](../node%20reference/xy%20plot/).
@@ -1,14 +1,7 @@
# 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
> - Blue: the specific nodes we use for processing / customization
>
> Of course, adjust to your env / needs: checkpoint, prompt, CFG, ...
These examples are intended for quick re-use, feel free to check [the tutorials](../../../../tutorials/) for more detailed explanations.
> These examples are intended for quick re-use, feel free to check [the tutorials](../../../../tutorials/) for more detailed explanations.
Sections:
@@ -18,7 +11,7 @@ Sections:
- [Epochs vs Random seeds](#epochs-vs-random-seeds)
> [!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`.
> Here we do not customize the grid look, but it can be done easily by plugging the `Plot Config: Grid` node to `XY Plot: Render`.
## Overview
@@ -51,7 +44,7 @@ We build the LoRA model file name thanks to the `Format String` node. Here speci
> [!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/).
Finally, we pipe the resulting string to `Load LoRA`, after converting it to type Any (`*`). More explanations in the [XY Plot tutorial: 3 - complex variations](../../../../tutorials/XY%20Plot/3%20-%20complex%20variations/).
#### Seed list
+1
View File
@@ -4,6 +4,7 @@ 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/)
- [Various resolutions (and aspect ratios)](./Various%20resolutions/)
> [!TIP]
> For more detailed information / explanations, please check the XY Plot [tutorials](../../tutorials/XY%20Plot/) and [node references](../../node%20reference/xy%20plot/).
@@ -0,0 +1,34 @@
# Examples / XY Plot / Various resolutions (and aspect ratios)
> [!NOTE]
> These examples are intended for quick re-use, feel free to check [the tutorials](../../../tutorials/) for more detailed explanations.
Sections:
- [Overview](#overview)
- [Workflow](#workflow)
> [!TIP]
> Here we do not customize the grid look, but it can be done easily by plugging the `Plot Config: Grid` and/or `Plot Config: Header/Footer` nodes to `XY Plot: Render`.\
> More details in the [node reference](../../../node%20reference/xy%20plot/2%20-%20config%20nodes.md) and the [XY Plot tutorial 2 - pimp my grid](../../../tutorials/XY%20Plot/2%20-%20pimp%20my%20grid/).
## Overview
While probably not the most useful as such, this example demonstrates the ability of the ComfyLab XY Plot to handle various resolutions or aspect ratios within the same grid.
Here we generate images of various resolutions, and apply rotations.
## Workflow
**Load either `various resolutions.json` or `various resolutions.png` into ComfyUI.**\
Adjust the checkpoint to one available in your ComfyUI instance.\
Execute the workflow.
![result](./images/result.jpg)
What we did:
- included the ComfyLab `Resolution to Dimensions` node, to split the first input (`1024 x 1024`, ...) into width and height, piped into `Empty Latent Image`
- we could have done this differently, I chose this method as it is straightforward in this case
- we also used a 2nd input list to set rotations, piped into the `rotation` input of `Rotate Latent`
- remember, we can do that because the `Queue` outputs are of type Any
Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

@@ -0,0 +1,840 @@
{
"last_node_id": 22,
"last_link_id": 31,
"nodes": [
{
"id": 7,
"type": "CLIPTextEncode",
"pos": [
413,
389
],
"size": [
425.27801513671875,
180.6060791015625
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 5
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
6
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"text, watermark"
]
},
{
"id": 8,
"type": "VAEDecode",
"pos": [
1209,
188
],
"size": [
210,
46
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 7
},
{
"name": "vae",
"type": "VAE",
"link": 8
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
11
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 11,
"type": "PreviewImage",
"pos": [
1480,
420
],
"size": [
260,
246
],
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 13
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 6,
"type": "CLIPTextEncode",
"pos": [
415,
186
],
"size": [
422.84503173828125,
164.31304931640625
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 3
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
4
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"beautiful scenery nature glass bottle landscape, , purple galaxy bottle,"
]
},
{
"id": 4,
"type": "CheckpointLoaderSimple",
"pos": [
26,
474
],
"size": [
315,
98
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
1
],
"slot_index": 0
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
3,
5
],
"slot_index": 1
},
{
"name": "VAE",
"type": "VAE",
"links": [
8
],
"slot_index": 2
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"sd_xl_base_1.0.safetensors"
]
},
{
"id": 3,
"type": "KSampler",
"pos": [
863,
186
],
"size": [
315,
474
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 4
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 6
},
{
"name": "latent_image",
"type": "LATENT",
"link": 26
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
7
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
134178653729123,
"randomize",
20,
8,
"euler",
"normal",
1
]
},
{
"id": 15,
"type": "ListFromMultiline",
"pos": [
-410,
160
],
"size": [
218.39999389648438,
220
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "list",
"type": "LIST",
"links": [
18
],
"slot_index": 0,
"shape": 6
},
{
"name": "count",
"type": "INT",
"links": null
}
],
"properties": {
"Node name for S&R": "ListFromMultiline"
},
"widgets_values": [
0,
true,
"disabled",
"# rotations\nnone\n90 degrees"
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 22,
"type": "ResolutionToDims",
"pos": [
190,
-110
],
"size": [
252,
102
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "resolution",
"type": "STRING",
"link": 29,
"widget": {
"name": "resolution"
}
}
],
"outputs": [
{
"name": "width",
"type": "INT",
"links": [
30
],
"slot_index": 0
},
{
"name": "height",
"type": "INT",
"links": [
31
],
"slot_index": 1
}
],
"properties": {
"Node name for S&R": "ResolutionToDims"
},
"widgets_values": [
"1024x1024",
1
],
"color": "#2a363b",
"bgcolor": "#3f5159"
},
{
"id": 5,
"type": "EmptyLatentImage",
"pos": [
500,
-10
],
"size": [
315,
106
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "width",
"type": "INT",
"link": 30,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 31,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
25
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "EmptyLatentImage"
},
"widgets_values": [
1024,
1024,
1
]
},
{
"id": 21,
"type": "LatentRotate",
"pos": [
860,
10
],
"size": [
210,
70
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 25
},
{
"name": "rotation",
"type": "COMBO",
"link": 28,
"widget": {
"name": "rotation"
}
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
26
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "LatentRotate"
},
"widgets_values": [
"none"
]
},
{
"id": 10,
"type": "PreviewImage",
"pos": [
1820,
180
],
"size": [
720,
640
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 12
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 14,
"type": "ListFromMultiline",
"pos": [
-410,
-110
],
"size": [
220,
210
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "list",
"type": "LIST",
"links": [
15
],
"slot_index": 0,
"shape": 6
},
{
"name": "count",
"type": "INT",
"links": null
}
],
"properties": {
"Node name for S&R": "ListFromMultiline"
},
"widgets_values": [
0,
true,
"disabled",
"# image dimensions\n1024 x 1024\n896 x 1152\n1216 x 832"
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 13,
"type": "XYPlotQueue",
"pos": [
-150,
-100
],
"size": [
315,
146
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "dim1",
"type": "LIST",
"link": 15,
"shape": 6
},
{
"name": "dim2",
"type": "LIST",
"link": 18,
"shape": 6,
"label": "dim2 (opt)"
}
],
"outputs": [
{
"name": "xy_plot_data",
"type": "XY_PLOT_DATA",
"links": [
14
],
"slot_index": 0,
"label": "XY plot data",
"color_off": "#52395B",
"color_on": "#9521c3"
},
{
"name": "dim1_value",
"type": "*",
"links": [
29
],
"slot_index": 1,
"label": "dim1 value"
},
{
"name": "dim2_value",
"type": "*",
"links": [
28
],
"slot_index": 2,
"label": "dim2 value"
}
],
"properties": {
"Node name for S&R": "XYPlotQueue"
},
"widgets_values": [
0,
0,
0
],
"color": "#2a363b",
"bgcolor": "#3f5159"
},
{
"id": 12,
"type": "XYPlotRender",
"pos": [
1450,
170
],
"size": [
315,
186
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "xy_plot_data",
"type": "XY_PLOT_DATA",
"link": 14,
"label": "XY plot data",
"color_off": "#52395B",
"color_on": "#9521c3"
},
{
"name": "image",
"type": "IMAGE",
"link": 11
},
{
"name": "plot_config_grid",
"type": "PLOT_CONFIG_GRID",
"link": null,
"shape": 7,
"label": "config: grid (opt)"
},
{
"name": "plot_config_header",
"type": "PLOT_CONFIG_HF",
"link": null,
"shape": 7,
"label": "config: header (opt)"
},
{
"name": "plot_config_footer",
"type": "PLOT_CONFIG_HF",
"link": null,
"shape": 7,
"label": "config: footer (opt)"
}
],
"outputs": [
{
"name": "grid",
"type": "IMAGE",
"links": [
12
],
"slot_index": 0
},
{
"name": "image",
"type": "IMAGE",
"links": [
13
],
"slot_index": 1
}
],
"properties": {
"Node name for S&R": "XYPlotRender"
},
"widgets_values": [
"{dim1}",
"{dim2}",
false
],
"color": "#2a363b",
"bgcolor": "#3f5159"
}
],
"links": [
[
1,
4,
0,
3,
0,
"MODEL"
],
[
3,
4,
1,
6,
0,
"CLIP"
],
[
4,
6,
0,
3,
1,
"CONDITIONING"
],
[
5,
4,
1,
7,
0,
"CLIP"
],
[
6,
7,
0,
3,
2,
"CONDITIONING"
],
[
7,
3,
0,
8,
0,
"LATENT"
],
[
8,
4,
2,
8,
1,
"VAE"
],
[
11,
8,
0,
12,
1,
"IMAGE"
],
[
12,
12,
0,
10,
0,
"IMAGE"
],
[
13,
12,
1,
11,
0,
"IMAGE"
],
[
14,
13,
0,
12,
0,
"XY_PLOT_DATA"
],
[
15,
14,
0,
13,
0,
"LIST"
],
[
18,
15,
0,
13,
1,
"LIST"
],
[
25,
5,
0,
21,
0,
"LATENT"
],
[
26,
21,
0,
3,
3,
"LATENT"
],
[
28,
13,
2,
21,
1,
"COMBO"
],
[
29,
13,
1,
22,
0,
"STRING"
],
[
30,
22,
0,
5,
0,
"INT"
],
[
31,
22,
1,
5,
1,
"INT"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 1.1000000000000003,
"offset": [
458.9711582045418,
260.08436179702727
]
},
"node_versions": {
"comfy-core": "0.3.10",
"ComfyLab-Pack": "1985411cc05fb8b6faa361d2fc18c3d867e9bdb5"
}
},
"version": 0.4
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB