Skip to content

An Extension for Automatic1111 Webui that helps cleaning up prompts

License

Notifications You must be signed in to change notification settings

Haoming02/sd-webui-prompt-format

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SD Webui Prompt Format

[English|中文]

This is an Extension for the Automatic1111 Webui, which helps formatting prompts.

Also supports SD.Next and Forge out of the box!

Sometimes, when you type too fast or copy prompts from all over the places, you end up with duplicated spaces or commas. This simple Extension helps removing them whenever you click Generate.

Features

  • Works in both txt2img and img2img
  • Remove duplicated spaces and commas
  • Fix misplaced brackets and commas
  • Toggle Remove Duplicates to remove identical tags found in the prompts
    • Note: Only works for tag-based prompt, not sentence-based prompt
      • eg. 1girl, solo, smile, 1girl will become 1girl, solo, smile
      • eg. a girl smiling, a girl standing will not be changed
  • Toggle Remove Underscores to replace _ with space
    • Some newer anime checkpoints claim to eliminate the need of using underscores
  • Respect line breaks
    • Remove Duplicates only checks within the same line
  • Toggle between auto formatting and manual formatting
    • In Auto: The process is ran whenever you press Generate
    • In Manual: The process is only ran when you press the Format button
  • Toggle which above features is enabled/disabled by default in System section of the Settings tab

Note

  1. Since the formatting in Auto mode is triggered at the same time as the generation, the immediate image will not have its metadata updated (unless you already did manual formatting beforehand).

  2. Some Extensions (eg. tagcomplete) listen to the text editing event, meaning the formatting will cause them to trigger. You can disable updating the actual prompts in the System section of the Settings tab.

About

An Extension for Automatic1111 Webui that helps cleaning up prompts

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •