-
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 preset selection to Gradio UI (session based) #1570
Add preset selection to Gradio UI (session based) #1570
Conversation
uses meta parsing to set presets in user session (UI elements only)
5aa8719
to
ccfd4f5
Compare
Sorry, i do not completely get what you are referring to. As of https://github.com/lllyasviel/Fooocus/tree/main/presets the "turbo" preset is not a default preset and you most likely have created this yourself, please double check the content there. All options from https://github.com/lllyasviel/Fooocus/blob/main/modules/config.py#L318 (except model download) are mapped to their specific meta identifier counterpart, so they can be set using the same logic as the meta prompt parser, which is intended. Nevertheless, there should not be any overlaps between the features which are user facing. Please elaborate where exactly you have issues and send the content of your turbo.json preset if this one causes issues for you. |
It has nothing to do with turbo, the resolution and style of other default presets cannot be loaded. |
thank you for the feedback, i'll double-check tomorrow |
@xhoxye both resolution and style are now processed correctly + i've also added style sorting after preset load. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
It's working very well for me. Thanks so much! Here's some feedback:
I'd also like to suggest some new features:
Thanks again! |
@peterng1618 all good ideas, but let's keep this MR simple and extend the functionality after it has been merged. |
useful for cloud provisioning to prevent model switches and keep models loaded
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@3Diva this PR is still awaiting review and has not yet been merged. You can already use the feature by checking out the git branch |
@mashb1t Oh thank you for the link, I appreciate it. I'm looking forward to checking out your fork of Fooocus! :D The presets sound like a great idea! I often use LCM models and Turbo models with Fooocus and it can be a pain to set up and change all the settings every time. Having presets for a quick one button enable of those settings would be amazingly cool and SO HELPFUL! 😊 I hope that a preset system gets added to vanilla Fooocus too, even if the creator of it chooses to hide it behind the "Advanced" tab, it would be nice to have presets available in Fooocus. |
# Conflicts: # modules/config.py # presets/realistic.json
2.1.864 Could not load "default_overwrite_step" this parameter? |
# Conflicts: # launch.py # modules/config.py
…ocus into feature/add-preset-selection
# Conflicts: # args_manager.py # launch.py # modules/config.py # modules/meta_parser.py # webui.py
# Conflicts: # launch.py # modules/config.py # webui.py
This PR implements a preset selection via radio buttons, which only affects the current gradio session and does not change settings globally.
To achieve this, the logic of the recently implemented meta_parser is used to update the elements in gradio. If a preset file doesn't include specific keys mentioned in modules.config.possible_preset_keys, the initial config is used (incl. preset set in args).
Also directly downloads requirements of a specific preset, allowing usage without having to restart the app (very helpful for Colab).
This offers the flexibility to change all preset keys without having to reload the UI while still keeping the preset set on application start as default/fallback.
Improves #1484