Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] - Output - "prompts from files or text box" format #20

Closed
creeduk opened this issue Jun 9, 2023 · 6 comments
Closed
Labels
enhancement New feature or request

Comments

@creeduk
Copy link

creeduk commented Jun 9, 2023

I always test new models with some of my previous generations or from samples I have collected from other model creators. That would usually be drag into png info and send to txt2img, generate and then get the next one, and over. Or use your tool, and copy paste the text. As the collection grew I have started now to use prompts from files or text box and add the full string.

I thought it could be a very cool addition to be able to output or send to clipboard the metadata in the correct format.

Example:

Typical data:

A red balloon Negative prompt: deformed, drawing, monochrome
Steps: 20, Sampler: Euler a, CFG scale: 7.5, Seed: 123400012, Size: 512x512, Model hash: <some number>, Model: <model name>

Required to drive script:
--prompt "A red balloon" --negative_prompt "deformed, drawing, monochrome" --steps 20 --cfg_scale 7.5 --sampler_name "Euler a"" --seed 123400012 --width 512 --height 512

See here for references:

AUTOMATIC1111/stable-diffusion-webui#248

Recently when putting a big file together I got all kinds of errors, It was due to leaving : or forgetting a closing quote or leaving a comma between steps and cfg for example. I started using regular expressions in notepad++ to make it more reliable but if we could get that straight from the prompt reader that would be cool.

Might be way too much but I thought it might be a cool enhancement request.

@receyuki
Copy link
Owner

receyuki commented Jun 9, 2023

This is so cool! I never knew webui had this kind of functionality!
Would a drop down menu option like EXPORT or CLEAR be acceptable to you (which means you need to click twice for each image).
BTW I plan to add custom configuration and batch processing in the next major update so that you can change the default format of COPY to this format, or even export multiple image data to a single file in this format (hopefully). But since I need to wait for the authors of the libraries I'm using to fix something, I'm not sure how long this will take.

@receyuki receyuki added the enhancement New feature or request label Jun 12, 2023
@altoiddealer
Copy link

altoiddealer commented Jun 22, 2023

There’s actually a script for txt2img as well as a script for img2img, which allow you to do batch processing using your existing images as input, with checkboxes for what information you want to recycle or default to current settings. The scripts also allow add/remove params from the prompts.

txt2img script
https://github.com/thundaga/SD-webui-txt2img-script

img2img script
AUTOMATIC1111/stable-diffusion-webui#4938 (comment)
(scroll down to “ I have modified @kevmatic's code”)

Note that when using the img2img script do not choose an output directory, let it go to default location, otherwise the output will have no metadata

@receyuki
Copy link
Owner

@creeduk This feature has been added in version 1.3.2, try it out.

@creeduk
Copy link
Author

creeduk commented Jul 14, 2023

Awesome, sorry I have been away 9plus I thought I requested this on the civit site LOL then I realized no I made it here officially, it was great to login and check messages and find that this looked useful to you. I also did not know about t for a long time but after wanting to find faster ways to test and digging through old posts I stumbled on it :)

looking fwd to trying this out. I have made countless mutations by not getting the exact format right (missing a dash or leaving a attribute name wrong.) so this could be a huge time save.

@receyuki
Copy link
Owner

Let me know if there's any problem about it.

@creeduk
Copy link
Author

creeduk commented Jul 17, 2023

Worked great, used it to extract all my prompts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants