Files
bugltd-ComfyLab-Pack/wiki/node reference/output config.md
T
Bug, Ltd. 07ae7129ea new banner and better README files (#10)
* set the new repo banner and icon

* improve the README files by using github md alerts
2025-01-28 10:07:28 +01:00

4.7 KiB

Node reference: Output Config

>> Link to the tutorials

Overview

The Output Config: Load (and its backend counterpart, Output Config: Retrieve) is very different from other nodes: it allows you to load config files and dynamically create any number of custom outputs, that you can later connect to other nodes before executing the workflow.

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.

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:

{
	"seed": 618896223111156, // value can be set directly
	"cfg": {
		"value": 7.5, // or inside a dictionary, with the 'value' key
	},
	"steps": 40,
	// add all the outputs you need, name them as you wish
}

But it can be extended, to customize the label, color, shape, and even the type of the output.
Here a more advanced example (written in YAML):

seed:
  value: 618896223111156
  shape: box
  color_off: '#FF0000' # when not connected
  color_on: '#00FF00' # when connected
cfg:
  value: 7.5
  shape: circle # default shape
  color_off: blue # we can set colors by name
steps:
  value: 40
  shape: arrow
  color_off: '#dcb21a'
prompt:
  value: illuminated pirate ship sailing on a sea with a galaxy in the sky
  label: a basic prompt but a custom label
  shape: grid
  color_off: '#28cfcd'
checkpoint:
  value: sd_xl_base_1.0.safetensors
  type: '*' # '*' means any type, use it as a last resort

Load vs Retrieve: which one should I choose?

The Output Config: Load and Output Config: Retrieve are very similar.
The only difference is that the latter allows you to get a file located in the backend machine, while the former is to load a file where the browser is running.

If your frontend (browser) is running on the same machine as the backend (as probably many of us), you certainly should choose the Load version: it is more interactive and easier to use.
The Retrieve version is probably only useful in some rare cases, but it's here if needed.

Widgets

Output Config: Load

widget label type description comment
Load output config button get and validate the file
then create the outputs
display errors combo how to display errors available options:
- in browser console (F12)
- in a popup (default)
- do not display
show config toggle show / hide the file preview

Output Config: Retrieve (backend)

widget label type description comment
JSON or YAML file (backend) text full path to the config file
in backend machine
Retrieve output config button get and validate the file
then create the outputs
display errors combo how to display errors available options:
- in browser console (F12)
- in a popup (default)
- do not display
show config toggle show / hide the file preview