Allowed changing default values of advanced checkbox and image number
This commit is contained in:
		
							parent
							
								
									6e2126b112
								
							
						
					
					
						commit
						59b32e9dec
					
				| @ -1 +1 @@ | |||||||
| version = '2.1.708' | version = '2.1.709' | ||||||
|  | |||||||
| @ -130,6 +130,16 @@ default_positive_prompt = get_config_item_or_set_default( | |||||||
|     validator=lambda x: isinstance(x, str), |     validator=lambda x: isinstance(x, str), | ||||||
|     disable_empty_as_none=True |     disable_empty_as_none=True | ||||||
| ) | ) | ||||||
|  | default_advanced_checkbox = get_config_item_or_set_default( | ||||||
|  |     key='default_advanced_checkbox', | ||||||
|  |     default_value=False, | ||||||
|  |     validator=lambda x: isinstance(x, bool) | ||||||
|  | ) | ||||||
|  | default_image_number = get_config_item_or_set_default( | ||||||
|  |     key='default_image_number', | ||||||
|  |     default_value=2, | ||||||
|  |     validator=lambda x: isinstance(x, int) and x >= 1 and x <= 32 | ||||||
|  | ) | ||||||
| checkpoint_downloads = get_config_item_or_set_default( | checkpoint_downloads = get_config_item_or_set_default( | ||||||
|     key='checkpoint_downloads', |     key='checkpoint_downloads', | ||||||
|     default_value={ |     default_value={ | ||||||
|  | |||||||
| @ -1,3 +1,11 @@ | |||||||
|  | # 2.1.709 | ||||||
|  | 
 | ||||||
|  | * Allowed changing default values of advanced checkbox and image number. | ||||||
|  | 
 | ||||||
|  | # 2.1.707 | ||||||
|  | 
 | ||||||
|  | * Updated Gradio to v3.41.2. | ||||||
|  | 
 | ||||||
| # 2.1.703 | # 2.1.703 | ||||||
| 
 | 
 | ||||||
| * Fixed many previous problems related to inpaint. | * Fixed many previous problems related to inpaint. | ||||||
|  | |||||||
							
								
								
									
										6
									
								
								webui.py
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								webui.py
									
									
									
									
									
								
							| @ -91,7 +91,7 @@ with shared.gradio_root: | |||||||
|                     skip_button.click(skip_clicked, queue=False) |                     skip_button.click(skip_clicked, queue=False) | ||||||
|             with gr.Row(elem_classes='advanced_check_row'): |             with gr.Row(elem_classes='advanced_check_row'): | ||||||
|                 input_image_checkbox = gr.Checkbox(label='Input Image', value=False, container=False, elem_classes='min_check') |                 input_image_checkbox = gr.Checkbox(label='Input Image', value=False, container=False, elem_classes='min_check') | ||||||
|                 advanced_checkbox = gr.Checkbox(label='Advanced', value=False, container=False, elem_classes='min_check') |                 advanced_checkbox = gr.Checkbox(label='Advanced', value=modules.path.default_advanced_checkbox, container=False, elem_classes='min_check') | ||||||
|             with gr.Row(visible=False) as image_input_panel: |             with gr.Row(visible=False) as image_input_panel: | ||||||
|                 with gr.Tabs(): |                 with gr.Tabs(): | ||||||
|                     with gr.TabItem(label='Upscale or Variation') as uov_tab: |                     with gr.TabItem(label='Upscale or Variation') as uov_tab: | ||||||
| @ -183,12 +183,12 @@ with shared.gradio_root: | |||||||
|             inpaint_tab.select(lambda: ['inpaint', default_image], outputs=[current_tab, inpaint_input_image], queue=False, _js=down_js) |             inpaint_tab.select(lambda: ['inpaint', default_image], outputs=[current_tab, inpaint_input_image], queue=False, _js=down_js) | ||||||
|             ip_tab.select(lambda: 'ip', outputs=[current_tab], queue=False, _js=down_js) |             ip_tab.select(lambda: 'ip', outputs=[current_tab], queue=False, _js=down_js) | ||||||
| 
 | 
 | ||||||
|         with gr.Column(scale=1, visible=False) as advanced_column: |         with gr.Column(scale=1, visible=modules.path.default_advanced_checkbox) as advanced_column: | ||||||
|             with gr.Tab(label='Setting'): |             with gr.Tab(label='Setting'): | ||||||
|                 performance_selection = gr.Radio(label='Performance', choices=['Speed', 'Quality'], value='Speed') |                 performance_selection = gr.Radio(label='Performance', choices=['Speed', 'Quality'], value='Speed') | ||||||
|                 aspect_ratios_selection = gr.Radio(label='Aspect Ratios', choices=list(aspect_ratios.keys()), |                 aspect_ratios_selection = gr.Radio(label='Aspect Ratios', choices=list(aspect_ratios.keys()), | ||||||
|                                                    value=modules.path.default_aspect_ratio, info='width × height') |                                                    value=modules.path.default_aspect_ratio, info='width × height') | ||||||
|                 image_number = gr.Slider(label='Image Number', minimum=1, maximum=32, step=1, value=2) |                 image_number = gr.Slider(label='Image Number', minimum=1, maximum=32, step=1, value=modules.path.default_image_number) | ||||||
|                 negative_prompt = gr.Textbox(label='Negative Prompt', show_label=True, placeholder="Type prompt here.", |                 negative_prompt = gr.Textbox(label='Negative Prompt', show_label=True, placeholder="Type prompt here.", | ||||||
|                                              info='Describing what you do not want to see.', lines=2, |                                              info='Describing what you do not want to see.', lines=2, | ||||||
|                                              value=modules.path.default_negative_prompt) |                                              value=modules.path.default_negative_prompt) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user