imrayya / stable-diffusion-webui-prompt_generator Goto Github PK
View Code? Open in Web Editor NEWAn extension to AUTOMATIC1111 WebUI for stable diffusion which adds a prompt generator
License: MIT License
An extension to AUTOMATIC1111 WebUI for stable diffusion which adds a prompt generator
License: MIT License
coming from the automatic1111 implementation of this repo. I noticed the repetition penalty
and top_k
variables aren't casted to floats and integers, respectively, which will cause error when the average user dragging the sliders; fyi
One of the models, the 304 MB large one, seems to download from a very, very slow server at 30 KBps on a 25 MBps connection. I couldn't find the part that downloads it so I don't know where it's fetched from but it would make sense to rehost it on Huggingface if the license allows for it.
Line 41 of the script prompt_generator.py, the directory name "stable-diffusion-webui-Prompt_Generator" should not be hard written.
__file__ might be used, to allow changing the ext directory name.
Describe the solution you'd like
Provide the feature to send a batch output to the "Prompt From File" script available in Text2Img and Img2Image.
Additional context
Reference to #24
I'd appreciate if you could make this clear somewhere on the repo... does your extension download the models locally or does it make inference requests to some free-access endpoint ?
I could read the code myself and be able to tell, but I think those who can't should also be informed about this.
This extension is so cool! Thank you for making it. I noticed the blacklist does not seem to be working. For example, I have "unreal" and "emma watson" in there, but I am still getting prompt results containing those words. I have tried restarting the app after saving the list.
Would be nice to include a export to file, or option to export as file.
can we have a way to automatically send a prompt to to text2img/img2img etc without copying and pasting?
and can it also generate negative prompts?
#19 made me think of this...
Can we please have buttons? :-P
As the title said, I can't install in the Extension tab. The error says:
Error executing callback ui_tabs_callback for E:\AI_RND\stable-diffusion-webui-master\extensions\stable-diffusion-webui-Prompt_Generator-master\scripts\prompt_generator.py
Traceback (most recent call last):
File "E:\AI_RND\stable-diffusion-webui-master\modules\script_callbacks.py", line 103, in ui_tabs_callback
res += c.callback() or []
File "E:\AI_RND\stable-diffusion-webui-master\extensions\stable-diffusion-webui-Prompt_Generator-master\scripts\prompt_generator.py", line 160, in on_ui_tabs
populate_models()
File "E:\AI_RND\stable-diffusion-webui-master\extensions\stable-diffusion-webui-Prompt_Generator-master\scripts\prompt_generator.py", line 34, in populate_models
with open(path, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: './extensions/stable-diffusion-webui-Prompt_Generator/models.json'
Even when I manually downloaded the git and extracted to extension folder, the A1111 still got error.
I think it would be great if you could add the Parameters Explanation paragraph somewhere in the extension UI... it would be very convenient to be able to read it right there.
Hi @imrayya your extension worked pefectly, but
since upgrading automatic1111, results and buttons are not shown, even with default theme, and no other extension, even after prompt_generator reinstall
python: 3.10.9 • torch: 2.0.0+cu118 • xformers: 0.0.17 • gradio: 3.28.1 • commit: [5ab7f213](https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/5ab7f213bec2f816f9c5644becb32eb72c8ffb89) • checkpoint: [92970aa785](https://google.com/search?q=92970aa785eb76e427847109a8f4ec6abfab36ef941f78d295d323d79f6130c9)
Do you have an idea why ? thxs
with no other extension,
Is there a way to limit the artist names being generated?
This is such a helpful extension as I'm a big fan of anything introducing randomness and saving on typing but I see the same artists all over the internet and don't want to join in with this trend.
I know it's not your model but is there a way to opt in or out of using artists in the prompts?
It took some time trying to figure out why my tooltips were broken in AUTOMATIC1111
After exhausting all community posts to try and resolve the problem I unloaded all of my extensions and fixed my tool tips. I started loading extensions 1 by 1.
I discovered that this extension breaks the tooltips.
I don't like making bug reports so I hope this finds you in good spirits.
Latest A1111 pull seems to cause issues for me with extension:
Exception encountered while attempting to generate prompt: local variable 'tokenizer' referenced before assignment
Traceback (most recent call last):
File "E:__workspace\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 321, in run_predict
output = await app.blocks.process_api(
File "E:__workspace\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1016, in process_api
data = self.postprocess_data(fn_index, result["prediction"], state)
File "E:__workspace\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 945, in postprocess_data
if predictions[i] is components._Keywords.FINISHED_ITERATING:
IndexError: tuple index out of range
Exception encountered while attempting to install tokenizer
Generate new prompt from: "Basketball, nba, landscape, rim, 35mm, 8k"
Exception encountered while attempting to generate prompt: local variable 'tokenizer' referenced before assignment
Traceback (most recent call last):
File "E:__workspace\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 321, in run_predict
output = await app.blocks.process_api(
File "E:__workspace\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1016, in process_api
data = self.postprocess_data(fn_index, result["prediction"], state)
File "E:__workspace\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 945, in postprocess_data
if predictions[i] is components._Keywords.FINISHED_ITERATING:
IndexError: tuple index out of range
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.