English | 日本語
Better Prompt is an extension of the Stable Diffusion web UI that adds a UI to assist with prompt input and editing.
Better Prompt was created to reduce the various inconveniences of traditional prompt input and editing. It allows you to set Textual Inversion and LoRA without displaying Extra networks (🎴), rearrange the order of prompts by drag and drop, and adjust the emphasis level of prompts through a GUI.
Better Prompt is a JavaScript-based extension. Please be aware that if JavaScript files are not loaded correctly, such as when using the --data-dir
option, Better Styles not function properly.
You can install it from the "Install from URL" option in the Extensions tab. Simply enter https://github.com/eideehi/sd-webui-better-prompt.git in the "URL for extension’s git repository" field and press the "Install" button.
You can also install it by executing the following command in the directory where Stable Diffusion web UI is installed.
git clone https://github.com/eideehi/sd-webui-better-prompt.git extensions/sd-webui-better-prompt
By installing it using the above methods, the latest version will be installed. However, it may not work well with the version of Web UI you are using. If Better Prompt is not displayed properly, it may be possible to resolve the issue by using a different version.
Tip
|
You can change the version of Better Prompt from the Settings tab. For more information, refer to Version of Better Prompt. |
Better Prompt adds the part enclosed by the red line in the image below. We will explain how to use this added content from now on.
This is the default content displayed where you can edit the prompt.
Adding a prompt is done using the three elements shown in the following image.
Enter a prompt in this field and press the Enter key to add the content to the positive prompt. Alternatively, press the Shift key while pressing Enter to add the content to the negative prompt. If there are Textual Inversion, LoRA, Danbooru tags, or My Prompt similar to the input content, they will be displayed in a list in [3] Suggest Area.
Tip
|
Fuse.js is used for similarity determination, allowing various determination methods such as "exact match," "prefix/suffix," and "AND/OR/NOT" to be used. For more information, refer to the fusejs.io documentation. |
Tip
|
Press the Tab key to move the focus to the elements in [3] Suggest Area, and press the Escape key to return the focus. The selected element can be added to the positive (negative) prompt by pressing Enter (or Shift + Enter). |
Only elements with a check in these filters will be displayed in [3] Suggest Area.
Displays a list of up to 20 elements similar to the content entered in [1] Prompt Input Field. An example of the items to be added is shown in the following image.
Green is Textual Inversion, blue is LoRA, and the last is Danbooru tags. Clicking (or Shift-clicking) these elements allows them to be added to the positive (negative) prompt.
Note
|
LoRA cannot be added to the negative prompt, so please be careful. |
Tip
|
You can check the thumbnail by right-clicking on the elements of Textual Inversion and LoRA. |
Prompt editing is done using the two elements shown in the following image.
Prompts added using Prompt Addition Form are displayed in this area. This element is synchronized with the positive prompt input area of the web UI.
Tip
|
Each prompt can be reordered by drag and drop, and can be deleted by clicking while holding the Shift key. |
Tip
|
Right-clicking on LoRA and normal prompts displays a popup for adjusting the emphasis level. |
Except for not being able to add LoRA, it is the same as [1] Positive Prompt.
You can assign aliases and tags to any prompt for easy management. The registered My Prompts will be displayed in the [3] Suggest Area when editing prompts.
When you click the Add new My Prompt
button, a popup will appear for registering a new My Prompt.
Set the display name for the My Prompt. This will be used when displayed in suggestions, among other places. This field is required and cannot be omitted. Additionally, you cannot set a label that already exists.
By setting tags, you can filter My Prompts based on their tags. When the input field is active, existing tags will be suggested and displayed as a list. You can add a new tag by pressing the Enter key after entering the desired string. This field is optional, and you can omit the input.
Set any prompt for the My Prompt. When you click on a My Prompt displayed in the [3] Suggest Area, the prompt you set here will be expanded. This field is required and cannot be omitted.
By clicking on a My Prompt in the displayed list, you can select it by clicking the Select and delete My Prompt
button. Then, you can delete all the selected My Prompts by pressing the Delete selected My Prompts
button. Please note that once you delete a My Prompt, it cannot be restored, so use this feature with caution.
Better Prompt creates its own configuration section in the Settings tab. Here, we will explain each item.
You can change the version of Better Prompt. Selecting a blank space will change it to the latest version at that point. If you change the settings, it is necessary to restart the Web UI. (not just reload)
Tip
|
The current version of Better Prompt is displayed in the console of the Web UI. Refer to the table below for the Web UI versions corresponding to each version. |
Version |
Web UI Version (Minimum) |
Web UI Version (Maximum) |
0.1.0 - 0.3.0 |
9e1afa9e (2023-03-25) |
1.3.2 |
0.4.0 |
9e1afa9e (2023-03-25) |
1.4.0 |
0.4.1 |
1.1.1 |
~ |
If checked, it will only notify once for each version when updates are available.
Specify the interval for displaying update notifications. The unit is "days", and the default value is 1 day.
Better Prompt is developed and published under the MIT license. For details on the license, please refer to the link below.