12 KiB
Prompt Gallery
A prompt cookbook worked as stable-diffusion-webui extenstions.
Watch Demo »
Explore the docs
·
Report Bug
·
Request Feature
Table of Contents
About The Project
TLDR; Stable-diffusion is an AI model which can generate illustration based on text-based prompts. What does a prompt/prompt-set in AI's eyes? How do we do prompt combination like shopping?
This is an extension of stable-diffusion-webui. Checkout this powerful tool.
Use Prompt Gallery like a cookbook. Build your own prompt-set library and do illustration/creation. Life is that easy.
Cool Features:
- Scalable Prompt Library
- Stable-Diffusion-WebUI Integration
- Avatar System (model/character presets)
Keep your pace. Let's start from building your prompt library. Build Library
Built With
Getting Started
🐘 Good news: we now adapt to webui dark theme.
Prerequisites & Installation
First, go to an empty directory where you store the temp.
Run git clone to get the prompt-gallery.
git clone https://github.com/dr413677671/PromptGallery-stable-diffusion-webui.git
Make sure you cloned the stable-diffusion-webui before. If not check out stable-diffusion-webui to install it first.
Make sure you add "--api --cors-allow-origins http://localhost:5173" as "COMMANDLINE_ARGS" in webui-user.bat (where you start webui) like this:
Follow instructions on stable-diffusion-webui to start webui
Goto Tab extensions in the webui and paste:
-
paste https://github.com/dr413677671/PromptGallery-stable-diffusion-webui.git into textbox "URL for extension's git repository"
-
Set Prompt Gallery as "Local directory name"
Usage
After installation, try restart webui. You should see a initial frontpage like this.
You might wonder why there is no preview pictures. Prompt Gallery works like a framework. You need to generate your own prompt-set library for your own purpose.
How follow the instructions below to build your own prompt-set library and generate previews for them.
Instead you could watch the video tutorial: View Demo
Speaking ahead. Don't be afraid to build a large library. There are some useful repo help you browse the prompts.
E.g. If you love anime, goto github and search "tags" or "prompts".
You will see many cool repo like sd-danbooru-tags or DeepDanbooru which will help you browse prompts and build your prompt-set library very quick.
Build library
Build up the prompt-set library and character library.
| value | negative | param |
|---|---|---|
| Positive prompts | Negative prompts | Other params for webui image generation |
Edit the teamplate at /extensions/your-prompt-gallery-extension-name/assets/avatars.yaml, and customize your avatars with prompts.
Teamplate:
whiteHair:
value: "1 girl, blush, White hair, Red eyes, animal ears, looking at viewer, gothic lolita, dramatic angle, very beautiful, beautiful eyes, "
negative: ""
pinkGirl:
value: "petite, 1girl, solo, pink hair, very long hair, school uniform, happy,outdoors, flower field, excited"
See the teamplate at /extensions/your-prompt-gallery-extension-name/assets/tags.yaml, and create your own prompt-set library.
The yaml file worked Hierarchyly.
For example you can create tags.yaml like this
Figure:
Hair:
"ponny-tail":
value: "ponny-tail"
negative: "lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, "
value: "short_hair"
negative: "long_hair,lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, "
Background:
'':
simple background:
value: simple background
sunburst background:
value: sunburst background
Nature:
Space:
value: "space background, space,"
Startrails:
value: colorful startrails
Woods:
value: "Woods background, fantacy background,"
Or something more powerful like webui config in "param"
Style:
General Effect:
"General_ice_high_res":
value: "flowing ice, portrait, focus on face, complex, extremely detailed , elegant, CG, (an extremely delicate and beautiful girl), incredibly absurdres, best quality,concept art"
negative: "lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, "
param: "Steps: 30, Sampler: Euler, CFG scale: 11.5, Seed: 1058629707, Size: 512x768, Variation seed: 1692844643, Variation seed strength: 0.27, Seed resize from: 1088x512"
Background:
'':
simple background:
value: simple background
sunburst background:
value: sunburst background
Nature:
Space:
value: "space background, space,"
Startrails:
value: colorful startrails
Start Prompt Gallery
Refresh webui.
Slect tab "Prompt Gallery" on top navigation bar.
You should see your prompts in prompt-gallery.
Select avatar (model for demo) -> Select prompt-sets -> Click "send WebUI"
Checkout the downloaded Images
But just the prompt-set is not enough. Let's generate preview picture for them.
Populate previews and QC
For instance having added two new prompt-sets, there will be no preview pictures for them.
Goto tab "txt2img" and Select "Prompt Gallery" in tab "scripts"
Upload yaml library of avatar first and select avatar.
Add default prompts and upload prompt-set yaml library.
Wait for stable-diffusion-webui generate previews automatically.
Pick the best image for preview.
Check it out in Prompt Gallery.
You could always inspect you pictures manually in prompt-gallery-directory/assets/preview/
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
Talk with me
- dr413677671 - @zhihu-Calcifer - 413677671@qq.com
- Project Link: https://github.com/dr413677671/PromptGallery-stable-diffusion-webui
