-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Add headless generation of images, and batch processing of prompts in a json file, directly from CLI. #471
Conversation
Okay, both --headless with and without --batch /path/to/batch_prompts_file.json has now been tested and it works fine for both entry_with_update.py and launch.py. |
Hello, I also have the need to generate pictures in batches. My job is to convert a lot of text usage fooocus given by users into pictures and store them locally. But my fooocus is deployed in the cloud, so I need a software that gets the base64 encoding of the fooocus generated image. |
Your code file directly replaces the corresponding code in the fooocus, can you use it successfully like your example? |
[ How should the example call you provided be used? What I need is to change the way style is called every time. |
First of all, note that this is a Pull Request which is still awaiting approval. Here is an example what you could do, with the same prompt for every batch: my_batches.json
Then you would run it using either But, you could also combine my_batches.json
And then set the same prompt for the whole batch like this: |
I get an error after merging your PR. Any idea how to fix this? python entry_with_update.py --headless --prompt "Beautiful woman" |
Yeah, since there are now more parameters than when this PR was suggested, you are missing some of the parameters as indicated by |
Why do I still get an error when I modify the launch.py and add headless.py according to the method? launch.py: error: unrecognized arguments: --headless --batch |
It's a start. Can be developed further.
Tested in Colab with:
!python entry_with_update.py --headless --prompt "Beautiful woman"
and
!python launch.py --headless --prompt Wow
Will solve #246 , #385 and #484
After adding the --headless option, there could also be a --batch path/to/bulk_commands.json.
That way, the whole environment wouldn't need to be reloaded for every generation.