mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
feat: add checkbox and config to disable updating selected styles when describing an image (#3430)
* feat: add checkbox and config to disable updating selected styles when describing an image * i18n: add translation for checkbox label * feat: change describe content type from Radio to CheckboxGroup, add config * fix: cast set to list when styles contains elements * feat: sort styles after describe
This commit is contained in:
@@ -702,6 +702,19 @@ default_inpaint_mask_sam_model = get_config_item_or_set_default(
|
||||
expected_type=str
|
||||
)
|
||||
|
||||
default_describe_apply_prompts_checkbox = get_config_item_or_set_default(
|
||||
key='default_describe_apply_prompts_checkbox',
|
||||
default_value=True,
|
||||
validator=lambda x: isinstance(x, bool),
|
||||
expected_type=bool
|
||||
)
|
||||
default_describe_content_type = get_config_item_or_set_default(
|
||||
key='default_describe_content_type',
|
||||
default_value=[modules.flags.describe_type_photo],
|
||||
validator=lambda x: all(k in modules.flags.describe_types for k in x),
|
||||
expected_type=list
|
||||
)
|
||||
|
||||
config_dict["default_loras"] = default_loras = default_loras[:default_max_lora_number] + [[True, 'None', 1.0] for _ in range(default_max_lora_number - len(default_loras))]
|
||||
|
||||
# mapping config to meta parameter
|
||||
|
||||
@@ -96,6 +96,7 @@ inpaint_options = [inpaint_option_default, inpaint_option_detail, inpaint_option
|
||||
|
||||
describe_type_photo = 'Photograph'
|
||||
describe_type_anime = 'Art/Anime'
|
||||
describe_types = [describe_type_photo, describe_type_anime]
|
||||
|
||||
sdxl_aspect_ratios = [
|
||||
'704*1408', '704*1344', '768*1344', '768*1280', '832*1216', '832*1152',
|
||||
|
||||
Reference in New Issue
Block a user