A grid/gallery-based style selector extension for Stable Diffusion WebUI Forge. Replaces the default dropdown with a searchable, categorized grid β multi-select, favorites, source filter, instant apply, silent mode, presets, conflict detection, and more.
- Visual grid β Styles appear as cards in a categorized grid instead of a long dropdown.
- Dynamic categories β Grouping by name:
PREFIX_StyleNameβ category PREFIX;name-with-dashβ category from the part before the dash; otherwise from the CSV filename. Colors are generated from category names. - Instant apply β Click a card to select and immediately apply its prompt. Click again to deselect and cleanly remove it. No Apply button needed.
- Multi-select β Select several styles at once; each is applied independently and can be removed individually.
- Favorites β Star any style; a β Favorites section at the top lists them. Favorites update immediately (no reload).
- Source filter β Dropdown to show All Sources or a single CSV file (e.g.
styles.csv,styles_integrated.csv). Combines with search. - Search β Filter by style name; works together with the source filter. Category names in the search box show only that category.
- Category view β Sidebar (when many categories): show All, β Favorites, π Recent, or one category. Compact bar when there are few categories.
- Silent mode β Toggle
π Silentto hide style content from prompt fields. Styles are injected at generation time only and recorded in image metadata asStyle Grid: style1, style2, .... - Style presets β Save any combination of selected styles as a named preset (π¦). Load or delete presets from the menu. Stored in
data/presets.json. - Conflict detector β Warns when selected styles contradict each other (e.g. one adds a tag that another negates). Shows a pulsing β badge with details on hover.
- Context menu β Right-click any card: Edit, Duplicate, Delete, Move to category, Copy prompt to clipboard.
- Built-in style editor β Create and edit styles directly from the grid (β or right-click β Edit). Changes are written to CSV β no manual file editing needed.
- Recent history β π section showing the last 10 used styles for quick re-access.
- Usage counter β Tracks how many times each style was used; badge on cards. Stats in
data/usage.json. - Random style β π² picks a random style (use at your own risk!).
- Manual backup β πΎ snapshots all CSV files to
data/backups/(keeps last 20). - Import/Export β π₯ export all styles, presets, and usage stats as JSON, or import from one.
- Dynamic refresh β Auto-detects CSV changes every 5 seconds; manual π button also available.
- {prompt} placeholder highlight β Styles containing
{prompt}are marked with a β³ icon. - Collapse / Expand β Collapse or expand all category blocks. Compact mode for a denser layout.
- Select All β Per-category "Select All" to toggle the whole group.
- Selected summary β Footer shows selected styles as removable tags; the trigger button shows a count badge.
- Preferences β Source choice and compact mode are saved in the browser (survive refresh).
- Both tabs β Separate state for txt2img and img2img; same behavior on both.
- Smart tag deduplication β When applying multiple styles, duplicate tags are automatically skipped. Works in both normal and silent mode.
- Source-aware randomizer β The π² button respects the selected CSV source: if a specific file is selected, random picks only from that file.
- Search clear button β Γ button in the search field for quick clear.
- Drag-and-drop prompt ordering β Tags of selected styles in the footer can be dragged to change order. The prompt updates in real time; user text stays in place.
- Category wildcard injection β Right-click on a category header β "Add as wildcard to prompt" inserts all styles of the category as
__sg_CATEGORY__into the prompt. Compatible with Dynamic Prompts.
- Find the grid icon button (β) next to the other tools under the Generate button (txt2img or img2img).
- Click it to open the Style Grid modal over the page.
- Categories β Styles are grouped (e.g. BASE, BODY, β Favorites, π Recent). Click a category in the sidebar (or All / β Favorites in the compact bar) to show only that group.
- Source β Use the dropdown to the left of the search bar: All Sources or a specific CSV file. Only styles from that source are shown.
- Search β Type in the search box to filter by style name. Search applies on top of the current source and category view.
- Click a card to select and apply it instantly β the style's prompt is added to your prompt fields immediately. Click again to deselect and remove.
- Select All on a category header to select or clear all styles in that category.
- Star (β ) on a card to add or remove it from β Favorites; the Favorites block updates at once.
- Silent mode β When
π Silentis active, clicking a card selects it, but prompts are not modified visually. Styles are injected during generation and appear in image metadata. - You can reorder applied styles by dragging their tags in the Selected footer. The prompt field updates to reflect the new order.
- Styles without
{prompt}have their prompt appended (comma-separated). - Styles with
{prompt}wrap your existing prompt (e.g.masterpiece, {prompt}, highresinserts your text in place of{prompt}). These are marked with a β³ icon on the card.
| Button | Function |
|---|---|
π Silent |
Toggle silent mode (styles applied at generation time only) |
π² |
Apply a random style |
π¦ |
Presets β save/load/delete style combinations |
β |
Collapse/expand all categories |
βͺ |
Toggle compact mode (saved in browser) |
π |
Refresh styles from CSV files |
β |
Create a new style |
π₯ |
Import/Export styles as JSON |
πΎ |
Manual backup of all CSV files |
Clear |
Deselect and unapply all styles |
β |
Close the Style Grid |
Use the standard Forge/A1111 CSV format:
name,prompt,negative_prompt
BASE_Illustrious_Quality,"masterpiece, best quality, highres","lowres, bad anatomy"
STYLE_Watercolor,"watercolor painting, soft edges",""
myfile_My_Custom_Style,"custom prompt here",""| Rule | Example | Category |
|---|---|---|
Name contains _ |
BODY_Thicc |
BODY (uppercase before first _) |
Name contains - (no _) |
sai-anime |
sai (before first -) |
| Else | SomeStyle |
From CSV filename (e.g. Styles_integrated) |
| Fallback | β | OTHER |
Category colors are generated from the category name (no fixed palette).
The extension stores its data in the data/ folder:
| File | Contents |
|---|---|
data/presets.json |
Saved style presets |
data/usage.json |
Per-style usage counters and timestamps |
data/backups/ |
Timestamped CSV backups (up to 20) |
These files are gitignored and created automatically.
- Use the CSV format above.
- Put it in:
- Forge root (next to
styles.csv), or - The extension's styles/ folder.
- Forge root (next to
- The grid auto-refreshes within 5 seconds, or click π to reload immediately.
You can also create styles directly from the grid using β or right-click β Edit.
- Extensions β Install from URL
- Paste the repository URL
- Install, then restart the UI
cd /path/to/stable-diffusion-webui-forge/extensions
git clone <this-repo-url>Then restart the UI.
- Stable Diffusion WebUI Forge (latest)
- Dark and light themes (panel, cards, search, source dropdown)
- txt2img and img2img
| Issue | What to try |
|---|---|
| Trigger button not visible | Enable the extension in the Extensions tab; do a full UI restart; check console for [Style Grid] messages. |
| Styles not loading | Ensure CSVs are in Forge root or the extension's styles/ folder; check name,prompt,negative_prompt header and encoding (UTF-8). |
| Conflict warning wrong | The detector compares comma-separated tokens. Complex prompts with shared common words may trigger false positives. |
| Silent mode not working | Ensure the extension's process() hook is running β check that Style Grid appears in your image metadata after generation. |
| Drag-and-drop not working | Ensure you're dragging the style tags in the footer area (bottom of Style Grid panel), not the cards in the grid. |
AGPL-3.0 (GNU Affero General Public License v3.0)