| 
									
										
										
										
											2022-09-29 17:46:23 -05:00
										 |  |  | import sys | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-09-03 12:08:45 +03:00
										 |  |  | import gradio as gr | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-22 19:05:03 +03:00
										 |  |  | from modules import shared_cmd_options, shared_gradio_themes, options, shared_items, sd_models_types | 
					
						
							| 
									
										
										
										
											2023-05-10 09:02:23 +03:00
										 |  |  | from modules.paths_internal import models_path, script_path, data_path, sd_configs_path, sd_default_config, sd_model_file, default_sd_model_file, extensions_dir, extensions_builtin_dir  # noqa: F401 | 
					
						
							| 
									
										
										
										
											2023-08-09 10:25:35 +03:00
										 |  |  | from modules import util | 
					
						
							| 
									
										
										
										
											2022-11-27 11:52:53 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-09 10:25:35 +03:00
										 |  |  | cmd_opts = shared_cmd_options.cmd_opts | 
					
						
							|  |  |  | parser = shared_cmd_options.parser | 
					
						
							| 
									
										
										
										
											2022-09-11 07:11:27 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-21 15:07:10 +03:00
										 |  |  | batch_cond_uncond = True  # old field, unused now in favor of shared.opts.batch_cond_uncond | 
					
						
							| 
									
										
										
										
											2023-08-22 18:49:08 +03:00
										 |  |  | parallel_processing_allowed = True | 
					
						
							| 
									
										
										
										
											2022-09-13 22:18:07 +00:00
										 |  |  | styles_filename = cmd_opts.styles_file | 
					
						
							| 
									
										
										
										
											2023-08-09 10:25:35 +03:00
										 |  |  | config_filename = cmd_opts.ui_settings_file | 
					
						
							| 
									
										
										
										
											2022-09-24 09:29:20 -04:00
										 |  |  | hide_dirs = {"visible": not cmd_opts.hide_ui_dir_config} | 
					
						
							| 
									
										
										
										
											2023-05-17 20:22:38 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-09 10:25:35 +03:00
										 |  |  | demo = None | 
					
						
							| 
									
										
										
										
											2023-01-30 00:25:30 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-09 10:25:35 +03:00
										 |  |  | device = None | 
					
						
							| 
									
										
										
										
											2023-01-30 00:25:30 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-09 10:25:35 +03:00
										 |  |  | weight_load_location = None | 
					
						
							| 
									
										
										
										
											2022-09-03 12:08:45 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-09 10:25:35 +03:00
										 |  |  | xformers_available = False | 
					
						
							| 
									
										
										
										
											2023-05-02 09:08:00 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-09 10:25:35 +03:00
										 |  |  | hypernetworks = {} | 
					
						
							| 
									
										
										
										
											2023-05-02 09:08:00 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-09 10:25:35 +03:00
										 |  |  | loaded_hypernetworks = [] | 
					
						
							| 
									
										
										
										
											2023-05-02 09:08:00 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-09 10:25:35 +03:00
										 |  |  | state = None | 
					
						
							| 
									
										
										
										
											2023-05-02 09:08:00 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-09 10:25:35 +03:00
										 |  |  | prompt_styles = None | 
					
						
							| 
									
										
										
										
											2023-05-02 09:08:00 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-09 10:25:35 +03:00
										 |  |  | interrogator = None | 
					
						
							| 
									
										
										
										
											2023-05-02 09:08:00 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-09 10:25:35 +03:00
										 |  |  | face_restorers = [] | 
					
						
							| 
									
										
										
										
											2023-05-02 09:08:00 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-09 10:25:35 +03:00
										 |  |  | options_templates = None | 
					
						
							|  |  |  | opts = None | 
					
						
							| 
									
										
										
										
											2023-08-09 15:06:03 +03:00
										 |  |  | restricted_opts = None | 
					
						
							| 
									
										
										
										
											2023-05-02 09:08:00 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-22 19:05:03 +03:00
										 |  |  | sd_model: sd_models_types.WebuiSdModel = None | 
					
						
							| 
									
										
										
										
											2023-05-02 09:08:00 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-01-30 00:25:30 +03:00
										 |  |  | settings_components = None | 
					
						
							| 
									
										
										
										
											2023-05-02 09:08:00 +03:00
										 |  |  | """assinged from ui.py, a mapping on setting names to gradio components repsponsible for those settings""" | 
					
						
							| 
									
										
										
										
											2023-01-30 00:25:30 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-09 10:25:35 +03:00
										 |  |  | tab_names = [] | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-01-02 19:42:10 +03:00
										 |  |  | latent_upscale_default_mode = "Latent" | 
					
						
							|  |  |  | latent_upscale_modes = { | 
					
						
							| 
									
										
										
										
											2023-01-04 05:12:06 -05:00
										 |  |  |     "Latent": {"mode": "bilinear", "antialias": False}, | 
					
						
							|  |  |  |     "Latent (antialiased)": {"mode": "bilinear", "antialias": True}, | 
					
						
							|  |  |  |     "Latent (bicubic)": {"mode": "bicubic", "antialias": False}, | 
					
						
							| 
									
										
										
										
											2023-01-04 05:36:18 -05:00
										 |  |  |     "Latent (bicubic antialiased)": {"mode": "bicubic", "antialias": True}, | 
					
						
							| 
									
										
										
										
											2023-01-04 05:12:06 -05:00
										 |  |  |     "Latent (nearest)": {"mode": "nearest", "antialias": False}, | 
					
						
							| 
									
										
										
										
											2023-01-05 20:17:39 +05:00
										 |  |  |     "Latent (nearest-exact)": {"mode": "nearest-exact", "antialias": False}, | 
					
						
							| 
									
										
										
										
											2023-01-02 19:42:10 +03:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-09-04 18:54:12 +03:00
										 |  |  | sd_upscalers = [] | 
					
						
							| 
									
										
										
										
											2022-09-03 12:08:45 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-16 17:53:56 +02:00
										 |  |  | clip_model = None | 
					
						
							| 
									
										
										
										
											2022-09-05 23:08:06 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-09-08 15:37:13 +02:00
										 |  |  | progress_print_out = sys.stdout | 
					
						
							| 
									
										
										
										
											2022-09-05 23:08:06 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-03-25 16:11:41 -04:00
										 |  |  | gradio_theme = gr.themes.Base() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-09 10:25:35 +03:00
										 |  |  | total_tqdm = None | 
					
						
							| 
									
										
										
										
											2023-03-25 16:11:41 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-09 10:25:35 +03:00
										 |  |  | mem_mon = None | 
					
						
							| 
									
										
										
										
											2023-05-17 21:45:26 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-09 10:25:35 +03:00
										 |  |  | options_section = options.options_section | 
					
						
							|  |  |  | OptionInfo = options.OptionInfo | 
					
						
							|  |  |  | OptionHTML = options.OptionHTML | 
					
						
							| 
									
										
										
										
											2023-08-01 00:24:48 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-09 10:25:35 +03:00
										 |  |  | natural_sort_key = util.natural_sort_key | 
					
						
							|  |  |  | listfiles = util.listfiles | 
					
						
							|  |  |  | html_path = util.html_path | 
					
						
							|  |  |  | html = util.html | 
					
						
							|  |  |  | walk_files = util.walk_files | 
					
						
							|  |  |  | ldm_print = util.ldm_print | 
					
						
							| 
									
										
										
										
											2023-08-01 00:24:48 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-09 10:25:35 +03:00
										 |  |  | reload_gradio_theme = shared_gradio_themes.reload_gradio_theme | 
					
						
							| 
									
										
										
										
											2023-08-01 00:24:48 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-09 10:25:35 +03:00
										 |  |  | list_checkpoint_tiles = shared_items.list_checkpoint_tiles | 
					
						
							|  |  |  | refresh_checkpoints = shared_items.refresh_checkpoints | 
					
						
							|  |  |  | list_samplers = shared_items.list_samplers | 
					
						
							|  |  |  | reload_hypernetworks = shared_items.reload_hypernetworks |