Skip to content

Advanced config

Aaron Fisher edited this page Aug 17, 2023 · 4 revisions

The config.properties file is a configuration file that allows users to customize the behavior and settings of the SDXL-DiscordBot. This wiki provides a detailed breakdown of each section in the file.

config.properties dictionary:

1. [LOCAL_TEXT2IMG]

This section is for configurations related to text-to-image generation when running the bot locally using ComfyUI.

  • CONFIG: Path to the JSON configuration file for text-to-image generation.
  • PROMPT_NODES: Comma-separated list of node IDs for positive text prompts.
  • NEG_PROMPT_NODES: Comma-separated list of node IDs for negative text prompts.
  • RAND_SEED_NODES: Comma-separated list of node IDs where random seeds will be injected.

2. [LOCAL_IMG2IMG]

This section is for configurations related to image-to-image transformations when running the bot locally using ComfyUI.

  • CONFIG: Path to the JSON configuration file for image-to-image transformations.
  • PROMPT_NODES: Node ID for the primary image input.
  • NEG_PROMPT_NODES: Node ID for the negative image input.
  • RAND_SEED_NODES: Node ID where a random seed will be injected for variations.
  • FILE_INPUT_NODES: Node ID for file-based image inputs.

3. [LOCAL_UPSCALE]

This section is for configurations related to image upscaling when running the bot locally using ComfyUI.

  • CONFIG: Path to the JSON configuration file for image upscaling.
  • FILE_INPUT_NODES: Node ID for file-based image inputs.

4. [API_TEXT2IMG]

This section is for configurations related to text-to-image generation when using the Stability AI API.

  • ENGINE: The specific engine version to use for the text-to-image generation.
  • CFG: Configuration scale for the model.
  • WIDTH: Desired width of the generated image.
  • HEIGHT: Desired height of the generated image.
  • SAMPLES: Number of sample images to generate.
  • SAMPLER: The sampling method to use.
  • STEPS: Number of steps for the generation process.

5. [API_IMG2IMG]

This section is for configurations related to image-to-image transformations when using the Stability AI API.

  • ENGINE: The specific engine version to use for the image-to-image transformation.
  • INIT_IMAGE_MODE: The mode to initialize the image.
  • IMAGE_STRENGTH: Strength of the initial image.
  • CFG: Configuration scale for the model.
  • SAMPLES: Number of sample images to generate.
  • SAMPLER: The sampling method to use.
  • STEPS: Number of steps for the transformation process.

6. [API_UPSCALE]

This section is for configurations related to image upscaling when using the Stability AI API.

  • ENGINE: The specific engine version to use for the image upscaling.
  • WIDTH: Desired width of the upscaled image.
  • SEED: Seed value for the upscaling process.
  • STEPS: Number of steps for the upscaling process.
  • CFG: Configuration scale for the model.

Installing Custom ComfyUI Workflows

If you're looking to customize SDXL-DiscordBot further with your own ComfyUI workflows, you're at the right place. Follow this step-by-step guide to seamlessly integrate custom workflows:

Step 1: Create Your Workflow

Begin by designing your desired workflow in ComfyUI. Ensure you have a clear vision of what you want to achieve with this custom workflow.

Step 2: Naming Convention

When setting up your workflow, make sure the output images have the prefix "final_output". This ensures the bot can recognize and process these images correctly.

Step 3: Save in API Format

  • Navigate to the developer options within ComfyUI.
  • Look for the option to save your workflow.
  • Choose the "API Format" option. This will save your workflow as a JSON file, which is essential for the next steps.

Step 4: Upload to the Bot's Directory

Take the JSON file you just saved and upload it to the comfyUI-workflows folder designated for the bot.

Step 5: Modify the Properties File (CONFIG Location)

Open the bot's properties file. You'll need to update the CONFIG location to point to the new workflow JSON you've just uploaded.

Step 6: Identify Essential Nodes

In the same properties file:

  • Identify and specify the Prompt nodes.
  • Specify the Negative Prompt nodes.
  • Point out the Random Seed nodes.
  • Finally, identify the File Input nodes.

This step ensures the bot knows where to pull specific data from within your custom workflow.

Step 7: Restart and Enjoy

Once all the above steps are completed, restart the bot. Post-restart, your custom ComfyUI workflow should be integrated and operational.