mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
feat: add config for selected tab, rename desc to describe
This commit is contained in:
+10
-4
@@ -493,16 +493,22 @@ default_inpaint_engine_version = get_config_item_or_set_default(
|
||||
validator=lambda x: x in modules.flags.inpaint_engine_versions,
|
||||
expected_type=str
|
||||
)
|
||||
default_selected_image_input_tab_id = get_config_item_or_set_default(
|
||||
key='default_selected_image_input_tab_id',
|
||||
default_value=modules.flags.default_input_image_tab,
|
||||
validator=lambda x: x in modules.flags.input_image_tab_ids,
|
||||
expected_type=str
|
||||
)
|
||||
default_uov_method = get_config_item_or_set_default(
|
||||
key='default_uov_method',
|
||||
default_value=modules.flags.disabled,
|
||||
validator=lambda x: x in modules.flags.uov_list,
|
||||
expected_type=int
|
||||
expected_type=str
|
||||
)
|
||||
default_controlnet_image_count = get_config_item_or_set_default(
|
||||
key='default_controlnet_image_count',
|
||||
default_value=4,
|
||||
validator=lambda x: x > 0,
|
||||
validator=lambda x: isinstance(x, int) and x > 0,
|
||||
expected_type=int
|
||||
)
|
||||
default_ip_images = {}
|
||||
@@ -529,13 +535,13 @@ for image_count in range(default_controlnet_image_count):
|
||||
default_ip_stop_ats[image_count] = get_config_item_or_set_default(
|
||||
key=f'default_ip_stop_at_{image_count}',
|
||||
default_value=default_end,
|
||||
validator=lambda x: x is None or isinstance(x, str) and os.path.exists(x),
|
||||
validator=lambda x: isinstance(x, float) and 0 <= x <= 1,
|
||||
expected_type=float
|
||||
)
|
||||
default_ip_weights[image_count] = get_config_item_or_set_default(
|
||||
key=f'default_ip_weight_{image_count}',
|
||||
default_value=default_weight,
|
||||
validator=lambda x: x is None or isinstance(x, str) and os.path.exists(x),
|
||||
validator=lambda x: isinstance(x, float) and 0 <= x <= 2,
|
||||
expected_type=float
|
||||
)
|
||||
|
||||
|
||||
+5
-2
@@ -67,6 +67,9 @@ default_vae = 'Default (model)'
|
||||
|
||||
refiner_swap_method = 'joint'
|
||||
|
||||
default_input_image_tab = 'uov_tab'
|
||||
input_image_tab_ids = ['uov_tab', 'ip_tab', 'inpaint_tab', 'describe_tab', 'enhance_tab', 'metadata_tab']
|
||||
|
||||
cn_ip = "ImagePrompt"
|
||||
cn_ip_face = "FaceSwap"
|
||||
cn_canny = "PyraCanny"
|
||||
@@ -91,8 +94,8 @@ inpaint_option_detail = 'Improve Detail (face, hand, eyes, etc.)'
|
||||
inpaint_option_modify = 'Modify Content (add objects, change background, etc.)'
|
||||
inpaint_options = [inpaint_option_default, inpaint_option_detail, inpaint_option_modify]
|
||||
|
||||
desc_type_photo = 'Photograph'
|
||||
desc_type_anime = 'Art/Anime'
|
||||
describe_type_photo = 'Photograph'
|
||||
describe_type_anime = 'Art/Anime'
|
||||
|
||||
sdxl_aspect_ratios = [
|
||||
'704*1408', '704*1344', '768*1344', '768*1280', '832*1216', '832*1152',
|
||||
|
||||
Reference in New Issue
Block a user