Skip to content

PurgatoryMP/Style-Mixer-WebUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Style Mixer WebUI

Style Mixer WebUI is a powerful extension for AUTOMATIC1111 Stable Diffusion WebUI that allows users to combine, organize, randomize, and manage multiple AI art prompt styles directly inside the Stable Diffusion interface.

This extension is designed for advanced prompt engineering workflows, enabling creators to build reusable JSON-based style libraries and dynamically apply positive and negative prompts during image generation.

Whether you're creating cinematic renders, anime artwork, photorealistic images, fantasy concepts, or experimental AI art, Style Mixer helps streamline prompt workflows and accelerate creative iteration.


Stable Diffusion Keywords

Stable Diffusion Style Mixer, AUTOMATIC1111 extension, Stable Diffusion extension, AI art prompt manager, prompt engineering tool, Stable Diffusion stylesets, Stable Diffusion prompt mixing, AI image generation workflow, SDXL style prompts, Stable Diffusion JSON prompts, Stable Diffusion prompt presets, Stable Diffusion random prompt generator, AI art styles, prompt blending extension


Features

Style Presets

The Style Mixer comes with hundreds of style presets across a host of different Categories from backgrounds to posture to eye color.

Multi-Style Prompt Mixing

  • Combine up to 4 styles per row
  • Support for up to 50 style rows
  • Stack positive and negative prompts dynamically
  • Modular prompt engineering workflow

JSON-Based Stylesets

Organize styles into reusable JSON categories such as:

  • Anime
  • Cinematic
  • Fantasy
  • Horror
  • Lighting
  • Realism
  • Camera Styles
  • Environment Styles
  • Character Styles
  • Color Palettes

Dynamic Category Loading

Style categories automatically load from the stylesets directory.

No coding required to add new style collections.


Built-In Randomizer

Randomly generate:

  • Categories
  • Style combinations
  • Prompt mixes

Useful for:

  • Inspiration
  • Creative exploration
  • Prompt experimentation
  • Rapid iteration

Refresh Styles Without Restarting

Reload all JSON stylesets instantly using the Refresh button.

No need to restart Stable Diffusion WebUI after editing style files.


Global and Per-Row Controls

Includes:

  • Global enable toggle
  • Per-row enable toggles
  • Disable negative prompts option

This allows precise control over prompt injection.


Stable Diffusion Pipeline Integration

Style Mixer integrates directly into the AUTOMATIC1111 generation pipeline.

The extension automatically modifies:

  • p.all_prompts
  • p.all_negative_prompts

Generation metadata is also stored for reproducibility.


Reload-Safe Logging

Includes a centralized logger system designed specifically for AUTOMATIC1111 reload behavior.

Features:

  • Structured console logs
  • Duplicate handler prevention
  • Debug visibility
  • Safe reinitialization

Installation

Install From URL (Recommended)

Open the Extensions tab inside AUTOMATIC1111 WebUI and install using:

https://github.com/PurgatoryMP/Style-Mixer-WebUI.git

Then:

  1. Click Install
  2. Click Apply and Restart UI

Manual Installation

Clone the repository into your Stable Diffusion WebUI extensions directory:

git clone https://github.com/PurgatoryMP/Style-Mixer-WebUI.git

Place the extension inside:

stable-diffusion-webui/extensions/

Restart WebUI after installation.


Requirements

  • AUTOMATIC1111 Stable Diffusion WebUI
  • Python 3.10+
  • Gradio
  • Stable Diffusion WebUI scripting support

How To Use

Step 1 — Enable Style Mixer

Open the Style Mixer accordion inside WebUI and enable the extension.


Step 2 — Add Rows

Click:

Add Row

Each row acts as an independent style mix.


Step 3 — Select a Category

Choose a styleset category from the dropdown.

Examples:

  • Cinematic
  • Anime
  • Lighting
  • Realism
  • Fantasy

Step 4 — Select Styles

Choose up to 4 styles per row.

The extension automatically combines:

  • Positive prompts
  • Negative prompts

Step 5 — Generate Images

Generate normally.

Style Mixer automatically injects prompts into the Stable Diffusion processing pipeline.


Styleset System

Styles are loaded from:

/stylesets/

Every styleset file must follow this naming convention:

styleset-<category>.json

Example:

styleset-cinematic.json

Example Styleset JSON

[
  {
    "name": "Dark Cinematic",
    "prompt": "cinematic lighting, volumetric fog, dramatic shadows",
    "negative_prompt": "low quality, blurry, bad anatomy"
  },
  {
    "name": "Film Noir",
    "prompt": "film noir style, monochrome, high contrast",
    "negative_prompt": "oversaturated, cartoon"
  }
]

JSON Field Reference

Field Required Description
name Yes Display name inside WebUI
prompt No Positive prompt text
negative_prompt No Negative prompt text

Prompt Placeholder Support

Style Mixer supports:

{prompt}

inside prompts for advanced workflow integration.


Folder Structure

Style-Mixer-WebUI/
│
├── scripts/
│   ├── Style-Mixer-WebUI.py
│   ├── processor.py
│   ├── styleset.py
│   └── style_logger.py
│
├── stylesets/
│   ├── styleset-anime.json
│   ├── styleset-cinematic.json
│   └── styleset-realism.json
│
├── style.css
└── README.md

Core Components

StyleSetLoader

Responsible for:

  • Loading JSON stylesets
  • Validating categories
  • Parsing style entries
  • Sorting styles alphabetically

StyleMixerPromptProcessor

Handles:

  • Prompt resolution
  • Positive prompt merging
  • Negative prompt merging
  • Prompt injection into generation

StyleLogger

Provides:

  • Centralized logging
  • Reload-safe initialization
  • Structured console formatting
  • Debug visibility

Supported Workflows

Style Mixer works well with:

  • SDXL
  • Stable Diffusion 1.5
  • Pony Diffusion
  • Anime checkpoints
  • Realistic checkpoints
  • LoRA workflows
  • Embeddings
  • Dynamic prompting
  • Prompt scheduling systems

Contributing

Pull requests, bug reports, and feature suggestions are welcome.


License

This project is licensed under the GNU GPL v3 License.

https://www.gnu.org/licenses/gpl-3.0.en.html

About

Advanced Stable Diffusion WebUI extension for mixing, organizing, randomizing, and managing reusable JSON-based prompt styles inside AUTOMATIC1111.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors