-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Description
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
-
Folder Organization
- Allow users to create categories and subcategories (e.g., Environment > Desert, Environment > Arctic, Styles > Cyberpunk).
- Each folder holds user-defined prompt expansions.
-
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.
- Use a folder structure similar to:
-
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
- Go to
C:\Fooocus-inswapper-main\sdxl_styles
. - Create a new folder for a category (e.g.,
Environment
). - Add
.txt
files for each style (e.g.,Desert.txt
) with the prompt text inside. - Add a
.jpg
or.png
with the same filename (e.g.,Desert.jpg
) for preview. - Restart Fooocus (or click a future Reload Styles button).
2. Accessing Styles in the GUI
- Open the Styles section in Fooocus.
- Styles are organized by folders (e.g., Environment, Styles).
- Expand a folder to view its styles.
- Hover over a style to view its preview image.
3. Applying Styles
- Click a style to append its prompt text to your current generation prompt.
- Multi-select styles (e.g., Environment > Desert + Styles > Cyberpunk) to combine expansions.
- Remove selected styles via a small “x” next to the style name.
4. Managing Styles
- Add new styles by dropping
.txt
and.jpg
files into the appropriate folder. - Remove styles by deleting the files.
- 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
- 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.
- 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).
- 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.
- 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
- 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
).
- Each
- 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.
2. 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).
3. 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.
4. 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.
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
).
- Each
- 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.
2. 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).
3. 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.
4. 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
No response