FAQ: How to create image in every single style with just one click #1751
Replies: 8 comments 1 reply
-
@docppp thank you for the explanation, much appreciated! |
Beta Was this translation helpful? Give feedback.
-
@docppp i want to thank you for your effort and code works great! I just made the required changes and when i hit generate, it generates all styles. The main problem for me is, i have to revert to backup version of the "webui.py" to be using the version (without generating all the styles). Is it possible for you to add a checbox enabled function to generate all the styles, instead of modifying the generate button function ? So that, when the checbox is enabled --> " .then(fn=queue_start " activates. I dont know if its possible. Because this way, i will not have to revert between the backup webui and the modified one. I want to thank you again for your efforts. ...or instead of putting a "checkbox enabled", may be an additional button as "Generate-ALL" button, for the function
to proceed.. |
Beta Was this translation helpful? Give feedback.
-
When you click Stop, it can't stop, it can only close the program. And wouldn't it be nice to have a check box to tell if it works? |
Beta Was this translation helpful? Give feedback.
-
@simartem |
Beta Was this translation helpful? Give feedback.
-
can you please help to make it more clear? i have trouble to understand the step above. thank you |
Beta Was this translation helpful? Give feedback.
-
the main code in the first post used to work for me but somehow i updated fooocus and i cant run to generate "all styles" with one click. Is there any way to fix the code for latest version ? |
Beta Was this translation helpful? Give feedback.
-
Same problem. Doesn't work in version 2.3.1 |
Beta Was this translation helpful? Give feedback.
-
I wish to use it a picture that I have alreay made how can I do it? how can I restore the original settings? |
Beta Was this translation helpful? Give feedback.
-
Note: This instruction is intended for non-programmers
There has been a lot of discussion lately about a "style preview" to make it easier for the user to see what a particular style looks like. Since there's no one good way to integrate such a demo, here's a quick guide to generating a ton of images yourself. Keep in mind that python is space-sensitive so all lines must have proper indentation.
1. Disable auto-update on run.bat
Replace whole content of
entry_with_update.py
with following:2. Add code that will iterate over all styles
Below lines that starts with
import
orfrom
paste the following:3. Override behavior of Generate button
Find the line starting with
generate_button.click(lambda
and a few lines below replace.then(fn=generate_clicked
with
.then(fn=queue_start
4. Run Fooocus with run.bat as normal
Enter any prompt you like and generate. For better comparison disable random seed. Every single style will be used once, no matter what you select in Style tab.
Beta Was this translation helpful? Give feedback.
All reactions