-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Queue prompts #1664
Comments
That's unfortunate, but thank you for the response. I'll try to deal with the API somehow, but I'm not the best when it comes to that hahaha. |
I have created simple prompt queue (I'm thinking of creating PR for this, but not in this exact form as its kinda dump right now, but it works), you can give it a try. Remember to disable auto update on startup as it will overwrite those changes.
|
Interesting. |
Hello! |
you can use git apply, but since you ask, i supposed you will do it by hand, so...
you can tell that you must add ignore all metadata parts and all lines starting with @@ like this:
|
This can be done, but you need to modify the original code, use wildcard files to store prompt word lists, modify the code to switch wildcard reading order and random reading, and set the number of images generated at one time. |
Here's another way. |
That's the way I said. |
Can you tell if there is an easier way to implenet this code to generate all styles in order ? with "git apply" |
See #1751 |
@docppp with "git apply" somehow wrote "corrupt patch at line 7" (used VScode and GitBash). I wrote by hand and it works! Notice that in my webui.py different coordinates (in urs "@@-560,9" in my it starts at 582). Maybe with last update it moved. (I can be easy wrong with anything bcs started learn only for this task) Anyway, wrote by hand and it works! Wanna ask is there anyways to add "Prompts from file or textbox" script in Fooocus UI? |
Im writing it from head, so this may need some tweaks but if you replace body of a queue_start function with following, it should work:
@mashb1t (longshoot, but @lllyasviel as well) |
@docppp it works, thank you!
But after test got one issue. "Fooocus V2" turns off after first prompt so "Fooocus V2 Expansion" doesn't write on 2nd, 3nd prompts. Maybe you know why ? |
@docppp your queue proposal does indeed provide flexibility, but for queueing a few more things have to be considered:
AFAIK Gradio was originally implemented based on the assumption that it is used on a private machine for personal use to make it as easy as possible for users to generate images (135#comment, 501 and 713 supporting this claim), for which it works great, , with multi-user capabilities as an afterthought (see points above). The community now more and more patches the code to make it work for other scenarios better. It's hard to evaluate the full picture here without knowing the plans for the future of Fooocus. I really like the approach you took and would like to offer help to optimise the code to fulfill above mentioned points. This will most likely be an advanced feature, so we might also hide it at first and not show the buttons directly before activating a checkbox in Let's also hear the opinion of other users. Your suggestions are welcome! |
Thanks for the thorough comment Mashb1t! It excellently highlights some concerns like infinite queue and clogging the GPU. Also, docppp should provide some examples of how to use this feature, as I have tried it but it doesn't work. This all looks very promising, so I am more than willing to help in areas I can. |
Tbh, I didnt even consider multi user scenario. As you said "assumption that it is used on a private machine for personal use", but if Fooocus is put into multi user direction, then indeed, queue system should be well thought thru. I dont quite understand "default queue size" and "Gradio output" points. This type of queue basically simulates setting the option, typing the prompt and clicking generate one by one by user. If you referring to the gallery being shown after generation, adding a limit is a very simple solution. I have prepared more clean version of my idea here #1773 @LordMilutin The main idea is to create some sort of object that will remember everything you set up to the clicking of Queue button. It will be stored, so you can modify prompt or options, click once again and now you will have 2 sets of parameters stored. Clicking Generate will run as normal, but several times with those exact parameters. |
This isn't in 2.3.0... |
Didn't find it too(( |
My bad, accidentally referred to in milestone and automatically closed. |
Ah bummer, I looked forward to it in this release. |
@LordMilutin no, no ETA. I'll also be out for the next 2-3 weeks, feel free to check out the PR and make improvements based on it. |
Not technically a queue system but you can achieve something similar by putting the 20 prompts onto 20 lines of a wildcard file and triggering that using the |
Is this being worked on? |
Is there tutorial on this somewhere? |
|
Thank you very much bro 😁 |
Indeed, but I do not have control over it. If I put 20 prompts, and I run it 20 times, I can have the same prompt repeat multiple times, while some prompts will never trigger. |
There is an option to control this: |
I will try it. For queue, it worked like the first option. |
@LordMilutin you'll get 20 images, one for each line of the wildcard file. |
I guessed so, that's why I prefer queue option, as I would leave it overnight and I would get 400 images. You may argue that I can put 400 lines in a wildcard, but that is tedious, and I can get the same result, as seeds can repeat that way. 😢 |
@LordMilutin you may also set image number to 400 and it uses modulo on the wildcards file, so repeats your prompt every 20th iteration with a different seed if necessary. Just make sure not to check disable_seed_increment. |
Any help on how to do that? |
@LordMilutin you can increase this value in the config.txt, please check out the config modification example file with all possible options. Make sure your last line before } doesn't end in a comma. |
Hello!
I would like to know if it's possible to implement a prompt queue.
For example, I have about 20 prompts that need to generate 30 images.
Instead of waiting for the queue to finish for each prompt one by one and retyping another one, it would be awesome if we had a queue prompt option so that we could leave as many prompts as we want and leave the PC overnight to generate them, without user input in-between.
Please let me know if this is feasible, as I think it would tremendously improve this app.
Thanks!
The text was updated successfully, but these errors were encountered: