Skip to content

[Feature Request]: Add "styles" folder management #4064

@tailgunnerx

Description

@tailgunnerx

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What would your feature do?

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What would your feature do?

Enhancement Request: User-Defined "Styles" Folder System for Custom Prompt Expansions

Overview

The current "Styles" feature in Fooocus provides pre-made prompt expansions, but it lacks organization and flexibility for users who want to manage their own custom style libraries.

Proposal:
Introduce a folder-based "Styles" system where users can add and organize their own prompt expansions, complete with optional preview images.


Proposed Features

  1. Folder Organization

    • Allow users to create categories and subcategories (e.g., Environment > Desert, Environment > Arctic, Styles > Cyberpunk).
    • Each folder holds user-defined prompt expansions.
  2. Backend Concept

    • Use a folder structure similar to:
      C:\Fooocus-inswapper-main\sdxl_styles\
        ├─ Environment\
        │   ├─ Desert.txt + Desert.jpg
        │   ├─ Arctic.txt + Arctic.jpg
        ├─ Styles\
        │   ├─ Cyberpunk.txt + Cyberpunk.jpg
        │   ├─ Steampunk.txt + Steampunk.jpg
      
    • Each style is defined by a .txt file (prompt text).
    • An optional .jpg or .png with the same name provides a preview thumbnail in the GUI.
  3. GUI Enhancements

    • A folder tree or collapsible category UI for "Styles".
    • Hovering over a style shows its preview image.
    • Support both default and user-added styles.

Step-by-Step User Workflow

1. Creating Custom Styles

  1. Go to C:\Fooocus-inswapper-main\sdxl_styles.
  2. Create a new folder for a category (e.g., Environment).
  3. Add .txt files for each style (e.g., Desert.txt) with the prompt text inside.
  4. Add a .jpg or .png with the same filename (e.g., Desert.jpg) for preview.
  5. Restart Fooocus (or click a future Reload Styles button).

2. Accessing Styles in the GUI

  1. Open the Styles section in Fooocus.
  2. Styles are organized by folders (e.g., Environment, Styles).
  3. Expand a folder to view its styles.
  4. Hover over a style to view its preview image.

3. Applying Styles

  1. Click a style to append its prompt text to your current generation prompt.
  2. Multi-select styles (e.g., Environment > Desert + Styles > Cyberpunk) to combine expansions.
  3. Remove selected styles via a small “x” next to the style name.

4. Managing Styles

  1. Add new styles by dropping .txt and .jpg files into the appropriate folder.
  2. Remove styles by deleting the files.
  3. Click Reload Styles (future feature) to refresh the GUI without restarting.

Why This Is Valuable

  • Allows for custom and shareable style libraries.
  • Avoids cluttering the main styles list.
  • Encourages community sharing of curated style packs.
  • Uses the existing sdxl_styles backend folder, so implementation could be minimal on the backend.

Future Enhancements (Optional)

  • Search bar to quickly locate styles.
  • Drag & drop upload for new styles directly in the GUI.
  • Export/import style packs (ZIP files).

Thank you for considering this feature!
I believe it would greatly enhance the flexibility and usability of the Styles feature for power users.

Proposed workflow

Proposed User Workflow

  1. Creating Custom Styles
    Navigate to C:\Fooocus-inswapper-main\sdxl_styles (or the equivalent styles folder in Fooocus).

Create a new folder for the category you want (e.g., Environment).

Inside this folder, create .txt files for each style prompt expansion (e.g., Desert.txt, Arctic.txt).

Each .txt file contains the prompt expansion text (e.g., "vast desert dunes, golden light, heat haze").

Optionally, place a .jpg or .png with the same filename (e.g., Desert.jpg) to serve as the preview image in the GUI.

Restart Fooocus, or click a "Reload Styles" button (if implemented), to see your new categories appear in the GUI.

  1. Accessing Styles in the GUI
    Open the Styles section in the Fooocus GUI.

Instead of one long list, the styles panel is now split into folders or collapsible categories.

Example layout:

Environment (click to expand)

Desert

Arctic

Styles (click to expand)

Cyberpunk

Steampunk

Hovering over any style displays its preview image (from the matching .jpg/.png file).

  1. Applying a Style
    Click on a style (e.g., Cyberpunk) to instantly add its associated prompt expansion text into your active prompt.

Optionally, multi-select styles (e.g., Environment > Desert + Styles > Cyberpunk) to combine expansions.

The selected styles are shown as "active" in a list (with a small "x" to remove them).

Generate as normal — the styles are automatically appended to your prompt.

  1. Managing Styles
    To add a new style, simply drop a new *.txt file and an optional preview image into the correct folder (no need to edit configs).

To delete a style, remove its text file and preview image.

A "Reload Styles" button could be added in the GUI to refresh without restarting Fooocus.

Future Usability Enhancements
Search Bar: Quickly search styles by name.

Drag & Drop Upload: Add .txt and preview files directly through the GUI.

Export/Import Styles: A "Save as ZIP" or "Load ZIP" feature for sharing style packs.

Additional information

Proposed User Workflow

1. Creating Custom Styles

  1. Navigate to C:\Fooocus-inswapper-main\sdxl_styles (or the equivalent styles folder in Fooocus).
  2. Create a new folder for the category you want (e.g., Environment).
  3. Inside this folder, create .txt files for each style prompt expansion (e.g., Desert.txt, Arctic.txt).
    • Each .txt file contains the prompt expansion text (e.g., vast desert dunes, golden light, heat haze).
  4. Optionally, place a .jpg or .png with the same filename (e.g., Desert.jpg) to serve as the preview image in the GUI.
  5. Restart Fooocus, or click a "Reload Styles" button (if implemented), to see your new categories appear in the GUI.

2. Accessing Styles in the GUI

  1. Open the Styles section in the Fooocus GUI.

  2. Instead of one long list, the styles panel is now split into folders or collapsible categories.

    Example layout:

    Environment (click to expand)
        Desert
        Arctic
    
    Styles (click to expand)
        Cyberpunk
        Steampunk
    
  3. Hovering over any style displays its preview image (from the matching .jpg/.png file).


3. Applying a Style

  1. Click on a style (e.g., Cyberpunk) to instantly add its associated prompt expansion text into your active prompt.
  2. Optionally, multi-select styles (e.g., Environment > Desert + Styles > Cyberpunk) to combine expansions.
  3. The selected styles are shown as "active" in a list (with a small "x" to remove them).
  4. Generate as normal — the styles are automatically appended to your prompt.

4. Managing Styles

  1. To add a new style, simply drop a new *.txt file and an optional preview image into the correct folder (no need to edit configs).
  2. To delete a style, remove its text file and preview image.
  3. A "Reload Styles" button could be added in the GUI to refresh without restarting Fooocus.

Future Usability Enhancements

  • Search Bar: Quickly search styles by name.
  • Drag & Drop Upload: Add .txt and preview files directly through the GUI.
  • Export/Import Styles: A "Save as ZIP" or "Load ZIP" feature for sharing style packs.

Proposed workflow

Proposed User Workflow

1. Creating Custom Styles

  1. Navigate to C:\Fooocus-inswapper-main\sdxl_styles (or the equivalent styles folder in Fooocus).
  2. Create a new folder for the category you want (e.g., Environment).
  3. Inside this folder, create .txt files for each style prompt expansion (e.g., Desert.txt, Arctic.txt).
    • Each .txt file contains the prompt expansion text (e.g., vast desert dunes, golden light, heat haze).
  4. Optionally, place a .jpg or .png with the same filename (e.g., Desert.jpg) to serve as the preview image in the GUI.
  5. Restart Fooocus, or click a "Reload Styles" button (if implemented), to see your new categories appear in the GUI.

2. Accessing Styles in the GUI

  1. Open the Styles section in the Fooocus GUI.

  2. Instead of one long list, the styles panel is now split into folders or collapsible categories.

    Example layout:

    Environment (click to expand)
        Desert
        Arctic
    
    Styles (click to expand)
        Cyberpunk
        Steampunk
    
  3. Hovering over any style displays its preview image (from the matching .jpg/.png file).


3. Applying a Style

  1. Click on a style (e.g., Cyberpunk) to instantly add its associated prompt expansion text into your active prompt.
  2. Optionally, multi-select styles (e.g., Environment > Desert + Styles > Cyberpunk) to combine expansions.
  3. The selected styles are shown as "active" in a list (with a small "x" to remove them).
  4. Generate as normal — the styles are automatically appended to your prompt.

4. Managing Styles

  1. To add a new style, simply drop a new *.txt file and an optional preview image into the correct folder (no need to edit configs).
  2. To delete a style, remove its text file and preview image.
  3. A "Reload Styles" button could be added in the GUI to refresh without restarting Fooocus.

Future Usability Enhancements

  • Search Bar: Quickly search styles by name.
  • Drag & Drop Upload: Add .txt and preview files directly through the GUI.
  • Export/Import Styles: A "Save as ZIP" or "Load ZIP" feature for sharing style packs.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageThis needs an (initial) review

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions