Skip to content

03. Payloads

imi edited this page Aug 16, 2025 · 1 revision

Payloads Configuration

Payloads define the specific parameters for each image generation job, such as the prompt, negative prompt, dimensions, and sampler settings.

File Structure

Payloads are configured in the conf/payloads/ directory. The structure is designed to separate default settings from individual prompts.

  • conf/payloads/cargo_WEBUI.yaml: This is the main file you will use. You should have copied the template corresponding to your WebUI (e.g., cargo_forge.yaml). It contains default settings and a cargo block that lists all the individual payload files to be used.
  • conf/payloads/cargo/: This directory holds the individual payload files, typically one for each distinct prompt or style you want to test.

cargo_WEBUI.yaml

This file has two main sections:

  1. Defaults: Any key-value pair at the top level of this file is considered a default setting. These settings will be applied to every payload unless the payload explicitly overrides them. This is useful for setting a consistent sampler_name, steps, cfg_scale, etc., for the entire run.
  2. cargo block: This block is a dictionary where each key is a unique name for a payload (e.g., portrait_test, landscape_v1) and the value is the filename of the corresponding payload file in the cargo/ directory.
# Example: conf/payloads/cargo_forge.yaml

# --- Defaults ---
sampler_name: "Euler a"
steps: 28
cfg_scale: 5.0
width: 1024
height: 1024
# --- etc. ---

# --- Cargo Block ---
# Defines which payloads to run.
cargo:
  noob1: payload.yaml
  noob2: payload2.yaml
  # Add more payloads here, any name can be used for the yamls

Individual Payload Files

Files inside the conf/payloads/cargo/ directory define the specific settings for a single generation job.

Key Fields:

  • prompt: (Required) The text prompt for the image.
  • negative_prompt: The negative prompt.
  • seed: The seed for generation. Use -1 for a random seed.
  • score_weight: (Optional) A multiplier for the final score of images generated from this payload. Useful for emphasizing or de-emphasizing the importance of certain prompts.
  • Any other key (steps, width, etc.) will override the default set in cargo_WEBUI.yaml.
# Example: conf/payloads/cargo/payload.yaml

prompt: "1girl, flat chest"
negative_prompt: "worst quality, bad anatomy"
seed: 12345
score_weight: 1.2 # Give this prompt 20% more importance

Wildcards

Wildcards allow you to dynamically insert random lines from text files into your prompts, increasing the diversity of generated images.

  • Setup: Place your wildcard files (e.g., weather.txt, artist.txt) in the directory specified by wildcards_dir in your config.yaml.
  • Syntax: In your prompt, use the format __filename__ (without the .txt) to insert a random line from that file.
  • Will be looked into at a later date, likely still works but outdated code (2+ years old)

Example:

If wildcards_dir/weather.txt contains:

sunny day
stormy clouds
gentle rain

And your prompt is "a beautiful landscape, __weather__, cinematic lighting", the final prompt sent to the WebUI could be:

  • "a beautiful landscape, stormy clouds, cinematic lighting"
  • "a beautiful landscape, sunny day, cinematic lighting"
  • etc.

Clone this wiki locally