From 64176bf77d66bf8eb01c0a69e21a700d7d7f5e39 Mon Sep 17 00:00:00 2001 From: Thomas Young <35073576+DrakeRichards@users.noreply.github.com> Date: Fri, 28 Apr 2023 17:06:22 -0500 Subject: [PATCH 001/282] Added notification.mp3 support --- .gitignore | 1 + modules/ui.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 06c8f11c5..26240bd12 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ venv /*.bat /*.sh /*.txt +/notification.mp3 !webui.bat !webui.sh diff --git a/modules/ui.py b/modules/ui.py index c811cd3eb..b20dc26a1 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1387,6 +1387,9 @@ def create_ui(): with gr.TabItem(label, id=ifid, elem_id='tab_' + ifid): interface.render() + if os.path.exists(os.path.join(script_path, "notification.mp3")): + audio_notification = gr.Audio(interactive=False, value=os.path.join(script_path, "notification.mp3"), elem_id="audio_notification", visible=False) + text_settings = gr.Textbox(elem_id="settings_json", value=lambda: opts.dumpjson(), visible=False) settings_submit.click( fn=wrap_gradio_call(run_settings, extra_outputs=[gr.update()]), From 5dc9743592f7d41eb5efd49c10792f63ab783d57 Mon Sep 17 00:00:00 2001 From: nekoworkshop Date: Sat, 29 Apr 2023 14:41:37 -0400 Subject: [PATCH 002/282] Initial implementation --- modules/generation_parameters_copypaste.py | 2 +- scripts/xyz_grid.py | 42 ++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/modules/generation_parameters_copypaste.py b/modules/generation_parameters_copypaste.py index 964432d72..b6609e224 100644 --- a/modules/generation_parameters_copypaste.py +++ b/modules/generation_parameters_copypaste.py @@ -316,7 +316,7 @@ infotext_to_setting_name_mapping = [ ('Token merging merge attention', 'token_merging_merge_attention'), ('Token merging merge cross attention', 'token_merging_merge_cross_attention'), ('Token merging merge mlp', 'token_merging_merge_mlp'), - ('Token merging maximum downsampling', 'token_merging_maximum_downsampling'), + ('Token merging maximum downsampling', 'token_merging_maximum_down_sampling'), ('Token merging stride x', 'token_merging_stride_x'), ('Token merging stride y', 'token_merging_stride_y') ] diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py index 700cc599e..68c294959 100644 --- a/scripts/xyz_grid.py +++ b/scripts/xyz_grid.py @@ -145,6 +145,39 @@ def apply_face_restore(p, opt, x): p.restore_faces = is_active +def apply_token_merging1(p, x, xs): + is_active = x.lower() in ('true', 'yes', 'y', '1') + p.override_settings["token_merging"] = is_active + +def apply_token_merging_ratio_hr(p, x, xs): + p.override_settings["token_merging_ratio_hr"] = x + +def apply_token_merging_ratio(p, x, xs): + p.override_settings["token_merging_ratio"] = x + +def apply_token_merging_hr_only(p, x, xs): + is_active = x.lower() in ('true', 'yes', 'y', '1') + p.override_settings["token_merging_hr_only"] = is_active + +def apply_token_merging_random(p, x, xs): + is_active = x.lower() in ('true', 'yes', 'y', '1') + p.override_settings["token_merging_random"] = is_active + +def apply_token_merging_attention(p, x, xs): + is_active = x.lower() in ('true', 'yes', 'y', '1') + p.override_settings["token_merging_merge_attention"] = is_active + +def apply_token_merging_cross_attention(p, x, xs): + is_active = x.lower() in ('true', 'yes', 'y', '1') + p.override_settings["token_merging_merge_cross_attention"] = is_active + +def apply_token_merging_mlp(p, x, xs): + is_active = x.lower() in ('true', 'yes', 'y', '1') + p.override_settings["token_merging_merge_mlp"] = is_active + +def apply_token_merging_maximum_down_sampling (p, x, xs): + p.override_settings["token_merging_maximum_down_sampling"] = x + #opts.data["token_merging_maximum_down_sampling"] = x def format_value_add_label(p, opt, x): if type(x) == float: @@ -226,6 +259,15 @@ axis_options = [ AxisOption("Styles", str, apply_styles, choices=lambda: list(shared.prompt_styles.styles)), AxisOption("UniPC Order", int, apply_uni_pc_order, cost=0.5), AxisOption("Face restore", str, apply_face_restore, format_value=format_value), + AxisOption("Token Merging", str, apply_token_merging1), + AxisOption("Token merging ratio",float,apply_token_merging_ratio), + AxisOption("Token merging ratio for Hires fix",float,apply_token_merging_ratio_hr), + AxisOption("Token merging apply only to Hires fix",str,apply_token_merging_hr_only, choices= lambda: ["Yes","No"]), + AxisOption("Token Merging use random pertubations",str,apply_token_merging_random, choices = lambda: ["Yes","No"]), + AxisOption("Token Merging merge attention", str, apply_token_merging_attention, choices= lambda: ["Yes","No"]), + AxisOption("Token Merging merge cross attention", str, apply_token_merging_cross_attention, choices= lambda: ["Yes","No"]), + AxisOption("Token Merging merge mlp", str, apply_token_merging_mlp, choices= lambda: ["Yes","No"]), + AxisOption("Token Merging maxium down sampling", int, apply_token_merging_maximum_down_sampling, choices= lambda: ["1","2","4","8"]) ] From 0e165ed2ee45238133d0132c018280c97eb0f053 Mon Sep 17 00:00:00 2001 From: nekoworkshop Date: Sat, 29 Apr 2023 17:18:01 -0400 Subject: [PATCH 003/282] Use SharedSettingsStackHelper --- scripts/xyz_grid.py | 54 ++++++++++++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 15 deletions(-) diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py index 68c294959..2d785bf04 100644 --- a/scripts/xyz_grid.py +++ b/scripts/xyz_grid.py @@ -145,39 +145,40 @@ def apply_face_restore(p, opt, x): p.restore_faces = is_active -def apply_token_merging1(p, x, xs): - is_active = x.lower() in ('true', 'yes', 'y', '1') - p.override_settings["token_merging"] = is_active - def apply_token_merging_ratio_hr(p, x, xs): - p.override_settings["token_merging_ratio_hr"] = x + opts.data["token_merging_ratio_hr"] = x def apply_token_merging_ratio(p, x, xs): - p.override_settings["token_merging_ratio"] = x + opts.data["token_merging_ratio"] = x def apply_token_merging_hr_only(p, x, xs): is_active = x.lower() in ('true', 'yes', 'y', '1') - p.override_settings["token_merging_hr_only"] = is_active + opts.data["token_merging_hr_only"] = is_active def apply_token_merging_random(p, x, xs): is_active = x.lower() in ('true', 'yes', 'y', '1') - p.override_settings["token_merging_random"] = is_active + opts.data["token_merging_random"] = is_active def apply_token_merging_attention(p, x, xs): is_active = x.lower() in ('true', 'yes', 'y', '1') - p.override_settings["token_merging_merge_attention"] = is_active + opts.data["token_merging_merge_attention"] = is_active def apply_token_merging_cross_attention(p, x, xs): is_active = x.lower() in ('true', 'yes', 'y', '1') - p.override_settings["token_merging_merge_cross_attention"] = is_active + opts.data["token_merging_merge_cross_attention"] = is_active def apply_token_merging_mlp(p, x, xs): is_active = x.lower() in ('true', 'yes', 'y', '1') - p.override_settings["token_merging_merge_mlp"] = is_active + opts.data["token_merging_merge_mlp"] = is_active def apply_token_merging_maximum_down_sampling (p, x, xs): - p.override_settings["token_merging_maximum_down_sampling"] = x - #opts.data["token_merging_maximum_down_sampling"] = x + opts.data["token_merging_maximum_down_sampling"] = x + +def apply_token_merging_stride_x(p, x, xs): + opts.data["token_merging_stride_x"] = x + +def apply_token_merging_stride_y(p, x, xs): + opts.data["token_merging_stride_y"] = x def format_value_add_label(p, opt, x): if type(x) == float: @@ -259,7 +260,6 @@ axis_options = [ AxisOption("Styles", str, apply_styles, choices=lambda: list(shared.prompt_styles.styles)), AxisOption("UniPC Order", int, apply_uni_pc_order, cost=0.5), AxisOption("Face restore", str, apply_face_restore, format_value=format_value), - AxisOption("Token Merging", str, apply_token_merging1), AxisOption("Token merging ratio",float,apply_token_merging_ratio), AxisOption("Token merging ratio for Hires fix",float,apply_token_merging_ratio_hr), AxisOption("Token merging apply only to Hires fix",str,apply_token_merging_hr_only, choices= lambda: ["Yes","No"]), @@ -267,7 +267,9 @@ axis_options = [ AxisOption("Token Merging merge attention", str, apply_token_merging_attention, choices= lambda: ["Yes","No"]), AxisOption("Token Merging merge cross attention", str, apply_token_merging_cross_attention, choices= lambda: ["Yes","No"]), AxisOption("Token Merging merge mlp", str, apply_token_merging_mlp, choices= lambda: ["Yes","No"]), - AxisOption("Token Merging maxium down sampling", int, apply_token_merging_maximum_down_sampling, choices= lambda: ["1","2","4","8"]) + AxisOption("Token Merging maxium down sampling", int, apply_token_merging_maximum_down_sampling, choices= lambda: ["1","2","4","8"]), + AxisOption("Token Merging Stride - X", int, apply_token_merging_stride_x, choices= lambda: ["2","4","6","8"]), + AxisOption("Token Merging Stride - Y", int, apply_token_merging_stride_y, choices= lambda: ["2","4","6","8"]) ] @@ -384,11 +386,23 @@ def draw_xyz_grid(p, xs, ys, zs, x_labels, y_labels, z_labels, cell, draw_legend class SharedSettingsStackHelper(object): def __enter__(self): + #Save overridden settings so they can be restored later. self.CLIP_stop_at_last_layers = opts.CLIP_stop_at_last_layers self.vae = opts.sd_vae self.uni_pc_order = opts.uni_pc_order + self.token_merging_ratio_hr = opts.token_merging_ratio_hr + self.token_merging_ratio = opts.token_merging_ratio + self.token_merging_hr_only = opts.token_merging_hr_only + self.token_merging_random = opts.token_merging_random + self.token_merging_merge_attention = opts.token_merging_merge_attention + self.token_merging_merge_cross_attention = opts.token_merging_merge_cross_attention + self.token_merging_merge_mlp = opts.token_merging_merge_mlp + self.token_merging_maximum_down_sampling = opts.token_merging_maximum_down_sampling + self.token_merging_stride_x = opts.token_merging_stride_x + self.token_merging_stride_y = opts.token_merging_stride_y def __exit__(self, exc_type, exc_value, tb): + #Restore overriden settings after plot generation. opts.data["sd_vae"] = self.vae opts.data["uni_pc_order"] = self.uni_pc_order sd_models.reload_model_weights() @@ -396,6 +410,16 @@ class SharedSettingsStackHelper(object): opts.data["CLIP_stop_at_last_layers"] = self.CLIP_stop_at_last_layers + opts.data["token_merging_ratio_hr"] = self.token_merging_ratio_hr + opts.data["token_merging_ratio"] = self.token_merging_ratio + opts.data["token_merging_hr_only"] = self.token_merging_hr_only + opts.data["token_merging_random"] = self.token_merging_random + opts.data["token_merging_merge_attention"] = self.token_merging_merge_attention + opts.data["token_merging_merge_cross_attention"] = self.token_merging_merge_cross_attention + opts.data["token_merging_merge_mlp"] = self.token_merging_merge_mlp + opts.data["token_merging_maximum_down_sampling"] = self.token_merging_maximum_down_sampling + opts.data["token_merging_stride_x"] = self.token_merging_stride_x + opts.data["token_merging_stride_y"] = self.token_merging_stride_y re_range = re.compile(r"\s*([+-]?\s*\d+)\s*-\s*([+-]?\s*\d+)(?:\s*\(([+-]\d+)\s*\))?\s*") re_range_float = re.compile(r"\s*([+-]?\s*\d+(?:.\d*)?)\s*-\s*([+-]?\s*\d+(?:.\d*)?)(?:\s*\(([+-]\d+(?:.\d*)?)\s*\))?\s*") From e97443ff1b9bc76d48f5eee1e8d8c88a8a6b23f3 Mon Sep 17 00:00:00 2001 From: nekoworkshop Date: Sat, 29 Apr 2023 17:37:58 -0400 Subject: [PATCH 004/282] Adjust axis names to be shorter. --- scripts/xyz_grid.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py index 2d785bf04..f47f0d167 100644 --- a/scripts/xyz_grid.py +++ b/scripts/xyz_grid.py @@ -260,16 +260,16 @@ axis_options = [ AxisOption("Styles", str, apply_styles, choices=lambda: list(shared.prompt_styles.styles)), AxisOption("UniPC Order", int, apply_uni_pc_order, cost=0.5), AxisOption("Face restore", str, apply_face_restore, format_value=format_value), - AxisOption("Token merging ratio",float,apply_token_merging_ratio), - AxisOption("Token merging ratio for Hires fix",float,apply_token_merging_ratio_hr), - AxisOption("Token merging apply only to Hires fix",str,apply_token_merging_hr_only, choices= lambda: ["Yes","No"]), - AxisOption("Token Merging use random pertubations",str,apply_token_merging_random, choices = lambda: ["Yes","No"]), - AxisOption("Token Merging merge attention", str, apply_token_merging_attention, choices= lambda: ["Yes","No"]), - AxisOption("Token Merging merge cross attention", str, apply_token_merging_cross_attention, choices= lambda: ["Yes","No"]), - AxisOption("Token Merging merge mlp", str, apply_token_merging_mlp, choices= lambda: ["Yes","No"]), - AxisOption("Token Merging maxium down sampling", int, apply_token_merging_maximum_down_sampling, choices= lambda: ["1","2","4","8"]), - AxisOption("Token Merging Stride - X", int, apply_token_merging_stride_x, choices= lambda: ["2","4","6","8"]), - AxisOption("Token Merging Stride - Y", int, apply_token_merging_stride_y, choices= lambda: ["2","4","6","8"]) + AxisOption("ToMe ratio",float,apply_token_merging_ratio), + AxisOption("ToMe ratio for Hires fix",float,apply_token_merging_ratio_hr), + AxisOption("ToMe apply only to Hires fix",str,apply_token_merging_hr_only, choices= lambda: ["Yes","No"]), + AxisOption("ToMe random pertubations",str,apply_token_merging_random, choices = lambda: ["Yes","No"]), + AxisOption("ToMe merge attention", str, apply_token_merging_attention, choices= lambda: ["Yes","No"]), + AxisOption("ToMe merge cross attention", str, apply_token_merging_cross_attention, choices= lambda: ["Yes","No"]), + AxisOption("ToMe merge mlp", str, apply_token_merging_mlp, choices= lambda: ["Yes","No"]), + AxisOption("ToMe maximum down sampling", int, apply_token_merging_maximum_down_sampling, choices= lambda: ["1","2","4","8"]), + AxisOption("ToMe Stride - X", int, apply_token_merging_stride_x, choices= lambda: ["2","4","6","8"]), + AxisOption("ToMe Stride - Y", int, apply_token_merging_stride_y, choices= lambda: ["2","4","6","8"]) ] From c4936fc92784c452bb067b5097b54476400b1abc Mon Sep 17 00:00:00 2001 From: nekoworkshop Date: Sat, 29 Apr 2023 17:59:00 -0400 Subject: [PATCH 005/282] Extra information in ToMe related settings --- modules/shared.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/shared.py b/modules/shared.py index 0dfefa8c4..dc8ac5067 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -422,14 +422,14 @@ options_templates.update(options_section(('sampler-params', "Sampler parameters" options_templates.update(options_section(('token_merging', 'Token Merging'), { "token_merging": OptionInfo(False, "Enable redundant token merging via tomesd. This can provide significant speed and memory improvements.", gr.Checkbox), - "token_merging_ratio": OptionInfo(0.5, "Merging Ratio", gr.Slider, {"minimum": 0, "maximum": 0.9, "step": 0.1}), + "token_merging_ratio": OptionInfo(0.5, "Merging Ratio. Higher merging ratio = faster generation, smaller VRAM usage, lower quality.", gr.Slider, {"minimum": 0, "maximum": 0.9, "step": 0.1}), "token_merging_hr_only": OptionInfo(True, "Apply only to high-res fix pass. Disabling can yield a ~20-35% speedup on contemporary resolutions.", gr.Checkbox), "token_merging_ratio_hr": OptionInfo(0.5, "Merging Ratio (high-res pass) - If 'Apply only to high-res' is enabled, this will always be the ratio used.", gr.Slider, {"minimum": 0, "maximum": 0.9, "step": 0.1}), "token_merging_random": OptionInfo(False, "Use random perturbations - Can improve outputs for certain samplers. For others, it may cause visual artifacting.", gr.Checkbox), - "token_merging_merge_attention": OptionInfo(True, "Merge attention", gr.Checkbox), - "token_merging_merge_cross_attention": OptionInfo(False, "Merge cross attention", gr.Checkbox), - "token_merging_merge_mlp": OptionInfo(False, "Merge mlp", gr.Checkbox), - "token_merging_maximum_down_sampling": OptionInfo(1, "Maximum down sampling", gr.Dropdown, lambda: {"choices": ["1", "2", "4", "8"]}), + "token_merging_merge_attention": OptionInfo(True, "Merge attention (Recommend on)", gr.Checkbox), + "token_merging_merge_cross_attention": OptionInfo(False, "Merge cross attention (Recommend off)", gr.Checkbox), + "token_merging_merge_mlp": OptionInfo(False, "Merge mlp (Strongly recommend off)", gr.Checkbox), + "token_merging_maximum_down_sampling": OptionInfo(1, "Maximum down sampling", gr.Radio, lambda: {"choices": [1, 2, 4, 8]}), "token_merging_stride_x": OptionInfo(2, "Stride - X", gr.Slider, {"minimum": 2, "maximum": 8, "step": 2}), "token_merging_stride_y": OptionInfo(2, "Stride - Y", gr.Slider, {"minimum": 2, "maximum": 8, "step": 2}) })) From df965a837bb6374b25b4f274b752805d68e38634 Mon Sep 17 00:00:00 2001 From: nekoworkshop Date: Sat, 29 Apr 2023 23:01:31 -0400 Subject: [PATCH 006/282] Remove less useful ToMe options from the xyz plot --- scripts/xyz_grid.py | 48 +-------------------------------------------- 1 file changed, 1 insertion(+), 47 deletions(-) diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py index f47f0d167..d216d2fef 100644 --- a/scripts/xyz_grid.py +++ b/scripts/xyz_grid.py @@ -151,35 +151,10 @@ def apply_token_merging_ratio_hr(p, x, xs): def apply_token_merging_ratio(p, x, xs): opts.data["token_merging_ratio"] = x -def apply_token_merging_hr_only(p, x, xs): - is_active = x.lower() in ('true', 'yes', 'y', '1') - opts.data["token_merging_hr_only"] = is_active - def apply_token_merging_random(p, x, xs): is_active = x.lower() in ('true', 'yes', 'y', '1') opts.data["token_merging_random"] = is_active -def apply_token_merging_attention(p, x, xs): - is_active = x.lower() in ('true', 'yes', 'y', '1') - opts.data["token_merging_merge_attention"] = is_active - -def apply_token_merging_cross_attention(p, x, xs): - is_active = x.lower() in ('true', 'yes', 'y', '1') - opts.data["token_merging_merge_cross_attention"] = is_active - -def apply_token_merging_mlp(p, x, xs): - is_active = x.lower() in ('true', 'yes', 'y', '1') - opts.data["token_merging_merge_mlp"] = is_active - -def apply_token_merging_maximum_down_sampling (p, x, xs): - opts.data["token_merging_maximum_down_sampling"] = x - -def apply_token_merging_stride_x(p, x, xs): - opts.data["token_merging_stride_x"] = x - -def apply_token_merging_stride_y(p, x, xs): - opts.data["token_merging_stride_y"] = x - def format_value_add_label(p, opt, x): if type(x) == float: x = round(x, 8) @@ -262,14 +237,7 @@ axis_options = [ AxisOption("Face restore", str, apply_face_restore, format_value=format_value), AxisOption("ToMe ratio",float,apply_token_merging_ratio), AxisOption("ToMe ratio for Hires fix",float,apply_token_merging_ratio_hr), - AxisOption("ToMe apply only to Hires fix",str,apply_token_merging_hr_only, choices= lambda: ["Yes","No"]), - AxisOption("ToMe random pertubations",str,apply_token_merging_random, choices = lambda: ["Yes","No"]), - AxisOption("ToMe merge attention", str, apply_token_merging_attention, choices= lambda: ["Yes","No"]), - AxisOption("ToMe merge cross attention", str, apply_token_merging_cross_attention, choices= lambda: ["Yes","No"]), - AxisOption("ToMe merge mlp", str, apply_token_merging_mlp, choices= lambda: ["Yes","No"]), - AxisOption("ToMe maximum down sampling", int, apply_token_merging_maximum_down_sampling, choices= lambda: ["1","2","4","8"]), - AxisOption("ToMe Stride - X", int, apply_token_merging_stride_x, choices= lambda: ["2","4","6","8"]), - AxisOption("ToMe Stride - Y", int, apply_token_merging_stride_y, choices= lambda: ["2","4","6","8"]) + AxisOption("ToMe random pertubations",str,apply_token_merging_random, choices = lambda: ["Yes","No"]) ] @@ -392,14 +360,7 @@ class SharedSettingsStackHelper(object): self.uni_pc_order = opts.uni_pc_order self.token_merging_ratio_hr = opts.token_merging_ratio_hr self.token_merging_ratio = opts.token_merging_ratio - self.token_merging_hr_only = opts.token_merging_hr_only self.token_merging_random = opts.token_merging_random - self.token_merging_merge_attention = opts.token_merging_merge_attention - self.token_merging_merge_cross_attention = opts.token_merging_merge_cross_attention - self.token_merging_merge_mlp = opts.token_merging_merge_mlp - self.token_merging_maximum_down_sampling = opts.token_merging_maximum_down_sampling - self.token_merging_stride_x = opts.token_merging_stride_x - self.token_merging_stride_y = opts.token_merging_stride_y def __exit__(self, exc_type, exc_value, tb): #Restore overriden settings after plot generation. @@ -412,14 +373,7 @@ class SharedSettingsStackHelper(object): opts.data["token_merging_ratio_hr"] = self.token_merging_ratio_hr opts.data["token_merging_ratio"] = self.token_merging_ratio - opts.data["token_merging_hr_only"] = self.token_merging_hr_only opts.data["token_merging_random"] = self.token_merging_random - opts.data["token_merging_merge_attention"] = self.token_merging_merge_attention - opts.data["token_merging_merge_cross_attention"] = self.token_merging_merge_cross_attention - opts.data["token_merging_merge_mlp"] = self.token_merging_merge_mlp - opts.data["token_merging_maximum_down_sampling"] = self.token_merging_maximum_down_sampling - opts.data["token_merging_stride_x"] = self.token_merging_stride_x - opts.data["token_merging_stride_y"] = self.token_merging_stride_y re_range = re.compile(r"\s*([+-]?\s*\d+)\s*-\s*([+-]?\s*\d+)(?:\s*\(([+-]\d+)\s*\))?\s*") re_range_float = re.compile(r"\s*([+-]?\s*\d+(?:.\d*)?)\s*-\s*([+-]?\s*\d+(?:.\d*)?)(?:\s*\(([+-]\d+(?:.\d*)?)\s*\))?\s*") From b075d3c8fdf6dece1c66d901a04a651509b2e7fd Mon Sep 17 00:00:00 2001 From: Disty0 Date: Sun, 30 Apr 2023 15:13:56 +0300 Subject: [PATCH 007/282] Intel ARC Support --- modules/cmd_args.py | 1 + modules/codeformer_model.py | 6 +- modules/devices.py | 33 ++++++++--- modules/memmon.py | 55 ++++++++++++++----- modules/processing.py | 12 +++- modules/sd_hijack_optimizations.py | 55 ++++++++++++++----- modules/sd_hijack_unet.py | 3 +- modules/sd_models.py | 1 - modules/shared.py | 4 +- .../textual_inversion/textual_inversion.py | 6 +- setup.py | 18 +++++- 11 files changed, 153 insertions(+), 41 deletions(-) diff --git a/modules/cmd_args.py b/modules/cmd_args.py index 9b8438800..fdc9ab240 100644 --- a/modules/cmd_args.py +++ b/modules/cmd_args.py @@ -23,6 +23,7 @@ parser.add_argument("--allow-code", action='store_true', help="Allow custom scri parser.add_argument("--share", action='store_true', help="Enable to make the UI accessible through Gradio site") parser.add_argument("--enable-insecure", action='store_true', help="Enable extensions tab regardless of other options") parser.add_argument("--use-cpu", nargs='+', help="Force use CPU for specified modules", default=[], type=str.lower) +parser.add_argument("--use-ipex", action='store_true', help="Force use Intel OneAPI XPU backend") parser.add_argument("--listen", action='store_true', help="Launch web server using public IP address") parser.add_argument("--port", type=int, help="Launch web server with given server port", default=None) parser.add_argument("--hide-ui-dir-config", action='store_true', help="Hide directory configuration from UI", default=False) diff --git a/modules/codeformer_model.py b/modules/codeformer_model.py index cbe06ec1e..5217f69db 100644 --- a/modules/codeformer_model.py +++ b/modules/codeformer_model.py @@ -103,7 +103,11 @@ def setup_model(dirname): output = self.net(cropped_face_t, w=w if w is not None else shared.opts.code_former_weight, adain=True)[0] restored_face = tensor2img(output, rgb2bgr=True, min_max=(-1, 1)) del output - torch.cuda.empty_cache() + from modules import shared + if shared.cmd_opts.use_ipex: + torch.xpu.empty_cache() + else: + torch.cuda.empty_cache() except Exception as error: print(f'\tFailed inference for CodeFormer: {error}', file=sys.stderr) restored_face = tensor2img(cropped_face_t, rgb2bgr=True, min_max=(-1, 1)) diff --git a/modules/devices.py b/modules/devices.py index e317d91f4..3606597d3 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -22,9 +22,13 @@ def extract_device_id(args, name): def get_cuda_device_string(): from modules import shared - if shared.cmd_opts.device_id is not None: - return f"cuda:{shared.cmd_opts.device_id}" - return "cuda" + if shared.cmd_opts.use_ipex: + return "xpu" + else: + from modules import shared + if shared.cmd_opts.device_id is not None: + return f"cuda:{shared.cmd_opts.device_id}" + return "cuda" def get_dml_device_string(): @@ -35,7 +39,10 @@ def get_dml_device_string(): def get_optimal_device_name(): - if torch.cuda.is_available(): + from modules import shared + if shared.cmd_opts.use_ipex: + return "xpu" + elif torch.cuda.is_available(): return get_cuda_device_string() if has_mps(): return "mps" @@ -61,7 +68,11 @@ def get_device_for(task): def torch_gc(): - if torch.cuda.is_available(): + from modules import shared + if shared.cmd_opts.use_ipex: + with torch.xpu.device("xpu"): + torch.xpu.empty_cache() + elif torch.cuda.is_available(): with torch.cuda.device(get_cuda_device_string()): torch.cuda.empty_cache() torch.cuda.ipc_collect() @@ -137,11 +148,19 @@ def autocast(disable=False): return contextlib.nullcontext() if dtype == torch.float32 or shared.cmd_opts.precision == "Full": return contextlib.nullcontext() - return torch.autocast("cuda") + from modules import shared + if shared.cmd_opts.use_ipex: + return torch.xpu.amp.autocast(enabled=True, dtype=dtype, cache_enabled=False) + else: + return torch.autocast("cuda") def without_autocast(disable=False): - return torch.autocast("cuda", enabled=False) if torch.is_autocast_enabled() and not disable else contextlib.nullcontext() + from modules import shared + if shared.cmd_opts.use_ipex: + return torch.autocast("xpu", enabled=False) if torch.is_autocast_enabled() and not disable else contextlib.nullcontext() + else: + return torch.autocast("cuda", enabled=False) if torch.is_autocast_enabled() and not disable else contextlib.nullcontext() class NansException(Exception): diff --git a/modules/memmon.py b/modules/memmon.py index 9b013e6b4..4ceb29a37 100644 --- a/modules/memmon.py +++ b/modules/memmon.py @@ -19,26 +19,44 @@ class MemUsageMonitor(threading.Thread): self.daemon = True self.run_flag = threading.Event() self.data = defaultdict(int) - if not torch.cuda.is_available(): + from modules import shared + if not torch.cuda.is_available() or not shared.cmd_opts.use_ipex: self.disabled = True else: - try: - self.cuda_mem_get_info() - torch.cuda.memory_stats(self.device) - except Exception as e: # AMD or whatever - print(f"Torch exception: {e}") - self.disabled = True + if shared.cmd_opts.use_ipex: + try: + self.cuda_mem_get_info() + torch.cuda.memory_stats("xpu") + except Exception as e: # AMD or whatever + print(f"Torch exception: {e}") + self.disabled = True + + else: + try: + self.cuda_mem_get_info() + torch.cuda.memory_stats(self.device) + except Exception as e: # AMD or whatever + print(f"Torch exception: {e}") + self.disabled = True def cuda_mem_get_info(self): - index = self.device.index if self.device.index is not None else torch.cuda.current_device() - return torch.cuda.mem_get_info(index) + from modules import shared + if shared.cmd_opts.use_ipex: + return torch.xpu.mem_get_info("xpu") + else: + index = self.device.index if self.device.index is not None else torch.cuda.current_device() + return torch.cuda.mem_get_info(index) def run(self): if self.disabled: return while True: self.run_flag.wait() - torch.cuda.reset_peak_memory_stats() + from modules import shared + if shared.cmd_opts.use_ipex: + torch.xpu.reset_peak_memory_stats() + else: + torch.cuda.reset_peak_memory_stats() self.data.clear() if self.opts.memmon_poll_rate <= 0: self.run_flag.clear() @@ -54,12 +72,19 @@ class MemUsageMonitor(threading.Thread): for k, v in self.read().items(): print(k, -(v // -(1024 ** 2))) print(self, 'raw torch memory stats:') - tm = torch.cuda.memory_stats(self.device) + from modules import shared + if shared.cmd_opts.use_ipex: + tm = torch.xpu.memory_stats("xpu") + else: + tm = torch.cuda.memory_stats(self.device) for k, v in tm.items(): if 'bytes' not in k: continue print('\t' if 'peak' in k else '', k, -(v // -(1024 ** 2))) - print(torch.cuda.memory_summary()) + if shared.cmd_opts.use_ipex: + print(torch.xpu.memory_summary()) + else: + print(torch.cuda.memory_summary()) def monitor(self): self.run_flag.set() @@ -70,7 +95,11 @@ class MemUsageMonitor(threading.Thread): self.data["free"] = free self.data["total"] = total - torch_stats = torch.cuda.memory_stats(self.device) + from modules import shared + if shared.cmd_opts.use_ipex: + torch_stats = torch.xpu.memory_stats("xpu") + else: + torch_stats = torch.cuda.memory_stats(self.device) self.data["active"] = torch_stats["active.all.current"] self.data["active_peak"] = torch_stats["active_bytes.all.peak"] self.data["reserved"] = torch_stats["reserved_bytes.all.current"] diff --git a/modules/processing.py b/modules/processing.py index e793f12a3..293a8d606 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -55,7 +55,17 @@ def memory_stats(): except Exception as e: mem.update({ 'ram': e }) try: - if torch.cuda.is_available(): + from modules import shared + if shared.cmd_opts.use_ipex: + s = torch.xpu.mem_get_info() + gpu = { 'used': gb(s[1] - s[0]), 'total': gb(s[1]) } + s = dict(torch.xpu.memory_stats("xpu")) + mem.update({ + 'gpu': gpu, + 'retries': s['num_alloc_retries'], + 'oom': s['num_ooms'] + }) + elif torch.cuda.is_available(): s = torch.cuda.mem_get_info() gpu = { 'used': gb(s[1] - s[0]), 'total': gb(s[1]) } s = dict(torch.cuda.memory_stats(shared.device)) diff --git a/modules/sd_hijack_optimizations.py b/modules/sd_hijack_optimizations.py index 12ee9f956..5168b4b7a 100644 --- a/modules/sd_hijack_optimizations.py +++ b/modules/sd_hijack_optimizations.py @@ -22,7 +22,15 @@ if shared.opts.cross_attention_optimization == "xFormers": def get_available_vram(): - if shared.device.type == 'cuda': + if shared.cmd_opts.use_ipex: + stats = torch.xpu.memory_stats("xpu") + mem_active = stats['active_bytes.all.current'] + mem_reserved = stats['reserved_bytes.all.current'] + mem_free_xpu, _ = torch.xpu.mem_get_info("xpu") + mem_free_torch = mem_reserved - mem_active + mem_free_total = mem_free_xpu + mem_free_torch + return mem_free_total + elif shared.device.type == 'cuda': stats = torch.cuda.memory_stats(shared.device) mem_active = stats['active_bytes.all.current'] mem_reserved = stats['reserved_bytes.all.current'] @@ -189,14 +197,24 @@ def einsum_op_tensor_mem(q, k, v, max_tensor_mb): return einsum_op_slice_1(q, k, v, max(q.shape[1] // div, 1)) def einsum_op_cuda(q, k, v): - stats = torch.cuda.memory_stats(q.device) - mem_active = stats['active_bytes.all.current'] - mem_reserved = stats['reserved_bytes.all.current'] - mem_free_cuda, _ = torch.cuda.mem_get_info(q.device) - mem_free_torch = mem_reserved - mem_active - mem_free_total = mem_free_cuda + mem_free_torch - # Divide factor of safety as there's copying and fragmentation - return einsum_op_tensor_mem(q, k, v, mem_free_total / 3.3 / (1 << 20)) + if shared.cmd_opts.use_ipex: + stats = torch.xpu.memory_stats("xpu") + mem_active = stats['active_bytes.all.current'] + mem_reserved = stats['reserved_bytes.all.current'] + mem_free_xpu, _ = torch.xpu.mem_get_info("xpu") + mem_free_torch = mem_reserved - mem_active + mem_free_total = mem_free_xpu + mem_free_torch + # Divide factor of safety as there's copying and fragmentation + return einsum_op_tensor_mem(q, k, v, mem_free_total / 3.3 / (1 << 20)) + else: + stats = torch.cuda.memory_stats(q.device) + mem_active = stats['active_bytes.all.current'] + mem_reserved = stats['reserved_bytes.all.current'] + mem_free_cuda, _ = torch.cuda.mem_get_info(q.device) + mem_free_torch = mem_reserved - mem_active + mem_free_total = mem_free_cuda + mem_free_torch + # Divide factor of safety as there's copying and fragmentation + return einsum_op_tensor_mem(q, k, v, mem_free_total / 3.3 / (1 << 20)) def einsum_op_dml(q, k, v): mem_total, mem_active = torch.dml.memory_stats(q.device) @@ -204,6 +222,9 @@ def einsum_op_dml(q, k, v): return einsum_op_tensor_mem(q, k, v, (mem_reserved - mem_active) if mem_reserved > mem_active else 1) def einsum_op(q, k, v): + if shared.cmd_opts.use_ipex: + return einsum_op_cuda(q, k, v) + if q.device.type == 'cuda': return einsum_op_cuda(q, k, v) @@ -397,8 +418,12 @@ def scaled_dot_product_attention_forward(self, x, context=None, mask=None): return hidden_states def scaled_dot_product_no_mem_attention_forward(self, x, context=None, mask=None): - with torch.backends.cuda.sdp_kernel(enable_flash=True, enable_math=True, enable_mem_efficient=False): - return scaled_dot_product_attention_forward(self, x, context, mask) + if shared.cmd_opts.use_ipex: + with torch.backends.xpu.sdp_kernel(enable_flash=True, enable_math=True, enable_mem_efficient=False): + return scaled_dot_product_attention_forward(self, x, context, mask) + else: + with torch.backends.cuda.sdp_kernel(enable_flash=True, enable_math=True, enable_mem_efficient=False): + return scaled_dot_product_attention_forward(self, x, context, mask) def cross_attention_attnblock_forward(self, x): h_ = x @@ -502,8 +527,12 @@ def sdp_attnblock_forward(self, x): return x + out def sdp_no_mem_attnblock_forward(self, x): - with torch.backends.cuda.sdp_kernel(enable_flash=True, enable_math=True, enable_mem_efficient=False): - return sdp_attnblock_forward(self, x) + if shared.cmd_opts.use_ipex: + with torch.backends.xpu.sdp_kernel(enable_flash=True, enable_math=True, enable_mem_efficient=False): + return sdp_attnblock_forward(self, x) + else: + with torch.backends.cuda.sdp_kernel(enable_flash=True, enable_math=True, enable_mem_efficient=False): + return sdp_attnblock_forward(self, x) def sub_quad_attnblock_forward(self, x): h_ = x diff --git a/modules/sd_hijack_unet.py b/modules/sd_hijack_unet.py index 158582632..7ff553ae3 100644 --- a/modules/sd_hijack_unet.py +++ b/modules/sd_hijack_unet.py @@ -3,6 +3,7 @@ from packaging import version from modules import devices from modules.sd_hijack_utils import CondFunc +from modules import shared class TorchHijackForUnet: @@ -67,7 +68,7 @@ def hijack_ddpm_edit(): unet_needs_upcast = lambda *args, **kwargs: devices.unet_needs_upcast CondFunc('ldm.models.diffusion.ddpm.LatentDiffusion.apply_model', apply_model, unet_needs_upcast) CondFunc('ldm.modules.diffusionmodules.openaimodel.timestep_embedding', lambda orig_func, timesteps, *args, **kwargs: orig_func(timesteps, *args, **kwargs).to(torch.float32 if timesteps.dtype == torch.int64 else devices.dtype_unet), unet_needs_upcast) -if version.parse(torch.__version__) <= version.parse("1.13.2") or torch.cuda.is_available(): +if version.parse(torch.__version__) <= version.parse("1.13.2") or torch.cuda.is_available() or shared.cmd_opts.use_ipex: CondFunc('ldm.modules.diffusionmodules.util.GroupNorm32.forward', lambda orig_func, self, *args, **kwargs: orig_func(self.float(), *args, **kwargs), unet_needs_upcast) CondFunc('ldm.modules.attention.GEGLU.forward', lambda orig_func, self, x: orig_func(self.float(), x.float()).to(devices.dtype_unet), unet_needs_upcast) CondFunc('open_clip.transformer.ResidualAttentionBlock.__init__', lambda orig_func, *args, **kwargs: kwargs.update({'act_layer': GELUHijack}) and False or orig_func(*args, **kwargs), lambda _, *args, **kwargs: kwargs.get('act_layer') is None or kwargs['act_layer'] == torch.nn.GELU) diff --git a/modules/sd_models.py b/modules/sd_models.py index a2ef7a012..49de37097 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -533,7 +533,6 @@ def unload_model_weights(sd_model=None, _info=None): sd_model = None gc.collect() devices.torch_gc() - torch.cuda.empty_cache() print(f"Unloaded weights {timer.summary()}") return sd_model diff --git a/modules/shared.py b/modules/shared.py index f3ebbce55..aa2ede29e 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -238,7 +238,7 @@ options_templates.update(options_section(('sd', "Stable Diffusion"), { "comma_padding_backtrack": OptionInfo(20, "Increase coherency by padding from the last comma within n tokens when using more than 75 tokens", gr.Slider, {"minimum": 0, "maximum": 74, "step": 1 }), "CLIP_stop_at_last_layers": OptionInfo(1, "Clip skip", gr.Slider, {"minimum": 1, "maximum": 12, "step": 1, "visible": False}), "upcast_attn": OptionInfo(False, "Upcast cross attention layer to float32"), - "cross_attention_optimization": OptionInfo("Sub-quadratic" if is_device_dml else "Scaled-Dot-Product", "Cross-attention optimization method", gr.Radio, lambda: {"choices": shared_items.list_crossattention() }), + "cross_attention_optimization": OptionInfo("Sub-quadratic" if is_device_dml else "Split attention" if cmd_opts.use_ipex else "Scaled-Dot-Product", "Cross-attention optimization method", gr.Radio, lambda: {"choices": shared_items.list_crossattention() }), "cross_attention_options": OptionInfo([], "Cross-attention advanced options", gr.CheckboxGroup, lambda: {"choices": ['xFormers enable flash Attention', 'SDP disable memory attention']}), "sub_quad_q_chunk_size": OptionInfo(512, "Sub-quadratic cross-attention query chunk size for the layer optimization to use", gr.Slider, {"minimum": 16, "maximum": 8192, "step": 8}), "sub_quad_kv_chunk_size": OptionInfo(512, "Sub-quadratic cross-attentionkv chunk size for the sub-quadratic cross-attention layer optimization to use", gr.Slider, {"minimum": 0, "maximum": 8192, "step": 8}), @@ -318,7 +318,7 @@ options_templates.update(options_section(('cuda', "CUDA Settings"), { "cuda_dtype": OptionInfo("FP32" if sys.platform == "darwin" else "FP16", "Device precision type", gr.Radio, lambda: {"choices": ["FP32", "FP16", "BF16"]}), "no_half": OptionInfo(True if is_device_dml else False, "Use full precision for model (--no-half)", None, None, lambda: print("Warning: Most of DirectML devices do not fully support half mode. Recommend to use full precision to model.") if is_device_dml else None), "no_half_vae": OptionInfo(True if is_device_dml else False, "Use full precision for VAE (--no-half-vae)"), - "upcast_sampling": OptionInfo(True if sys.platform == "darwin" else False, "Enable upcast sampling. Usually produces similar results to --no-half with better performance while using less memory"), + "upcast_sampling": OptionInfo(True if sys.platform == "darwin" or cmd_opts.use_ipex else False, "Enable upcast sampling. Usually produces similar results to --no-half with better performance while using less memory"), "disable_nan_check": OptionInfo(True, "Do not check if produced images/latent spaces have NaN values"), "rollback_vae": OptionInfo(False, "Attempt to roll back VAE when produced NaN values, requires NaN check (experimental)"), "opt_channelslast": OptionInfo(False, "Use channels last as torch memory format "), diff --git a/modules/textual_inversion/textual_inversion.py b/modules/textual_inversion/textual_inversion.py index 2180d7f32..36a1e1e17 100644 --- a/modules/textual_inversion/textual_inversion.py +++ b/modules/textual_inversion/textual_inversion.py @@ -434,7 +434,11 @@ def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_st else: print("No saved optimizer exists in checkpoint") - scaler = torch.cuda.amp.GradScaler() + from modules import shared + if shared.cmd_opts.use_ipex: + scaler = torch.xpu.amp.GradScaler() + else: + scaler = torch.cuda.amp.GradScaler() batch_size = ds.batch_size gradient_step = ds.gradient_step diff --git a/setup.py b/setup.py index cfaa1aaa0..59c200161 100644 --- a/setup.py +++ b/setup.py @@ -56,6 +56,7 @@ def setup_logging(clean=False): # check if package is installed def installed(package, friendly: str = None): import pkg_resources + from modules import shared ok = True try: if friendly: @@ -76,6 +77,8 @@ def installed(package, friendly: str = None): ok = ok and spec is not None if ok: version = pkg_resources.get_distribution(p[0]).version + if shared.cmd_opts.use_ipex and p[0] == "pytorch_lightning": + p[1] = "1.8.6" log.debug(f"Package version found: {p[0]} {version}") if len(p) > 1: ok = ok and version == p[1] @@ -91,6 +94,9 @@ def installed(package, friendly: str = None): # install package using pip if not already installed def install(package, friendly: str = None, ignore: bool = False): + from modules import shared + if shared.cmd_opts.use_ipex and package == "pytorch_lightning==1.9.4": + package = "pytorch_lightning==1.8.6" def pip(arg: str): arg = arg.replace('>=', '==') log.info(f'Installing package: {arg.replace("install", "").replace("--upgrade", "").replace("--no-deps", "").replace(" ", " ").strip()}') @@ -188,6 +194,7 @@ def check_python(): # check torch version def check_torch(): + from modules import shared if shutil.which('nvidia-smi') is not None or os.path.exists(os.path.join(os.environ.get('SystemRoot') or r'C:\Windows', 'System32', 'nvidia-smi.exe')): log.info('nVidia toolkit detected') torch_command = os.environ.get('TORCH_COMMAND', 'torch torchaudio torchvision --index-url https://download.pytorch.org/whl/cu118') @@ -197,6 +204,11 @@ def check_torch(): os.environ.setdefault('HSA_OVERRIDE_GFX_VERSION', '10.3.0') torch_command = os.environ.get('TORCH_COMMAND', 'torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.4.2') xformers_package = os.environ.get('XFORMERS_PACKAGE', 'none') + elif shutil.which('sycl-ls') is not None or os.path.exists('/opt/intel/oneapi'): + shared.cmd_opts.use_ipex = True + log.info('Intel toolkit detected') + torch_command = os.environ.get('TORCH_COMMAND', 'torch==1.13.0a0+git6c9b55e torchvision==0.14.1a0 intel_extension_for_pytorch==1.13.120+xpu --index-url https://developer.intel.com/ipex-whl-stable-xpu') + xformers_package = os.environ.get('XFORMERS_PACKAGE', 'none') else: machine = platform.machine() if 'arm' not in machine and 'aarch' not in machine and not args.nodirectml: # torch-directml is available on AMD64 @@ -212,7 +224,11 @@ def check_torch(): try: import torch log.info(f'Torch {torch.__version__}') - if torch.cuda.is_available(): + if shared.cmd_opts.use_ipex: + import intel_extension_for_pytorch as ipex + log.info(f'Torch backend: Intel OneAPI {torch.__version__}') + log.info(f'Torch detected GPU: {torch.xpu.get_device_name("xpu")} VRAM {round(torch.xpu.get_device_properties("xpu").total_memory / 1024 / 1024)}') + elif torch.cuda.is_available(): if torch.version.cuda: log.info(f'Torch backend: nVidia CUDA {torch.version.cuda} cuDNN {torch.backends.cudnn.version() if torch.backends.cudnn.is_available() else "N/A"}') elif torch.version.hip: From 5c76087b9d4e90edb7f79631c3ef1cc3e627327d Mon Sep 17 00:00:00 2001 From: Disty0 Date: Sun, 30 Apr 2023 15:30:15 +0300 Subject: [PATCH 008/282] Revert force cross_attention_optimization --- modules/shared.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/shared.py b/modules/shared.py index aa2ede29e..12cb05b05 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -238,7 +238,7 @@ options_templates.update(options_section(('sd', "Stable Diffusion"), { "comma_padding_backtrack": OptionInfo(20, "Increase coherency by padding from the last comma within n tokens when using more than 75 tokens", gr.Slider, {"minimum": 0, "maximum": 74, "step": 1 }), "CLIP_stop_at_last_layers": OptionInfo(1, "Clip skip", gr.Slider, {"minimum": 1, "maximum": 12, "step": 1, "visible": False}), "upcast_attn": OptionInfo(False, "Upcast cross attention layer to float32"), - "cross_attention_optimization": OptionInfo("Sub-quadratic" if is_device_dml else "Split attention" if cmd_opts.use_ipex else "Scaled-Dot-Product", "Cross-attention optimization method", gr.Radio, lambda: {"choices": shared_items.list_crossattention() }), + "cross_attention_optimization": OptionInfo("Sub-quadratic" if is_device_dml else "Scaled-Dot-Product", "Cross-attention optimization method", gr.Radio, lambda: {"choices": shared_items.list_crossattention() }), "cross_attention_options": OptionInfo([], "Cross-attention advanced options", gr.CheckboxGroup, lambda: {"choices": ['xFormers enable flash Attention', 'SDP disable memory attention']}), "sub_quad_q_chunk_size": OptionInfo(512, "Sub-quadratic cross-attention query chunk size for the layer optimization to use", gr.Slider, {"minimum": 16, "maximum": 8192, "step": 8}), "sub_quad_kv_chunk_size": OptionInfo(512, "Sub-quadratic cross-attentionkv chunk size for the sub-quadratic cross-attention layer optimization to use", gr.Slider, {"minimum": 0, "maximum": 8192, "step": 8}), From b23b6a6e2c002eaf91693ef7997158bf8c279cdf Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 30 Apr 2023 08:55:44 -0400 Subject: [PATCH 009/282] update ti folders --- extensions-builtin/multidiffusion-upscaler-for-automatic1111 | 2 +- extensions-builtin/sd-webui-controlnet | 2 +- modules/lora | 2 +- modules/shared.py | 4 ++-- modules/textual_inversion/textual_inversion.py | 5 +++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 index 6931b89cb..860f8a405 160000 --- a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 +++ b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 @@ -1 +1 @@ -Subproject commit 6931b89cb4507c7dc8fa81ac36c2c19d0691c44e +Subproject commit 860f8a405193bcd992e21d82e43fa18137bc4923 diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 4d4b1f8c0..09d1fcbf4 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 4d4b1f8c00a0355d1517465ac3c0e801d5a2d194 +Subproject commit 09d1fcbf4dc715bca7547496f850801f95f732a6 diff --git a/modules/lora b/modules/lora index d52c524fc..bc803e01c 160000 --- a/modules/lora +++ b/modules/lora @@ -1 +1 @@ -Subproject commit d52c524fc2942c053cf37c648188502a3a26df1b +Subproject commit bc803e01c7028471efc8db5bc9aa183fde06080c diff --git a/modules/shared.py b/modules/shared.py index f3ebbce55..29a1786da 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -252,8 +252,6 @@ options_templates.update(options_section(('system-paths', "System Paths"), { "ckpt_dir": OptionInfo(os.path.join(paths.models_path, 'Stable-diffusion'), "Path to directory with stable diffusion checkpoints"), "vae_dir": OptionInfo(os.path.join(paths.models_path, 'VAE'), "Path to directory with VAE files"), "embeddings_dir": OptionInfo(os.path.join(paths.models_path, 'embeddings'), "Embeddings directory for textual inversion"), - "embeddings_templates_dir": OptionInfo(os.path.join(paths.script_path, 'train/templates'), "Embeddings train templates directory"), - "embeddings_train_log": OptionInfo(os.path.join(paths.script_path, 'train.csv'), "Embeddings train log file"), "hypernetwork_dir": OptionInfo(os.path.join(paths.models_path, 'hypernetworks'), "Hypernetwork directory"), "codeformer_models_path": OptionInfo(os.path.join(paths.models_path, 'Codeformer'), "Path to directory with codeformer model file(s)."), "gfpgan_models_path": OptionInfo(os.path.join(paths.models_path, 'GFPGAN'), "Path to directory with GFPGAN model file(s)"), @@ -351,6 +349,8 @@ options_templates.update(options_section(('training', "Training"), { "save_training_settings_to_txt": OptionInfo(True, "Save textual inversion and hypernet settings to a text file whenever training starts."), "dataset_filename_word_regex": OptionInfo("", "Filename word regex"), "dataset_filename_join_string": OptionInfo(" ", "Filename join string"), + "embeddings_templates_dir": OptionInfo(os.path.join(paths.script_path, 'train', 'templates'), "Embeddings train templates directory"), + "embeddings_train_log": OptionInfo(os.path.join(paths.script_path, 'train', 'log', 'train.csv'), "Embeddings train log file"), "training_image_repeats_per_epoch": OptionInfo(1, "Number of repeats for a single input image per epoch; used only for displaying epoch number", gr.Number, {"precision": 0}), "training_write_csv_every": OptionInfo(0, "Save an csv containing the loss to log directory every N steps, 0 to disable"), "training_enable_tensorboard": OptionInfo(False, "Enable tensorboard logging."), diff --git a/modules/textual_inversion/textual_inversion.py b/modules/textual_inversion/textual_inversion.py index 2180d7f32..cbacc2ce2 100644 --- a/modules/textual_inversion/textual_inversion.py +++ b/modules/textual_inversion/textual_inversion.py @@ -174,7 +174,7 @@ class EmbeddingDatabase: if len(emb.shape) == 1: emb = emb.unsqueeze(0) else: - raise Exception(f"Couldn't identify {filename} as neither textual inversion embedding nor diffuser concept.") + raise RuntimeError(f"Couldn't identify {filename} as neither textual inversion embedding nor diffuser concept.") vec = emb.detach().to(devices.device, dtype=torch.float32) embedding = Embedding(vec, name) @@ -347,7 +347,8 @@ def validate_train_inputs(model_name, learn_rate, batch_size, gradient_step, dat assert log_directory, "Log directory is empty" -def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_step, data_root, log_directory, training_width, training_height, varsize, steps, clip_grad_mode, clip_grad_value, shuffle_tags, tag_drop_out, latent_sampling_method, use_weight, create_image_every, save_embedding_every, template_filename, save_image_with_stored_embedding, preview_from_txt2img, preview_prompt, preview_negative_prompt, preview_steps, preview_sampler_index, preview_cfg_scale, preview_seed, preview_width, preview_height): +def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_step, data_root, log_directory, training_width, training_height, varsize, steps, clip_grad_mode, clip_grad_value, shuffle_tags, tag_drop_out, latent_sampling_method, use_weight, create_image_every, save_embedding_every, template_filename, save_image_with_stored_embedding, preview_from_txt2img, preview_prompt, preview_negative_prompt, preview_steps, preview_sampler_index, preview_cfg_scale, preview_seed, preview_width, preview_height): # pylint: disable=unused_argument + save_embedding_every = save_embedding_every or 0 create_image_every = create_image_every or 0 template_file = textual_inversion_templates.get(template_filename, None) From a720a670e826715790d095d26a3829126f6b7811 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Sun, 30 Apr 2023 16:01:17 +0300 Subject: [PATCH 010/282] More patches and less import shared --- cli/modules/bench.py | 7 ++- cli/modules/interrogate-offline.py | 18 ++++++- cli/modules/lora-extract.py | 16 +++++- cli/modules/lora-latents.py | 11 ++++- cli/modules/util.py | 21 +++++++- cli/random/dynamotest.py | 49 ++++++++++++++----- cli/train-lora.py | 13 ++++- cli/train/latents.py | 11 ++++- .../multidiffusion-upscaler-for-automatic1111 | 2 +- extensions-builtin/sd-webui-controlnet | 2 +- modules/devices.py | 17 +++---- modules/lora | 2 +- 12 files changed, 132 insertions(+), 37 deletions(-) diff --git a/cli/modules/bench.py b/cli/modules/bench.py index 094b73f63..18791bfc9 100755 --- a/cli/modules/bench.py +++ b/cli/modules/bench.py @@ -10,7 +10,7 @@ import time from PIL import Image import sdapi from util import Map, log - +from modules import shared options = Map({ 'restore_faces': False, @@ -56,7 +56,10 @@ async def txt2img(): def memstats(): mem = sdapi.getsync('/sdapi/v1/memory') cpu = mem.get('ram', 'unavailable') - gpu = mem.get('cuda', 'unavailable') + if shared.cmd_opts.use_ipex: + gpu = mem.get('xpu', 'unavailable') + else: + gpu = mem.get('cuda', 'unavailable') if 'active' in gpu: gpu['session'] = gpu.pop('active') if 'reserved' in gpu: diff --git a/cli/modules/interrogate-offline.py b/cli/modules/interrogate-offline.py index 6d9ae56fa..c2623cda6 100755 --- a/cli/modules/interrogate-offline.py +++ b/cli/modules/interrogate-offline.py @@ -6,6 +6,12 @@ import json import time import argparse import torch +from modules import shared +try: + import intel_extension_for_pytorch as ipex +except: + if shared.cmd_opts.use_ipex: + print("Failed to import IPEX") import filetype from PIL import Image import transformers @@ -19,7 +25,10 @@ model = None processor = None extractor = None dtype = torch.float32 -device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') +if shared.cmd_opts.use_ipex: + device = torch.device('xpu') +else: + device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') options = Map({ 'input': '', @@ -129,7 +138,12 @@ def unload_model(): del extractor extractor = None gc.collect() - if torch.cuda.is_available(): + if shared.cmd_opts.use_ipex: + with torch.no_grad(): + torch.xpu.empty_cache() + with torch.xpu.device('xpu'): + torch.xpu.empty_cache() + elif torch.cuda.is_available(): with torch.no_grad(): torch.cuda.empty_cache() with torch.cuda.device('cuda'): diff --git a/cli/modules/lora-extract.py b/cli/modules/lora-extract.py index 102728308..9a781789a 100755 --- a/cli/modules/lora-extract.py +++ b/cli/modules/lora-extract.py @@ -10,6 +10,12 @@ import sys import time import argparse import torch +from modules import shared +try: + import intel_extension_for_pytorch as ipex +except: + if shared.cmd_opts.use_ipex: + print("Failed to import IPEX") import transformers from tqdm import tqdm from util import log @@ -20,7 +26,10 @@ import networks.lora as lora def svd(args): # pylint: disable=redefined-outer-name - device = 'cuda' if torch.cuda.is_available() and args.device == 'cuda' else 'cpu' + if shared.cmd_opts.use_ipex: + device = torch.device('xpu') + else: + device = 'cuda' if torch.cuda.is_available() and args.device == 'cuda' else 'cpu' transformers.logging.set_verbosity_error() CLAMP_QUANTILE = 0.99 MIN_DIFF = 1e-6 @@ -38,7 +47,10 @@ def svd(args): # pylint: disable=redefined-outer-name log.info({ 'loading model': args.tuned }) text_encoder_t, _, unet_t = model_util.load_models_from_stable_diffusion_checkpoint(args.v2, args.tuned) with torch.no_grad(): - torch.cuda.empty_cache() + if shared.cmd_opts.use_ipex: + torch.xpu.empty_cache() + else: + torch.cuda.empty_cache() # create LoRA network to extract weights: Use dim (rank) as alpha lora_network_o = lora.create_network(1.0, args.dim, args.dim, None, text_encoder_o, unet_o) lora_network_t = lora.create_network(1.0, args.dim, args.dim, None, text_encoder_t, unet_t) diff --git a/cli/modules/lora-latents.py b/cli/modules/lora-latents.py index d556d596b..7e701df12 100755 --- a/cli/modules/lora-latents.py +++ b/cli/modules/lora-latents.py @@ -10,6 +10,12 @@ import warnings import cv2 import numpy as np import torch +from modules import shared +try: + import intel_extension_for_pytorch as ipex +except: + if shared.cmd_opts.use_ipex: + print("Failed to import IPEX") from PIL import Image from torchvision import transforms from tqdm import tqdm @@ -20,7 +26,10 @@ import library.model_util as model_util import library.train_util as train_util warnings.filterwarnings('ignore') -device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') +if shared.cmd_opts.use_ipex: + device = torch.device('xpu') +else: + device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') options = Map({ 'batch': 1, 'input': '', diff --git a/cli/modules/util.py b/cli/modules/util.py index 479b77233..d48887961 100755 --- a/cli/modules/util.py +++ b/cli/modules/util.py @@ -44,7 +44,26 @@ def get_memory(): mem.update({ 'ram': e }) try: import torch - if torch.cuda.is_available(): + from modules import shared + if shared.cmd_opts.use_ipex: + import intel_extension_for_pytorch as ipex + s = torch.xpu.mem_get_info() + gpu = { 'free': gb(s[0]), 'used': gb(s[1] - s[0]), 'total': gb(s[1]) } + s = dict(torch.xpu.memory_stats('xpu')) + allocated = { 'current': gb(s['allocated_bytes.all.current']), 'peak': gb(s['allocated_bytes.all.peak']) } + reserved = { 'current': gb(s['reserved_bytes.all.current']), 'peak': gb(s['reserved_bytes.all.peak']) } + active = { 'current': gb(s['active_bytes.all.current']), 'peak': gb(s['active_bytes.all.peak']) } + inactive = { 'current': gb(s['inactive_split_bytes.all.current']), 'peak': gb(s['inactive_split_bytes.all.peak']) } + warnings = { 'retries': s['num_alloc_retries'], 'oom': s['num_ooms'] } + mem.update({ + 'gpu': gpu, + 'gpu-active': active, + 'gpu-allocated': allocated, + 'gpu-reserved': reserved, + 'gpu-inactive': inactive, + 'events': warnings, + }) + elif torch.cuda.is_available(): s = torch.cuda.mem_get_info() gpu = { 'free': gb(s[0]), 'used': gb(s[1] - s[0]), 'total': gb(s[1]) } s = dict(torch.cuda.memory_stats('cuda')) diff --git a/cli/random/dynamotest.py b/cli/random/dynamotest.py index 82b1143c6..556ae96a8 100755 --- a/cli/random/dynamotest.py +++ b/cli/random/dynamotest.py @@ -7,9 +7,14 @@ import warnings import numpy as np import torch +from modules import shared +try: + import intel_extension_for_pytorch as ipex +except: + if shared.cmd_opts.use_ipex: + print("Failed to import IPEX") from torchvision.models import resnet18 - print('torch:', torch.__version__) try: import torch._dynamo as dynamo # must be imported explicitly or namespace is not found @@ -24,24 +29,42 @@ warnings.filterwarnings('ignore', category=UserWarning) # disable those for now def timed(fn): # returns the result of running `fn()` and the time it took for `fn()` to run in ms using CUDA events - start = torch.cuda.Event(enable_timing=True) - end = torch.cuda.Event(enable_timing=True) - start.record() - result = fn() - end.record() - torch.cuda.synchronize() - return result, start.elapsed_time(end) + if shared.cmd_opts.use_ipex: + start = torch.xpu.Event(enable_timing=True) + end = torch.xpu.Event(enable_timing=True) + start.record() + result = fn() + end.record() + torch.xpu.synchronize() + return result, start.elapsed_time(end) + else: + start = torch.cuda.Event(enable_timing=True) + end = torch.cuda.Event(enable_timing=True) + start.record() + result = fn() + end.record() + torch.cuda.synchronize() + return result, start.elapsed_time(end) def generate_data(b): - return ( - torch.randn(b, 3, 128, 128).to(torch.float32).cuda(), - torch.randint(1000, (b,)).cuda(), - ) + if shared.cmd_opts.use_ipex: + return ( + torch.randn(b, 3, 128, 128).to(torch.float32).xpu(), + torch.randint(1000, (b,)).xpu(), + ) + else: + return ( + torch.randn(b, 3, 128, 128).to(torch.float32).cuda(), + torch.randint(1000, (b,)).cuda(), + ) def init_model(): - return resnet18().to(torch.float32).cuda() + if shared.cmd_opts.use_ipex: + return resnet18().to(torch.float32).xpu() + else: + return resnet18().to(torch.float32).cuda() def eval(mod, inp): diff --git a/cli/train-lora.py b/cli/train-lora.py index 6f82063a6..f1e295a35 100755 --- a/cli/train-lora.py +++ b/cli/train-lora.py @@ -23,6 +23,12 @@ import shutil import argparse import tempfile import torch +from modules import shared +try: + import intel_extension_for_pytorch as ipex +except: + if shared.cmd_opts.use_ipex: + print("Failed to import IPEX") import logging import importlib import transformers @@ -117,7 +123,12 @@ options = Map({ def mem_stats(): gc.collect() - if torch.cuda.is_available(): + if shared.cmd_opts.use_ipex: + with torch.no_grad(): + torch.xpu.empty_cache() + with torch.xpu.device('xpu'): + torch.cuda.empty_cache() + elif torch.cuda.is_available(): with torch.no_grad(): torch.cuda.empty_cache() with torch.cuda.device('cuda'): diff --git a/cli/train/latents.py b/cli/train/latents.py index 94249b18a..715f92aba 100755 --- a/cli/train/latents.py +++ b/cli/train/latents.py @@ -10,6 +10,12 @@ import warnings import cv2 import numpy as np import torch +from modules import shared +try: + import intel_extension_for_pytorch as ipex +except: + if shared.cmd_opts.use_ipex: + print("Failed to import IPEX") from PIL import Image from torchvision import transforms from tqdm import tqdm @@ -28,7 +34,10 @@ import library.model_util as model_util import library.train_util as train_util warnings.filterwarnings('ignore') -device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') +if shared.cmd_opts.use_ipex: + device = torch.device('xpu') +else: + device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') options = Map({ 'batch': 1, 'input': '', diff --git a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 index 6931b89cb..860f8a405 160000 --- a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 +++ b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 @@ -1 +1 @@ -Subproject commit 6931b89cb4507c7dc8fa81ac36c2c19d0691c44e +Subproject commit 860f8a405193bcd992e21d82e43fa18137bc4923 diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 4d4b1f8c0..09d1fcbf4 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 4d4b1f8c00a0355d1517465ac3c0e801d5a2d194 +Subproject commit 09d1fcbf4dc715bca7547496f850801f95f732a6 diff --git a/modules/devices.py b/modules/devices.py index 3606597d3..1ab082f33 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -1,6 +1,12 @@ import sys import contextlib import torch +from modules import shared +try: + import intel_extension_for_pytorch as ipex +except: + if shared.cmd_opts.use_ipex: + print("Failed to import IPEX") if sys.platform == "darwin": from modules import mac_specific @@ -21,25 +27,21 @@ def extract_device_id(args, name): def get_cuda_device_string(): - from modules import shared if shared.cmd_opts.use_ipex: return "xpu" else: - from modules import shared if shared.cmd_opts.device_id is not None: return f"cuda:{shared.cmd_opts.device_id}" return "cuda" def get_dml_device_string(): - from modules import shared if shared.cmd_opts.device_id is not None: return f"privateuseone:{shared.cmd_opts.device_id}" return "privateuseone:0" def get_optimal_device_name(): - from modules import shared if shared.cmd_opts.use_ipex: return "xpu" elif torch.cuda.is_available(): @@ -61,14 +63,12 @@ def get_optimal_device(): def get_device_for(task): - from modules import shared if task in shared.cmd_opts.use_cpu: return cpu return get_optimal_device() def torch_gc(): - from modules import shared if shared.cmd_opts.use_ipex: with torch.xpu.device("xpu"): torch.xpu.empty_cache() @@ -79,7 +79,6 @@ def torch_gc(): def set_cuda_params(): - from modules import shared if torch.cuda.is_available(): try: torch.backends.cuda.matmul.allow_tf32 = shared.opts.cuda_allow_tf32 @@ -143,12 +142,10 @@ def randn_without_seed(shape): def autocast(disable=False): - from modules import shared if disable: return contextlib.nullcontext() if dtype == torch.float32 or shared.cmd_opts.precision == "Full": return contextlib.nullcontext() - from modules import shared if shared.cmd_opts.use_ipex: return torch.xpu.amp.autocast(enabled=True, dtype=dtype, cache_enabled=False) else: @@ -156,7 +153,6 @@ def autocast(disable=False): def without_autocast(disable=False): - from modules import shared if shared.cmd_opts.use_ipex: return torch.autocast("xpu", enabled=False) if torch.is_autocast_enabled() and not disable else contextlib.nullcontext() else: @@ -168,7 +164,6 @@ class NansException(Exception): def test_for_nans(x, where): - from modules import shared if shared.opts.disable_nan_check: return if not torch.all(torch.isnan(x)).item(): diff --git a/modules/lora b/modules/lora index d52c524fc..bc803e01c 160000 --- a/modules/lora +++ b/modules/lora @@ -1 +1 @@ -Subproject commit d52c524fc2942c053cf37c648188502a3a26df1b +Subproject commit bc803e01c7028471efc8db5bc9aa183fde06080c From 14055afb9b7d31b65af2da2b8d8e7483241b028d Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 30 Apr 2023 09:20:50 -0400 Subject: [PATCH 011/282] update logging --- modules/textual_inversion/logging.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/textual_inversion/logging.py b/modules/textual_inversion/logging.py index edef48433..d0e52beb7 100644 --- a/modules/textual_inversion/logging.py +++ b/modules/textual_inversion/logging.py @@ -2,7 +2,7 @@ import datetime import json import os -saved_params_shared = {"model_name", "model_hash", "initial_step", "num_of_dataset_images", "learn_rate", "batch_size", "clip_grad_mode", "clip_grad_value", "gradient_step", "data_root", "log_directory", "training_width", "training_height", "steps", "create_image_every", "template_file", "gradient_step", "latent_sampling_method"} +saved_params_shared = {"model_name", "model_hash", "initial_step", "num_of_dataset_images", "learn_rate", "batch_size", "clip_grad_mode", "clip_grad_value", "gradient_step", "data_root", "log_directory", "training_width", "training_height", "steps", "create_image_every", "template_file", "latent_sampling_method"} saved_params_ti = {"embedding_name", "num_vectors_per_token", "save_embedding_every", "save_image_with_stored_embedding"} saved_params_hypernet = {"hypernetwork_name", "layer_structure", "activation_func", "weight_init", "add_layer_norm", "use_dropout", "save_hypernetwork_every"} saved_params_all = saved_params_shared | saved_params_ti | saved_params_hypernet @@ -12,13 +12,12 @@ saved_params_previews = {"preview_prompt", "preview_negative_prompt", "preview_s def save_settings_to_file(log_directory, all_params): now = datetime.datetime.now() params = {"datetime": now.strftime("%Y-%m-%d %H:%M:%S")} - keys = saved_params_all if all_params.get('preview_from_txt2img'): keys = keys | saved_params_previews - params.update({k: v for k, v in all_params.items() if k in keys}) - - filename = f'settings.json' - with open(os.path.join(log_directory, filename), "w") as file: + filename = 'settings.json' + fn = os.path.join(log_directory, filename) + with open(os.path.join(log_directory, filename), "w", encoding='utf-8') as file: + print(f'Training settings file: {fn}') json.dump(params, file, indent=2) From 917ecad43c4da4f3aad54048284ad0ee44a04634 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 30 Apr 2023 09:31:38 -0400 Subject: [PATCH 012/282] add dynamo options --- extensions-builtin/sd-webui-controlnet | 2 +- modules/sd_hijack.py | 3 ++- modules/shared.py | 2 ++ wiki | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 09d1fcbf4..d2da774a4 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 09d1fcbf4dc715bca7547496f850801f95f732a6 +Subproject commit d2da774a40ff9c3770e21f71fb516403022fc3f6 diff --git a/modules/sd_hijack.py b/modules/sd_hijack.py index f817b7afd..47640377c 100644 --- a/modules/sd_hijack.py +++ b/modules/sd_hijack.py @@ -178,7 +178,8 @@ class StableDiffusionModelHijack: if opts.cuda_compile and opts.cuda_compile_mode != 'none': try: import torch._dynamo as dynamo # pylint: disable=unused-import - torch._dynamo.config.verbose = True # pylint: disable=protected-access + torch._dynamo.config.verbose = opts.cuda_compile_verbose # pylint: disable=protected-access + torch._dynamo.config.suppress_errors = opts.cuda_compile_errors # pylint: disable=protected-access torch.backends.cudnn.benchmark = True m.model = torch.compile(m.model, mode="default", backend=opts.cuda_compile_mode, fullgraph=False, dynamic=False) print("Model compile enabled:", opts.cuda_compile_mode) diff --git a/modules/shared.py b/modules/shared.py index af65368da..288804fea 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -325,6 +325,8 @@ options_templates.update(options_section(('cuda', "CUDA Settings"), { "cuda_allow_tf16_reduced": OptionInfo(True, "Allow TF16 reduced precision math ops"), "cuda_compile": OptionInfo(False, "Enable model compile (experimental)"), "cuda_compile_mode": OptionInfo("none", "Model compile mode (experimental)", gr.Radio, lambda: {"choices": ['none', 'inductor', 'cudagraphs', 'aot_ts_nvfuser']}), + "cuda_compile_verbose": OptionInfo(True, "Compile verbose mode"), + "cuda_compile_errors": OptionInfo(True, "Compile suppress errors"), })) options_templates.update(options_section(('upscaling', "Upscaling"), { diff --git a/wiki b/wiki index 6cd8fde16..4cbdffaa9 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 6cd8fde165190057c0849fa6f8dbb183f717b176 +Subproject commit 4cbdffaa95978d0a46758eac4a3fbe689eb4cdcd From 682330b172b35a5f91a1bdcb74a2d84a6fc978ec Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 30 Apr 2023 10:54:59 -0400 Subject: [PATCH 013/282] new command line parser --- TODO.md | 3 +- modules/cmd_args.py | 141 ++++++++++++++++++++++--------------------- modules/sd_hijack.py | 14 +++-- modules/sd_models.py | 2 +- modules/shared.py | 16 ++--- modules/ui.py | 4 +- setup.py | 40 ++++++------ webui.py | 8 +-- 8 files changed, 118 insertions(+), 110 deletions(-) diff --git a/TODO.md b/TODO.md index 0a5b0e99d..503154a59 100644 --- a/TODO.md +++ b/TODO.md @@ -11,13 +11,14 @@ Stuff to be fixed... Stuff to be added... -- Update README +- Update `README.md` - Add Gradio theme maker - Transformers version - Create new GitHub hooks/actions for CI/CD - Redo Extensions tab: see - Stream-load models as option for slow storage - Auto-test `torch.layer_norm` for FP16 +- Monitor file changes by misbehaving extensions ## Investigate diff --git a/modules/cmd_args.py b/modules/cmd_args.py index 9b8438800..c45e6c203 100644 --- a/modules/cmd_args.py +++ b/modules/cmd_args.py @@ -1,80 +1,81 @@ import argparse import os -from modules.paths_internal import data_path, sd_default_config, sd_model_file +from modules.paths_internal import data_path -parser = argparse.ArgumentParser(description="Stable Diffusion", conflict_handler='resolve', formatter_class=lambda prog: argparse.HelpFormatter(prog, max_help_position=55, indent_increment=2, width=200)) +parser = argparse.ArgumentParser(description="SD.Next", conflict_handler='resolve', epilog='For other options see UI Settings page', prog='', add_help=True, formatter_class=lambda prog: argparse.HelpFormatter(prog, max_help_position=55, indent_increment=2, width=200)) +parser._optionals = parser.add_argument_group('Other options') # pylint: disable=protected-access +group = parser.add_argument_group('Server options') +# group.add_argument("--config", type=str, default=sd_default_config, help=argparse.SUPPRESS) -parser.add_argument("-f", action='store_true', help=argparse.SUPPRESS) # allows running as root; implemented outside of webui -parser.add_argument("--ui-settings-file", type=str, help=argparse.SUPPRESS, default=os.path.join(data_path, 'config.json')) -parser.add_argument("--ui-config-file", type=str, help=argparse.SUPPRESS, default=os.path.join(data_path, 'ui-config.json')) -parser.add_argument("--config", type=str, default=sd_default_config, help=argparse.SUPPRESS) -parser.add_argument("--theme", type=str, help=argparse.SUPPRESS, default=None) +group.add_argument("-f", action='store_true', help=argparse.SUPPRESS) # allows running as root; implemented outside of webui +group.add_argument("--ui-settings-file", type=str, help=argparse.SUPPRESS, default=os.path.join(data_path, 'config.json')) +group.add_argument("--ui-config-file", type=str, help=argparse.SUPPRESS, default=os.path.join(data_path, 'ui-config.json')) +group.add_argument("--hide-ui-dir-config", action='store_true', help=argparse.SUPPRESS, default=False) +group.add_argument("--theme", type=str, help=argparse.SUPPRESS, default=None) +group.add_argument("--disable-console-progressbars", action='store_true', help=argparse.SUPPRESS, default=True) +group.add_argument("--disable-safe-unpickle", action='store_true', help=argparse.SUPPRESS, default=True) +group.add_argument("--lowram", action='store_true', help=argparse.SUPPRESS) -parser.add_argument("--medvram", action='store_true', help="Enable model optimizations for sacrificing a little speed for low memory usage") -parser.add_argument("--lowvram", action='store_true', help="Enable model optimizations for sacrificing a lot of speed for lowest memory usage") -parser.add_argument("--lowram", action='store_true', help="Load checkpoint weights to VRAM instead of RAM") - -parser.add_argument("--ckpt", type=str, default=sd_model_file, help="Path to checkpoint of stable diffusion model to load immediately",) -parser.add_argument('--vae', type=str, help='Path to checkpoint of stable diffusion VAE model to load immediately', default=None) -parser.add_argument("--data-dir", type=str, default=os.path.dirname(os.path.dirname(os.path.realpath(__file__))), help="Base path where all user data is stored") -parser.add_argument("--models-dir", type=str, default="models", help="Nase path where all models are stored",) - -parser.add_argument("--allow-code", action='store_true', help="Allow custom script execution") -parser.add_argument("--share", action='store_true', help="Enable to make the UI accessible through Gradio site") -parser.add_argument("--enable-insecure", action='store_true', help="Enable extensions tab regardless of other options") -parser.add_argument("--use-cpu", nargs='+', help="Force use CPU for specified modules", default=[], type=str.lower) -parser.add_argument("--listen", action='store_true', help="Launch web server using public IP address") -parser.add_argument("--port", type=int, help="Launch web server with given server port", default=None) -parser.add_argument("--hide-ui-dir-config", action='store_true', help="Hide directory configuration from UI", default=False) -parser.add_argument("--freeze-settings", action='store_true', help="Disable editing settings", default=False) -parser.add_argument("--gradio-auth", type=str, help='Set Gradio authentication like "username:password,username:password""', default=None) -parser.add_argument("--gradio-auth-path", type=str, help='Set Gradio authentication using file', default=None) -parser.add_argument("--autolaunch", action='store_true', help="Open the UI URL in the system's default browser upon launch", default=False) -parser.add_argument("--disable-console-progressbars", action='store_true', help="Do not output progressbars to console", default=True) -parser.add_argument("--disable-safe-unpickle", action='store_true', help="Disable checking models for malicious code", default=True) -parser.add_argument("--api-auth", type=str, help='Set API authentication', default=None) -parser.add_argument("--api-log", action='store_true', help="Enable logging of all API requests") -parser.add_argument("--device-id", type=str, help="Select the default CUDA device to use", default=None) -parser.add_argument("--cors-origins", type=str, help="Allowed CORS origin(s) in the form of a comma-separated list", default=None) -parser.add_argument("--cors-regex", type=str, help="Allowed CORS origin(s) in the form of a single regular expression", default=None) -parser.add_argument("--tls-keyfile", type=str, help="Partially enables TLS, requires --tls-certfile to fully function", default=None) -parser.add_argument("--tls-certfile", type=str, help="Partially enables TLS, requires --tls-keyfile to fully function", default=None) -parser.add_argument("--server-name", type=str, help="Sets hostname of server", default=None) -parser.add_argument("--no-hashing", action='store_true', help="Disable sha256 hashing of checkpoints", default=False) -parser.add_argument("--no-download-sd-model", action='store_true', help="Disable download of default model even if no model is found", default=False) -parser.add_argument("--profile", action='store_true', help="Run profiler, default: %(default)s") -parser.add_argument("--disable-queue", action='store_true', help="Disable Gradio queues and force use of HTTP instead of WebSockets, default: %(default)s") +group.add_argument("--config", type=str, default=os.path.join(data_path, 'config.json'), help="Use specific configuration file, default: %(default)s") +group.add_argument("--medvram", action='store_true', help="Split model stages and keep only active part in VRAM, default: %(default)s") +group.add_argument("--lowvram", action='store_true', help="Split model components and keep only active part in VRAM, default: %(default)s") +group.add_argument("--ckpt", type=str, default=None, help="Path to model checkpoint to load immediately, default: %(default)s") +group.add_argument('--vae', type=str, default=None, help='Path to VAE checkpoint to load immediately, default: %(default)s') +group.add_argument("--data-dir", type=str, default=os.path.dirname(os.path.dirname(os.path.realpath(__file__))), help="Base path where all user data is stored, default: %(default)s") +group.add_argument("--models-dir", type=str, default="models", help="Base path where all models are stored, default: %(default)s",) +group.add_argument("--allow-code", action='store_true', help="Allow custom script execution, default: %(default)s") +group.add_argument("--share", action='store_true', help="Enable UI accessible through Gradio site, default: %(default)s") +group.add_argument("--insecure", action='store_true', help="Enable extensions tab regardless of other options, default: %(default)s") +group.add_argument("--use-cpu", nargs='+', default=[], type=str.lower, help="Force use CPU for specified modules, default: %(default)s") +group.add_argument("--listen", action='store_true', help="Launch web server using public IP address, default: %(default)s") +group.add_argument("--port", type=int, default=7860, help="Launch web server with given server port, default: %(default)s") +group.add_argument("--freeze", action='store_true', help="Disable editing settings", default=False) +group.add_argument("--auth", type=str, help='Set access authentication like "user:pwd,user:pwd""', default=None) +group.add_argument("--authfile", type=str, help='Set access authentication using file, default: %(default)s', default=None) +group.add_argument("--autolaunch", action='store_true', help="Open the UI URL in the system's default browser upon launch", default=False) +group.add_argument("--api-auth", type=str, help='Set API authentication, default: %(default)s', default=None) +group.add_argument("--api-log", default=False, action='store_true', help="Enable logging of all API requests, default: %(default)s") +group.add_argument("--device-id", type=str, help="Select the default CUDA device to use, default: %(default)s", default=None) +group.add_argument("--cors-origins", type=str, help="Allowed CORS origins as comma-separated list, default: %(default)s", default=None) +group.add_argument("--cors-regex", type=str, help="Allowed CORS origins as regular expression, default: %(default)s", default=None) +group.add_argument("--tls-keyfile", type=str, help="Enable TLS and specify key file, default: %(default)s", default=None) +group.add_argument("--tls-certfile", type=str, help="Enable TLS and specify cert file, default: %(default)s", default=None) +group.add_argument("--server-name", type=str, help="Sets hostname of server, default: %(default)s", default=None) +group.add_argument("--no-hashing", action='store_true', help="Disable hashing of checkpoints, default: %(default)s", default=False) +group.add_argument("--no-download", action='store_true', help="Disable download of default model, default: %(default)s", default=False) +group.add_argument("--profile", action='store_true', help="Run profiler, default: %(default)s") +group.add_argument("--disable-queue", action='store_true', help="Disable queues, default: %(default)s") def compatibility_args(opts, args): - parser.add_argument("--ckpt-dir", type=str, help=argparse.SUPPRESS, default=opts.ckpt_dir) - parser.add_argument("--vae-dir", type=str, help=argparse.SUPPRESS, default=opts.vae_dir) - parser.add_argument("--embeddings-dir", type=str, help=argparse.SUPPRESS, default=opts.embeddings_dir) - parser.add_argument("--embeddings-templates-dir", type=str, help=argparse.SUPPRESS, default=opts.embeddings_templates_dir) - parser.add_argument("--hypernetwork-dir", type=str, help=argparse.SUPPRESS, default=opts.hypernetwork_dir) - parser.add_argument("--codeformer-models-path", type=str, help=argparse.SUPPRESS, default=opts.codeformer_models_path) - parser.add_argument("--gfpgan-models-path", type=str, help=argparse.SUPPRESS, default=opts.gfpgan_models_path) - parser.add_argument("--esrgan-models-path", type=str, help=argparse.SUPPRESS, default=opts.esrgan_models_path) - parser.add_argument("--bsrgan-models-path", type=str, help=argparse.SUPPRESS, default=opts.bsrgan_models_path) - parser.add_argument("--realesrgan-models-path", type=str, help=argparse.SUPPRESS, default=opts.realesrgan_models_path) - parser.add_argument("--scunet-models-path", help=argparse.SUPPRESS, default=opts.scunet_models_path) - parser.add_argument("--swinir-models-path", help=argparse.SUPPRESS, default=opts.swinir_models_path) - parser.add_argument("--ldsr-models-path", help=argparse.SUPPRESS, default=opts.ldsr_models_path) - parser.add_argument("--clip-models-path", type=str, help=argparse.SUPPRESS, default=opts.clip_models_path) - parser.add_argument("--disable-extension-access", default = False, action='store_true', help=argparse.SUPPRESS) - parser.add_argument("--opt-channelslast", help=argparse.SUPPRESS, default=opts.opt_channelslast) - parser.add_argument("--xformers", default = (opts.cross_attention_optimization == "xFormers"), action='store_true', help=argparse.SUPPRESS) - parser.add_argument("--disable-nan-check", help=argparse.SUPPRESS, default=opts.disable_nan_check) - parser.add_argument("--token-merging", help=argparse.SUPPRESS, default=opts.token_merging) - parser.add_argument("--rollback-vae", help=argparse.SUPPRESS, default=opts.rollback_vae) - parser.add_argument("--no-half", help=argparse.SUPPRESS, default=opts.no_half) - parser.add_argument("--no-half-vae", help=argparse.SUPPRESS, default=opts.no_half_vae) - parser.add_argument("--precision", help=argparse.SUPPRESS, default=opts.precision) - parser.add_argument("--api", help=argparse.SUPPRESS, default=True) - parser.add_argument("--sub-quad-q-chunk-size", help=argparse.SUPPRESS, default=opts.sub_quad_q_chunk_size) - parser.add_argument("--sub-quad-kv-chunk-size", help=argparse.SUPPRESS, default=opts.sub_quad_kv_chunk_size) - parser.add_argument("--sub-quad-chunk-threshold", help=argparse.SUPPRESS, default=opts.sub_quad_chunk_threshold) - parser.add_argument('--debug', default = False, action='store_true', help = "Run installer with debug logging, default: %(default)s") + group.add_argument("--ckpt-dir", type=str, help=argparse.SUPPRESS, default=opts.ckpt_dir) + group.add_argument("--vae-dir", type=str, help=argparse.SUPPRESS, default=opts.vae_dir) + group.add_argument("--embeddings-dir", type=str, help=argparse.SUPPRESS, default=opts.embeddings_dir) + group.add_argument("--embeddings-templates-dir", type=str, help=argparse.SUPPRESS, default=opts.embeddings_templates_dir) + group.add_argument("--hypernetwork-dir", type=str, help=argparse.SUPPRESS, default=opts.hypernetwork_dir) + group.add_argument("--codeformer-models-path", type=str, help=argparse.SUPPRESS, default=opts.codeformer_models_path) + group.add_argument("--gfpgan-models-path", type=str, help=argparse.SUPPRESS, default=opts.gfpgan_models_path) + group.add_argument("--esrgan-models-path", type=str, help=argparse.SUPPRESS, default=opts.esrgan_models_path) + group.add_argument("--bsrgan-models-path", type=str, help=argparse.SUPPRESS, default=opts.bsrgan_models_path) + group.add_argument("--realesrgan-models-path", type=str, help=argparse.SUPPRESS, default=opts.realesrgan_models_path) + group.add_argument("--scunet-models-path", help=argparse.SUPPRESS, default=opts.scunet_models_path) + group.add_argument("--swinir-models-path", help=argparse.SUPPRESS, default=opts.swinir_models_path) + group.add_argument("--ldsr-models-path", help=argparse.SUPPRESS, default=opts.ldsr_models_path) + group.add_argument("--clip-models-path", type=str, help=argparse.SUPPRESS, default=opts.clip_models_path) + group.add_argument("--disable-extension-access", default = False, action='store_true', help=argparse.SUPPRESS) + group.add_argument("--opt-channelslast", help=argparse.SUPPRESS, default=opts.opt_channelslast) + group.add_argument("--xformers", default = (opts.cross_attention_optimization == "xFormers"), action='store_true', help=argparse.SUPPRESS) + group.add_argument("--disable-nan-check", help=argparse.SUPPRESS, default=opts.disable_nan_check) + group.add_argument("--token-merging", help=argparse.SUPPRESS, default=opts.token_merging) + group.add_argument("--rollback-vae", help=argparse.SUPPRESS, default=opts.rollback_vae) + group.add_argument("--no-half", help=argparse.SUPPRESS, default=opts.no_half) + group.add_argument("--no-half-vae", help=argparse.SUPPRESS, default=opts.no_half_vae) + group.add_argument("--precision", help=argparse.SUPPRESS, default=opts.precision) + group.add_argument("--api", help=argparse.SUPPRESS, default=True) + group.add_argument("--sub-quad-q-chunk-size", help=argparse.SUPPRESS, default=opts.sub_quad_q_chunk_size) + group.add_argument("--sub-quad-kv-chunk-size", help=argparse.SUPPRESS, default=opts.sub_quad_kv_chunk_size) + group.add_argument("--sub-quad-chunk-threshold", help=argparse.SUPPRESS, default=opts.sub_quad_chunk_threshold) + group.add_argument('--debug', default = False, action='store_true', help = "Run installer with debug logging, default: %(default)s") opts.use_old_emphasis_implementation = False opts.use_old_karras_scheduler_sigmas = False @@ -93,7 +94,7 @@ def compatibility_args(opts, args): opts.print_hypernet_extra = False opts.dimensions_and_batch_together = True - parser.add_argument("--lora-dir", help=argparse.SUPPRESS, default=opts.lora_dir) + group.add_argument("--lora-dir", help=argparse.SUPPRESS, default=opts.lora_dir) args = parser.parse_args() if 'lyco_dir' in args: args.lyco_dir = opts.lyco_dir diff --git a/modules/sd_hijack.py b/modules/sd_hijack.py index 47640377c..459dfd091 100644 --- a/modules/sd_hijack.py +++ b/modules/sd_hijack.py @@ -92,12 +92,12 @@ def undo_optimizations(): def fix_checkpoint(): """checkpoints are now added and removed in embedding/hypernet code, since torch doesn't want checkpoints to be added when not training (there's a warning)""" - pass + pass # pylint: disable=unnecessary-pass def weighted_loss(sd_model, pred, target, mean=True): #Calculate the weight normally, but ignore the mean - loss = sd_model._old_get_loss(pred, target, mean=False) + loss = sd_model._old_get_loss(pred, target, mean=False) # pylint: disable=protected-access #Check if we have weights available weight = getattr(sd_model, '_custom_loss_weight', None) @@ -110,12 +110,12 @@ def weighted_loss(sd_model, pred, target, mean=True): def weighted_forward(sd_model, x, c, w, *args, **kwargs): try: #Temporarily append weights to a place accessible during loss calc - sd_model._custom_loss_weight = w + sd_model._custom_loss_weight = w # pylint: disable=protected-access #Replace 'get_loss' with a weight-aware one. Otherwise we need to reimplement 'forward' completely #Keep 'get_loss', but don't overwrite the previous old_get_loss if it's already set if not hasattr(sd_model, '_old_get_loss'): - sd_model._old_get_loss = sd_model.get_loss + sd_model._old_get_loss = sd_model.get_loss # pylint: disable=protected-access sd_model.get_loss = MethodType(weighted_loss, sd_model) #Run the standard forward function, but with the patched 'get_loss' @@ -129,7 +129,7 @@ def weighted_forward(sd_model, x, c, w, *args, **kwargs): #If we have an old loss function, reset the loss function to the original one if hasattr(sd_model, '_old_get_loss'): - sd_model.get_loss = sd_model._old_get_loss + sd_model.get_loss = sd_model._old_get_loss # pylint: disable=protected-access del sd_model._old_get_loss def apply_weighted_forward(sd_model): @@ -181,6 +181,10 @@ class StableDiffusionModelHijack: torch._dynamo.config.verbose = opts.cuda_compile_verbose # pylint: disable=protected-access torch._dynamo.config.suppress_errors = opts.cuda_compile_errors # pylint: disable=protected-access torch.backends.cudnn.benchmark = True + if opts.cuda_compile_mode == 'hidet': + import hidet + hidet.torch.dynamo_config.use_tensor_core(True) + hidet.torch.dynamo_config.search_space(2) m.model = torch.compile(m.model, mode="default", backend=opts.cuda_compile_mode, fullgraph=False, dynamic=False) print("Model compile enabled:", opts.cuda_compile_mode) except Exception as err: diff --git a/modules/sd_models.py b/modules/sd_models.py index a2ef7a012..4f5b18891 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -118,7 +118,7 @@ def list_models(): checkpoint_info.register() print(f'Available models: {shared.opts.ckpt_dir} {len(checkpoints_list)}') if len(checkpoints_list) == 0: - if not shared.cmd_opts.no_download_sd_model: + if not shared.cmd_opts.no_download: key = input('Download the default model? (y/N) ') if key.lower().startswith('y'): model_url = "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors" diff --git a/modules/shared.py b/modules/shared.py index 288804fea..aabed166c 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -49,7 +49,7 @@ ui_reorder_categories = [ "scripts", ] -cmd_opts.disable_extension_access = (cmd_opts.share or cmd_opts.listen or cmd_opts.server_name) and not cmd_opts.enable_insecure +cmd_opts.disable_extension_access = (cmd_opts.share or cmd_opts.listen or cmd_opts.server_name) and not cmd_opts.insecure devices.device, devices.device_interrogate, devices.device_gfpgan, devices.device_esrgan, devices.device_codeformer = (devices.cpu if any(y in cmd_opts.use_cpu for y in [x, 'all']) else devices.get_optimal_device() for x in ['sd', 'interrogate', 'gfpgan', 'esrgan', 'codeformer']) device = devices.device is_device_dml = False @@ -59,7 +59,7 @@ clip_model = None if device.type == 'privateuseone': - import modules.dml + import modules.dml # pylint: disable=ungrouped-imports is_device_dml = True @@ -324,9 +324,9 @@ options_templates.update(options_section(('cuda', "CUDA Settings"), { "cuda_allow_tf32": OptionInfo(True, "Allow TF32 math ops"), "cuda_allow_tf16_reduced": OptionInfo(True, "Allow TF16 reduced precision math ops"), "cuda_compile": OptionInfo(False, "Enable model compile (experimental)"), - "cuda_compile_mode": OptionInfo("none", "Model compile mode (experimental)", gr.Radio, lambda: {"choices": ['none', 'inductor', 'cudagraphs', 'aot_ts_nvfuser']}), - "cuda_compile_verbose": OptionInfo(True, "Compile verbose mode"), - "cuda_compile_errors": OptionInfo(True, "Compile suppress errors"), + "cuda_compile_mode": OptionInfo("none", "Model compile mode (experimental)", gr.Radio, lambda: {"choices": ['none', 'inductor', 'cudagraphs', 'aot_ts_nvfuser', 'hidet']}), + "cuda_compile_verbose": OptionInfo(True, "Model compile verbose mode"), + "cuda_compile_errors": OptionInfo(True, "Model compile suppress errors"), })) options_templates.update(options_section(('upscaling', "Upscaling"), { @@ -468,7 +468,7 @@ class Options: def __setattr__(self, key, value): if self.data is not None: if key in self.data or key in self.data_labels: - if cmd_opts.freeze_settings: + if cmd_opts.freeze: print(f'Settings are frozen: {key}') return if cmd_opts.hide_ui_dir_config and key in restricted_opts: @@ -514,7 +514,7 @@ class Options: return data_label.default def save(self, filename): - assert not cmd_opts.freeze_settings, "saving settings is disabled" + assert not cmd_opts.freeze, "saving settings is disabled" with open(filename, "w", encoding="utf8") as file: json.dump(self.data, file, indent=4) @@ -587,7 +587,7 @@ opts = Options() batch_cond_uncond = opts.always_batch_cond_uncond or not (cmd_opts.lowvram or cmd_opts.medvram) parallel_processing_allowed = not cmd_opts.lowvram and not cmd_opts.medvram xformers_available = False -config_filename = cmd_opts.ui_settings_file +config_filename = cmd_opts.config os.makedirs(opts.hypernetwork_dir, exist_ok=True) hypernetworks = {} loaded_hypernetworks = [] diff --git a/modules/ui.py b/modules/ui.py index 12e888308..e9d6c6efc 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -254,7 +254,7 @@ def setup_progressbar(*args, **kwargs): # pylint: disable=unused-argument def apply_setting(key, value): if value is None: return gr.update() - if shared.cmd_opts.freeze_settings: + if shared.cmd_opts.freeze: return gr.update() # dont allow model to be swapped when model hash exists in prompt if key == "sd_model_checkpoint" and opts.disable_weights_auto_swap: @@ -1292,7 +1292,7 @@ def create_ui(): current_row = gr.Column(variant='compact') current_row.__enter__() previous_section = item.section - if k in quicksettings_names and not shared.cmd_opts.freeze_settings: + if k in quicksettings_names and not shared.cmd_opts.freeze: quicksettings_list.append((i, k, item)) components.append(dummy_component) elif section_must_be_skipped: diff --git a/setup.py b/setup.py index cfaa1aaa0..3d680f397 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ class Dot(dict): # dot notation access to dictionary attributes log = logging.getLogger("sd") -args = Dot({ 'debug': False, 'upgrade': False, 'noupdate': False, 'nodirectml': False, 'skip-extensions': False, 'skip-requirements': False, 'reset': False }) +args = Dot({ 'debug': False, 'upgrade': False, 'skip_update': False, 'no_directml': False, 'skip_extensions': False, 'skip_requirements': False, 'reset': False }) quick_allowed = True errors = 0 opts = {} @@ -169,7 +169,6 @@ def clone(url, folder, commithash=None): # check python version def check_python(): - import platform supported_minors = [9, 10] if args.experimental: supported_minors.append(11) @@ -199,7 +198,7 @@ def check_torch(): xformers_package = os.environ.get('XFORMERS_PACKAGE', 'none') else: machine = platform.machine() - if 'arm' not in machine and 'aarch' not in machine and not args.nodirectml: # torch-directml is available on AMD64 + if 'arm' not in machine and 'aarch' not in machine and not args.no_directml: # torch-directml is available on AMD64 log.info('Using DirectML Backend') torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.0.0 torchvision torch-directml') xformers_package = os.environ.get('XFORMERS_PACKAGE', 'none') @@ -223,7 +222,7 @@ def check_torch(): log.info(f'Torch detected GPU: {torch.cuda.get_device_name(device)} VRAM {round(torch.cuda.get_device_properties(device).total_memory / 1024 / 1024)} Arch {torch.cuda.get_device_capability(device)} Cores {torch.cuda.get_device_properties(device).multi_processor_count}') else: try: - import torch_directml + import torch_directml # pylint: disable=import-error import pkg_resources version = pkg_resources.get_distribution("torch-directml") log.info(f'Torch backend: DirectML ({version})') @@ -245,6 +244,8 @@ def check_torch(): install(tensorflow_package, 'tensorflow', ignore=True) except Exception as e: log.debug(f'Cannot install tensorflow package: {e}') + if opts.get('cuda_compile_mode', '') == 'hidet': + install('hidet', 'hidet') # install required packages @@ -322,7 +323,7 @@ def install_extensions(): extensions = list_extensions(folder) log.info(f'Extensions enabled: {extensions}') for ext in extensions: - if not args.noupdate: + if not args.skip_update: try: update(os.path.join(folder, ext)) except: @@ -346,7 +347,7 @@ def install_submodules(): git('checkout master') log.info('Continuing setup') txt = git('submodule --quiet update --init --recursive') - if not args.noupdate: + if not args.skip_update: log.info('Updating submodules') submodules = git('submodule').splitlines() for submodule in submodules: @@ -461,7 +462,7 @@ def check_version(): def update_wiki(): - if not args.noupdate: + if not args.skip_update: log.info('Updating Wiki') try: update(os.path.join(os.path.dirname(__file__), "wiki")) @@ -503,16 +504,17 @@ def check_timestamp(): def add_args(): - parser.add_argument('--debug', default = False, action='store_true', help = "Run installer with debug logging, default: %(default)s") - parser.add_argument('--reset', default = False, action='store_true', help = "Reset main repository to latest version, default: %(default)s") - parser.add_argument('--upgrade', default = False, action='store_true', help = "Upgrade main repository to latest version, default: %(default)s") - parser.add_argument('--noupdate', default = False, action='store_true', help = "Skip update of extensions and submodules, default: %(default)s") - parser.add_argument('--nodirectml', default = False, action='store_true', help = "Although nVidia and AMD toolkit aren't detected, use CPU not DirectML, default: %(default)s") - parser.add_argument('--skip-requirements', default = False, action='store_true', help = "Skips checking and installing requirements, default: %(default)s") - parser.add_argument('--skip-extensions', default = False, action='store_true', help = "Skips running individual extension installers, default: %(default)s") - parser.add_argument('--skip-git', default = False, action='store_true', help = "Skips running all GIT operations, default: %(default)s") - parser.add_argument('--experimental', default = False, action='store_true', help = "Allow unsupported versions of libraries, default: %(default)s") - parser.add_argument('--test', default = False, action='store_true', help = "Run test only, default: %(default)s") + group = parser.add_argument_group('Setup options') + group.add_argument('--debug', default = False, action='store_true', help = "Run installer with debug logging, default: %(default)s") + group.add_argument('--reset', default = False, action='store_true', help = "Reset main repository to latest version, default: %(default)s") + group.add_argument('--upgrade', default = False, action='store_true', help = "Upgrade main repository to latest version, default: %(default)s") + group.add_argument('--no-directml', default = False, action='store_true', help = "Use CPU instead of DirectML if no compatible GPU is detected, default: %(default)s") + group.add_argument('--skip-update', default = False, action='store_true', help = "Skip update of extensions and submodules, default: %(default)s") + group.add_argument('--skip-requirements', default = False, action='store_true', help = "Skips checking and installing requirements, default: %(default)s") + group.add_argument('--skip-extensions', default = False, action='store_true', help = "Skips running individual extension installers, default: %(default)s") + group.add_argument('--skip-git', default = False, action='store_true', help = "Skips running all GIT operations, default: %(default)s") + group.add_argument('--experimental', default = False, action='store_true', help = "Allow unsupported versions of libraries, default: %(default)s") + group.add_argument('--test', default = False, action='store_true', help = "Run test only, default: %(default)s") def parse_args(): @@ -550,8 +552,8 @@ def git_reset(): def read_options(): global opts # pylint: disable=global-statement - if os.path.isfile(args.ui_settings_file): - with open(args.ui_settings_file, "r", encoding="utf8") as file: + if os.path.isfile(args.config): + with open(args.config, "r", encoding="utf8") as file: opts = json.load(file) diff --git a/webui.py b/webui.py index 7ca052a2e..6d78be03c 100644 --- a/webui.py +++ b/webui.py @@ -198,10 +198,10 @@ def start_ui(): shared.demo.queue(16) gradio_auth_creds = [] - if cmd_opts.gradio_auth: - gradio_auth_creds += [x.strip() for x in cmd_opts.gradio_auth.strip('"').replace('\n', '').split(',') if x.strip()] - if cmd_opts.gradio_auth_path: - with open(cmd_opts.gradio_auth_path, 'r', encoding="utf8") as file: + if cmd_opts.auth: + gradio_auth_creds += [x.strip() for x in cmd_opts.auth.strip('"').replace('\n', '').split(',') if x.strip()] + if cmd_opts.authfile: + with open(cmd_opts.authfile, 'r', encoding="utf8") as file: for line in file.readlines(): gradio_auth_creds += [x.strip() for x in line.split(',') if x.strip()] From de8d0bef9f64cab4e83845e2055d671181f5b4a6 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Sun, 30 Apr 2023 18:19:37 +0300 Subject: [PATCH 014/282] More patches and Import IPEX after Torch --- extensions-builtin/sd-webui-controlnet | 2 +- modules/api/api.py | 19 ++++++++++++++++++- modules/codeformer/codeformer_arch.py | 4 ++++ modules/codeformer/vqgan_arch.py | 4 ++++ modules/codeformer_model.py | 7 +++++-- modules/deepbooru.py | 4 ++++ modules/deepbooru_model.py | 4 ++++ modules/devices.py | 3 +-- modules/esrgan_model.py | 4 ++++ modules/esrgan_model_arch.py | 4 ++++ modules/extras.py | 4 ++++ modules/hypernetworks/hypernetwork.py | 17 ++++++++++++++--- modules/interrogate.py | 4 ++++ modules/lowvram.py | 4 ++++ modules/mac_specific.py | 4 ++++ modules/memmon.py | 13 +++++++------ modules/models/diffusion/ddpm_edit.py | 4 ++++ modules/models/diffusion/uni_pc/sampler.py | 4 ++++ modules/models/diffusion/uni_pc/uni_pc.py | 4 ++++ modules/processing.py | 10 ++++++---- modules/prompt_parser.py | 4 ++++ modules/safe.py | 4 ++++ modules/sd_disable_initialization.py | 4 ++++ modules/sd_hijack.py | 4 ++++ modules/sd_hijack_clip.py | 4 ++++ modules/sd_hijack_inpainting.py | 4 ++++ modules/sd_hijack_open_clip.py | 4 ++++ modules/sd_hijack_optimizations.py | 8 ++++++-- modules/sd_hijack_unet.py | 4 ++++ modules/sd_hijack_xlmr.py | 4 ++++ modules/sd_models.py | 4 ++++ modules/sd_models_config.py | 4 ++++ modules/sd_samplers_common.py | 4 ++++ modules/sd_samplers_compvis.py | 4 ++++ modules/sd_samplers_kdiffusion.py | 4 ++++ modules/sd_vae.py | 8 +++++++- modules/sd_vae_approx.py | 4 ++++ modules/sub_quadratic_attention.py | 4 ++++ modules/textual_inversion/dataset.py | 4 ++++ modules/textual_inversion/image_embedding.py | 4 ++++ .../textual_inversion/textual_inversion.py | 5 ++++- modules/xlmr.py | 4 ++++ webui.py | 4 ++++ wiki | 2 +- 44 files changed, 202 insertions(+), 24 deletions(-) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 09d1fcbf4..d2da774a4 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 09d1fcbf4dc715bca7547496f850801f95f732a6 +Subproject commit d2da774a40ff9c3770e21f71fb516403022fc3f6 diff --git a/modules/api/api.py b/modules/api/api.py index 0717edfaf..fdd26f868 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -573,7 +573,24 @@ class Api: ram = { 'error': f'{err}' } try: import torch - if torch.cuda.is_available(): + if shared.cmd_opts.use_ipex(): + import intel_extension_for_pytorch as ipex + system = { 'free': (torch.xpu.get_device_properties("xpu").total_memory - torch.xpu.memory_allocated()), 'used': torch.xpu.memory_allocated(), 'total': torch.xpu.get_device_properties("xpu").total_memory } + s = dict(torch.xpu.memory_stats("xpu")) + allocated = { 'current': s['allocated_bytes.all.current'], 'peak': s['allocated_bytes.all.peak'] } + reserved = { 'current': s['reserved_bytes.all.current'], 'peak': s['reserved_bytes.all.peak'] } + active = { 'current': s['active_bytes.all.current'], 'peak': s['active_bytes.all.peak'] } + inactive = { 'current': s['inactive_split_bytes.all.current'], 'peak': s['inactive_split_bytes.all.peak'] } + warnings = { 'retries': s['num_alloc_retries'], 'oom': s['num_ooms'] } + cuda = { + 'system': system, + 'active': active, + 'allocated': allocated, + 'reserved': reserved, + 'inactive': inactive, + 'events': warnings, + } + elif torch.cuda.is_available(): s = torch.cuda.mem_get_info() system = { 'free': s[0], 'used': s[1] - s[0], 'total': s[1] } s = dict(torch.cuda.memory_stats(shared.device)) diff --git a/modules/codeformer/codeformer_arch.py b/modules/codeformer/codeformer_arch.py index 11dcc3ee7..6d7b926fe 100644 --- a/modules/codeformer/codeformer_arch.py +++ b/modules/codeformer/codeformer_arch.py @@ -3,6 +3,10 @@ import math import numpy as np import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass from torch import nn, Tensor import torch.nn.functional as F from typing import Optional, List diff --git a/modules/codeformer/vqgan_arch.py b/modules/codeformer/vqgan_arch.py index e72936838..e66bb2a72 100644 --- a/modules/codeformer/vqgan_arch.py +++ b/modules/codeformer/vqgan_arch.py @@ -7,6 +7,10 @@ https://github.com/samb-t/unleashing-transformers/blob/master/models/vqgan.py ''' import numpy as np import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass import torch.nn as nn import torch.nn.functional as F import copy diff --git a/modules/codeformer_model.py b/modules/codeformer_model.py index 5217f69db..9d75e823d 100644 --- a/modules/codeformer_model.py +++ b/modules/codeformer_model.py @@ -3,6 +3,10 @@ import sys import cv2 import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass import modules.face_restoration from modules import shared, devices, modelloader, errors @@ -103,8 +107,7 @@ def setup_model(dirname): output = self.net(cropped_face_t, w=w if w is not None else shared.opts.code_former_weight, adain=True)[0] restored_face = tensor2img(output, rgb2bgr=True, min_max=(-1, 1)) del output - from modules import shared - if shared.cmd_opts.use_ipex: + if cmd_opts.use_ipex: torch.xpu.empty_cache() else: torch.cuda.empty_cache() diff --git a/modules/deepbooru.py b/modules/deepbooru.py index 1c4554a20..50e400fd8 100644 --- a/modules/deepbooru.py +++ b/modules/deepbooru.py @@ -2,6 +2,10 @@ import os import re import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass import numpy as np from modules import modelloader, paths, deepbooru_model, devices, images, shared diff --git a/modules/deepbooru_model.py b/modules/deepbooru_model.py index c2c77cd25..ef53494a2 100644 --- a/modules/deepbooru_model.py +++ b/modules/deepbooru_model.py @@ -1,4 +1,8 @@ import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass import torch.nn as nn import torch.nn.functional as F diff --git a/modules/devices.py b/modules/devices.py index 1ab082f33..8be1e3866 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -5,8 +5,7 @@ from modules import shared try: import intel_extension_for_pytorch as ipex except: - if shared.cmd_opts.use_ipex: - print("Failed to import IPEX") + pass if sys.platform == "darwin": from modules import mac_specific diff --git a/modules/esrgan_model.py b/modules/esrgan_model.py index bb4c6619b..769d66f01 100644 --- a/modules/esrgan_model.py +++ b/modules/esrgan_model.py @@ -2,6 +2,10 @@ import os import numpy as np import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass from PIL import Image from basicsr.utils.download_util import load_file_from_url diff --git a/modules/esrgan_model_arch.py b/modules/esrgan_model_arch.py index 411d98d38..fc352d0ba 100644 --- a/modules/esrgan_model_arch.py +++ b/modules/esrgan_model_arch.py @@ -2,6 +2,10 @@ import math import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass import torch.nn as nn import torch.nn.functional as F diff --git a/modules/extras.py b/modules/extras.py index c0ae9477f..4513f2491 100644 --- a/modules/extras.py +++ b/modules/extras.py @@ -4,6 +4,10 @@ import html import shutil import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass import tqdm import gradio as gr import safetensors.torch diff --git a/modules/hypernetworks/hypernetwork.py b/modules/hypernetworks/hypernetwork.py index 4aa5ffcdc..a1caecbe4 100644 --- a/modules/hypernetworks/hypernetwork.py +++ b/modules/hypernetworks/hypernetwork.py @@ -8,6 +8,10 @@ import inspect import modules.textual_inversion.dataset import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass import tqdm from einops import rearrange, repeat from ldm.util import default @@ -591,7 +595,10 @@ def train_hypernetwork(id_task, hypernetwork_name, learn_rate, batch_size, gradi print("Cannot resume from saved optimizer!") print(e) - scaler = torch.cuda.amp.GradScaler() + if shared.cmd_opts.use_ipex: + scaler = torch.xpu.amp.GradScaler() + else: + scaler = torch.cuda.amp.GradScaler() batch_size = ds.batch_size gradient_step = ds.gradient_step @@ -708,7 +715,9 @@ def train_hypernetwork(id_task, hypernetwork_name, learn_rate, batch_size, gradi hypernetwork.eval() rng_state = torch.get_rng_state() cuda_rng_state = None - if torch.cuda.is_available(): + if shared.cmd_opts.use_ipex: + cuda_rng_state = torch.xpu.get_rng_state_all() + elif torch.cuda.is_available(): cuda_rng_state = torch.cuda.get_rng_state_all() shared.sd_model.cond_stage_model.to(devices.device) shared.sd_model.first_stage_model.to(devices.device) @@ -745,7 +754,9 @@ def train_hypernetwork(id_task, hypernetwork_name, learn_rate, batch_size, gradi shared.sd_model.cond_stage_model.to(devices.cpu) shared.sd_model.first_stage_model.to(devices.cpu) torch.set_rng_state(rng_state) - if torch.cuda.is_available(): + if shared.cmd_opts.use_ipex: + torch.xpu.set_rng_state_all(cuda_rng_state) + elif torch.cuda.is_available(): torch.cuda.set_rng_state_all(cuda_rng_state) hypernetwork.train() if image is not None: diff --git a/modules/interrogate.py b/modules/interrogate.py index 6afbde570..93bb08f20 100644 --- a/modules/interrogate.py +++ b/modules/interrogate.py @@ -5,6 +5,10 @@ from pathlib import Path import re import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass import torch.hub from torchvision import transforms diff --git a/modules/lowvram.py b/modules/lowvram.py index e254cc131..7dba01593 100644 --- a/modules/lowvram.py +++ b/modules/lowvram.py @@ -1,4 +1,8 @@ import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass from modules import devices module_in_gpu = None diff --git a/modules/mac_specific.py b/modules/mac_specific.py index c8a534d0e..2455800d5 100644 --- a/modules/mac_specific.py +++ b/modules/mac_specific.py @@ -1,4 +1,8 @@ import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass import platform from modules.sd_hijack_utils import CondFunc from packaging import version diff --git a/modules/memmon.py b/modules/memmon.py index 4ceb29a37..3abc70ac3 100644 --- a/modules/memmon.py +++ b/modules/memmon.py @@ -2,6 +2,12 @@ import threading import time from collections import defaultdict import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass + +from modules import shared class MemUsageMonitor(threading.Thread): @@ -19,7 +25,6 @@ class MemUsageMonitor(threading.Thread): self.daemon = True self.run_flag = threading.Event() self.data = defaultdict(int) - from modules import shared if not torch.cuda.is_available() or not shared.cmd_opts.use_ipex: self.disabled = True else: @@ -40,9 +45,8 @@ class MemUsageMonitor(threading.Thread): self.disabled = True def cuda_mem_get_info(self): - from modules import shared if shared.cmd_opts.use_ipex: - return torch.xpu.mem_get_info("xpu") + return [(torch.xpu.get_device_properties("xpu").total_memory - torch.xpu.memory_allocated()), torch.xpu.get_device_properties("xpu").total_memory] else: index = self.device.index if self.device.index is not None else torch.cuda.current_device() return torch.cuda.mem_get_info(index) @@ -52,7 +56,6 @@ class MemUsageMonitor(threading.Thread): return while True: self.run_flag.wait() - from modules import shared if shared.cmd_opts.use_ipex: torch.xpu.reset_peak_memory_stats() else: @@ -72,7 +75,6 @@ class MemUsageMonitor(threading.Thread): for k, v in self.read().items(): print(k, -(v // -(1024 ** 2))) print(self, 'raw torch memory stats:') - from modules import shared if shared.cmd_opts.use_ipex: tm = torch.xpu.memory_stats("xpu") else: @@ -95,7 +97,6 @@ class MemUsageMonitor(threading.Thread): self.data["free"] = free self.data["total"] = total - from modules import shared if shared.cmd_opts.use_ipex: torch_stats = torch.xpu.memory_stats("xpu") else: diff --git a/modules/models/diffusion/ddpm_edit.py b/modules/models/diffusion/ddpm_edit.py index f3d49c44c..846a74fc4 100644 --- a/modules/models/diffusion/ddpm_edit.py +++ b/modules/models/diffusion/ddpm_edit.py @@ -10,6 +10,10 @@ https://github.com/CompVis/taming-transformers # See more details in LICENSE. import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass import torch.nn as nn import numpy as np import pytorch_lightning as pl diff --git a/modules/models/diffusion/uni_pc/sampler.py b/modules/models/diffusion/uni_pc/sampler.py index 3100522ab..6dd7c7fd8 100644 --- a/modules/models/diffusion/uni_pc/sampler.py +++ b/modules/models/diffusion/uni_pc/sampler.py @@ -2,6 +2,10 @@ import numpy as np import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass from .uni_pc import NoiseScheduleVP, model_wrapper, UniPC from modules import shared, devices diff --git a/modules/models/diffusion/uni_pc/uni_pc.py b/modules/models/diffusion/uni_pc/uni_pc.py index 61ee39522..895fc58c3 100644 --- a/modules/models/diffusion/uni_pc/uni_pc.py +++ b/modules/models/diffusion/uni_pc/uni_pc.py @@ -1,4 +1,8 @@ import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass import torch.nn.functional as F import math import time diff --git a/modules/processing.py b/modules/processing.py index 293a8d606..36737fdbe 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -8,6 +8,10 @@ from typing import Any, Dict, List import psutil import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass import numpy as np from PIL import Image, ImageFilter, ImageOps import cv2 @@ -55,10 +59,8 @@ def memory_stats(): except Exception as e: mem.update({ 'ram': e }) try: - from modules import shared - if shared.cmd_opts.use_ipex: - s = torch.xpu.mem_get_info() - gpu = { 'used': gb(s[1] - s[0]), 'total': gb(s[1]) } + if cmd_opts.use_ipex: + gpu = { 'used': gb(torch.xpu.memory_allocated()), 'total': gb(torch.xpu.get_device_properties("xpu").total_memory) } s = dict(torch.xpu.memory_stats("xpu")) mem.update({ 'gpu': gpu, diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py index 7006f2822..6722d9f80 100644 --- a/modules/prompt_parser.py +++ b/modules/prompt_parser.py @@ -368,3 +368,7 @@ if __name__ == "__main__": doctest.testmod(optionflags=doctest.NORMALIZE_WHITESPACE) else: import torch # doctest faster + try: + import intel_extension_for_pytorch as ipex + except: + pass diff --git a/modules/safe.py b/modules/safe.py index 9a1133ddc..dd463ccdd 100644 --- a/modules/safe.py +++ b/modules/safe.py @@ -6,6 +6,10 @@ import zipfile import re import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass import numpy import _codecs diff --git a/modules/sd_disable_initialization.py b/modules/sd_disable_initialization.py index c4a09d15d..5cc5e4e7a 100644 --- a/modules/sd_disable_initialization.py +++ b/modules/sd_disable_initialization.py @@ -1,6 +1,10 @@ import ldm.modules.encoders.modules import open_clip import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass import transformers.utils.hub diff --git a/modules/sd_hijack.py b/modules/sd_hijack.py index f817b7afd..6d2bb3b0f 100644 --- a/modules/sd_hijack.py +++ b/modules/sd_hijack.py @@ -1,6 +1,10 @@ from types import MethodType from rich import print # pylint: disable=redefined-builtin import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass from torch.nn.functional import silu import ldm.modules.attention import ldm.modules.diffusionmodules.model diff --git a/modules/sd_hijack_clip.py b/modules/sd_hijack_clip.py index 945f7732d..cf4abf84f 100644 --- a/modules/sd_hijack_clip.py +++ b/modules/sd_hijack_clip.py @@ -2,6 +2,10 @@ import math from collections import namedtuple import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass from modules import prompt_parser, devices, sd_hijack from modules.shared import opts diff --git a/modules/sd_hijack_inpainting.py b/modules/sd_hijack_inpainting.py index 4b23c132d..1a9ea9b4c 100644 --- a/modules/sd_hijack_inpainting.py +++ b/modules/sd_hijack_inpainting.py @@ -1,4 +1,8 @@ import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass import ldm.models.diffusion.ddpm import ldm.models.diffusion.ddim diff --git a/modules/sd_hijack_open_clip.py b/modules/sd_hijack_open_clip.py index f76fc1f3b..c0c204a82 100644 --- a/modules/sd_hijack_open_clip.py +++ b/modules/sd_hijack_open_clip.py @@ -1,5 +1,9 @@ import open_clip.tokenizer import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass from modules import sd_hijack_clip, devices diff --git a/modules/sd_hijack_optimizations.py b/modules/sd_hijack_optimizations.py index 5168b4b7a..3887e238d 100644 --- a/modules/sd_hijack_optimizations.py +++ b/modules/sd_hijack_optimizations.py @@ -2,6 +2,10 @@ import math import psutil import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass from torch import einsum from ldm.util import default @@ -26,7 +30,7 @@ def get_available_vram(): stats = torch.xpu.memory_stats("xpu") mem_active = stats['active_bytes.all.current'] mem_reserved = stats['reserved_bytes.all.current'] - mem_free_xpu, _ = torch.xpu.mem_get_info("xpu") + mem_free_xpu, _ = [(torch.xpu.get_device_properties("xpu").total_memory - torch.xpu.memory_allocated()), torch.xpu.get_device_properties("xpu").total_memory] mem_free_torch = mem_reserved - mem_active mem_free_total = mem_free_xpu + mem_free_torch return mem_free_total @@ -201,7 +205,7 @@ def einsum_op_cuda(q, k, v): stats = torch.xpu.memory_stats("xpu") mem_active = stats['active_bytes.all.current'] mem_reserved = stats['reserved_bytes.all.current'] - mem_free_xpu, _ = torch.xpu.mem_get_info("xpu") + mem_free_xpu, _ = [(torch.xpu.get_device_properties("xpu").total_memory - torch.xpu.memory_allocated()), torch.xpu.get_device_properties("xpu").total_memory] mem_free_torch = mem_reserved - mem_active mem_free_total = mem_free_xpu + mem_free_torch # Divide factor of safety as there's copying and fragmentation diff --git a/modules/sd_hijack_unet.py b/modules/sd_hijack_unet.py index 7ff553ae3..ce6ac1306 100644 --- a/modules/sd_hijack_unet.py +++ b/modules/sd_hijack_unet.py @@ -1,4 +1,8 @@ import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass from packaging import version from modules import devices diff --git a/modules/sd_hijack_xlmr.py b/modules/sd_hijack_xlmr.py index 28528329b..a9cb9454c 100644 --- a/modules/sd_hijack_xlmr.py +++ b/modules/sd_hijack_xlmr.py @@ -1,4 +1,8 @@ import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass from modules import sd_hijack_clip, devices diff --git a/modules/sd_models.py b/modules/sd_models.py index 49de37097..2e2b5f0a2 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -8,6 +8,10 @@ from os import mkdir from urllib import request from rich import print, progress # pylint: disable=redefined-builtin import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass import safetensors.torch from omegaconf import OmegaConf import tomesd diff --git a/modules/sd_models_config.py b/modules/sd_models_config.py index a9c515b14..5bc3799a0 100644 --- a/modules/sd_models_config.py +++ b/modules/sd_models_config.py @@ -1,6 +1,10 @@ import os import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass from modules import paths, sd_disable_initialization diff --git a/modules/sd_samplers_common.py b/modules/sd_samplers_common.py index 888f9a30e..dfb478251 100644 --- a/modules/sd_samplers_common.py +++ b/modules/sd_samplers_common.py @@ -1,6 +1,10 @@ from collections import namedtuple import numpy as np import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass from PIL import Image from modules import devices, processing, images, sd_vae_approx diff --git a/modules/sd_samplers_compvis.py b/modules/sd_samplers_compvis.py index 8de719323..6f08a9022 100644 --- a/modules/sd_samplers_compvis.py +++ b/modules/sd_samplers_compvis.py @@ -4,6 +4,10 @@ import ldm.models.diffusion.plms import numpy as np import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass from modules.shared import state from modules import sd_samplers_common, prompt_parser, shared diff --git a/modules/sd_samplers_kdiffusion.py b/modules/sd_samplers_kdiffusion.py index a30d351fc..5ba34cc33 100644 --- a/modules/sd_samplers_kdiffusion.py +++ b/modules/sd_samplers_kdiffusion.py @@ -1,6 +1,10 @@ from collections import deque import inspect import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass import k_diffusion.sampling from modules import prompt_parser, devices, sd_samplers_common diff --git a/modules/sd_vae.py b/modules/sd_vae.py index e5c544487..a13d73be7 100644 --- a/modules/sd_vae.py +++ b/modules/sd_vae.py @@ -3,8 +3,14 @@ import collections import glob from copy import deepcopy from rich import print # pylint: disable=redefined-builtin +from modules import shared import torch -from modules import paths, shared, devices, script_callbacks, sd_models +try: + import intel_extension_for_pytorch as ipex +except: + if shared.cmd_opts.use_ipex: + print("Failed to import IPEX") +from modules import paths, devices, script_callbacks, sd_models vae_ignore_keys = {"model_ema.decay", "model_ema.num_updates"} diff --git a/modules/sd_vae_approx.py b/modules/sd_vae_approx.py index e2f004683..56c3fb15f 100644 --- a/modules/sd_vae_approx.py +++ b/modules/sd_vae_approx.py @@ -1,6 +1,10 @@ import os import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass from torch import nn from modules import devices, paths diff --git a/modules/sub_quadratic_attention.py b/modules/sub_quadratic_attention.py index 87c18a38d..0af680de2 100644 --- a/modules/sub_quadratic_attention.py +++ b/modules/sub_quadratic_attention.py @@ -14,6 +14,10 @@ from functools import partial import math from typing import Optional, NamedTuple, List import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass from torch import Tensor from torch.utils.checkpoint import checkpoint diff --git a/modules/textual_inversion/dataset.py b/modules/textual_inversion/dataset.py index af9fbcf28..272ae76ea 100644 --- a/modules/textual_inversion/dataset.py +++ b/modules/textual_inversion/dataset.py @@ -2,6 +2,10 @@ import os import numpy as np import PIL import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass from PIL import Image from torch.utils.data import Dataset, DataLoader, Sampler from torchvision import transforms diff --git a/modules/textual_inversion/image_embedding.py b/modules/textual_inversion/image_embedding.py index 0ba5db8a4..a2c518af3 100644 --- a/modules/textual_inversion/image_embedding.py +++ b/modules/textual_inversion/image_embedding.py @@ -4,6 +4,10 @@ import numpy as np import zlib from PIL import Image, PngImagePlugin, ImageDraw, ImageFont import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass from modules.shared import opts diff --git a/modules/textual_inversion/textual_inversion.py b/modules/textual_inversion/textual_inversion.py index 36a1e1e17..377b577f0 100644 --- a/modules/textual_inversion/textual_inversion.py +++ b/modules/textual_inversion/textual_inversion.py @@ -3,6 +3,10 @@ import html import csv from collections import namedtuple import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass import tqdm import safetensors.torch from rich import print # pylint: disable=redefined-builtin @@ -434,7 +438,6 @@ def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_st else: print("No saved optimizer exists in checkpoint") - from modules import shared if shared.cmd_opts.use_ipex: scaler = torch.xpu.amp.GradScaler() else: diff --git a/modules/xlmr.py b/modules/xlmr.py index 9da3161cc..a891beb6d 100644 --- a/modules/xlmr.py +++ b/modules/xlmr.py @@ -1,5 +1,9 @@ from typing import Optional import torch +try: + import intel_extension_for_pytorch as ipex +except: + pass import torch.nn as nn from transformers import XLMRobertaModel,XLMRobertaTokenizer, BertPreTrainedModel, BertModel, BertConfig # pylint: disable=unused-import from transformers.models.xlm_roberta.configuration_xlm_roberta import XLMRobertaConfig diff --git a/webui.py b/webui.py index 7ca052a2e..e9ec96c6d 100644 --- a/webui.py +++ b/webui.py @@ -12,6 +12,10 @@ from modules import timer, errors startup_timer = timer.Timer() import torch # pylint: disable=C0411 +try: + import intel_extension_for_pytorch as ipex +except: + pass import torchvision # pylint: disable=W0611,C0411 import pytorch_lightning # pytorch_lightning should be imported after torch, but it re-enables warnings on import so import once to disable them # pylint: disable=W0611,C0411 logging.getLogger("xformers").addFilter(lambda record: 'A matching Triton is not available' not in record.getMessage()) diff --git a/wiki b/wiki index 6cd8fde16..4cbdffaa9 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 6cd8fde165190057c0849fa6f8dbb183f717b176 +Subproject commit 4cbdffaa95978d0a46758eac4a3fbe689eb4cdcd From 56cdac65929578fd5900ecdad7a8c450e24832bd Mon Sep 17 00:00:00 2001 From: Disty0 Date: Sun, 30 Apr 2023 18:36:52 +0300 Subject: [PATCH 015/282] undo cli --- cli/modules/bench.py | 7 ++-- cli/modules/interrogate-offline.py | 18 ++-------- cli/modules/lora-extract.py | 16 ++------- cli/modules/lora-latents.py | 11 +----- cli/modules/util.py | 20 +---------- cli/random/dynamotest.py | 49 +++++++------------------- cli/train-lora.py | 13 +------ cli/train/latents.py | 11 +----- extensions-builtin/sd-webui-controlnet | 2 +- 9 files changed, 24 insertions(+), 123 deletions(-) diff --git a/cli/modules/bench.py b/cli/modules/bench.py index 18791bfc9..094b73f63 100755 --- a/cli/modules/bench.py +++ b/cli/modules/bench.py @@ -10,7 +10,7 @@ import time from PIL import Image import sdapi from util import Map, log -from modules import shared + options = Map({ 'restore_faces': False, @@ -56,10 +56,7 @@ async def txt2img(): def memstats(): mem = sdapi.getsync('/sdapi/v1/memory') cpu = mem.get('ram', 'unavailable') - if shared.cmd_opts.use_ipex: - gpu = mem.get('xpu', 'unavailable') - else: - gpu = mem.get('cuda', 'unavailable') + gpu = mem.get('cuda', 'unavailable') if 'active' in gpu: gpu['session'] = gpu.pop('active') if 'reserved' in gpu: diff --git a/cli/modules/interrogate-offline.py b/cli/modules/interrogate-offline.py index c2623cda6..6d9ae56fa 100755 --- a/cli/modules/interrogate-offline.py +++ b/cli/modules/interrogate-offline.py @@ -6,12 +6,6 @@ import json import time import argparse import torch -from modules import shared -try: - import intel_extension_for_pytorch as ipex -except: - if shared.cmd_opts.use_ipex: - print("Failed to import IPEX") import filetype from PIL import Image import transformers @@ -25,10 +19,7 @@ model = None processor = None extractor = None dtype = torch.float32 -if shared.cmd_opts.use_ipex: - device = torch.device('xpu') -else: - device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') +device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') options = Map({ 'input': '', @@ -138,12 +129,7 @@ def unload_model(): del extractor extractor = None gc.collect() - if shared.cmd_opts.use_ipex: - with torch.no_grad(): - torch.xpu.empty_cache() - with torch.xpu.device('xpu'): - torch.xpu.empty_cache() - elif torch.cuda.is_available(): + if torch.cuda.is_available(): with torch.no_grad(): torch.cuda.empty_cache() with torch.cuda.device('cuda'): diff --git a/cli/modules/lora-extract.py b/cli/modules/lora-extract.py index 9a781789a..102728308 100755 --- a/cli/modules/lora-extract.py +++ b/cli/modules/lora-extract.py @@ -10,12 +10,6 @@ import sys import time import argparse import torch -from modules import shared -try: - import intel_extension_for_pytorch as ipex -except: - if shared.cmd_opts.use_ipex: - print("Failed to import IPEX") import transformers from tqdm import tqdm from util import log @@ -26,10 +20,7 @@ import networks.lora as lora def svd(args): # pylint: disable=redefined-outer-name - if shared.cmd_opts.use_ipex: - device = torch.device('xpu') - else: - device = 'cuda' if torch.cuda.is_available() and args.device == 'cuda' else 'cpu' + device = 'cuda' if torch.cuda.is_available() and args.device == 'cuda' else 'cpu' transformers.logging.set_verbosity_error() CLAMP_QUANTILE = 0.99 MIN_DIFF = 1e-6 @@ -47,10 +38,7 @@ def svd(args): # pylint: disable=redefined-outer-name log.info({ 'loading model': args.tuned }) text_encoder_t, _, unet_t = model_util.load_models_from_stable_diffusion_checkpoint(args.v2, args.tuned) with torch.no_grad(): - if shared.cmd_opts.use_ipex: - torch.xpu.empty_cache() - else: - torch.cuda.empty_cache() + torch.cuda.empty_cache() # create LoRA network to extract weights: Use dim (rank) as alpha lora_network_o = lora.create_network(1.0, args.dim, args.dim, None, text_encoder_o, unet_o) lora_network_t = lora.create_network(1.0, args.dim, args.dim, None, text_encoder_t, unet_t) diff --git a/cli/modules/lora-latents.py b/cli/modules/lora-latents.py index 7e701df12..d556d596b 100755 --- a/cli/modules/lora-latents.py +++ b/cli/modules/lora-latents.py @@ -10,12 +10,6 @@ import warnings import cv2 import numpy as np import torch -from modules import shared -try: - import intel_extension_for_pytorch as ipex -except: - if shared.cmd_opts.use_ipex: - print("Failed to import IPEX") from PIL import Image from torchvision import transforms from tqdm import tqdm @@ -26,10 +20,7 @@ import library.model_util as model_util import library.train_util as train_util warnings.filterwarnings('ignore') -if shared.cmd_opts.use_ipex: - device = torch.device('xpu') -else: - device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') +device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') options = Map({ 'batch': 1, 'input': '', diff --git a/cli/modules/util.py b/cli/modules/util.py index d48887961..5ab9dee6b 100755 --- a/cli/modules/util.py +++ b/cli/modules/util.py @@ -45,25 +45,7 @@ def get_memory(): try: import torch from modules import shared - if shared.cmd_opts.use_ipex: - import intel_extension_for_pytorch as ipex - s = torch.xpu.mem_get_info() - gpu = { 'free': gb(s[0]), 'used': gb(s[1] - s[0]), 'total': gb(s[1]) } - s = dict(torch.xpu.memory_stats('xpu')) - allocated = { 'current': gb(s['allocated_bytes.all.current']), 'peak': gb(s['allocated_bytes.all.peak']) } - reserved = { 'current': gb(s['reserved_bytes.all.current']), 'peak': gb(s['reserved_bytes.all.peak']) } - active = { 'current': gb(s['active_bytes.all.current']), 'peak': gb(s['active_bytes.all.peak']) } - inactive = { 'current': gb(s['inactive_split_bytes.all.current']), 'peak': gb(s['inactive_split_bytes.all.peak']) } - warnings = { 'retries': s['num_alloc_retries'], 'oom': s['num_ooms'] } - mem.update({ - 'gpu': gpu, - 'gpu-active': active, - 'gpu-allocated': allocated, - 'gpu-reserved': reserved, - 'gpu-inactive': inactive, - 'events': warnings, - }) - elif torch.cuda.is_available(): + if torch.cuda.is_available(): s = torch.cuda.mem_get_info() gpu = { 'free': gb(s[0]), 'used': gb(s[1] - s[0]), 'total': gb(s[1]) } s = dict(torch.cuda.memory_stats('cuda')) diff --git a/cli/random/dynamotest.py b/cli/random/dynamotest.py index 556ae96a8..82b1143c6 100755 --- a/cli/random/dynamotest.py +++ b/cli/random/dynamotest.py @@ -7,14 +7,9 @@ import warnings import numpy as np import torch -from modules import shared -try: - import intel_extension_for_pytorch as ipex -except: - if shared.cmd_opts.use_ipex: - print("Failed to import IPEX") from torchvision.models import resnet18 + print('torch:', torch.__version__) try: import torch._dynamo as dynamo # must be imported explicitly or namespace is not found @@ -29,42 +24,24 @@ warnings.filterwarnings('ignore', category=UserWarning) # disable those for now def timed(fn): # returns the result of running `fn()` and the time it took for `fn()` to run in ms using CUDA events - if shared.cmd_opts.use_ipex: - start = torch.xpu.Event(enable_timing=True) - end = torch.xpu.Event(enable_timing=True) - start.record() - result = fn() - end.record() - torch.xpu.synchronize() - return result, start.elapsed_time(end) - else: - start = torch.cuda.Event(enable_timing=True) - end = torch.cuda.Event(enable_timing=True) - start.record() - result = fn() - end.record() - torch.cuda.synchronize() - return result, start.elapsed_time(end) + start = torch.cuda.Event(enable_timing=True) + end = torch.cuda.Event(enable_timing=True) + start.record() + result = fn() + end.record() + torch.cuda.synchronize() + return result, start.elapsed_time(end) def generate_data(b): - if shared.cmd_opts.use_ipex: - return ( - torch.randn(b, 3, 128, 128).to(torch.float32).xpu(), - torch.randint(1000, (b,)).xpu(), - ) - else: - return ( - torch.randn(b, 3, 128, 128).to(torch.float32).cuda(), - torch.randint(1000, (b,)).cuda(), - ) + return ( + torch.randn(b, 3, 128, 128).to(torch.float32).cuda(), + torch.randint(1000, (b,)).cuda(), + ) def init_model(): - if shared.cmd_opts.use_ipex: - return resnet18().to(torch.float32).xpu() - else: - return resnet18().to(torch.float32).cuda() + return resnet18().to(torch.float32).cuda() def eval(mod, inp): diff --git a/cli/train-lora.py b/cli/train-lora.py index f1e295a35..6f82063a6 100755 --- a/cli/train-lora.py +++ b/cli/train-lora.py @@ -23,12 +23,6 @@ import shutil import argparse import tempfile import torch -from modules import shared -try: - import intel_extension_for_pytorch as ipex -except: - if shared.cmd_opts.use_ipex: - print("Failed to import IPEX") import logging import importlib import transformers @@ -123,12 +117,7 @@ options = Map({ def mem_stats(): gc.collect() - if shared.cmd_opts.use_ipex: - with torch.no_grad(): - torch.xpu.empty_cache() - with torch.xpu.device('xpu'): - torch.cuda.empty_cache() - elif torch.cuda.is_available(): + if torch.cuda.is_available(): with torch.no_grad(): torch.cuda.empty_cache() with torch.cuda.device('cuda'): diff --git a/cli/train/latents.py b/cli/train/latents.py index 715f92aba..94249b18a 100755 --- a/cli/train/latents.py +++ b/cli/train/latents.py @@ -10,12 +10,6 @@ import warnings import cv2 import numpy as np import torch -from modules import shared -try: - import intel_extension_for_pytorch as ipex -except: - if shared.cmd_opts.use_ipex: - print("Failed to import IPEX") from PIL import Image from torchvision import transforms from tqdm import tqdm @@ -34,10 +28,7 @@ import library.model_util as model_util import library.train_util as train_util warnings.filterwarnings('ignore') -if shared.cmd_opts.use_ipex: - device = torch.device('xpu') -else: - device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') +device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') options = Map({ 'batch': 1, 'input': '', diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index d2da774a4..af4720780 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit d2da774a40ff9c3770e21f71fb516403022fc3f6 +Subproject commit af4720780f10d912789cbd6db1fbc6d2f0afc533 From 185b796991e6ae8f71c03fea826581f0799ce9b4 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Sun, 30 Apr 2023 18:37:58 +0300 Subject: [PATCH 016/282] undo cli --- cli/modules/util.py | 1 - 1 file changed, 1 deletion(-) diff --git a/cli/modules/util.py b/cli/modules/util.py index 5ab9dee6b..479b77233 100755 --- a/cli/modules/util.py +++ b/cli/modules/util.py @@ -44,7 +44,6 @@ def get_memory(): mem.update({ 'ram': e }) try: import torch - from modules import shared if torch.cuda.is_available(): s = torch.cuda.mem_get_info() gpu = { 'free': gb(s[0]), 'used': gb(s[1] - s[0]), 'total': gb(s[1]) } From e157681985207b6c987ebc6ca9bde701495e658d Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 30 Apr 2023 11:43:56 -0400 Subject: [PATCH 017/282] update todo --- TODO.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index 503154a59..040fca0a2 100644 --- a/TODO.md +++ b/TODO.md @@ -15,10 +15,11 @@ Stuff to be added... - Add Gradio theme maker - Transformers version - Create new GitHub hooks/actions for CI/CD -- Redo Extensions tab: see +- Redo Extensions tab: - Stream-load models as option for slow storage - Auto-test `torch.layer_norm` for FP16 - Monitor file changes by misbehaving extensions +- Kitchen theme: ## Investigate From d62ee69c75fe79c9452d51b0997cf5e91efb7dca Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 30 Apr 2023 12:01:25 -0400 Subject: [PATCH 018/282] cleanup installer --- setup.py => installer.py | 8 ++++---- launch.py | 40 +++++++++++++++++++++------------------- modules/cmd_args.py | 3 +-- modules/shared.py | 4 ++-- 4 files changed, 28 insertions(+), 27 deletions(-) rename setup.py => installer.py (98%) diff --git a/setup.py b/installer.py similarity index 98% rename from setup.py rename to installer.py index 393663088..3be52a6c2 100644 --- a/setup.py +++ b/installer.py @@ -13,7 +13,6 @@ except: import argparse parser = argparse.ArgumentParser(description="Stable Diffusion", conflict_handler='resolve', formatter_class=lambda prog: argparse.HelpFormatter(prog, max_help_position=55, indent_increment=2, width=200)) - class Dot(dict): # dot notation access to dictionary attributes __getattr__ = dict.get __setattr__ = dict.__setitem__ @@ -224,9 +223,9 @@ def check_torch(): import torch log.info(f'Torch {torch.__version__}') if shared.cmd_opts.use_ipex: - import intel_extension_for_pytorch as ipex - log.info(f'Torch backend: Intel OneAPI {torch.__version__}') - log.info(f'Torch detected GPU: {torch.xpu.get_device_name("xpu")} VRAM {round(torch.xpu.get_device_properties("xpu").total_memory / 1024 / 1024)}') + import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import + log.info(f'Torch backend: Intel OneAPI {torch.__version__}') + log.info(f'Torch detected GPU: {torch.xpu.get_device_name("xpu")} VRAM {round(torch.xpu.get_device_properties("xpu").total_memory / 1024 / 1024)}') elif torch.cuda.is_available(): if torch.version.cuda: log.info(f'Torch backend: nVidia CUDA {torch.version.cuda} cuDNN {torch.backends.cudnn.version() if torch.backends.cudnn.is_available() else "N/A"}') @@ -524,6 +523,7 @@ def add_args(): group.add_argument('--debug', default = False, action='store_true', help = "Run installer with debug logging, default: %(default)s") group.add_argument('--reset', default = False, action='store_true', help = "Reset main repository to latest version, default: %(default)s") group.add_argument('--upgrade', default = False, action='store_true', help = "Upgrade main repository to latest version, default: %(default)s") + group.add_argument("--use-ipex", action='store_true', help="Use Intel OneAPI XPU backend, default: %(default)s", default=False) group.add_argument('--no-directml', default = False, action='store_true', help = "Use CPU instead of DirectML if no compatible GPU is detected, default: %(default)s") group.add_argument('--skip-update', default = False, action='store_true', help = "Skip update of extensions and submodules, default: %(default)s") group.add_argument('--skip-requirements', default = False, action='store_true', help = "Skips checking and installing requirements, default: %(default)s") diff --git a/launch.py b/launch.py index 8df3f787c..32e2f8419 100644 --- a/launch.py +++ b/launch.py @@ -1,23 +1,24 @@ +### majority of this file is superflous, but used by some extensions as helpers during extension installation + import subprocess import os import sys import shlex import logging -import setup -import modules.paths_internal -import modules.cmd_args - -setup.ensure_base_requirements() -from rich import print # pylint: disable=redefined-builtin,wrong-import-order - -### majority of this file is superflous, but used by some extensions as helpers during extension installation commandline_args = os.environ.get('COMMANDLINE_ARGS', "") sys.argv += shlex.split(commandline_args) -setup.add_args() -setup.extensions_preload(force=False) -setup.parse_args() + +import installer +installer.add_args() +installer.ensure_base_requirements() +installer.extensions_preload(force=False) +installer.parse_args() + +import modules.cmd_args args, _ = modules.cmd_args.parser.parse_known_args() + +import modules.paths_internal script_path = modules.paths_internal.script_path extensions_dir = modules.paths_internal.extensions_dir git = os.environ.get('GIT', "git") @@ -41,6 +42,7 @@ def commit_hash(): def run(command, desc=None, errdesc=None, custom_env=None, live=False): if desc is not None: + from rich import print # pylint: disable=redefined-builtin,wrong-import-order print(desc) if live: result = subprocess.run(command, check=False, shell=True, env=os.environ if custom_env is None else custom_env) @@ -62,7 +64,7 @@ def check_run(command): def is_installed(package): - return setup.installed(package) + return installer.installed(package) def repo_dir(name): @@ -85,20 +87,20 @@ def check_run_python(code): def git_clone(url, tgt, _name, commithash=None): - setup.clone(url, tgt, commithash) + installer.clone(url, tgt, commithash) def run_extension_installer(ext_dir): - setup.run_extension_installer(ext_dir) + installer.run_extension_installer(ext_dir) if __name__ == "__main__": - setup.run_setup() - setup.extensions_preload(force=True) - setup.log.info(f"Server arguments: {sys.argv[1:]}") - setup.log.debug('Starting WebUI') + installer.run_setup() + installer.extensions_preload(force=True) + installer.log.info(f"Server arguments: {sys.argv[1:]}") + installer.log.debug('Starting WebUI') logging.disable(logging.INFO) if args.test: - setup.log.info("Test only") + installer.log.info("Test only") import webui exit(0) import webui diff --git a/modules/cmd_args.py b/modules/cmd_args.py index 0d1da94ef..d365c067a 100644 --- a/modules/cmd_args.py +++ b/modules/cmd_args.py @@ -27,7 +27,6 @@ group.add_argument("--allow-code", action='store_true', help="Allow custom scrip group.add_argument("--share", action='store_true', help="Enable UI accessible through Gradio site, default: %(default)s") group.add_argument("--insecure", action='store_true', help="Enable extensions tab regardless of other options, default: %(default)s") group.add_argument("--use-cpu", nargs='+', default=[], type=str.lower, help="Force use CPU for specified modules, default: %(default)s") -group.add_argument("--use-ipex", action='store_true', help="Force use Intel OneAPI XPU backend, default: %(default)s", default=False) group.add_argument("--listen", action='store_true', help="Launch web server using public IP address, default: %(default)s") group.add_argument("--port", type=int, default=7860, help="Launch web server with given server port, default: %(default)s") group.add_argument("--freeze", action='store_true', help="Disable editing settings", default=False) @@ -97,6 +96,6 @@ def compatibility_args(opts, args): group.add_argument("--lora-dir", help=argparse.SUPPRESS, default=opts.lora_dir) args = parser.parse_args() - if 'lyco_dir' in args: + if 'lyco_dir' in args: # pylint disable=unsupported-membership-test args.lyco_dir = opts.lyco_dir return args diff --git a/modules/shared.py b/modules/shared.py index 11177d0ac..b2a93542c 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -12,11 +12,11 @@ import modules.devices as devices from modules import errors, ui_components, shared_items, cmd_args 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 # pylint: disable=W0611 import modules.paths_internal as paths -from setup import log as setup_log # pylint: disable=E0611 +from installer import log as central_logger # pylint: disable=E0611 errors.install(gr) demo: gr.Blocks = None -log = setup_log +log = central_logger parser = cmd_args.parser url = 'https://github.com/vladmandic/automatic' if os.environ.get('IGNORE_CMD_ARGS_ERRORS', None) is None: From 7eb82e26273cc850c647c4c37903e043b231c064 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 30 Apr 2023 12:21:32 -0400 Subject: [PATCH 019/282] remove circular imports from installer --- installer.py | 24 ++++++++---------------- launch.py | 1 - modules/cmd_args.py | 3 +-- webui.py | 2 +- 4 files changed, 10 insertions(+), 20 deletions(-) diff --git a/installer.py b/installer.py index 3be52a6c2..8be8980e1 100644 --- a/installer.py +++ b/installer.py @@ -55,7 +55,6 @@ def setup_logging(clean=False): # check if package is installed def installed(package, friendly: str = None): import pkg_resources - from modules import shared ok = True try: if friendly: @@ -76,7 +75,7 @@ def installed(package, friendly: str = None): ok = ok and spec is not None if ok: version = pkg_resources.get_distribution(p[0]).version - if shared.cmd_opts.use_ipex and p[0] == "pytorch_lightning": + if args.use_ipex and p[0] == "pytorch_lightning": p[1] = "1.8.6" log.debug(f"Package version found: {p[0]} {version}") if len(p) > 1: @@ -93,8 +92,7 @@ def installed(package, friendly: str = None): # install package using pip if not already installed def install(package, friendly: str = None, ignore: bool = False): - from modules import shared - if shared.cmd_opts.use_ipex and package == "pytorch_lightning==1.9.4": + if args.use_ipex and package == "pytorch_lightning==1.9.4": package = "pytorch_lightning==1.8.6" def pip(arg: str): arg = arg.replace('>=', '==') @@ -192,7 +190,6 @@ def check_python(): # check torch version def check_torch(): - from modules import shared if shutil.which('nvidia-smi') is not None or os.path.exists(os.path.join(os.environ.get('SystemRoot') or r'C:\Windows', 'System32', 'nvidia-smi.exe')): log.info('nVidia toolkit detected') torch_command = os.environ.get('TORCH_COMMAND', 'torch torchaudio torchvision --index-url https://download.pytorch.org/whl/cu118') @@ -202,8 +199,7 @@ def check_torch(): os.environ.setdefault('HSA_OVERRIDE_GFX_VERSION', '10.3.0') torch_command = os.environ.get('TORCH_COMMAND', 'torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.4.2') xformers_package = os.environ.get('XFORMERS_PACKAGE', 'none') - elif shutil.which('sycl-ls') is not None or os.path.exists('/opt/intel/oneapi'): - shared.cmd_opts.use_ipex = True + elif shutil.which('sycl-ls') is not None or os.path.exists('/opt/intel/oneapi') or args.use_ipex: log.info('Intel toolkit detected') torch_command = os.environ.get('TORCH_COMMAND', 'torch==1.13.0a0+git6c9b55e torchvision==0.14.1a0 intel_extension_for_pytorch==1.13.120+xpu --index-url https://developer.intel.com/ipex-whl-stable-xpu') xformers_package = os.environ.get('XFORMERS_PACKAGE', 'none') @@ -222,7 +218,7 @@ def check_torch(): try: import torch log.info(f'Torch {torch.__version__}') - if shared.cmd_opts.use_ipex: + if args.use_ipex: import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import log.info(f'Torch backend: Intel OneAPI {torch.__version__}') log.info(f'Torch detected GPU: {torch.xpu.get_device_name("xpu")} VRAM {round(torch.xpu.get_device_properties("xpu").total_memory / 1024 / 1024)}') @@ -373,15 +369,11 @@ def install_submodules(): log.error(f'Error updating submodule: {submodule}') -def ensure_package(pkg): - try: - import pkg # type: ignore - except ImportError: - install(pkg) - - def ensure_base_requirements(): - ensure_package('rich') + try: + import rich # pylint: disable=unused-import + except ImportError: + install('rich', 'rich') def install_requirements(): diff --git a/launch.py b/launch.py index 32e2f8419..76745b4c2 100644 --- a/launch.py +++ b/launch.py @@ -17,7 +17,6 @@ installer.parse_args() import modules.cmd_args args, _ = modules.cmd_args.parser.parse_known_args() - import modules.paths_internal script_path = modules.paths_internal.script_path extensions_dir = modules.paths_internal.extensions_dir diff --git a/modules/cmd_args.py b/modules/cmd_args.py index d365c067a..4f74e5ad0 100644 --- a/modules/cmd_args.py +++ b/modules/cmd_args.py @@ -95,7 +95,6 @@ def compatibility_args(opts, args): opts.dimensions_and_batch_together = True group.add_argument("--lora-dir", help=argparse.SUPPRESS, default=opts.lora_dir) + group.add_argument("--lyco-dir", help=argparse.SUPPRESS, default=opts.lyco_dir) args = parser.parse_args() - if 'lyco_dir' in args: # pylint disable=unsupported-membership-test - args.lyco_dir = opts.lyco_dir return args diff --git a/webui.py b/webui.py index 707585ca7..8d9e0dc2f 100644 --- a/webui.py +++ b/webui.py @@ -13,7 +13,7 @@ startup_timer = timer.Timer() import torch # pylint: disable=C0411 try: - import intel_extension_for_pytorch as ipex + import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import except: pass import torchvision # pylint: disable=W0611,C0411 From 04f4da00134aef4f6ba477d9f333f71ef45be07a Mon Sep 17 00:00:00 2001 From: cool-bigdogs-tshirt <131823432+cool-bigdogs-tshirt@users.noreply.github.com> Date: Sun, 30 Apr 2023 12:27:52 -0500 Subject: [PATCH 020/282] fix unipc img2img denoising sample count was wrongly using the inverse of the intended value. smaller denoising strength should run fewer steps. --- modules/models/diffusion/uni_pc/sampler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/models/diffusion/uni_pc/sampler.py b/modules/models/diffusion/uni_pc/sampler.py index 6dd7c7fd8..953e786db 100644 --- a/modules/models/diffusion/uni_pc/sampler.py +++ b/modules/models/diffusion/uni_pc/sampler.py @@ -47,7 +47,7 @@ class UniPCSampler(object): # actual number of steps we'll run self.steps = max( - num_inference_steps - init_timestep, + init_timestep, shared.opts.uni_pc_order+1, ) From a136a8ea63f2246cac5a08e2e835c158ff1897c6 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 30 Apr 2023 18:44:12 -0400 Subject: [PATCH 021/282] update --- installer.py | 10 ++++------ scripts/xyz_grid.py | 3 --- style.css | 33 +++++++++++++++++---------------- 3 files changed, 21 insertions(+), 25 deletions(-) diff --git a/installer.py b/installer.py index 8be8980e1..a7760f81e 100644 --- a/installer.py +++ b/installer.py @@ -75,8 +75,6 @@ def installed(package, friendly: str = None): ok = ok and spec is not None if ok: version = pkg_resources.get_distribution(p[0]).version - if args.use_ipex and p[0] == "pytorch_lightning": - p[1] = "1.8.6" log.debug(f"Package version found: {p[0]} {version}") if len(p) > 1: ok = ok and version == p[1] @@ -191,17 +189,17 @@ def check_python(): # check torch version def check_torch(): if shutil.which('nvidia-smi') is not None or os.path.exists(os.path.join(os.environ.get('SystemRoot') or r'C:\Windows', 'System32', 'nvidia-smi.exe')): - log.info('nVidia toolkit detected') + log.info('nVidia CUDA toolkit detected') torch_command = os.environ.get('TORCH_COMMAND', 'torch torchaudio torchvision --index-url https://download.pytorch.org/whl/cu118') xformers_package = os.environ.get('XFORMERS_PACKAGE', 'xformers==0.0.17' if opts.get('cross_attention_optimization', '') == 'xFormers' else 'none') elif shutil.which('rocminfo') is not None or os.path.exists('/opt/rocm/bin/rocminfo'): - log.info('AMD toolkit detected') + log.info('AMD ROCm toolkit detected') os.environ.setdefault('HSA_OVERRIDE_GFX_VERSION', '10.3.0') torch_command = os.environ.get('TORCH_COMMAND', 'torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.4.2') xformers_package = os.environ.get('XFORMERS_PACKAGE', 'none') elif shutil.which('sycl-ls') is not None or os.path.exists('/opt/intel/oneapi') or args.use_ipex: - log.info('Intel toolkit detected') - torch_command = os.environ.get('TORCH_COMMAND', 'torch==1.13.0a0+git6c9b55e torchvision==0.14.1a0 intel_extension_for_pytorch==1.13.120+xpu --index-url https://developer.intel.com/ipex-whl-stable-xpu') + log.info('Intel OneAPI Toolkit detected') + torch_command = os.environ.get('TORCH_COMMAND', 'torch==1.13.0a0+git6c9b55e torchvision==0.14.1a0 intel_extension_for_pytorch==1.13.120+xpu -f https://developer.intel.com/ipex-whl-stable-xpu') xformers_package = os.environ.get('XFORMERS_PACKAGE', 'none') else: machine = platform.machine() diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py index d216d2fef..389560501 100644 --- a/scripts/xyz_grid.py +++ b/scripts/xyz_grid.py @@ -446,9 +446,6 @@ class Script(scripts.Script): current_values = axis_values_dropdown if has_choices: choices = choices() - if len(choices) > 12: - has_choices = False - if has_choices: if isinstance(current_values,str): current_values = current_values.split(",") current_values = list(filter(lambda x: x in choices, current_values)) diff --git a/style.css b/style.css index 996ad15d2..c0fe31146 100644 --- a/style.css +++ b/style.css @@ -1,28 +1,29 @@ :root, .dark{ --checkbox-label-gap: 0.25em 0.1em; --section-header-text-size: 12pt; --block-background-fill: transparent;} -.block.padded:not(.gradio-accordion) { padding: 0 !important; } div.gradio-container{ max-width: unset !important; } -.hidden{ display: none; } -.compact{ background: transparent !important; padding: 0 !important; } div.form{ border-width: 0; box-shadow: none; background: transparent; overflow: visible; gap: 0.5em; } -.block.gradio-dropdown, .block.gradio-slider, .block.gradio-checkbox, .block.gradio-textbox, .block.gradio-radio, .block.gradio-checkboxgroup, .block.gradio-number, .block.gradio-colorpicker { border-width: 0 !important; box-shadow: none !important;} -.gap.compact{ padding: 0; gap: 0.2em 0; } div.compact{ gap: 1em; } -.gradio-dropdown label span:not(.has-info), .gradio-textbox label span:not(.has-info), .gradio-number label span:not(.has-info) { margin-bottom: 0; } -.gradio-dropdown ul.options{ z-index: 3000; min-width: fit-content; max-width: inherit; white-space: nowrap; } -.gradio-dropdown ul.options li.item { padding: 0.05em 0; } -.gradio-dropdown ul.options li.item:not(:has(.hide)) { background-color: var(--neutral-100); } +div.gradio-html.min{ min-height: 0; } +.block.gradio-checkbox { margin: 0.75em 1.5em 0 0; } +.block.gradio-dropdown, .block.gradio-slider, .block.gradio-checkbox, .block.gradio-textbox, .block.gradio-radio, .block.gradio-checkboxgroup, .block.gradio-number, .block.gradio-colorpicker { border-width: 0 !important; box-shadow: none !important;} +.block.gradio-gallery{ background: var(--input-background-fill); } +.block.padded:not(.gradio-accordion) { padding: 0 !important; } +.compact{ background: transparent !important; padding: 0 !important; } .dark .gradio-dropdown ul.options li.item:not(:has(.hide)) { background-color: var(--neutral-900); } -.gradio-dropdown div.wrap.wrap.wrap.wrap{ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); } -.gradio-dropdown:not(.multiselect) .wrap-inner.wrap-inner.wrap-inner{ flex-wrap: unset; } +.gap.compact{ padding: 0; gap: 0.2em 0; } +.gradio-container .prose a, .gradio-container .prose a:visited{ color: unset; text-decoration: none; } .gradio-dropdown .single-select{ white-space: nowrap; overflow: hidden; } .gradio-dropdown .token-remove.remove-all.remove-all{ display: none; } +.gradio-dropdown div.wrap.wrap.wrap.wrap{ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); } +.gradio-dropdown label span:not(.has-info), .gradio-textbox label span:not(.has-info), .gradio-number label span:not(.has-info) { margin-bottom: 0; } +.gradio-dropdown ul.options li.item { padding: 0.05em 0; } +.gradio-dropdown ul.options li.item:not(:has(.hide)) { background-color: var(--neutral-100); } +.gradio-dropdown ul.options{ z-index: 3000; min-width: fit-content; max-width: inherit; white-space: nowrap; } +.gradio-dropdown:not(.multiselect) .wrap-inner.wrap-inner.wrap-inner{ flex-wrap: unset; } .gradio-dropdown.multiselect .token-remove.remove-all.remove-all{ display: flex; } -.gradio-slider input[type="number"]{ width: 6em; } -.block.gradio-checkbox { margin: 0.75em 1.5em 0 0; } +.gradio-dropdown.multiselect div.wrap-inner { overflow-x: hidden; overflow-y: auto; max-height: 50vh; overflow-wrap: anywhere; } .gradio-html div.wrap{ height: 100%; } -div.gradio-html.min{ min-height: 0; } -.block.gradio-gallery{ background: var(--input-background-fill); } -.gradio-container .prose a, .gradio-container .prose a:visited{ color: unset; text-decoration: none; } +.gradio-slider input[type="number"]{ width: 6em; } +.hidden{ display: none; } /* general styled components */ .gradio-button.tool{ max-width: 2.2em; min-width: 2.2em !important; height: 2.4em; align-self: end; line-height: 1em; border-radius: 0.5em; } From dedd3ffafbdf519d77399e314330cd9fbe2343a0 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 30 Apr 2023 20:08:44 -0400 Subject: [PATCH 022/282] fix script api --- .../stable-diffusion-webui-images-browser | 2 +- modules/api/api.py | 27 ++++-- modules/processing.py | 89 ++----------------- 3 files changed, 25 insertions(+), 93 deletions(-) diff --git a/extensions-builtin/stable-diffusion-webui-images-browser b/extensions-builtin/stable-diffusion-webui-images-browser index 2c988c08c..84cb61749 160000 --- a/extensions-builtin/stable-diffusion-webui-images-browser +++ b/extensions-builtin/stable-diffusion-webui-images-browser @@ -1 +1 @@ -Subproject commit 2c988c08c7fc2f1c0f572bc4209f0baa1fac4fee +Subproject commit 84cb6174983812da2dff242fb484431b4ae3b8f8 diff --git a/modules/api/api.py b/modules/api/api.py index fdd26f868..2912e2cf2 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -181,19 +181,28 @@ class Api: script_args[script.args_from:script.args_to] = ui_default_values return script_args - def init_script_args(self, p, request, default_script_args, script_runner): + def init_script_args(self, p, request, default_script_args, selectable_scripts, selectable_script_idx, script_runner): script_args = default_script_args.copy() + # position 0 in script_arg is the idx+1 of the selectable script that is going to be run when using scripts.scripts_*2img.run() + if selectable_scripts: + # TODO this can corrupt values for other scripts + script_args[selectable_scripts.args_from:selectable_scripts.args_to] = request.script_args + script_args[0] = selectable_script_idx + 1 + # Now check for always on scripts if request.alwayson_scripts and (len(request.alwayson_scripts) > 0): for alwayson_script_name in request.alwayson_scripts.keys(): alwayson_script = self.get_script(alwayson_script_name, script_runner) if alwayson_script is None: - raise HTTPException(status_code=422, detail=f"always on script {alwayson_script_name} not found") + raise HTTPException(status_code=422, detail=f"Always on script not found: {alwayson_script_name}") if not alwayson_script.alwayson: - raise HTTPException(status_code=422, detail="Cannot have a selectable script in the always on scripts params") + raise HTTPException(status_code=422, detail=f"Selectable script cannot be in always on params: {alwayson_script_name}") if "args" in request.alwayson_scripts[alwayson_script_name]: - p.per_script_args[alwayson_script.title()] = request.alwayson_scripts[alwayson_script_name]["args"] + script_args + # TODO this can corrupt values for other scripts + script_args[alwayson_script.args_from:alwayson_script.args_to] = request.alwayson_scripts[alwayson_script_name]["args"] + p.per_script_args[alwayson_script.title()] = request.alwayson_scripts[alwayson_script_name]["args"] return script_args + def text2imgapi(self, txt2imgreq: StableDiffusionTxt2ImgProcessingAPI): script_runner = scripts.scripts_txt2img if not script_runner.scripts: @@ -201,7 +210,7 @@ class Api: ui.create_ui() if not self.default_script_arg_txt2img: self.default_script_arg_txt2img = self.init_default_script_args(script_runner) - selectable_scripts, _selectable_script_idx = self.get_selectable_script(txt2imgreq.script_name, script_runner) + selectable_scripts, selectable_script_idx = self.get_selectable_script(txt2imgreq.script_name, script_runner) populate = txt2imgreq.copy(update={ # Override __init__ params "sampler_name": validate_sampler_name(txt2imgreq.sampler_name or txt2imgreq.sampler_index), "do_not_save_samples": not txt2imgreq.save_images, @@ -222,7 +231,7 @@ class Api: p.outpath_grids = opts.outdir_grids or opts.outdir_txt2img_grids p.outpath_samples = opts.outdir_samples or opts.outdir_txt2img_samples shared.state.begin() - script_args = self.init_script_args(p, txt2imgreq, self.default_script_arg_txt2img, script_runner) + script_args = self.init_script_args(p, txt2imgreq, self.default_script_arg_txt2img, selectable_scripts, selectable_script_idx, script_runner) if selectable_scripts is not None: processed = scripts.scripts_txt2img.run(p, *script_args) # Need to pass args as list here else: @@ -246,7 +255,7 @@ class Api: ui.create_ui() if not self.default_script_arg_img2img: self.default_script_arg_img2img = self.init_default_script_args(script_runner) - selectable_scripts, _selectable_script_idx = self.get_selectable_script(img2imgreq.script_name, script_runner) + selectable_scripts, selectable_script_idx = self.get_selectable_script(img2imgreq.script_name, script_runner) populate = img2imgreq.copy(update={ # Override __init__ params "sampler_name": validate_sampler_name(img2imgreq.sampler_name or img2imgreq.sampler_index), "do_not_save_samples": not img2imgreq.save_images, @@ -270,7 +279,7 @@ class Api: p.outpath_grids = opts.outdir_img2img_grids p.outpath_samples = opts.outdir_img2img_samples shared.state.begin() - script_args = self.init_script_args(p, img2imgreq, self.default_script_arg_txt2img, script_runner) + script_args = self.init_script_args(p, img2imgreq, self.default_script_arg_img2img, selectable_scripts, selectable_script_idx, script_runner) if selectable_scripts is not None: processed = scripts.scripts_img2img.run(p, *script_args) # Need to pass args as list here else: @@ -574,7 +583,7 @@ class Api: try: import torch if shared.cmd_opts.use_ipex(): - import intel_extension_for_pytorch as ipex + import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import system = { 'free': (torch.xpu.get_device_properties("xpu").total_memory - torch.xpu.memory_allocated()), 'used': torch.xpu.memory_allocated(), 'total': torch.xpu.get_device_properties("xpu").total_memory } s = dict(torch.xpu.memory_stats("xpu")) allocated = { 'current': s['allocated_bytes.all.current'], 'peak': s['allocated_bytes.all.peak'] } diff --git a/modules/processing.py b/modules/processing.py index 36737fdbe..41be44010 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -9,7 +9,7 @@ from typing import Any, Dict, List import psutil import torch try: - import intel_extension_for_pytorch as ipex + import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import except: pass import numpy as np @@ -25,7 +25,7 @@ from blendmodes.blend import blendLayers, BlendType import modules.sd_hijack from modules import devices, prompt_parser, masking, sd_samplers, lowvram, generation_parameters_copypaste, script_callbacks, extra_networks, sd_vae_approx, scripts # pylint: disable=unused-import from modules.sd_hijack import model_hijack -from modules.shared import opts, cmd_opts, state # pylint: disable=unused-import +from modules.shared import opts, cmd_opts, state, log # pylint: disable=unused-import import modules.shared as shared import modules.paths as paths import modules.face_restoration @@ -35,13 +35,6 @@ import modules.sd_models as sd_models import modules.sd_vae as sd_vae import tomesd # pylint: disable=wrong-import-order - -# add a logger for the processing module -logger = logging.getLogger(__name__) -# manually set output level here since there is no option to do so yet through launch options -# logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)s %(name)s %(message)s') - -# some of those options should not be changed at all because they would break the model, so I removed them from options. opt_C = 4 opt_f = 8 @@ -559,7 +552,7 @@ def process_images(p: StableDiffusionProcessing) -> Processed: if (opts.token_merging or cmd_opts.token_merging) and not opts.token_merging_hr_only: sd_models.apply_token_merging(sd_model=p.sd_model, hr=False) - logger.debug('Token merging applied') + log.debug('Token merging applied') res = process_images_inner(p) @@ -567,7 +560,7 @@ def process_images(p: StableDiffusionProcessing) -> Processed: # undo model optimizations made by tomesd if opts.token_merging or cmd_opts.token_merging: tomesd.remove_patch(p.sd_model) - logger.debug('Token merging model optimizations removed') + log.debug('Token merging model optimizations removed') # restore opts to original state if p.override_settings_restore_afterwards: @@ -778,47 +771,34 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: image_without_cc = apply_overlay(image, p.paste_to, i, p.overlay_images) images.save_image(image_without_cc, p.outpath_samples, "", seeds[i], prompts[i], opts.samples_format, info=infotext(n, i), p=p, suffix="-before-color-correction") image = apply_color_correction(p.color_corrections[i], image) - image = apply_overlay(image, p.paste_to, i, p.overlay_images) - if opts.samples_save and not p.do_not_save_samples: images.save_image(image, p.outpath_samples, "", seeds[i], prompts[i], opts.samples_format, info=infotext(n, i), p=p) - text = infotext(n, i) infotexts.append(text) if opts.enable_pnginfo: image.info["parameters"] = text output_images.append(image) - if hasattr(p, 'mask_for_overlay') and p.mask_for_overlay and any([opts.save_mask, opts.save_mask_composite, opts.return_mask, opts.return_mask_composite]): image_mask = p.mask_for_overlay.convert('RGB') image_mask_composite = Image.composite(image.convert('RGBA').convert('RGBa'), Image.new('RGBa', image.size), images.resize_image(2, p.mask_for_overlay, image.width, image.height).convert('L')).convert('RGBA') - if opts.save_mask: images.save_image(image_mask, p.outpath_samples, "", seeds[i], prompts[i], opts.samples_format, info=infotext(n, i), p=p, suffix="-mask") - if opts.save_mask_composite: images.save_image(image_mask_composite, p.outpath_samples, "", seeds[i], prompts[i], opts.samples_format, info=infotext(n, i), p=p, suffix="-mask-composite") - if opts.return_mask: output_images.append(image_mask) - if opts.return_mask_composite: output_images.append(image_mask_composite) - del x_samples_ddim - devices.torch_gc() - state.nextjob() p.color_corrections = None - index_of_first_image = 0 unwanted_grid_because_of_img_count = len(output_images) < 2 and opts.grid_only_if_multiple if (opts.return_grid or opts.grid_save) and not p.do_not_save_grid and not unwanted_grid_because_of_img_count: grid = images.image_grid(output_images, p.batch_size) - if opts.return_grid: text = infotext() infotexts.insert(0, text) @@ -826,32 +806,25 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: grid.info["parameters"] = text output_images.insert(0, grid) index_of_first_image = 1 - if opts.grid_save: images.save_image(grid, p.outpath_grids, "grid", p.all_seeds[0], p.all_prompts[0], opts.grid_format, info=infotext(), short_filename=not opts.grid_extended_filename, p=p, grid=True) if not p.disable_extra_networks and extra_network_data: extra_networks.deactivate(p, extra_network_data) - devices.torch_gc() - res = Processed(p, output_images, p.all_seeds[0], infotext(), comments="".join(["\n\n" + x for x in comments]), subseed=p.all_subseeds[0], index_of_first_image=index_of_first_image, infotexts=infotexts) - if p.scripts is not None: p.scripts.postprocess(p, res) - return res def old_hires_fix_first_pass_dimensions(width, height): """old algorithm for auto-calculating first pass size""" - desired_pixel_count = 512 * 512 actual_pixel_count = width * height scale = math.sqrt(desired_pixel_count / actual_pixel_count) width = math.ceil(scale * width / 64) * 64 height = math.ceil(scale * height / 64) * 64 - return width, height @@ -869,13 +842,11 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): self.hr_resize_y = hr_resize_y self.hr_upscale_to_x = hr_resize_x self.hr_upscale_to_y = hr_resize_y - if firstphase_width != 0 or firstphase_height != 0: self.hr_upscale_to_x = self.width self.hr_upscale_to_y = self.height self.width = firstphase_width self.height = firstphase_height - self.truncate_x = 0 self.truncate_y = 0 self.applied_old_hires_behavior_to = None @@ -887,17 +858,14 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): self.hr_resize_y = self.height self.hr_upscale_to_x = self.width self.hr_upscale_to_y = self.height - self.width, self.height = old_hires_fix_first_pass_dimensions(self.width, self.height) self.applied_old_hires_behavior_to = (self.width, self.height) - if self.hr_resize_x == 0 and self.hr_resize_y == 0: self.extra_generation_params["Hires upscale"] = self.hr_scale self.hr_upscale_to_x = int(self.width * self.hr_scale) self.hr_upscale_to_y = int(self.height * self.hr_scale) else: self.extra_generation_params["Hires resize"] = f"{self.hr_resize_x}x{self.hr_resize_y}" - if self.hr_resize_y == 0: self.hr_upscale_to_x = self.hr_resize_x self.hr_upscale_to_y = self.hr_resize_x * self.height // self.width @@ -909,17 +877,14 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): target_h = self.hr_resize_y src_ratio = self.width / self.height dst_ratio = self.hr_resize_x / self.hr_resize_y - if src_ratio < dst_ratio: self.hr_upscale_to_x = self.hr_resize_x self.hr_upscale_to_y = self.hr_resize_x * self.height // self.width else: self.hr_upscale_to_x = self.hr_resize_y * self.width // self.height self.hr_upscale_to_y = self.hr_resize_y - self.truncate_x = (self.hr_upscale_to_x - target_w) // opt_f self.truncate_y = (self.hr_upscale_to_y - target_h) // opt_f - # special case: the user has chosen to do nothing if self.hr_upscale_to_x == self.width and self.hr_upscale_to_y == self.height: self.enable_hr = False @@ -927,53 +892,41 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): self.extra_generation_params.pop("Hires upscale", None) self.extra_generation_params.pop("Hires resize", None) return - if not state.processing_has_refined_job_count: if state.job_count == -1: state.job_count = self.n_iter state.job_count = state.job_count * 2 state.processing_has_refined_job_count = True - if self.hr_second_pass_steps: self.extra_generation_params["Hires steps"] = self.hr_second_pass_steps - if self.hr_upscaler is not None: self.extra_generation_params["Hires upscaler"] = self.hr_upscaler def sample(self, conditioning, unconditional_conditioning, seeds, subseeds, subseed_strength, prompts): self.sampler = sd_samplers.create_sampler(self.sampler_name, self.sd_model) - latent_scale_mode = shared.latent_upscale_modes.get(self.hr_upscaler, None) if self.hr_upscaler is not None else shared.latent_upscale_modes.get(shared.latent_upscale_default_mode, "nearest") if self.enable_hr and latent_scale_mode is None: assert len([x for x in shared.sd_upscalers if x.name == self.hr_upscaler]) > 0, f"could not find upscaler named {self.hr_upscaler}" - x = create_random_tensors([opt_C, self.height // opt_f, self.width // opt_f], seeds=seeds, subseeds=subseeds, subseed_strength=self.subseed_strength, seed_resize_from_h=self.seed_resize_from_h, seed_resize_from_w=self.seed_resize_from_w, p=self) samples = self.sampler.sample(self, x, conditioning, unconditional_conditioning, image_conditioning=self.txt2img_image_conditioning(x)) - if not self.enable_hr: return samples - target_width = self.hr_upscale_to_x target_height = self.hr_upscale_to_y def save_intermediate(image, index): """saves image before applying hires fix, if enabled in options; takes as an argument either an image or batch with latent space images""" - if not opts.save or self.do_not_save_samples or not opts.save_images_before_highres_fix: return - if not isinstance(image, Image.Image): image = sd_samplers.sample_to_image(image, index, approximation=0) - info = create_infotext(self, self.all_prompts, self.all_seeds, self.all_subseeds, [], iteration=self.iteration, position_in_batch=index) images.save_image(image, self.outpath_samples, "", seeds[index], prompts[index], opts.samples_format, info=info, suffix="-before-highres-fix") if latent_scale_mode is not None: for i in range(samples.shape[0]): save_intermediate(samples, i) - samples = torch.nn.functional.interpolate(samples, size=(target_height // opt_f, target_width // opt_f), mode=latent_scale_mode["mode"], antialias=latent_scale_mode["antialias"]) - # Avoid making the inpainting conditioning unless necessary as # this does need some extra compute to decode / encode the image again. if getattr(self, "inpainting_mask_weight", shared.opts.inpainting_mask_weight) < 1.0: @@ -983,44 +936,32 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): else: decoded_samples = decode_first_stage(self.sd_model, samples) lowres_samples = torch.clamp((decoded_samples + 1.0) / 2.0, min=0.0, max=1.0) - batch_images = [] for i, x_sample in enumerate(lowres_samples): x_sample = 255. * np.moveaxis(x_sample.cpu().numpy(), 0, 2) x_sample = x_sample.astype(np.uint8) image = Image.fromarray(x_sample) - save_intermediate(image, i) - image = images.resize_image(0, image, target_width, target_height, upscaler_name=self.hr_upscaler) image = np.array(image).astype(np.float32) / 255.0 image = np.moveaxis(image, 2, 0) batch_images.append(image) - decoded_samples = torch.from_numpy(np.array(batch_images)) decoded_samples = decoded_samples.to(shared.device) decoded_samples = 2. * decoded_samples - 1. - samples = self.sd_model.get_first_stage_encoding(self.sd_model.encode_first_stage(decoded_samples)) - image_conditioning = self.img2img_image_conditioning(decoded_samples, samples) - shared.state.nextjob() - img2img_sampler_name = self.sampler_name force_latent_upscaler = shared.opts.data.get('xyz_fallback_sampler') if self.sampler_name in ['PLMS'] or (force_latent_upscaler is not None and force_latent_upscaler != 'None'): img2img_sampler_name = force_latent_upscaler or shared.opts.fallback_sampler # PLMS does not support img2img, use fallback instead self.sampler = sd_samplers.create_sampler(img2img_sampler_name, self.sd_model) - samples = samples[:, :, self.truncate_y//2:samples.shape[2]-(self.truncate_y+1)//2, self.truncate_x//2:samples.shape[3]-(self.truncate_x+1)//2] - noise = create_random_tensors(samples.shape[1:], seeds=seeds, subseeds=subseeds, subseed_strength=subseed_strength, p=self) - # GC now before running the next img2img to prevent running out of memory x = None devices.torch_gc() - # apply token merging optimizations from tomesd for high-res pass # check if hr_only so we are not redundantly patching if (cmd_opts.token_merging or opts.token_merging) and (opts.token_merging_hr_only or opts.token_merging_ratio_hr != opts.token_merging_ratio): @@ -1028,13 +969,11 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): if not opts.token_merging_hr_only: # clean patch done by first pass. (clobbering the first patch might be fine? this might be excessive) tomesd.remove_patch(self.sd_model) - logger.debug('Temporarily removed token merging optimizations in preparation for next pass') + log.debug('Temporarily removed token merging optimizations in preparation for next pass') sd_models.apply_token_merging(sd_model=self.sd_model, hr=True) - logger.debug('Applied token merging for high-res pass') - + log.debug('Applied token merging for high-res pass') samples = self.sampler.sample_img2img(self, samples, noise, conditioning, unconditional_conditioning, steps=self.hr_second_pass_steps or self.steps, image_conditioning=image_conditioning) - return samples @@ -1043,7 +982,6 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing): def __init__(self, init_images: list = None, resize_mode: int = 0, denoising_strength: float = 0.75, image_cfg_scale: float = None, mask: Any = None, mask_blur: int = 4, inpainting_fill: int = 0, inpaint_full_res: bool = True, inpaint_full_res_padding: int = 0, inpainting_mask_invert: int = 0, initial_noise_multiplier: float = None, **kwargs): super().__init__(**kwargs) - self.init_images = init_images self.resize_mode: int = resize_mode self.denoising_strength: float = denoising_strength @@ -1115,30 +1053,23 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing): image = np.array(image).astype(np.float32) / 255.0 image = np.moveaxis(image, 2, 0) imgs.append(image) - if len(imgs) == 1: batch_images = np.expand_dims(imgs[0], axis=0).repeat(self.batch_size, axis=0) if self.overlay_images is not None: self.overlay_images = self.overlay_images * self.batch_size - if self.color_corrections is not None and len(self.color_corrections) == 1: self.color_corrections = self.color_corrections * self.batch_size - elif len(imgs) <= self.batch_size: self.batch_size = len(imgs) batch_images = np.array(imgs) else: raise RuntimeError(f"bad number of images passed: {len(imgs)}; expecting {self.batch_size} or less") - image = torch.from_numpy(batch_images) image = 2. * image - 1. image = image.to(shared.device) - self.init_latent = self.sd_model.get_first_stage_encoding(self.sd_model.encode_first_stage(image)) - if self.resize_mode == 3: self.init_latent = torch.nn.functional.interpolate(self.init_latent, size=(self.height // opt_f, self.width // opt_f), mode="bilinear") - if image_mask is not None: init_mask = latent_mask latmask = init_mask.convert('RGB').resize((self.init_latent.shape[3], self.init_latent.shape[2])) @@ -1146,31 +1077,23 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing): latmask = latmask[0] latmask = np.around(latmask) latmask = np.tile(latmask[None], (4, 1, 1)) - self.mask = torch.asarray(1.0 - latmask).to(shared.device).type(self.sd_model.dtype) self.nmask = torch.asarray(latmask).to(shared.device).type(self.sd_model.dtype) - # this needs to be fixed to be done in sample() using actual seeds for batches if self.inpainting_fill == 2: self.init_latent = self.init_latent * self.mask + create_random_tensors(self.init_latent.shape[1:], all_seeds[0:self.init_latent.shape[0]]) * self.nmask elif self.inpainting_fill == 3: self.init_latent = self.init_latent * self.mask - self.image_conditioning = self.img2img_image_conditioning(image, self.init_latent, image_mask) def sample(self, conditioning, unconditional_conditioning, seeds, subseeds, subseed_strength, prompts): x = create_random_tensors([opt_C, self.height // opt_f, self.width // opt_f], seeds=seeds, subseeds=subseeds, subseed_strength=self.subseed_strength, seed_resize_from_h=self.seed_resize_from_h, seed_resize_from_w=self.seed_resize_from_w, p=self) - if self.initial_noise_multiplier != 1.0: self.extra_generation_params["Noise multiplier"] = self.initial_noise_multiplier x *= self.initial_noise_multiplier - samples = self.sampler.sample_img2img(self, self.init_latent, x, conditioning, unconditional_conditioning, image_conditioning=self.image_conditioning) - if self.mask is not None: samples = samples * self.nmask + self.init_latent * self.mask - del x devices.torch_gc() - return samples From 4dc5941912cc78bbe986a0c1fcdba6d7b194ab4d Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 30 Apr 2023 21:01:49 -0400 Subject: [PATCH 023/282] fix embedding logging --- modules/shared.py | 1 - modules/textual_inversion/logging.py | 5 +-- .../textual_inversion/textual_inversion.py | 45 ++----------------- webui.py | 2 +- 4 files changed, 7 insertions(+), 46 deletions(-) diff --git a/modules/shared.py b/modules/shared.py index b2a93542c..611d8af4d 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -352,7 +352,6 @@ options_templates.update(options_section(('training', "Training"), { "dataset_filename_word_regex": OptionInfo("", "Filename word regex"), "dataset_filename_join_string": OptionInfo(" ", "Filename join string"), "embeddings_templates_dir": OptionInfo(os.path.join(paths.script_path, 'train', 'templates'), "Embeddings train templates directory"), - "embeddings_train_log": OptionInfo(os.path.join(paths.script_path, 'train', 'log', 'train.csv'), "Embeddings train log file"), "training_image_repeats_per_epoch": OptionInfo(1, "Number of repeats for a single input image per epoch; used only for displaying epoch number", gr.Number, {"precision": 0}), "training_write_csv_every": OptionInfo(0, "Save an csv containing the loss to log directory every N steps, 0 to disable"), "training_enable_tensorboard": OptionInfo(False, "Enable tensorboard logging."), diff --git a/modules/textual_inversion/logging.py b/modules/textual_inversion/logging.py index d0e52beb7..b8440f656 100644 --- a/modules/textual_inversion/logging.py +++ b/modules/textual_inversion/logging.py @@ -16,8 +16,7 @@ def save_settings_to_file(log_directory, all_params): if all_params.get('preview_from_txt2img'): keys = keys | saved_params_previews params.update({k: v for k, v in all_params.items() if k in keys}) - filename = 'settings.json' - fn = os.path.join(log_directory, filename) + filename = f"{params['embedding_name']}-{now.strftime('%Y-%m-%d_%H-%M-%S')}.json" with open(os.path.join(log_directory, filename), "w", encoding='utf-8') as file: - print(f'Training settings file: {fn}') + print(f'Training settings file: {os.path.join(log_directory, filename)}') json.dump(params, file, indent=2) diff --git a/modules/textual_inversion/textual_inversion.py b/modules/textual_inversion/textual_inversion.py index ab412f458..343e55539 100644 --- a/modules/textual_inversion/textual_inversion.py +++ b/modules/textual_inversion/textual_inversion.py @@ -4,7 +4,7 @@ import csv from collections import namedtuple import torch try: - import intel_extension_for_pytorch as ipex + import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import except: pass import tqdm @@ -283,20 +283,15 @@ def create_embedding(name, num_vectors_per_token, overwrite_old, init_text='*'): def write_loss(log_directory, filename, step, epoch_len, values): if shared.opts.training_write_csv_every == 0: return - - if step % epoch_len != 0: + if step % shared.opts.training_write_csv_every != 0: return write_csv_header = False if os.path.exists(os.path.join(log_directory, filename)) else True - with open(os.path.join(log_directory, filename), "a+", newline='', encoding='utf-8') as fout: csv_writer = csv.DictWriter(fout, fieldnames=["step", "epoch", "epoch_step", *(values.keys())]) - if write_csv_header: csv_writer.writeheader() - epoch = (step - 1) // epoch_len epoch_step = (step - 1) % epoch_len - csv_writer.writerow({ "step": step, "epoch": epoch, @@ -410,16 +405,11 @@ def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_st tensorboard_writer = tensorboard_setup(log_directory) pin_memory = shared.opts.pin_memory - ds = modules.textual_inversion.dataset.PersonalizedBase(data_root=data_root, width=training_width, height=training_height, repeats=shared.opts.training_image_repeats_per_epoch, placeholder_token=embedding_name, model=shared.sd_model, cond_model=shared.sd_model.cond_stage_model, device=devices.device, template_file=template_file, batch_size=batch_size, gradient_step=gradient_step, shuffle_tags=shuffle_tags, tag_drop_out=tag_drop_out, latent_sampling_method=latent_sampling_method, varsize=varsize, use_weight=use_weight) - if shared.opts.save_training_settings_to_txt: save_settings_to_file(log_directory, {**dict(model_name=checkpoint.model_name, model_hash=checkpoint.shorthash, num_of_dataset_images=len(ds), num_vectors_per_token=len(embedding.vec)), **locals()}) - latent_sampling_method = ds.latent_sampling_method - dl = modules.textual_inversion.dataset.PersonalizedDataLoader(ds, latent_sampling_method=latent_sampling_method, batch_size=ds.batch_size, pin_memory=pin_memory) - if unload: shared.parallel_processing_allowed = False shared.sd_model.first_stage_model.to(devices.cpu) @@ -432,7 +422,6 @@ def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_st optimizer_saved_dict = torch.load(filename + '.optim', map_location='cpu') if embedding.checksum() == optimizer_saved_dict.get('hash', None): optimizer_state_dict = optimizer_saved_dict.get('optimizer_state_dict', None) - if optimizer_state_dict is not None: optimizer.load_state_dict(optimizer_state_dict) print("Loaded existing optimizer from checkpoint") @@ -451,12 +440,10 @@ def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_st max_steps_per_epoch = len(ds) // batch_size - (len(ds) // batch_size) % gradient_step loss_step = 0 _loss_step = 0 #internal - last_saved_file = "" last_saved_image = "" forced_filename = "" embedding_yet_to_be_embedded = False - is_training_inpainting_model = shared.sd_model.model.conditioning_key in {'hybrid', 'concat'} img_c = None @@ -478,7 +465,6 @@ def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_st break if shared.state.interrupted: break - if clip_grad: clip_grad_sched.step(embedding.step) @@ -487,32 +473,26 @@ def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_st if use_weight: w = batch.weight.to(devices.device, non_blocking=pin_memory) c = shared.sd_model.cond_stage_model(batch.cond_text) - if is_training_inpainting_model: if img_c is None: img_c = processing.txt2img_image_conditioning(shared.sd_model, c, training_width, training_height) - cond = {"c_concat": [img_c], "c_crossattn": [c]} else: cond = c - if use_weight: loss = shared.sd_model.weighted_forward(x, cond, w)[0] / gradient_step del w else: loss = shared.sd_model.forward(x, cond)[0] / gradient_step del x - _loss_step += loss.item() - scaler.scale(loss).backward() + scaler.scale(loss).backward() # go back until we reach gradient accumulation steps if (j + 1) % gradient_step != 0: continue - if clip_grad: clip_grad(embedding.vec, clip_grad_sched.learn_rate) - scaler.step(optimizer) scaler.update() embedding.step += 1 @@ -520,9 +500,7 @@ def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_st optimizer.zero_grad(set_to_none=True) loss_step = _loss_step _loss_step = 0 - steps_done = embedding.step + 1 - epoch_num = embedding.step // steps_per_epoch description = f"Training textual inversion step {embedding.step} loss: {loss_step:.5f} lr: {scheduler.learn_rate:.5f}" @@ -534,15 +512,11 @@ def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_st save_embedding(embedding, optimizer, checkpoint, embedding_name_every, last_saved_file, remove_cached_checksum=True) embedding_yet_to_be_embedded = True - write_loss(log_directory, shared.opts.embeddings_train_log, embedding.step, steps_per_epoch, { - "loss": f"{loss_step:.7f}", - "learn_rate": scheduler.learn_rate - }) + write_loss(log_directory, f"{embedding_name}.csv", embedding.step, steps_per_epoch, { "loss": f"{loss_step:.7f}", "learn_rate": scheduler.learn_rate }) if images_dir is not None and steps_done % create_image_every == 0: forced_filename = f'{embedding_name}-{steps_done}' last_saved_image = os.path.join(images_dir, forced_filename) - shared.sd_model.first_stage_model.to(devices.device) p = processing.StableDiffusionProcessingTxt2Img( @@ -568,7 +542,6 @@ def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_st p.height = training_height preview_text = p.prompt - processed = processing.process_images(p) image = processed.images[0] if len(processed.images) > 0 else None @@ -577,35 +550,27 @@ def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_st if image is not None: shared.state.assign_current_image(image) - last_saved_image, _last_text_info = images.save_image(image, images_dir, "", p.seed, p.prompt, shared.opts.samples_format, processed.infotexts[0], p=p, forced_filename=forced_filename, save_to_dirs=False) last_saved_image += f", prompt: {preview_text}" - if shared.opts.training_enable_tensorboard and shared.opts.training_tensorboard_save_images: tensorboard_add_image(tensorboard_writer, f"Validation at epoch {epoch_num}", image, embedding.step) if save_image_with_stored_embedding and os.path.exists(last_saved_file) and embedding_yet_to_be_embedded: - last_saved_image_chunks = os.path.join(images_embeds_dir, f'{embedding_name}-{steps_done}.png') - info = PngImagePlugin.PngInfo() data = torch.load(last_saved_file) info.add_text("sd-ti-embedding", embedding_to_b64(data)) title = f"<{data.get('name', '???')}>" - try: vectorSize = list(data['string_to_param'].values())[0].shape[0] except Exception: vectorSize = '?' - checkpoint = sd_models.select_checkpoint() footer_left = checkpoint.model_name footer_mid = f'[{checkpoint.shorthash}]' footer_right = f'{vectorSize}v {steps_done}s' - captioned_image = caption_image_overlay(image, title, footer_left, footer_mid, footer_right) captioned_image = insert_image_data_embed(captioned_image, data) - captioned_image.save(last_saved_image_chunks, "PNG", pnginfo=info) embedding_yet_to_be_embedded = False @@ -613,7 +578,6 @@ def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_st last_saved_image += f", prompt: {preview_text}" shared.state.job_no = embedding.step - shared.state.textinfo = f"""

Loss: {loss_step:.7f}
@@ -633,7 +597,6 @@ Last saved image: {html.escape(last_saved_image)}
shared.sd_model.first_stage_model.to(devices.device) shared.parallel_processing_allowed = old_parallel_processing_allowed sd_hijack_checkpoint.remove() - return embedding, filename diff --git a/webui.py b/webui.py index 8d9e0dc2f..8954cfbfe 100644 --- a/webui.py +++ b/webui.py @@ -212,7 +212,7 @@ def start_ui(): app, _local_url, _share_url = shared.demo.launch( share=cmd_opts.share, server_name=server_name, - server_port=cmd_opts.port, + server_port=cmd_opts.port if cmd_opts.port != 7860 else None, ssl_keyfile=cmd_opts.tls_keyfile, ssl_certfile=cmd_opts.tls_certfile, debug=False, From 75b741f1199e526841b079c2e9b8ace99df2d1ad Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 30 Apr 2023 23:06:32 -0400 Subject: [PATCH 024/282] fallback args --- extensions-builtin/sd-webui-controlnet | 2 +- installer.py | 2 +- modules/cmd_args.py | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index af4720780..14971922f 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit af4720780f10d912789cbd6db1fbc6d2f0afc533 +Subproject commit 14971922f0971095f0a9d0725d2027a26bf5dcb2 diff --git a/installer.py b/installer.py index a7760f81e..56431ec20 100644 --- a/installer.py +++ b/installer.py @@ -20,7 +20,7 @@ class Dot(dict): # dot notation access to dictionary attributes log = logging.getLogger("sd") -args = Dot({ 'debug': False, 'upgrade': False, 'skip_update': False, 'no_directml': False, 'skip_extensions': False, 'skip_requirements': False, 'reset': False }) +args = Dot({ 'debug': False, 'upgrade': False, 'no_directml': False, 'skip_update': False, 'skip_extensions': False, 'skip_requirements': False, 'skip_git': False, 'reset': False, 'use_ipex': False, 'experimental': False, 'test': False }) quick_allowed = True errors = 0 opts = {} diff --git a/modules/cmd_args.py b/modules/cmd_args.py index 4f74e5ad0..130354f37 100644 --- a/modules/cmd_args.py +++ b/modules/cmd_args.py @@ -76,6 +76,9 @@ def compatibility_args(opts, args): group.add_argument("--sub-quad-kv-chunk-size", help=argparse.SUPPRESS, default=opts.sub_quad_kv_chunk_size) group.add_argument("--sub-quad-chunk-threshold", help=argparse.SUPPRESS, default=opts.sub_quad_chunk_threshold) group.add_argument('--debug', default = False, action='store_true', help = "Run installer with debug logging, default: %(default)s") + group.add_argument("--lora-dir", help=argparse.SUPPRESS, default=opts.lora_dir) + group.add_argument("--lyco-dir", help=argparse.SUPPRESS, default=opts.lyco_dir) + group.add_argument("--use-ipex", action='store_true', help="Use Intel OneAPI XPU backend, default: %(default)s", default=False) opts.use_old_emphasis_implementation = False opts.use_old_karras_scheduler_sigmas = False @@ -94,7 +97,6 @@ def compatibility_args(opts, args): opts.print_hypernet_extra = False opts.dimensions_and_batch_together = True - group.add_argument("--lora-dir", help=argparse.SUPPRESS, default=opts.lora_dir) - group.add_argument("--lyco-dir", help=argparse.SUPPRESS, default=opts.lyco_dir) args = parser.parse_args() + return args From f4256655b2c7266dad62795bf08f64ded6aa8d9a Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 1 May 2023 08:43:02 -0400 Subject: [PATCH 025/282] fix argparse --- extensions-builtin/sd-webui-controlnet | 2 +- modules/cmd_args.py | 31 ++++++++++++++------------ modules/memmon.py | 5 +---- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 14971922f..cfc37659a 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 14971922f0971095f0a9d0725d2027a26bf5dcb2 +Subproject commit cfc37659aca364b37fc90943e039ceb2e7b6d8ba diff --git a/modules/cmd_args.py b/modules/cmd_args.py index 130354f37..e347c3532 100644 --- a/modules/cmd_args.py +++ b/modules/cmd_args.py @@ -5,17 +5,8 @@ from modules.paths_internal import data_path parser = argparse.ArgumentParser(description="SD.Next", conflict_handler='resolve', epilog='For other options see UI Settings page', prog='', add_help=True, formatter_class=lambda prog: argparse.HelpFormatter(prog, max_help_position=55, indent_increment=2, width=200)) parser._optionals = parser.add_argument_group('Other options') # pylint: disable=protected-access group = parser.add_argument_group('Server options') -# group.add_argument("--config", type=str, default=sd_default_config, help=argparse.SUPPRESS) - -group.add_argument("-f", action='store_true', help=argparse.SUPPRESS) # allows running as root; implemented outside of webui -group.add_argument("--ui-settings-file", type=str, help=argparse.SUPPRESS, default=os.path.join(data_path, 'config.json')) -group.add_argument("--ui-config-file", type=str, help=argparse.SUPPRESS, default=os.path.join(data_path, 'ui-config.json')) -group.add_argument("--hide-ui-dir-config", action='store_true', help=argparse.SUPPRESS, default=False) -group.add_argument("--theme", type=str, help=argparse.SUPPRESS, default=None) -group.add_argument("--disable-console-progressbars", action='store_true', help=argparse.SUPPRESS, default=True) -group.add_argument("--disable-safe-unpickle", action='store_true', help=argparse.SUPPRESS, default=True) -group.add_argument("--lowram", action='store_true', help=argparse.SUPPRESS) +# main server args group.add_argument("--config", type=str, default=os.path.join(data_path, 'config.json'), help="Use specific configuration file, default: %(default)s") group.add_argument("--medvram", action='store_true', help="Split model stages and keep only active part in VRAM, default: %(default)s") group.add_argument("--lowvram", action='store_true', help="Split model components and keep only active part in VRAM, default: %(default)s") @@ -45,9 +36,24 @@ group.add_argument("--no-hashing", action='store_true', help="Disable hashing of group.add_argument("--no-download", action='store_true', help="Disable download of default model, default: %(default)s", default=False) group.add_argument("--profile", action='store_true', help="Run profiler, default: %(default)s") group.add_argument("--disable-queue", action='store_true', help="Disable queues, default: %(default)s") +group.add_argument('--debug', default = False, action='store_true', help = "Run installer with debug logging, default: %(default)s") +group.add_argument("--use-ipex", action='store_true', help="Use Intel OneAPI XPU backend, default: %(default)s", default=False) + +# removed args are added here as hidden in fixed format for compatbility reasons +group.add_argument("-f", action='store_true', help=argparse.SUPPRESS) # allows running as root; implemented outside of webui +group.add_argument("--ui-settings-file", type=str, help=argparse.SUPPRESS, default=os.path.join(data_path, 'config.json')) +group.add_argument("--ui-config-file", type=str, help=argparse.SUPPRESS, default=os.path.join(data_path, 'ui-config.json')) +group.add_argument("--hide-ui-dir-config", action='store_true', help=argparse.SUPPRESS, default=False) +group.add_argument("--theme", type=str, help=argparse.SUPPRESS, default=None) +group.add_argument("--disable-console-progressbars", action='store_true', help=argparse.SUPPRESS, default=True) +group.add_argument("--disable-safe-unpickle", action='store_true', help=argparse.SUPPRESS, default=True) +group.add_argument("--lowram", action='store_true', help=argparse.SUPPRESS) +group.add_argument("--disable-extension-access", default = False, action='store_true', help=argparse.SUPPRESS) +group.add_argument("--api", help=argparse.SUPPRESS, default=True) def compatibility_args(opts, args): + # removed args that have been moved to opts are added here as hidden with default values as defined in opts group.add_argument("--ckpt-dir", type=str, help=argparse.SUPPRESS, default=opts.ckpt_dir) group.add_argument("--vae-dir", type=str, help=argparse.SUPPRESS, default=opts.vae_dir) group.add_argument("--embeddings-dir", type=str, help=argparse.SUPPRESS, default=opts.embeddings_dir) @@ -62,7 +68,6 @@ def compatibility_args(opts, args): group.add_argument("--swinir-models-path", help=argparse.SUPPRESS, default=opts.swinir_models_path) group.add_argument("--ldsr-models-path", help=argparse.SUPPRESS, default=opts.ldsr_models_path) group.add_argument("--clip-models-path", type=str, help=argparse.SUPPRESS, default=opts.clip_models_path) - group.add_argument("--disable-extension-access", default = False, action='store_true', help=argparse.SUPPRESS) group.add_argument("--opt-channelslast", help=argparse.SUPPRESS, default=opts.opt_channelslast) group.add_argument("--xformers", default = (opts.cross_attention_optimization == "xFormers"), action='store_true', help=argparse.SUPPRESS) group.add_argument("--disable-nan-check", help=argparse.SUPPRESS, default=opts.disable_nan_check) @@ -71,15 +76,13 @@ def compatibility_args(opts, args): group.add_argument("--no-half", help=argparse.SUPPRESS, default=opts.no_half) group.add_argument("--no-half-vae", help=argparse.SUPPRESS, default=opts.no_half_vae) group.add_argument("--precision", help=argparse.SUPPRESS, default=opts.precision) - group.add_argument("--api", help=argparse.SUPPRESS, default=True) group.add_argument("--sub-quad-q-chunk-size", help=argparse.SUPPRESS, default=opts.sub_quad_q_chunk_size) group.add_argument("--sub-quad-kv-chunk-size", help=argparse.SUPPRESS, default=opts.sub_quad_kv_chunk_size) group.add_argument("--sub-quad-chunk-threshold", help=argparse.SUPPRESS, default=opts.sub_quad_chunk_threshold) - group.add_argument('--debug', default = False, action='store_true', help = "Run installer with debug logging, default: %(default)s") group.add_argument("--lora-dir", help=argparse.SUPPRESS, default=opts.lora_dir) group.add_argument("--lyco-dir", help=argparse.SUPPRESS, default=opts.lyco_dir) - group.add_argument("--use-ipex", action='store_true', help="Use Intel OneAPI XPU backend, default: %(default)s", default=False) + # removed opts are added here with fixed values for compatibility reasons opts.use_old_emphasis_implementation = False opts.use_old_karras_scheduler_sigmas = False opts.no_dpmpp_sde_batch_determinism = False diff --git a/modules/memmon.py b/modules/memmon.py index 3abc70ac3..77e5eb752 100644 --- a/modules/memmon.py +++ b/modules/memmon.py @@ -25,7 +25,7 @@ class MemUsageMonitor(threading.Thread): self.daemon = True self.run_flag = threading.Event() self.data = defaultdict(int) - if not torch.cuda.is_available() or not shared.cmd_opts.use_ipex: + if not torch.cuda.is_available(): self.disabled = True else: if shared.cmd_opts.use_ipex: @@ -35,7 +35,6 @@ class MemUsageMonitor(threading.Thread): except Exception as e: # AMD or whatever print(f"Torch exception: {e}") self.disabled = True - else: try: self.cuda_mem_get_info() @@ -96,7 +95,6 @@ class MemUsageMonitor(threading.Thread): free, total = self.cuda_mem_get_info() self.data["free"] = free self.data["total"] = total - if shared.cmd_opts.use_ipex: torch_stats = torch.xpu.memory_stats("xpu") else: @@ -106,7 +104,6 @@ class MemUsageMonitor(threading.Thread): self.data["reserved"] = torch_stats["reserved_bytes.all.current"] self.data["reserved_peak"] = torch_stats["reserved_bytes.all.peak"] self.data["system_peak"] = total - self.data["min_free"] - return self.data def stop(self): From 22da90d4b8b1c5f582fb300b9b1e1d5808a02b60 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 1 May 2023 10:13:21 -0400 Subject: [PATCH 026/282] fix lora memory leak --- TODO.md | 1 + extensions-builtin/Lora/lora.py | 3 +++ modules/sd_models.py | 2 ++ modules/shared.py | 4 ++-- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index 040fca0a2..556370885 100644 --- a/TODO.md +++ b/TODO.md @@ -20,6 +20,7 @@ Stuff to be added... - Auto-test `torch.layer_norm` for FP16 - Monitor file changes by misbehaving extensions - Kitchen theme: +- Lightbox improvements ## Investigate diff --git a/extensions-builtin/Lora/lora.py b/extensions-builtin/Lora/lora.py index 3cbd91646..ac3f3a8e5 100644 --- a/extensions-builtin/Lora/lora.py +++ b/extensions-builtin/Lora/lora.py @@ -260,6 +260,9 @@ def lora_apply_weights(self: Union[torch.nn.Conv2d, torch.nn.Linear, torch.nn.Mu If not, restores orginal weights from backup and alters weights according to loras. """ + if len(loaded_loras) == 0: + return + lora_layer_name = getattr(self, 'lora_layer_name', None) if lora_layer_name is None: return diff --git a/modules/sd_models.py b/modules/sd_models.py index a7a9adeb9..332a19e65 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -236,6 +236,7 @@ def read_metadata_from_safetensors(filename): def read_state_dict(checkpoint_file, map_location=None): # pylint: disable=unused-argument try: + pl_sd = None with progress.open(checkpoint_file, 'rb', description=f'Loading weights: [cyan]{checkpoint_file}', auto_refresh=True) as f: _, extension = os.path.splitext(checkpoint_file) if 'v1-5-pruned-emaonly.safetensors' or 'vae-ft-mse-840000-ema-pruned.ckpt' in checkpoint_file: @@ -251,6 +252,7 @@ def read_state_dict(checkpoint_file, map_location=None): # pylint: disable=unuse buffer = io.BytesIO(f.read()) pl_sd = torch.load(buffer, map_location='cpu') sd = get_state_dict_from_checkpoint(pl_sd) + del pl_sd except Exception as e: errors.display(e, f'loading model: {checkpoint_file}') sd = None diff --git a/modules/shared.py b/modules/shared.py index 611d8af4d..77d5b3e14 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -5,12 +5,12 @@ import json import datetime import gradio as gr import tqdm +from modules import errors, ui_components, shared_items, cmd_args +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 # pylint: disable=W0611 import modules.interrogate import modules.memmon import modules.styles import modules.devices as devices -from modules import errors, ui_components, shared_items, cmd_args -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 # pylint: disable=W0611 import modules.paths_internal as paths from installer import log as central_logger # pylint: disable=E0611 From d4a748d758e1f3dd4bdf36c045fc30113043fe50 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 1 May 2023 12:25:35 -0400 Subject: [PATCH 027/282] update requirements --- TODO.md | 1 - extensions-builtin/Lora/lora.py | 3 --- extensions-builtin/a1111-sd-webui-lycoris | 2 +- extensions-builtin/sd-webui-controlnet | 2 +- javascript/black-orange.css | 7 ++++--- modules/api/api.py | 4 ++-- modules/cmd_args.py | 1 + requirements.txt | 6 +++--- webui.py | 1 + 9 files changed, 13 insertions(+), 14 deletions(-) diff --git a/TODO.md b/TODO.md index 556370885..a18ac0d0c 100644 --- a/TODO.md +++ b/TODO.md @@ -13,7 +13,6 @@ Stuff to be added... - Update `README.md` - Add Gradio theme maker -- Transformers version - Create new GitHub hooks/actions for CI/CD - Redo Extensions tab: - Stream-load models as option for slow storage diff --git a/extensions-builtin/Lora/lora.py b/extensions-builtin/Lora/lora.py index ac3f3a8e5..3cbd91646 100644 --- a/extensions-builtin/Lora/lora.py +++ b/extensions-builtin/Lora/lora.py @@ -260,9 +260,6 @@ def lora_apply_weights(self: Union[torch.nn.Conv2d, torch.nn.Linear, torch.nn.Mu If not, restores orginal weights from backup and alters weights according to loras. """ - if len(loaded_loras) == 0: - return - lora_layer_name = getattr(self, 'lora_layer_name', None) if lora_layer_name is None: return diff --git a/extensions-builtin/a1111-sd-webui-lycoris b/extensions-builtin/a1111-sd-webui-lycoris index ce584a0ff..4d74a7b88 160000 --- a/extensions-builtin/a1111-sd-webui-lycoris +++ b/extensions-builtin/a1111-sd-webui-lycoris @@ -1 +1 @@ -Subproject commit ce584a0ff863de98233ee135dcc17f2fb44703c3 +Subproject commit 4d74a7b889f91499dd85b9ccd7de58350b8da195 diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index cfc37659a..070d08f75 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit cfc37659aca364b37fc90943e039ceb2e7b6d8ba +Subproject commit 070d08f7524ae6d16973ee57b1e0bc6369d5388f diff --git a/javascript/black-orange.css b/javascript/black-orange.css index a055e2e51..703425ece 100644 --- a/javascript/black-orange.css +++ b/javascript/black-orange.css @@ -54,7 +54,7 @@ svg.feather.feather-image, .feather .feather-image { display: none } .py-6 { padding-bottom: 0; } .rounded-lg { border-radius: 0; } .tabs { background-color: black; } -.gradio-button.tool { border-radius: 0; height: 2em; } +.gradio-button.tool { border-radius: 0; height: 2.0em; } .block.token-counter span { background-color: #222 !important; box-shadow: 2px 2px 2px #111; border: none !important; border-radius: 0; font-size: 0.8rem; } .tab-nav { zoom: 130%; margin-bottom: 16px; border-bottom: 2px solid #CE6400 !important; padding-bottom: 2px; } .label-wrap { margin: 16px 0px 8px 0px; } @@ -80,7 +80,7 @@ svg.feather.feather-image, .feather .feather-image { display: none } #lightboxModal { background-color: rgba(20, 20, 20, 0.8) } #quicksettings .gr-button-tool { font-size: 1.6rem; box-shadow: none; margin-left: -20px; margin-top: -2px; height: 2.4em; } #quicksettings > div, #quicksettings > fieldset { min-width: 26em; max-width: 26em; line-height: 2em; } -#refresh_sd_model_checkpoint { height: 40px; margin-left: -14px; background: #333333; box-shadow: none; } +#refresh_sd_model_checkpoint { height: 48px; margin-left: -14px; background: #333333; box-shadow: none; } #refresh_txt2img_styles, #refresh_img2img_styles, #open_folder_txt2img, #open_folder_img2img, #open_folder_extras, #footer, #style_pos_col, #style_neg_col, #roll_col, #extras_upscaler_2, #extras_upscaler_2_visibility, #txt2img_res_switch_btn, #img2img_res_switch_btn, #txt2img_seed_resize_from_w, #txt2img_seed_resize_from_h, #txt2img_tiling { display: none; } #save-animation { border-radius: 0 !important; margin-bottom: 16px; background-color: #111111; } #script_list { padding: 4px; margin-top: 20px; margin-bottom: 20px; } @@ -103,7 +103,8 @@ svg.feather.feather-image, .feather .feather-image { display: none } #txt2img_tools, #img2img_tools { margin-top: 54px; scale: 120%; margin-left: 26px; } #txtimg_hr_finalres { max-width: 200px; } #pnginfo_html2_info { margin-top: -18px; background-color: var(--input-background-fill); padding: var(--input-padding) } -#txt2img_extra_refresh, #txt2img_extra_close { height: 1.7em } +#txt2img_extra_refresh, #txt2img_extra_close { height: 1.7em; } +#extras_generate { margin-top: 8px; } /* custom elements overrides */ #steps-animation, #controlnet { border-width: 0; } diff --git a/modules/api/api.py b/modules/api/api.py index 2912e2cf2..fbe64a037 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -13,8 +13,8 @@ import piexif import piexif.helper import uvicorn import gradio as gr -from gradio.processing_utils import decode_base64_to_file -# from gradio_client.utils import decode_base64_to_file +# from gradio.processing_utils import decode_base64_to_file # gradio 3.23 +from gradio_client.utils import decode_base64_to_file # gradio 3.28 from modules import errors, shared, sd_samplers, deepbooru, sd_hijack, images, scripts, ui, postprocessing from modules.api.models import * # pylint: disable=unused-wildcard-import, wildcard-import diff --git a/modules/cmd_args.py b/modules/cmd_args.py index e347c3532..80b11402d 100644 --- a/modules/cmd_args.py +++ b/modules/cmd_args.py @@ -31,6 +31,7 @@ group.add_argument("--cors-origins", type=str, help="Allowed CORS origins as com group.add_argument("--cors-regex", type=str, help="Allowed CORS origins as regular expression, default: %(default)s", default=None) group.add_argument("--tls-keyfile", type=str, help="Enable TLS and specify key file, default: %(default)s", default=None) group.add_argument("--tls-certfile", type=str, help="Enable TLS and specify cert file, default: %(default)s", default=None) +group.add_argument("--tls-selfsign", action="store_true", help="Enable TLS with self-signed certificates, default: %(default)s", default=None) group.add_argument("--server-name", type=str, help="Sets hostname of server, default: %(default)s", default=None) group.add_argument("--no-hashing", action='store_true', help="Disable hashing of checkpoints, default: %(default)s", default=False) group.add_argument("--no-download", action='store_true', help="Disable download of default model, default: %(default)s", default=False) diff --git a/requirements.txt b/requirements.txt index 3f7db3419..e87a63e85 100644 --- a/requirements.txt +++ b/requirements.txt @@ -51,13 +51,13 @@ yapf scikit-image accelerate==0.18.0 opencv-python==4.7.0.72 -diffusers==0.15.0 +diffusers==0.16.1 einops==0.4.1 -gradio==3.23.0 +gradio==3.28.1 numexpr==2.8.4 pandas==1.5.3 protobuf==3.20.3 pytorch_lightning==1.9.4 -transformers==4.26.1 +transformers==4.28.1 timm==0.6.13 tomesd==0.1.2 diff --git a/webui.py b/webui.py index 8954cfbfe..81e196bac 100644 --- a/webui.py +++ b/webui.py @@ -215,6 +215,7 @@ def start_ui(): server_port=cmd_opts.port if cmd_opts.port != 7860 else None, ssl_keyfile=cmd_opts.tls_keyfile, ssl_certfile=cmd_opts.tls_certfile, + ssl_verify=False if cmd_opts.tls_selfsign else True, debug=False, auth=[tuple(cred.split(':')) for cred in gradio_auth_creds] if gradio_auth_creds else None, inbrowser=cmd_opts.autolaunch, From deb0546b4695defd3851beae2b679ad4fcc1841a Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 1 May 2023 18:54:50 -0400 Subject: [PATCH 028/282] update requirements --- TODO.md | 2 +- extensions-builtin/sd-webui-controlnet | 2 +- .../stable-diffusion-webui-images-browser | 2 +- modules/memmon.py | 73 ++++++++++--------- modules/sd_hijack_optimizations.py | 56 ++++++-------- requirements.txt | 2 +- 6 files changed, 63 insertions(+), 74 deletions(-) diff --git a/TODO.md b/TODO.md index a18ac0d0c..309c274fb 100644 --- a/TODO.md +++ b/TODO.md @@ -34,7 +34,7 @@ Stuff to be investigated... Pick & merge PRs from main repo... -- Merge backlog: +- Merge backlog: ## Models diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 070d08f75..6315bec9a 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 070d08f7524ae6d16973ee57b1e0bc6369d5388f +Subproject commit 6315bec9abbeaaff7ef5f59dc9bf7f8d4bf67c8c diff --git a/extensions-builtin/stable-diffusion-webui-images-browser b/extensions-builtin/stable-diffusion-webui-images-browser index 84cb61749..a396a9f90 160000 --- a/extensions-builtin/stable-diffusion-webui-images-browser +++ b/extensions-builtin/stable-diffusion-webui-images-browser @@ -1 +1 @@ -Subproject commit 84cb6174983812da2dff242fb484431b4ae3b8f8 +Subproject commit a396a9f90c6cd2fbd16fd2dc5aef3d210491bbc6 diff --git a/modules/memmon.py b/modules/memmon.py index 77e5eb752..97199445d 100644 --- a/modules/memmon.py +++ b/modules/memmon.py @@ -3,7 +3,7 @@ import time from collections import defaultdict import torch try: - import intel_extension_for_pytorch as ipex + import intel_extension_for_pytorch as ipex # pylint: disable=unused-import,import-error except: pass @@ -28,20 +28,15 @@ class MemUsageMonitor(threading.Thread): if not torch.cuda.is_available(): self.disabled = True else: - if shared.cmd_opts.use_ipex: - try: + try: + if shared.cmd_opts.use_ipex: self.cuda_mem_get_info() torch.cuda.memory_stats("xpu") - except Exception as e: # AMD or whatever - print(f"Torch exception: {e}") - self.disabled = True - else: - try: + else: self.cuda_mem_get_info() torch.cuda.memory_stats(self.device) - except Exception as e: # AMD or whatever - print(f"Torch exception: {e}") - self.disabled = True + except Exception: + self.disabled = True def cuda_mem_get_info(self): if shared.cmd_opts.use_ipex: @@ -70,22 +65,25 @@ class MemUsageMonitor(threading.Thread): time.sleep(1 / self.opts.memmon_poll_rate) def dump_debug(self): - print(self, 'recorded data:') - for k, v in self.read().items(): - print(k, -(v // -(1024 ** 2))) - print(self, 'raw torch memory stats:') - if shared.cmd_opts.use_ipex: - tm = torch.xpu.memory_stats("xpu") - else: - tm = torch.cuda.memory_stats(self.device) - for k, v in tm.items(): - if 'bytes' not in k: - continue - print('\t' if 'peak' in k else '', k, -(v // -(1024 ** 2))) - if shared.cmd_opts.use_ipex: - print(torch.xpu.memory_summary()) - else: - print(torch.cuda.memory_summary()) + try: + print(self, 'recorded data:') + for k, v in self.read().items(): + print(k, -(v // -(1024 ** 2))) + print(self, 'raw torch memory stats:') + if shared.cmd_opts.use_ipex: + tm = torch.xpu.memory_stats("xpu") + else: + tm = torch.cuda.memory_stats(self.device) + for k, v in tm.items(): + if 'bytes' not in k: + continue + print('\t' if 'peak' in k else '', k, -(v // -(1024 ** 2))) + if shared.cmd_opts.use_ipex: + print(torch.xpu.memory_summary()) + else: + print(torch.cuda.memory_summary()) + except: + self.disabled = True def monitor(self): self.run_flag.set() @@ -95,15 +93,18 @@ class MemUsageMonitor(threading.Thread): free, total = self.cuda_mem_get_info() self.data["free"] = free self.data["total"] = total - if shared.cmd_opts.use_ipex: - torch_stats = torch.xpu.memory_stats("xpu") - else: - torch_stats = torch.cuda.memory_stats(self.device) - self.data["active"] = torch_stats["active.all.current"] - self.data["active_peak"] = torch_stats["active_bytes.all.peak"] - self.data["reserved"] = torch_stats["reserved_bytes.all.current"] - self.data["reserved_peak"] = torch_stats["reserved_bytes.all.peak"] - self.data["system_peak"] = total - self.data["min_free"] + try: + if shared.cmd_opts.use_ipex: + torch_stats = torch.xpu.memory_stats("xpu") + else: + torch_stats = torch.cuda.memory_stats(self.device) + self.data["active"] = torch_stats["active.all.current"] + self.data["active_peak"] = torch_stats["active_bytes.all.peak"] + self.data["reserved"] = torch_stats["reserved_bytes.all.current"] + self.data["reserved_peak"] = torch_stats["reserved_bytes.all.peak"] + self.data["system_peak"] = total - self.data["min_free"] + except: + self.disabled = True return self.data def stop(self): diff --git a/modules/sd_hijack_optimizations.py b/modules/sd_hijack_optimizations.py index 3887e238d..6c6824175 100644 --- a/modules/sd_hijack_optimizations.py +++ b/modules/sd_hijack_optimizations.py @@ -3,7 +3,7 @@ import psutil import torch try: - import intel_extension_for_pytorch as ipex + import intel_extension_for_pytorch as ipex # pylint: disable=unused-import,import-error except: pass from torch import einsum @@ -14,12 +14,12 @@ from einops import rearrange from modules import shared, errors, devices from modules.hypernetworks import hypernetwork -from .sub_quadratic_attention import efficient_dot_product_attention +from .sub_quadratic_attention import efficient_dot_product_attention # pylint: disable=relative-beyond-top-level if shared.opts.cross_attention_optimization == "xFormers": try: - import xformers.ops + import xformers.ops # pylint: disable=import-error shared.xformers_available = True except Exception: pass @@ -35,12 +35,16 @@ def get_available_vram(): mem_free_total = mem_free_xpu + mem_free_torch return mem_free_total elif shared.device.type == 'cuda': - stats = torch.cuda.memory_stats(shared.device) - mem_active = stats['active_bytes.all.current'] - mem_reserved = stats['reserved_bytes.all.current'] - mem_free_cuda, _ = torch.cuda.mem_get_info(torch.cuda.current_device()) - mem_free_torch = mem_reserved - mem_active - mem_free_total = mem_free_cuda + mem_free_torch + try: + stats = torch.cuda.memory_stats(shared.device) + mem_active = stats['active_bytes.all.current'] + mem_reserved = stats['reserved_bytes.all.current'] + mem_free_cuda, _ = torch.cuda.mem_get_info(torch.cuda.current_device()) + mem_free_torch = mem_reserved - mem_active + mem_free_total = mem_free_cuda + mem_free_torch + except: + mem_free_total = 1024 * 1024 * 1024 + return mem_free_total elif shared.device.type == 'privateuseone': mem_total, mem_active = torch.dml.memory_stats(shared.device) @@ -74,10 +78,8 @@ def split_cross_attention_forward_v1(self, x, context=None, mask=None): end = i + 2 s1 = einsum('b i d, b j d -> b i j', q[i:end], k[i:end]) s1 *= self.scale - s2 = s1.softmax(dim=-1) del s1 - r1[i:end] = einsum('b i j, b j d -> b i d', s2, v[i:end]) del s2 del q, k, v @@ -93,7 +95,6 @@ def split_cross_attention_forward_v1(self, x, context=None, mask=None): # taken from https://github.com/Doggettx/stable-diffusion and modified def split_cross_attention_forward(self, x, context=None, mask=None): h = self.heads - q_in = self.to_q(x) context = default(context, x) @@ -107,47 +108,34 @@ def split_cross_attention_forward(self, x, context=None, mask=None): with devices.without_autocast(disable=not shared.opts.upcast_attn): k_in = k_in * self.scale - del context, x - q, k, v = map(lambda t: rearrange(t, 'b n (h d) -> (b h) n d', h=h), (q_in, k_in, v_in)) del q_in, k_in, v_in - r1 = torch.zeros(q.shape[0], q.shape[1], v.shape[2], device=q.device, dtype=q.dtype) - mem_free_total = get_available_vram() - gb = 1024 ** 3 tensor_size = q.shape[0] * q.shape[1] * k.shape[1] * q.element_size() modifier = 3 if q.element_size() == 2 else 2.5 mem_required = tensor_size * modifier steps = 1 - if mem_required > mem_free_total: steps = 2 ** (math.ceil(math.log(mem_required / mem_free_total, 2))) # print(f"Expected tensor size:{tensor_size/gb:0.1f}GB, cuda free:{mem_free_cuda/gb:0.1f}GB " # f"torch free:{mem_free_torch/gb:0.1f} total:{mem_free_total/gb:0.1f} steps:{steps}") - if steps > 64: max_res = math.floor(math.sqrt(math.sqrt(mem_free_total / 2.5)) / 8) * 64 raise RuntimeError(f'Not enough memory, use lower resolution (max approx. {max_res}x{max_res}). ' f'Need: {mem_required / 64 / gb:0.1f}GB free, Have:{mem_free_total / gb:0.1f}GB free') - slice_size = q.shape[1] // steps if (q.shape[1] % steps) == 0 else q.shape[1] for i in range(0, q.shape[1], slice_size): end = i + slice_size s1 = einsum('b i d, b j d -> b i j', q[:, i:end], k) - s2 = s1.softmax(dim=-1, dtype=q.dtype) del s1 - r1[:, i:end] = einsum('b i j, b j d -> b i d', s2, v) del s2 - del q, k, v - r1 = r1.to(dtype) - r2 = rearrange(r1, '(b h) n d -> b n (h d)', h=h) del r1 @@ -211,12 +199,15 @@ def einsum_op_cuda(q, k, v): # Divide factor of safety as there's copying and fragmentation return einsum_op_tensor_mem(q, k, v, mem_free_total / 3.3 / (1 << 20)) else: - stats = torch.cuda.memory_stats(q.device) - mem_active = stats['active_bytes.all.current'] - mem_reserved = stats['reserved_bytes.all.current'] - mem_free_cuda, _ = torch.cuda.mem_get_info(q.device) - mem_free_torch = mem_reserved - mem_active - mem_free_total = mem_free_cuda + mem_free_torch + try: + stats = torch.cuda.memory_stats(q.device) + mem_active = stats['active_bytes.all.current'] + mem_reserved = stats['reserved_bytes.all.current'] + mem_free_cuda, _ = torch.cuda.mem_get_info(q.device) + mem_free_torch = mem_reserved - mem_active + mem_free_total = mem_free_cuda + mem_free_torch + except: + mem_free_total = 1024 * 1024 * 1024 # Divide factor of safety as there's copying and fragmentation return einsum_op_tensor_mem(q, k, v, mem_free_total / 3.3 / (1 << 20)) @@ -261,7 +252,6 @@ def split_cross_attention_forward_invokeAI(self, x, context=None, mask=None): with devices.without_autocast(disable=not shared.opts.upcast_attn): k = k * self.scale - q, k, v = map(lambda t: rearrange(t, 'b n (h d) -> (b h) n d', h=h), (q, k, v)) r = einsum_op(q, k, v) r = r.to(dtype) @@ -400,9 +390,7 @@ def scaled_dot_product_attention_forward(self, x, context=None, mask=None): q = q_in.view(batch_size, -1, h, head_dim).transpose(1, 2) k = k_in.view(batch_size, -1, h, head_dim).transpose(1, 2) v = v_in.view(batch_size, -1, h, head_dim).transpose(1, 2) - del q_in, k_in, v_in - dtype = q.dtype if shared.opts.upcast_attn: q, k, v = q.float(), k.float(), v.float() diff --git a/requirements.txt b/requirements.txt index e87a63e85..15b606bc1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -58,6 +58,6 @@ numexpr==2.8.4 pandas==1.5.3 protobuf==3.20.3 pytorch_lightning==1.9.4 -transformers==4.28.1 +transformers==4.26.1 timm==0.6.13 tomesd==0.1.2 From f325594a6593a9b23984fa990c3a791f01ba59d5 Mon Sep 17 00:00:00 2001 From: Thomas Young <35073576+DrakeRichards@users.noreply.github.com> Date: Mon, 1 May 2023 18:05:25 -0500 Subject: [PATCH 029/282] Added notification sound settings --- html/notification_default.mp3 | Bin 0 -> 27585 bytes modules/shared.py | 2 ++ modules/ui.py | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 html/notification_default.mp3 diff --git a/html/notification_default.mp3 b/html/notification_default.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..dba530bf72d3b186b9e4334d5ee5c556237b129a GIT binary patch literal 27585 zcmXV%WmweB*T;Vwz_QfRt#pG+hk$fk~G zyqIfd-pn;GKIePpoHGx%)3yMB#VR=w;Ufjs>dE+C^9f*Fc+Vqx1b}w?Y!!v20KOI9 z@v^z6`Rd>h{*jh3#-BY&@%RdL&uLz8c#$8xU$V~>&-9J7A*77zXJMtxguZ!+d{n1+ zbawwch@Vyov!TILIo-3LX?m^e$%jpz{vo52pohq>zqq67uAoM7(siQvvLX(+(*DhD zpLg5cP17e=ZxIf7Uc=rrQS`&!lxxqu*WYuG{TqV*xAiyp@zB{{|F6I99)kZHqQ3rH z{@XjJiBq8ez3whd9Y1z(aKQdQ;{ruRb^QiF4_gnYfQN^N^T!V~NXSos;Gf|F|Lp%K z2tWnMEac9B665NUXdw)?G5(IAW@0`bPf*(RX{+;tT1EFM>st~ENOJZHeyhl`+Zsp95i3wWw zmV6$$Fqz>lcgo^Y*Xvl%JE-d3U;}4WAni@IJfy^gY+7RgJ~)X`$P@nx0um}u0qctH zABg7=o@ar09|^Shep_|-X4FB*tWmhasAM+o0?SYM#Cs@fHBC@RK^`VK_ydIoyv&Xv zz@xici3NhOIgCph3c$d0mX7!tIZq5$J&|k>nH~^ongozy6DwF@UU;Y462xXy@kZLQ zx6F_n_C{ar&HL>vQF^r8It7fnh8AXxaK$=sehBkLi9j&A@Rfx1czkuFM=+uYzJ(?5D~nE8=JsWK^l;FbtY}Oij~#xDUyklV#FoR<9&xBh>9z{%TBMXPV zea!cSZqC41+}fPy#q-$nh#fkhY!`? z5f8>!4-cxB52X*6a~leLKN)zn0H7NNKJF{SXX+k@=5+soaP`13#Jk@>m%EpsMgHfy3tVmJ7Cu;X}5BEq$IiTs@-@u5KMLSGNl`O%DvSrk4ULj!Ru|BK2@PYs(g= zMDb=I|IH@gwtWLX)dCpfZ^%4$eMZeBw((jL*!#OFY493lN4iHj@ua9gn3!M`>87O@ zhzApx2Ba*BP&t?&PtewAL<(Lrutki1mvP`l^l|8?N8vTEx@yHih!QW*9##B(B(#UY zg8N-u+$#sHi(k|(^`FuCl$Wl)_wC9f~D^`mTB z=m@fi!JUm|6c)Ke+|pdaEKo1Kmn?Bb}Iq*6K20B1Gpuxt1O;ennX*7 z>u^QC+{8UiRcf6GmPDN6+dRauWy&AU7DaPeKHZVupG)|sBlrfRYbr-1$U1l!q*NKh zCsOtJ*JQsm$^arA5`)VdY7N|kz`(pA2~gwEPcXtrdm`hyP2qr20|KYmbdr$1WNGZ^ zR|NE-zp>auA|Z_-Y@leA8Qx3?59kKf0A!+&n3W-NG}^`2+lAq-gxaV*j1iO`cnie< zazY`1nHXb_IV&=T+W8Gv((yWrW1Xp`_nIKM|-&IEc{amFgba_^48~o%jbWgnZ>b0?9m&G8s z&(Uq)%>u3*_fhA%5^X>IlcRq8&At5>+129Kv3>5Lhp*a#Bdx8zY0n0xme`fG(`J6@ zzviZz%BFVk7n@~Gr_v2hE9212<-MrTF1*RxXhWB|Yl=74*P*mB|4^gW`{Sp^$C1kE zeLBmzadm>aB2HfOdA8yYUB=>;iYn@dS)g!_uOoW zQ{io8j&S4wV?QRgK!Oi$7Mfp3ypnusL7B(wKKOnm_)S2-yI&7uf5#dEL7<;@oRf_T z@QD*uz$bv>&N_j1kR_=FJ3X|r%*Fd$P7Q$hsQo3Irui9g`o>T!67Kf zOj0s?Be|cE^y0mB-kXToH*~i;1?Iy^6k!Yk8H=SkAu?=h6N_Cu%@R+FlLlPv9xhx* zUyCKgKYD!CG-*TGP{Dd=R$u!gHK`P*IVJqsAy3p|kL*{Z*<}6)$WUcn8>2IgFbzF1 z;+GhVbUu-!t@0VQwFsSg0Au>&&4IQ!xk{b2lf8yJHu%k3_;p~6 zOkW;JJlr@XuRd>Iu;65S__l_ZNU$C1ZCxCt{UZ#RJKf0Vq97L4eGX z6vbot43uRlgnDVo1lU_X0q!kr!q#n}j7TfDP?)6xP-aPmlCp#W_@;Z;P9-uPCcIhp z%eE_4<;e^yzo?PC%1;wD_=Za})rt%ZK4tF2^bsvz7Vq167HN-^0V6>-W7P!PM*ilihHJ_i3X( z7+PcuPW#W<+x2t|*v6f(+o)e!#QWo3lp2;&%O5*;I4v1|JuJUnS!**lcK`0&^)Dvi z)K9H_%IK-$#qp+8Rcp}7k0`#PS%|OOGw#2H5i17KqE2t3Cl20MD`#N zaRq#e*Y;L6!+Y!>EbPgZwlKq1WcOe&?m^HrVHvOw!vrir3g8c%3jZ<02p#r(qo8|h z<{ho6^go6IF33E#h(~E98RJ{h*+EEL77z?e0h|HD#A=|jcdgW9q4C5iw_qbA;tG^w z$U3EZf_xooIiLv!o?`TF9pvh$cS-dOuIACc8!h%-ESk1VQsaQU?a`?a64rsdabgkv z)v#TTp`4oYo#LHutmV~T)!)t}2|DgyvsRbb4k{|VpJXW~ zbS4C`{T6oMr*-02AzAaGRyc_}>8cVZ#mEd5vO#W&>piS|HPnPVc{5M>Bz(KOqaLb5MZ3c`)U@k$41h;DNLM>sSt1L5 z!&^)`Vz3ftA1eg0r44Srn!NRw{8-nJYy;YkP}SQwC9B)aZ9A{onsNWNlHKe!itYsn0Pt#bQk^~Y(z~Wb!_DUK4 ztrzT-KuNwKa6AWV`P0OtGP`ZiMa8;bt`b|Z>l~v%rFFg|mOQ|35h-%!=J>i`b5Dw? z%b!}-==vR-?We&IPp)}-QvS2ZdeQvFI|oangHL&Pw+|JgLHZK~;wzjiE#*P!O6^

88wpgcOD#Jt+QTh&FEMJZSLgs+o5L z!SI|DLkwN~Et$swVb8trc6>9OoemXX1P4p4_blt<=eQ^h4h!JNHghR;hjAClHj1cl zyN@LD6l(sJk&YA+^)?Yvz&jQ^k1_Uhta0qcOP416+d+~MZ1>B#>*HQM$VjwYd+K9onSrfolQ-b3A)`A`WN#Z1#_JcMTslcBNEIKX|trUz7sUs6*X!erE?Ra2Im!1)L(nEuM zE9H*l00fc5QWQu6fEI~^;zSZi5g~B^dL%x|4N2Ma5t;n zv|~uHioYT9*q<4t6Sb)S)oZy2c-M-x~Xs{Tx=Ff2zV|2Qb zI`z5o=T64SJ7+Nt;xdVmCMWR=od}L^3sn+Nc8?~U1!K#cle7;nPN!o^mSYlQ6S8xN zV3_z1j;oJv_q?KVJVLw|X@alSDM!=WD6b7BdaB`}q$y;U2QQCi8wu+BUk+KJbS&iSj+W_)Jbr#s9oU4(iSUkkS1k1JsT} zK(tYkSnQ|@@<#M&EhwS@;T5*Yb(8c`Iw=GRt3)wCtWW@G1Vse~q26GEP-Y-yln#gx zl@3k{al}4I60^ySpo6a58aYRVzNK^dP90q|5t+f3hVJ7xxPr`=M$sh`*6#E>EypX+ zyz?6}ER~tOOqM(uUF$d^_uJv6=;UcS*6wJf^eyd>bDl3NJrQ&=5C63w!R#!mLFO#& z=nGAF<&omJySK}`YwOlLqTO9oe9Ab}?I3}~fA(eLTsPM7u&sobSfzv)pIPoRUmnSf z&kd9qpBjN1V)prUg!hGsUy2raQArxJPApUC=By1jpAxaO$zvmaZaowb@#b7W@!_;2 z$d=+c+%mlksi*M$?#qQADx|#W@!$H6k5>$DZ0MAGu+L`6_!`Z94HdlfzR55*?Z*#j z-a0ndli^@^xkoauyGl)vuqz!rRN5OqXxvk;w>4Ma2arGfVc)$EM4z;h$rYn zZHB7nxxa`!B!uDYo!jPe35CCZWNJXu$I*%^pz)V*EEFD+23{$xOsX?L`I5P@GO+1U z$*WS>@A8FCui@gE5$<7YEe?>UZ!>ATLW0#ZqqjRkvzkT`w8i3FJY*qeLb6egn|p5# zUA1@fPE=kFU9|L0ia5mI>^9&Ck&-@{s!Vj8=%!7n`Kk#{V)xZ$2q(p)s^ zB+ZYPT&&WHm1A%3>BQf1w!9@r$ za!fJUl@N%0PUb4Ij3(iTN{L#3;B*kL>~zysmlYIx9l&BdrO3xTJ${nS+FG&RdEJ(M zVC$n7A6ZMf9d)!G@8sM4Kc99m_~>?9%bFM{A8wd>z0l=s%X78xvBc9W)^VNQ{T?YoHJFqU2?R*oL}G)z*D0`3#$lUg zG#xec3EfXA*ipk2cp#}qG4PWt|t=c^O(d1|>b48=-u8nbMrzNXFFyl*S1vcMMp zvGh|oT9ZDz)sOsk$E)8X)!m|0E3KwwOZ2*!%Y!Jz>%)3g*;u+hv&9A-S0;Clapn_s zmOiJNbuCs5?v}%6pS@TU&Wgty+8DzSe#$r`j`8P~vF{s;1Pgp4u|MI?|722=wge|= zKGGRwrDf{Y!uGiD*Isq1B}pbmPM@=}X}waSC?iBjQ?lzY%=Yr*X^z=8sa$VfPE$&; zU@8rVSKsWiJFzn6N}o>z{_*_&xIH*0ckEZ4-}SS*&%ujN=})~>>Z+}?)>63-cJchh z##%bIx!NrlQfRF8_npEy{Q6M<2S7&wqyQv<4WI-f23jCCAQZL_RGg`grcuO(RDh%p zRAZk)6Bo&d;fvc0O8gf(1OjIOzykU}y$42tBP_|nq%{6xh#C5!=#4D(A2rXAx|fIA zj3t(hx41u?5__Q{jD_I|^hlDPT0UpI2c%99hA>f_af4Jpap^X$`SgZkGiQw2VOo1% z%2b@wJSEvQYu)(sq#0$`nTFq~O|Ss()WJ=d3tnHUAIEz6%ZhE^AEj9Vnmn548&II^ z;&1A%PKuvrSwe~TclNzMpHg20Rg@+UyB{9^k?ZHtOf7K2eI}7NAL2hczt6l^qNL7{ zB`OcPfOAu-S%E&XY&?lBVGFZWqV-cR5C}0XhZ7EDrt2in53Y=m?Je0d%+RuQZyg%) zr%a!zAe&_v1Y*8PgS)%dsAQXBi)k>if0|5t_OwP{n#ZNT@T7j(+xkHEV<7UaLO=5e z##3mTZPOS>Rs{r$i&~^?97boT5V@7B$l+B#u$3*aJ63ld@FTtJj^QX6=i!-DK5Lqz zukYF;s(-7y-1>AqD&G##TmCVEE6zM4!Cf&u12~owv@yJfC%m;t3T|n}53-~{@S@$gyJ~TA!?-n2LF^m}IDS+ey`2YwwQU|n&(4`;;qC2>7+;{T0L6PUuWV6%&^1Lu^r@kn;}$3)dt6aT7oMrO1{b+Yd$QNV6DG_ zmLeL;3Vr*udRgXGrQEwM8_I-~-C4u;LXko7Nw4F0Y@WYmh<)_NPmt41<{|d>on2Gp zXo^|j zxvf1se6%t3S@LjOUr5N-_B9ENBHPWy3yEszoW-o$?~TN!YsVzB3TKDN)mZlAN+_PI zXly7>+H2)(ecydIHI}EG{n1ZT!|N`?du%RCf3{Qt-m-M{I>mojHuTG?)3Xtd<3x5@ z%g3-Ub#O*1vz$d&P;LXqmf&Um{i9=icW9Z)6JDk&rR-Lij zvi1h<77!6bBe~s5hTV=N`WKEP0Hfxg>JXU@Qf7c@$prbAmmyuIHV6#s3_YJKo=brg z3Q$UN6EUio&}R;=u85k?^Q$m5ZKejp1kLr^6?G!`8~?D2Mqa)UV_8#Fy?p)VA zQwKM<_I>pj;ojQy(bo))3C{Ij6P!*rwtt|pOLsy3qgRcK9jT~YhrKgv8d8_r-=1<_3 zmaqR6j$s6=;PbylYDYGwD3|-c-KML zFYqM4XRLBQOep#p?c4U)XF<_R1*K0feh8(rFK^HdEp***8J+EZ%o`sd>5sY$kSi0h z+*mZ6NpCrFt39P4AgRs2BwO0@O4l~j_!3IwEwZ%oJ4SiZWM9CdVm$fmfT_~mmaD(s z98~(NX<$HRVmQhz@$#In5|`DE{d<|90PhD+%jXYG0ul^cM%dkRgW{w^^JQZ1?NL03A^r3V{GOhDd=ysa2Sb;fbKe{}^J!g^4|24i5L4Z#dx8<0WcA0h$Y4_3NUngLs3wRyWmFmJtP zXN5aIkG{VYOwX0+pLRP|7+$qXQy1j!WMwn_#x^c+gzRoSNi}yQ&^_J^zZ3o@Kz_CLwNG`ub(v)4WGA zT8^Jubqo#B<%idh6bOiJ__uurx~;=}rBazR{K4BScM?yLh^x#|oFsa8x3}Dg>?LOL;ZyEiD}?ri%Q$`!hmMUmtD0Cs%d6QCO#yoSGvrh7|}q8mv9k7 zpa?(nTGKAKKwaeknEHhZd6hcDH%h!|>p}t>L8Dn2QdMqM4Xi&IU##M`3jlzQxkG7& zT3hKOAjZ%;O_6$TUlTfC3gdcx?oT?+@U-Se;jHDSWBF%OKGhg%J6Rn|S99BpjzLIIG)s7Ed2}{GqUu(F%!z=pJwRp!|R(4Sx3XiH@ z*ehIJc*bL1t0)|5J?8Hfh1<~naT1~B)TE1 zG5VCI3z0q`DJ}fs7&^<=*;iDf* z7NznHWnIY}4(l`P%0(*6RwW)K&Y)*3A+7Da-4);BV*2hElhHO-7cl7hm}OPiXa**R zDxyXrgYZWjm#(g9D3ROixqKB^++wwd$C7YfHuBS5apKut=JmpLd^YFZkGJ`MJT@RN zJp3BO-$uH|W=^%-@a^my7GhpDyKTUfmUh>P7|-y|9MdwM5Vj)9Ea_7_`eh3+sm2EjSd%tKGDDh(`*r#LXWK%=PI=#9c2!MJ(QN$SQ=3%L&I`KCQukETR})~bU2!);3q=Nqn45yE^Gg)pzeqx zQ2+Cmr=lPc1(}8tOKpsNo=Hw3|4i3As%oyo6tMw>vqX3=Wous0_{tS+p)hmfZEMiO z3fYh5j2{8P&%XuZ`utjV>uJSv*8e(Qf8tNE96ICU_e*WaMTga<=~ zY!8(NwqrH`(VPY%6# zi^zPo@kzL^WtRNkGvSBruI=l`#_o=(>1A%WU+O)s9Wyz9Y7RQ6@R7FoC(uHsMzaOo*z`#~k#Wry10~4Ip5X#{^)Yle+lANYCx(NG-bl zZ~Qoz_{sZ1D5D|h_5-ELEa^;7Y;1jm zz5G!qOj7I&Eu_ycP*Z565cA{dHZ^s*vTGp=gHNY*(`-^3%bVIGM%Hs}HQqnYz^LIP zDm81F1|}W_wV-RK;W4?(bSLmml+2(C8kgZoLdv;gJ+a(xO(#tCbJYQfvf8YPz`E^o z;mYF|7D;+rY_7Ge>DFEvJURtA`kxYB6!z&ZkYsCCESHPF+xDx<{y~}>c+sLL|6J@Q z&$T=#feJ=Nsw4PEfzs4)@TE5x6YDy?U#@H?9d4jgK_SAJsIw*I+nbD9@)7TDfFVFN z0wR1EV#v8T8X#-XFbPq$fSuRSF|8R=%ovK$qY>bAN@0yFGKMfM|6*g|^pqFn>ZJ)* zvXDC^{p`BO)Sr9ufo%cXEYpCu`8koBZ+UgCOF>}mau}}2jZmbgk?V@xmy6#1Mb^Of zXFfc!x=}!jiNiS&Wm4~k>F{(RIZb-D>pKp#CT*JVC9+>eZNN!>4}$(F)m{2=c{;O_ zACoOp4^Bg<$c8KsvJw?{iB7gug2Dj(_TQA?TneXpEP$msovB|XuGjIH$3izvvFXdU z4t%7So!(<6Ljg-YF_#g+WZ*3Oy9`Sv49u=idJ+<}bre1^In7L+&G^3GW8r-weP9zA3JM1d5{i(1Ui{?4IC7>`Ii^Vx16hGD z7y2P@=N|4S{=OZ~j7i4*qHt+%W~l{|B7V4T%-{K|&C?$N2PMoH@dx%SOffeY(J1jc zG?6^S8J1}AFItg331I$hU-Yj~VSO!aP*wbqMVrU-4TqV+$dXY6Ib zY8X8bI$nfUR+Z~`txfEkOSj*v_)auISz)%zIZLn*Ih6l^yjaUF70ZmeJXcGCcZ!c$_Pxyb8E6nwcd}J6yk|S ziQ7|4$A&~w5#}tL(GX&R(@A?N0O4~=wr<4yX#ooIpqvMu@YaRkp#+GL-fzW1(v=w! zXUxSg;7rL*1(Y&%Fz?L_ak@y$%0(MIod5;I9(2CIgBTqfYCt0(g(4#Ef z-&KclFUU5NE}!R?n)yBL`qkOwn%;n0O~6nEX6OhwLwgrN));J3!HZ_(r**+wAGar` zcNaw?7-VtPlgTgxJ{cjH+NqsCT9>rm#c}zU--z?)tXh@Y$S$U#D3ssRNyS7wMEKnla&+6+>E(B z@Ll*s&9*nn4xMeXfsBNMuHtF@M)pb7LjdAu@0C-SBDSHlh71zTShRl42Av=xkeVHq zhStj}ZSVL-7slbNR;5f55-AO@l%ssPeRvvOB9>N!b!i-v+QaR%+-m?s;`OkL6YZ-S z*ZmVOwmALhV*1*W*>4?^+fIY{Z0hKpN>Y}=a#%^TgZ^Yx;nIkWHdv)p7t1u7*F~@v zr$YYO4!U+we#Xnr{PB)I=R#+YYVSMj+Oc`OqKB1VpOe`oXXr&;I<>sn{o3o z6*VfKw&>f?ynIcCj}j#CXho;|R@n+CMuEfWSQC|2Y`!*q(VP>NkVZQgieL?oFSfOEa^y?I!Fgs&)9|9tK#G}h>?L(s{(Oxg z>x(}so9kE38*cj}y8Ela(MvZwzw{ObKmW+^<~x>Y8m`b5TuLm*M-2aK{AhN;ZI>2R?zv)Bi18$=_d zzEffoLsA6Wy!2ZagP&__5hgwcg;g zt2m>1LQl#)e@2+J+EnWHj$R?Hm`~_&!uK@U5kZ5eDZ5FuEHzh|%hT(V)Q0s6V1NVj z- z1v+3YG*m4_q<{(e!>uvIbhMg*5L7S|Z-9dXgR3izj6Bz@F5w_qG_SI6a(3R4suwt^ zqwOTt=EC3q_NdGQM}XzAw1Kt0X`MZBSZl0@4awBpBKLWxH8<<+`Ox1J_x4t#W77uQ zvA)JbV59oy?7O_?cv;$yLJNEb87yVC6Ti8RvQbJ2PN@=|m``cY>XHT*lTY~*n+@5s zYORj4o1;hBc+tjufC6JFg}MDFL(KrjvseGg zkavyi4W3(AzP|Dg+S(GI-g^EL!ICUDJ}fZ+J3(YYi4fEzKRM%WV^7BYTkX-c=9eQx zyON$C1RClyyxG=tx2El#$nD6D~uQl$(l35otUJsWiQj>r#scE2#nkQHXa(%2N57 zl_7iGNWIx#BKqW={u+;!k~OVx)_2p1!VjCqHI$8{ota;D5?ho-?L-^Zb#n2~9RyGO zB=S#%?`|cRa(@|3CBFaUsxf*Hn#q!;`1{si{Yy%5yTs^)c;bY(WSA=ih6!ngZbMvbzrAt>NDq|}B8LHr;XctW8N|h>N4bt$d z+pM#b-_d!56aL;TH1E3PGVFw2tAi|tAjvsKl562ySr;sg(u>{jX*|^yip(O{0aGre5Vh%=J;#_ARgkfMCHDz z%|Tu)0}#&az}YNjV)_N^sML9C))RH6y^kU-#Vmo!vn$+k`#i?7>i<&iZjHqod|ZC} zKlHvNI}u38%vTe$od0ZTgva#K7pLe{MAPCPPLd+Dwfh52M=X}^y3!g|b+LGb}i`=>kBK=s-DcsT}64PC_kXT!P ztPW0CAU4LuFhGKgtK`si(ns_J62M0$>S|{7nbdU$STkNJ4~U6sTj^#0$IuB1<1VOw zE?S^>m|!`}i!F~b;Eq83j0gNj@|#nCmXp3M!h~9pF0XL#{M($?dVY*b7ps_vv43HI zVO8lBd+_!yyPcv9!EC($?2Lw>XYa?h90%sG|{W}B)YhjkeTN@$!6_`tOJ( z>&@SobDt$@8!Hf6FV+42;jt#s*>fau)>@_iQPo*<{rfY57pcTr7VnbYwBftNs>6y?!^}&j@>ghf3t9IRw?4{^CxiN!zVN0NFqu$AXL|*;*v}s6x=fwL%)zb zi1vC=pO{~hEg@NGU5v_jRgdxd$hBEweYMmy-g_~zkj&A_ij!{h zr*@e2n1*0PSxkt?he*k8DJ*cdDWjat-%-9@MyJA|6sDLgD(qX6NH-^_#@HQ)ElV(1 z0DPpgcxg@~kc``cVnPLK7z49sEcOd644E1E2D1EW85&$hBYb0JQSY?)zFM{X$IvAT zQ#)ABB~H$B^vQmf7dnBg=Z5^B4#m=RSv$3{Q1EwzD;0;c(aJC@leX=h>WKnaQa=AW z^eru!HmnPln2!SKLU1dzi1_?lDnzP>wB_c>8gS`}v?8!%D#|g~(V~LnEiV-w;ih1L zKm4q-?yvRYIr$cW5Hp~79GH}7hP#ad5Bap)NQ2lp>^@x%>AYK;=r4@ zt*h}&PBqK1Ftn=MJB^DE*37*t0k#;eo7~DV&2wUnVuYZ17WDK12|2w{GJF{!Thxs2 zr82!5#yq~dZ|x^Xq~f^K6%laqqu949At%Q#T+eDe+=t5HStDHNRd4gd z61nI@&Bht~ZAY?|_s(hn6mGOihYdkJJ4O}Ld3LY*h`QxSV&*3RU!x*B}#5Q!i_%5ZIE$s zu=CMlXKx%=Esj0wX5G8il8C_P?!3kr3fD%*=OZUUU#kV(rY3QoT2a_`_OM9yrb-)x zG;13+@t?vbOjXvEX-RO2+nk4IpG9~H(Svo3R=j<=M!C2mc&U8-2wU>xS{8+n=G-z> z6>!&S-bC*lg`z4YEr9M+Xa>-aS|sX5z=^z!SR((s&SIQ60a(7KnyX5e(p=H(la~FL z;YzneW%;ix?`b-`X~r=Nnvv-8G9C_v(9EQC5_luT`7O` z^p04TXP&03_x5p&E{z~fFPTqZn7{C6jIn2D)A;O6mGz}8WtU5ZB3->S_X>ALm9W=6 z^_y$*i&1SInEj_f3iDaMMN+Afbfs^}^hA_uC)arveuEhdB#DonzsO1MuOKm=GH(H6 zEE5)Zvta9!Gc&kB0V!C2*IJFz{Z)H;gm4^di8Bu2)397aDvT^`_BRrd_#(SfYa^wX zvC?QS71q%5;W8;Rw=%gTe#gOUj||BWMi?xSNu#L-zJ^Qf#^Ad^&*YVkfoA)Up<5u* z?~UyAYo+t)`sG*rPF!R&XOy)}K7HUW2KF{8-l_rYnIz{waSPOjBqq!SsX8&cM9M}3 zp;s)n@+z#OC!4FkFTf+E&c4Z(j#fBC92MK`g4X`?MYsy4 z@Y?N@4*m5+fzpj%rV#MQdKB9F%*V=pN>d;L0~ zmxx6R3`Wo=7Jn`j=0m8OU|Xyk+s10fveNC0?0b&zG}7&aj&JdbkW_Ebj*E9N_Bh() zMG`G>)B6D!w1de2taWG%WCFn#sKB7ZRS}9LRXUl~H};GxBV6CCntlW$OcapA{xGvI z!10QoUP>Si5t|we7T*q2>*?1#e*fN?w<910hi;3UuvFDikQJ+_goa9)O)uQplNIirNvcz*r z`cmXXT%efB24+nbGE6|p zdTvA2PDclVYwahK0SAG3C;VnfE6^pLWLdrhx?x%R=n005YXnnV?{GXJ0^#ClYKlmP zPruXG|L8m*r-Ctqt!qyF#gQv33X#f8!W4cxJWcSJ*eEk}luu6W+zVvp81=YcRcCWm zifJUY6eN5Cp;(jI@$}F+S`u+ z;oJU9klx4PLd-ae+tNY;q4)Jq!!710eV!jX9S@RI|9VGj?!+n*&@85OIb%?>vye3z8nQxcxb{zo*hH<4Db1eSePjt z>DqMiaJ)~bT(D)n{t_m%?xRk9~2zoo%)Y`q=Pe^uk8+xCT5fDnt z0~lg*b5c-K+0d%}xwjE1Be>&^2Ul73L90>rrK(H=HrfMWT8lYC(HO)fOqR2GkFLZ%WoB&Be=qrzy;ZHJ%9^w46Ehxzj+^8myU;t8 zESez3y6GtO!>jTlr=EaWaJ;{Qarjq0SZ;YiQgtM9fy73L!`v71^ zf5RS?QIn(j;y*m9x`&@fg$K!PqPY&qqf(=R^f(mHz7ZPo9JU(wXx9 zS1ULS@kMF_E!AcbnP|K`S~?cSM|Lt$Ha!jw$IHD&@xS;&^GsZsQ+vf~9GwUKuu6$O zQ&JL#dD8Ynt_rd2z)wW(I6W_i?E8I&j#OB#^kl`eC8!+9>g0lNn2PwYO%Y7Hk7K$V!NYU{=#3e5ivOAd-g2 zv^Ji2YSE9uwR>ogPYM_43&$jsV4H9ptq9=YM`tCby$2J|vwoNCJ_D z|1oq3U|Iyr&QL2`PHFBtQ#)~xxm}UhGR?%Sb}e&$rexlBkTc>8V_2??mkNoC z(3mVdmW&@dMxq{mRjjl=i$S6lm?+NqI+LCS8J)~%k+GtHRJc5ev2aM-(~BQur%?X= zF}{K~u7uC*8z)T!jzBhjTBNfNx-@`zMQa{gqmoPMAEP$qiXn%K z(zDj~6yAVlVT?|5xkP{6(Rg%h^0W_0^|RCpzsCnT8QA`DB)q~Ne^tD#$#^e}=&Vvg zkDf?R`>03A_I1n7#49FO5O`Ttx=j(LlafxVvdC{+v0W|)!w~UNMU8Za)w)@apK!L7 zTxJusoRX{=z3lw=>qann8IGG2lV>4LE5dFP*b+dSV|s+HkXux1{Z>nHLsF|laR~hu z5fCDlZfj#kKXgcysUxoKl!`aJ zUTAc|D4$w!+mI|I77|L4_f$DY$KYkPo$y9hoXqHnj1keK-MrbBG`)1CS|-!a0pS#; z%~{qe#=rpLzKr&NXv45EY311a1BgRh5h)vTevuWOS=EJmxS>0Ef}+pxuM@wkaxhl+ z<+|Dt%~u<{@hy~`5KsY9BLCOkS^hP_g?)U4I2uMH%^0J{7~P{bdXpR>F*+nwP?Uzz zF=B)gqeEKCpc`os&|6YKP*F;Z`|*DMiRaC8y*+Qvbv~c(=Xb6+*9ly|&q{Sh<-2;s zX;xEWd~l}3&r5Lao@attq}_n(C&ajix=2$OSb;>H29;)E2@Dmp_xF1=CmzIpR~Z{y zlxm(er748GbAe#E?>A>IpEmX}CwTc-0Ary)`pR?e8HQ3WP{jz}XdU-l5$385F~nqN zlupZ2^6(oV|9xM2jP7iYlu&u3XNpwXLPe|5Y>34I=Gem0;a@G$KL+aME=T0JH)40n zHD`4@yrsj;4@17)uhCGK%uO=z@MV-3JC^(3rwsl3YP{wds?vlr9wTl+Jai$9o)?>^n)`(i(>f$mc&NPhOo*mt_=yBKT1|hhuzf4YX0~x-D#6}DK0wU!YW>9-EFcf{2pz)r+zZX7x zHPjL(kPC{jHgfL)ZZ!6z6g1@Wka3&P=@A~sJ_^#RsqhQN+3Qxb6jmcKLdJX(!9{6V z*W2$5B7ukFoBRD@O;aw(ys)=oEh8G%gU^_|(?@zOooYW?g@2jcy#3C0@mU31k4}Ne zmlC(6RCrviKwJwK-4Pw4)XCq#2)A-J`bg2Jy;X ze^{K)gVtJTFj^hBbvJwenAzY;ET`dc$J_S?=e6S4Drb>YOrmF_svNy|pbV|lSX##| zyWu=89{=F=ApSd+WV`lEew%?UMhaR9yJ}yn_iD_Qia5IFm0Na;D&ZpR(Eut}hjagE z?G)ca;8an+V&)@Pt9x?+l+;MiOcBhj%1pKR4%ovK{P+!S!au5BzjS}SD0!(CSCu*@ zx3F4Se6xRgLF!DieN_A6`Fnx84!2%}U|)AUd;AlZ=Zak;KPp`_P?P=Ie|lkEttx{U zWTuKp2P#XjHEe&fS#dwV$nN>n_X(YYa@TD+FVe7=%@6qnuQ9uZT^$r9(I%#Gzy@rc z$9-0O6e|}Be3(S&mlf6GuX^Ol4^GaCrAPbcnXe}#|J5P!$IkvlaH@K zNKU)IX-or>DB2!_5dabi^13T%vekiZf?PO0e*HSjV~xpg6o+@?4hyM5X?S&IRE8OS zR%q3q zr~Yx0rGWocWNobznCa+UXvh^y_VCtb>%sE2*b_+)x22?~ys~!QAR2=1veX}#mIkTq zmSk}wFGF@xAUC7?!p^S2NB6bOcX-ph66mmhq(c1uBLPBkZvK=9i$BR*HhaX4;_gca zR(2IFT}1O_!SY1&Sk|*Q&*E;Mi;{sN!LH=(dXOAe`xczuyYAHMcvkY!^U0`)A=CD% zp5oi{Y7aKc$D{vcrnk*Jf6;tG$z#HF`uV=h=O+Vi*OLt)F@MJY>A|r_Ro)Ez^l&cS z=~u5MwNGQMG@d=dtHbRgX=@4Qr0u~PD$HFNA-&D0b%fPYYkH)01 zqlvub_wo9sF>_74U!fUWwsrg3cjdFE?_0NImD8ePl6MsH0x`Zrc^78}p=>uf%wh9CKi6U3u^L== zA+~*TgRW%MI)BJn7WgD(Pq`R>mb2)=wcx3jtxv?z zA}Ol;9nbDAOnE-o&4tWL4(yim*R+ggHY_xsfcYmEg2P!xvFxU ziArQ^wRy%RefM#oL)06W`rD274Vj=p%g>o#fAB80wSDQ9n@T7C^Jy0$UfD(@CU5+W z6udH+ebTq-zF~iNpLxhfpO34(yPnrSHj+T7tFogPu`v|!w~K{ARwWX4_j(3Ym6d~6 zO=P)7sti1aV#e)bhe8O;dHrsEy7ZO+SopAE9$iicIRYUAvI~<`kWMOE%*mGCyk2ng zm=Wg~k2inV4tgJ>j+&a{dI|B~tm4x))RDGUf6EI#jqYfcMbE+iyUYEGrg{Dd$+G79 z>h05g!yBe5yeB__!<$Jan%d>H=Mb0Wjgf}xaFH*b^ygKbeg&?-YobK#sahPoKdbGo zV;F5p#+Jf%lO^&`SB%?~Dk{alR#aLD%HHBlVAZ_cURunxxB6%5Q(_wFGJDOboE@!|WoV z1MuDJb((synD(whfK`nM8lWiq1ZO>c^AfECNEtXZ5pjWLxD(CHb>U1ERz6ah@2p$< z?1KF$UAAm&lbY4UHBiyj4}va9&vu#`D;AgYd$KuM*(}hTRTd4mECp*Xy5V}i*izqr zXD1R-TMcxUQl@2}+7bj{!z^n}%f_m=tnv&L7t`*`^s3m3A->4kYZR|2P2Go7TOT(J?;Vg1Nr^A2Ilc?Qe&w>Uesk`<9xm@=OW=n^@ zAf{q=hoR3>UB-^lN;1qCT$@X+;+5up2-@yqUrSj@4lNlJ@ zbq6Y-$YEUQrG#2RB3rAie6SPg2kpXz1^xhv8foun_zTzEY8rYG}4#Hyon@xjwH!9?W#_WwI;C{BM2eLvq5MheN6m^SMU3 z@kp@GDX#T5wSHB>klV`-$@$u~33q9cxbS_Frw?}kf}y^_h>4d&X>Cwh@&+s(A>s1j z5NVL6j@8%Sqsvz@*I8|JU`v|c`0bWG+;Q+g-Ey8#zB(PQE+8Ot;|HP(g3%2+UE+dC z&@q72tXPq!h7bH{p;Aj>e7d!JvEi;eBVqo@fG_L0Y?HbOJgu2N_^@t#t~-@=QKIw? zbP4Tnn5bu9&X}}8&K+g!A{-nducJ=9jj&vl-q#EY;|J;fmYJISxAb$-m_%P}5||k`{$_ zJO~zZwcBXraDPzia?3m8gA!OIs5Y{-;`_)#+g8MUJ*#}{oUgjw(L$g6g!_QjBN1Gx zc*+~)fTuXp>Bms}yajm%t8UgkddlaMl8zS{(TL35#oAsLNeBvH;9#n$eP6CXu+Tem z4^neZKK$oNSnrzo?bIWLa?b{7!S4Dtrk~uZf$P?{Xw>(;^a0Cqo~a*=9%@ zqw0lWYGD7EV0E80nh9odI^4A%=Z;rkSQpjQLyA@!t#MMbLq%Cqc6L7k6$Q#nv zpBT(~)U?#>y&ROU$+0x3qRnxvY3nIDNFS+U+S4rF2w{Ynd4%duQ825vzSXPm+0E&6 zEk53$U<|m>GJxHNrA*kWfh?B1LElbuly{RL8STH!#M;v~Lb39C+jC^#jh3kBAWIl8 z;Db=vS=@F!DlU_jA#O0Pc6|NGkxg!}0Vc7$Ab41%59*AO*14C!3SvWzo9D1*!NEcS zwFNMJ3@cr*pVj%=JN79kkGQqrQpNrZIhG}x;Tk1xQEmBuI`p^jg?@xoC3pr+X6_sD z5UROJzk#|{c|#~|mw0^JNm0Wm@tleFL-ZksUCjQ|Hebvsake~wq>wrgUL5mN3W~)x zkG9gK>w3Kn*)I)z;V7r_Uh-}M7fws&afu-Ed4y4#=@{wWL-_#Rhxy>HW7pQ_DZ6+$ za&Yxq_bVfmwaX+?0x@?KIX~Cw%aTViKhG~*sZn)f(zYfYO}aPXZ%$c!Yj2IV*qme_ z7Ol=<>&l%8Zoz;JuG~E2(_IxZyor($<{jh`3@a<^TA)(@PPRm9%A4mks)k;VeP`~l z=j`J2B_ThWD%&)?Dgy47;q8sYnAoKa=&c{x{cKM`ShbCfnzZzeCD&?o1)0f5atpdv zoATa^FB~A77{$pS2v1$AOQGyXC!~3b*$G}WU~D*D-8j%-XLrGPsroffj#2GDavk;{ zBcsu_;Mnb5{m_#u;jerobHPl}wGJ3FIFKBec4?wG85Eg?jj<7}$Ma zEusUfW=^Ojvb}jl)!w80E2{5R>y?eV;*zgc@4IR8nDpVLpl|Ow+w0ue zkVW|tfycexo<`mkMs(^@X`5YONpj^=%?3nQGFdRc)p@I1D^fgxqD@XiJ(l2Q?tiP1_PJg^dfS^u zzpmcJ7LiK=ZH=1|)iQ<>SaT~{u|jsHB;B8`Evx=eGl0QpOw6n!mLfBUb_zJOz01m6 zNL`FC3)7+EN)}{+w$k!h02;@KsK~W>)U*hQ2oRut`FUeK0CYQEENfi#Q%%scpigf{ zaJHp1tLQadfHW824R9FVQ+c*#XuT={uQn@$cmkKwF7Dd+7%;kleIP?df?}>&dS-}> zClXt#Z0qLZGxFa!#8kAoL#cN>3%m!Z-#J>ohfeY-COb|hnRqvmjhS+j@_pd%>>ziJ zBhIVTEzkIk9|qcc2$P<`^(uIN{1bUPk_R!EB+LHoid=0pg(rVN@s{i9A^2408bibj zb^7OsL6kg>_avaDa(simYL|uS_cm${ae(U)r}_C4$B(gzF$oa2sRZl_qOVJ6v$`BD zjK!Nc>kG;XF4jOGjzfN@d|EJ-wuSP%*I$}d_3xNYmCS17a6J6|PsG)>SVv%SQ=%{P2<{AU7L=38j3=Y4ak( z362yP+wK*hA~;3+5rR@`L&4>IrH=`|MQxo8!0Vz#F{BunH_fIA;yfSl71&o(LwP^5iLu3VogfUD@Ltbx$D-%f?}W-SVYr zg1!N{=f_nblMU3y=4}|m2%Xh>l>R(!8rO1vNv?f~sMUC-3QvUK;+y!K{T`lYZj*(V zvu3F-GpPU2KZo_yvYSmgsbp1$1?!nhx~dLX7zWrF_#uA|HI>&rOkOmms0byUVV{GhMEe=_trdGy00T~>&@&J6Ru5|7+8 zC&f=@Lmo}!g0`z^uDB1MAlIVGHJxhOdGR(n_p)EGnI)x^-q)#e^y6BB&=|ii$a6V* z<(=bCH$8`b-hmEd6Mv?K3*As!Yur+N=elk;@_gEuRuS@R!c4)m11ooG>yoS?dVii% zSIk$}%8{TdZ(Oumsus*kJzlIS9S|OtjcMaB)0)896VRISIRJ`fhd;k+D*lw?I<&6x zb?0r^mR4$Erpz=3;>FToR)cfF+_;oHdYROroePzU-g8vf0lS68hPdsf*6li(V}%fn z-gB{8W8RyKGnhLjJnU!QB^`czLdEyd_xuTRdHV6W6Z+qAa==>lWYqx@R?*stNF7-s zWN18D<>rpjyg;2PFcc%dwv~yLRx> z;$|z)aYgzQ+d$8+DxE$HAn}`49jzKlHjn5o1p}4OTrs=Ji@BVl+g;NRY6#bgQa5$2 zI=;^)*DcCPbkjsPyJ-Q3a_kv-;ee%D-EQ3A9zt?YPUxwF-qMHpGn#~fdw=A^97PI~ zKYpY)yvJ~>XnMl%2B!enZ9d~bT0}3?H0Ny!CrCvf7=KgL?%NKMn4a)H1`LY~Xs@d` z)r_%b?$$7TSxT)QSy*OTz>?6{}l zF%IAAXyhqxQ`^`Ep;s=KfaPaxf(3nK1x|WgPI1}-E&iR`)x7>^F6UJ`DZcm!c)vCr zX?{xsQp%lqIMC-qkj$JlbvO1F>k`TPfRUhY>)}gMs^w&gE6WyQySDN2$#-~Jp20aq z963$jA!e&W;cuhp$t*ZB99K$7SK$h)#NF=9{xd%rv) zG*>Meoi#7~E7)p%Y1t)#c8hg8xLj!4f9RyDzxtVFOGgk4^|saQ-j<0BsnGS^jQ7B^ z+^L6?XTXd%JOY_7vt*5N#*ZjbOiY|<44tg?JhGw-lnUJ2)&S)NK;sGtKB07pY9`Pk zPWhp7o(P%fTyA4mSR2uivOaC$jwvT}AheO>h*Tpcc)7$-ijA7*X%Irms3bI3Dolw) zm|%!(+>?{~E~@A34N4j%V-8%Z!#@m$>X@cZ6hekU$r0A6DZ&t06D8Z`ZF;j$Rc~(| zY6=sVHF()YMRM4kjVzRUVdJ%s6Dk7%dlgypX8wqCFmXIW*n<^%#ce}39Lvew;T!0d z_4P;9z}pUaSsnBypyOBbtNp-|94&r=_kK3n0Wo6Nd(}MWCNjGY*kH*?%u}rZ;r264q_VfS%jPxj zFTZ-odxau9J)t!hjkG=mG+W(t3c!Y#acm@r~jT`bvzu=De zo0cPy=uTgj<8u{U+E~&q%r*X4f4|-F#-Z^afsfwg564r^c@j!fEZeCc>c>`ep?=KP zkrDTf&UTXO-dxuw^7PNU-E_{!(Ks$lkh-zmshp8L}PA zt8g7X?or;_bCAHuY&6KD5r1N7*Ztw3c8eKZmpbnEj~z{I>BV6G?l%cif1Q^R`MgR* znLJ5CdW8C4yTQUCo>2{!;s(DFs^9Q4T|`ZUxVbe7g9bO_sZ)bnA{$S2bz3h^|3$j7@aB7Spscy;m<}ew1(0JIU4b` z9XE0IjFDrXT~qP+7XTs77t!pOv-9Bf&Bz*hNrHg49qPKNbYI!IA(Fa_(y^M}T)>Ql zE$l9hWo>#qDm7+*FsaZ}rhKcKMfb2`xpi1{4vbPusK)pj(zgeW$pDERQg|6h;vKn^ z@te2AZ(d|#dX%=k`>vN>8}Fk>^w0-z5IjcBlx(JGEKG+8Zkoe&?xM#3RCV zED#&LSuA)Slyq29FC?AE`l=-dkFr8rnQ*>}Pj2@{>}2cEC*+3o zK!5R@Q1z3J-c>^NMQwPM-q7hp#@9_-y{SB|R=hZSP01Qf{(GqLg2n6Ez3Yh1qhSq04p?2h#)qk z(>NX^%iml-qn`|r_^A~&s@K<vV2Xp?1A@HQPo~mXg zqJ6x?@=Q1r)^T<5d2Jg$k=?{!$;`>6HT*O!!q!k__=&%s^pMRYtOBWLKClon6(1Y1 z>HK0o=GC8DTl4H~nm|~`ormQY(-X?lpvMnlWwZmHGQwY9?Qeg+8H;t25J?b|y2)u^ z>^Au}f%$rdpfLlaE!P3V2X;cg715I5*VBhq)X`CX)k|*H&dkJBQTMI7VkP$7p%Wkv{**rPD3kM{O z{Znn5SVZ4_YD_G95T@HPSLtdDRfO}gPXI1^h^^V@8tc1;-h9Xa;wN;V`4Z7#@9Qbs zd_q$T1Fl3Pk~z*TyJNEKTuuPiavDd z>ESOIw$B~wACQ;o+p0}gj1m73y}o#2CcW$xVs{dbd)GqNlf1r=9Vqc)geM`8jMcCn zO4iRD_Ilq>_K&_*d8sl|RFfVMJpkWBD#eEemEPoUAhRp+=h7F7yCEJlK8>y=au{n-bvF^*)vWu9T zn+@Q~RE9;;&xq4P6xXywvfEQFEy;&QWuD-`{}?(Z_xqDe z@V-(SY7)JNBj8j0?^NQs->EA*eTa{fJd9S#lqte}Fdiao-$s$ve^%CrUGLj*-$gu{ z{NG;MRA+WbUB@%gl^{8pWKEM3h-)6>%g9RO9ANN4G0reQ_*HT=tuR3s%#La|Zo5_) zwv(mPal24kfN#=G#zov)aVAGT8mg3em*URh5x7WAf_bFR&CvlC_gI98*~hk$tkEsg?N?2ns* zjxJG}VmAoGx$~qPHcQK6+$QkgjW5vp8wLC6%6)bFB+rXPE(x;+zkfb0_>(oa?{E{^ zB7WSkxAT3KoqfOBgo)9@NfS(9$x8!}&{e6mQpbASW;eWNV2Nu1b_4pK>6#cVjy`nw z9o^oTlW9ZL?-xc*zB{1eKFgNiPHU@g>>Ius8}X*sCO6CW;o~z*T67F^4wbyyu;+Y| zI>zBL>{c)Tft(S3{Ceg9ffRAkTz5Fn?oZwN zNl2`+^?o2DIg1(R-eVqi)s#P9KFN??aOm16&rbAaDg@8{2>68<_=k2Zy`dB?T&L;i z<~s^v6BRn>ijK7@Hh4HBxKlSMYMjkOFd4wjhikZ$u2k8taOLCRr@~61*JKW+P1}} z@|zkv`p$~|njCjm((;${nqT$)P5)vhJgLP0m!W7H|A&L}ghyC%=4uly>6qg;I1 zohN?7#+s^{3ur~Z8gRv%ul9D9E4tr6?11;e<{oFXPLgI@?DZSqlj-mqqgI|vN}_wB zg}Zu|i^PL_p~7aNDMH{P_Jo`4B>TLMgrdB1gZiu#J9@U;)_GO;^d+b060JBy=?KO- zE9H8qq7yQzIw8+PN-rnPSGCQa^DL{}t6m~jBAbp-M4W4fHl|wZJ^5EGThZIHIuX&) zRM>b5bxY!;S6CMI@JY~v{#`HtH=dykMDjhP*q_tNa#F{cnM(7L=%suc*Ep?(U97%= zAn`)@S9U8RO`qrzkkxZ}@E;-GwQemrxoG{Fdx|%CO;3ViwO&~WaG~trO+!8sv4H@f@#fpP_y#zFPF{PuPfa`U>SqmCP2Z~p*dRmf_ zBE}P{I7tD%YxH}Zd*|0P{3OAMKbjcYGn@|{0(}y$K;QGgTwypJXBgRRAy^aqEm?1w zK2W;Rp=>HMgC6F!n26&;XQ zjpq*Dcg2LC5%>1d-!Fsy{dXeY-tyl+Qy!uce Date: Mon, 1 May 2023 19:12:10 -0400 Subject: [PATCH 030/282] update requirements --- requirements.txt | 2 +- wiki | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 15b606bc1..1409e2960 100644 --- a/requirements.txt +++ b/requirements.txt @@ -45,10 +45,10 @@ torch torchdiffeq torchsde torchvision -tqdm voluptuous yapf scikit-image +tqdm==4.65.0 accelerate==0.18.0 opencv-python==4.7.0.72 diffusers==0.16.1 diff --git a/wiki b/wiki index 4cbdffaa9..ab46c9f35 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 4cbdffaa95978d0a46758eac4a3fbe689eb4cdcd +Subproject commit ab46c9f3583bbd155623fd7d59a969a353aa96be From 10a9c2760a7dce566e5f37231cdcae24137d6744 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 1 May 2023 19:49:19 -0400 Subject: [PATCH 031/282] switch cmdargs --- installer.py | 8 +++++--- webui.py | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/installer.py b/installer.py index 56431ec20..010ee1980 100644 --- a/installer.py +++ b/installer.py @@ -20,7 +20,7 @@ class Dot(dict): # dot notation access to dictionary attributes log = logging.getLogger("sd") -args = Dot({ 'debug': False, 'upgrade': False, 'no_directml': False, 'skip_update': False, 'skip_extensions': False, 'skip_requirements': False, 'skip_git': False, 'reset': False, 'use_ipex': False, 'experimental': False, 'test': False }) +args = Dot({ 'debug': False, 'upgrade': False, 'skip_update': False, 'skip_extensions': False, 'skip_requirements': False, 'skip_git': False, 'reset': False, 'use_directml': False, 'use_ipex': False, 'experimental': False, 'test': False }) quick_allowed = True errors = 0 opts = {} @@ -203,7 +203,7 @@ def check_torch(): xformers_package = os.environ.get('XFORMERS_PACKAGE', 'none') else: machine = platform.machine() - if 'arm' not in machine and 'aarch' not in machine and not args.no_directml: # torch-directml is available on AMD64 + if 'arm' not in machine and 'aarch' not in machine and args.use_directml: # torch-directml is available on AMD64 log.info('Using DirectML Backend') torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.0.0 torchvision torch-directml') xformers_package = os.environ.get('XFORMERS_PACKAGE', 'none') @@ -514,7 +514,7 @@ def add_args(): group.add_argument('--reset', default = False, action='store_true', help = "Reset main repository to latest version, default: %(default)s") group.add_argument('--upgrade', default = False, action='store_true', help = "Upgrade main repository to latest version, default: %(default)s") group.add_argument("--use-ipex", action='store_true', help="Use Intel OneAPI XPU backend, default: %(default)s", default=False) - group.add_argument('--no-directml', default = False, action='store_true', help = "Use CPU instead of DirectML if no compatible GPU is detected, default: %(default)s") + group.add_argument('--use-directml', default = False, action='store_true', help = "Use DirectML if no compatible GPU is detected, default: %(default)s") group.add_argument('--skip-update', default = False, action='store_true', help = "Skip update of extensions and submodules, default: %(default)s") group.add_argument('--skip-requirements', default = False, action='store_true', help = "Skips checking and installing requirements, default: %(default)s") group.add_argument('--skip-extensions', default = False, action='store_true', help = "Skips running individual extension installers, default: %(default)s") @@ -594,5 +594,7 @@ def run_setup(): if __name__ == "__main__": + add_args() + ensure_base_requirements() parse_args() run_setup() diff --git a/webui.py b/webui.py index 81e196bac..8fae77f30 100644 --- a/webui.py +++ b/webui.py @@ -199,7 +199,7 @@ def start_ui(): if cmd_opts.disable_queue: print('Server queues disabled') else: - shared.demo.queue(16) + shared.demo.queue(concurrency_count=16) gradio_auth_creds = [] if cmd_opts.auth: @@ -220,6 +220,7 @@ def start_ui(): auth=[tuple(cred.split(':')) for cred in gradio_auth_creds] if gradio_auth_creds else None, inbrowser=cmd_opts.autolaunch, prevent_thread_lock=True, + show_api=True, favicon_path='automatic.ico', ) setup_middleware(app, cmd_opts) From 9e214b32d739a83d1c94205e0872cfadcf02d030 Mon Sep 17 00:00:00 2001 From: Seunghoon Lee Date: Tue, 2 May 2023 09:04:35 +0900 Subject: [PATCH 032/282] remove NotImplementedError. --- modules/dml/optimizer/intel/__init__.py | 7 +++---- modules/dml/optimizer/nvidia/__init__.py | 7 +++---- modules/dml/optimizer/unknown/__init__.py | 3 +-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/modules/dml/optimizer/intel/__init__.py b/modules/dml/optimizer/intel/__init__.py index bffda69f1..aaa9e67b1 100644 --- a/modules/dml/optimizer/intel/__init__.py +++ b/modules/dml/optimizer/intel/__init__.py @@ -1,7 +1,6 @@ from modules.dml.optimizer.optimizer import Optimizer class IntelOptimizer(Optimizer): - def memory_stats(index): - raise NotImplementedError() - # DML TODO: Implement - return + def memory_stats(index: int): + # DML TODO: Implement or find a general (and also lightweight) way. + return (1073741824, 0) diff --git a/modules/dml/optimizer/nvidia/__init__.py b/modules/dml/optimizer/nvidia/__init__.py index e5fda97b8..5990c11a9 100644 --- a/modules/dml/optimizer/nvidia/__init__.py +++ b/modules/dml/optimizer/nvidia/__init__.py @@ -1,7 +1,6 @@ from modules.dml.optimizer.optimizer import Optimizer class nVidiaOptimizer(Optimizer): - def memory_stats(index): - raise NotImplementedError() - # DML TODO: Implement - return + def memory_stats(index: int): + # DML TODO: Implement or find a general (and also lightweight) way. + return (1073741824, 0) diff --git a/modules/dml/optimizer/unknown/__init__.py b/modules/dml/optimizer/unknown/__init__.py index 40ff476cd..79ed11ce5 100644 --- a/modules/dml/optimizer/unknown/__init__.py +++ b/modules/dml/optimizer/unknown/__init__.py @@ -1,6 +1,5 @@ from modules.dml.optimizer.optimizer import Optimizer class UnknownOptimizer(Optimizer): - def memory_stats(index): - # DML TODO: Implement + def memory_stats(index: int): return (1073741824, 0) From eaea88a444571ff5f81cae442c2de06b191cacb4 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 1 May 2023 21:03:08 -0400 Subject: [PATCH 033/282] update --- webui.py | 1 + 1 file changed, 1 insertion(+) diff --git a/webui.py b/webui.py index 8fae77f30..d3afac97f 100644 --- a/webui.py +++ b/webui.py @@ -198,6 +198,7 @@ def start_ui(): startup_timer.record("ui") if cmd_opts.disable_queue: print('Server queues disabled') + shared.demo.progress_tracking = False else: shared.demo.queue(concurrency_count=16) From 530dafc453a670ea567b7d2d1befd94cfedb777a Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 2 May 2023 08:54:47 -0400 Subject: [PATCH 034/282] cleanup --- extensions-builtin/a1111-sd-webui-lycoris | 2 +- extensions-builtin/sd-webui-controlnet | 2 +- javascript/ui.js | 6 ++---- modules/extras.py | 4 ++-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/extensions-builtin/a1111-sd-webui-lycoris b/extensions-builtin/a1111-sd-webui-lycoris index 4d74a7b88..3176baedf 160000 --- a/extensions-builtin/a1111-sd-webui-lycoris +++ b/extensions-builtin/a1111-sd-webui-lycoris @@ -1 +1 @@ -Subproject commit 4d74a7b889f91499dd85b9ccd7de58350b8da195 +Subproject commit 3176baedf003c382fea4dfc32bd926ce210bf883 diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 6315bec9a..4366c66e8 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 6315bec9abbeaaff7ef5f59dc9bf7f8d4bf67c8c +Subproject commit 4366c66e8393ca307dadf7431689416f61b91e1b diff --git a/javascript/ui.js b/javascript/ui.js index 52a9341ce..db8e1f381 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -163,10 +163,8 @@ function ask_for_style_name(_, prompt_text, negative_prompt_text) { } function confirm_clear_prompt(prompt, negative_prompt) { - if(confirm("Delete prompt?")) { - prompt = "" - negative_prompt = "" - } + prompt = "" + negative_prompt = "" return [prompt, negative_prompt] } diff --git a/modules/extras.py b/modules/extras.py index 4513f2491..6c6704079 100644 --- a/modules/extras.py +++ b/modules/extras.py @@ -5,7 +5,7 @@ import shutil import torch try: - import intel_extension_for_pytorch as ipex + import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import except: pass import tqdm @@ -69,7 +69,7 @@ def to_half(tensor, enable): return tensor -def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_model_name, interp_method, multiplier, save_as_half, custom_name, checkpoint_format, config_source, bake_in_vae, discard_weights): +def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_model_name, interp_method, multiplier, save_as_half, custom_name, checkpoint_format, config_source, bake_in_vae, discard_weights): # pylint: disable=unused-argument shared.state.begin() shared.state.job = 'model-merge' From 2166b4de06fc06dfce2afc16ede56d4dbcf4b292 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 2 May 2023 09:56:33 -0400 Subject: [PATCH 035/282] fix exif data handler --- modules/images.py | 26 ++++++++++---------------- scripts/postprocessing_upscale.py | 4 ++-- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/modules/images.py b/modules/images.py index 8b3c539c3..ce384fd71 100644 --- a/modules/images.py +++ b/modules/images.py @@ -532,39 +532,33 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i params = script_callbacks.ImageSaveParams(image, p, fullfn, pnginfo) script_callbacks.before_image_saved_callback(params) - image = params.image fullfn = params.filename - info = params.pnginfo.get(pnginfo_section_name, None) + + exifinfo_data = params.pnginfo.get('UserComment', '') + if len(exifinfo_data) > 0: + exifinfo_data = exifinfo_data + ', ' + params.pnginfo.get(pnginfo_section_name, '') + else: + exifinfo_data = params.pnginfo.get(pnginfo_section_name, '') def _atomically_save_image(image_to_save, filename_without_extension, extension): # save image with .tmp extension to avoid race condition when another process detects new image in the directory temp_file_path = filename_without_extension + ".tmp" image_format = Image.registered_extensions()[extension] - if extension.lower() == '.png': pnginfo_data = PngImagePlugin.PngInfo() if opts.enable_pnginfo: for k, v in params.pnginfo.items(): pnginfo_data.add_text(k, str(v)) - image_to_save.save(temp_file_path, format=image_format, quality=opts.jpeg_quality, pnginfo=pnginfo_data) - elif extension.lower() in (".jpg", ".jpeg", ".webp"): if image_to_save.mode == 'RGBA': image_to_save = image_to_save.convert("RGB") elif image_to_save.mode == 'I;16': image_to_save = image_to_save.point(lambda p: p * 0.0038910505836576).convert("RGB" if extension.lower() == ".webp" else "L") - image_to_save.save(temp_file_path, format=image_format, quality=opts.jpeg_quality, lossless=opts.webp_lossless) - - if opts.enable_pnginfo and info is not None: - exif_bytes = piexif.dump({ - "Exif": { - piexif.ExifIFD.UserComment: piexif.helper.UserComment.dump(info or "", encoding="unicode") - }, - }) - + if opts.enable_pnginfo: + exif_bytes = piexif.dump({ "Exif": { piexif.ExifIFD.UserComment: piexif.helper.UserComment.dump(exifinfo_data or "", encoding="unicode") } }) piexif.insert(exif_bytes, temp_file_path) else: image_to_save.save(temp_file_path, format=image_format, quality=opts.jpeg_quality) @@ -582,10 +576,10 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i image.already_saved_as = fullfn - if opts.save_txt and info is not None: + if opts.save_txt and len(exifinfo_data) > 0: txt_fullfn = f"{fullfn_without_extension}.txt" with open(txt_fullfn, "w", encoding="utf8") as file: - file.write(info + "\n") + file.write(exifinfo_data + "\n") else: txt_fullfn = None diff --git a/scripts/postprocessing_upscale.py b/scripts/postprocessing_upscale.py index 9ee8878ad..43df74aff 100644 --- a/scripts/postprocessing_upscale.py +++ b/scripts/postprocessing_upscale.py @@ -30,10 +30,10 @@ class ScriptPostprocessingUpscale(scripts_postprocessing.ScriptPostprocessing): upscaling_crop = gr.Checkbox(label='Crop to fit', value=True, elem_id="extras_upscaling_crop") with FormRow(): - extras_upscaler_1 = gr.Dropdown(label='Upscaler 1', elem_id="extras_upscaler_1", choices=[x.name for x in shared.sd_upscalers], value=shared.sd_upscalers[0].name) + extras_upscaler_1 = gr.Dropdown(label='Upscaler', elem_id="extras_upscaler_1", choices=[x.name for x in shared.sd_upscalers], value=shared.sd_upscalers[0].name) with FormRow(): - extras_upscaler_2 = gr.Dropdown(label='Upscaler 2', elem_id="extras_upscaler_2", choices=[x.name for x in shared.sd_upscalers], value=shared.sd_upscalers[0].name) + extras_upscaler_2 = gr.Dropdown(label='Secondary Upscaler', elem_id="extras_upscaler_2", choices=[x.name for x in shared.sd_upscalers], value=shared.sd_upscalers[0].name) extras_upscaler_2_visibility = gr.Slider(minimum=0.0, maximum=1.0, step=0.001, label="Upscaler 2 visibility", value=0.0, elem_id="extras_upscaler_2_visibility") upscaling_res_switch_btn.click(lambda w, h: (h, w), inputs=[upscaling_resize_w, upscaling_resize_h], outputs=[upscaling_resize_w, upscaling_resize_h], show_progress=False) From cb4cff39292107acdaf100741a9fb6f34ca5da50 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 2 May 2023 13:57:16 -0400 Subject: [PATCH 036/282] redesign logging --- extensions-builtin/Lora/lora.py | 21 ++- extensions-builtin/sd-webui-controlnet | 2 +- launch.py | 5 +- modules/api/api.py | 2 +- modules/errors.py | 11 +- modules/extras.py | 18 +- modules/generation_parameters_copypaste.py | 2 +- modules/hashes.py | 11 +- modules/images.py | 6 +- modules/img2img.py | 16 +- modules/import_hook.py | 8 +- modules/interrogate.py | 6 +- modules/memmon.py | 21 --- modules/memstats.py | 40 +++++ modules/middleware.py | 9 +- modules/processing.py | 44 +---- modules/safe.py | 28 ++-- modules/sd_hijack.py | 28 ++-- modules/sd_hijack_optimizations.py | 2 - modules/sd_models.py | 154 +++++------------- modules/sd_vae.py | 17 +- modules/shared.py | 30 ++-- modules/shared_items.py | 5 - modules/styles.py | 3 - .../textual_inversion/textual_inversion.py | 15 +- modules/txt2img.py | 8 +- modules/ui.py | 8 +- modules/ui_common.py | 10 +- modules/ui_extensions.py | 9 +- modules/upscaler.py | 2 +- webui.py | 49 +++--- 31 files changed, 236 insertions(+), 354 deletions(-) create mode 100644 modules/memstats.py diff --git a/extensions-builtin/Lora/lora.py b/extensions-builtin/Lora/lora.py index 3cbd91646..40863787b 100644 --- a/extensions-builtin/Lora/lora.py +++ b/extensions-builtin/Lora/lora.py @@ -265,19 +265,32 @@ def lora_apply_weights(self: Union[torch.nn.Conv2d, torch.nn.Linear, torch.nn.Mu return current_names = getattr(self, "lora_current_names", ()) + lora_prev_names = getattr(self, "lora_prev_names", ()) wanted_names = tuple((x.name, x.multiplier) for x in loaded_loras) weights_backup = getattr(self, "lora_weights_backup", None) - if weights_backup is None: + if weights_backup is None and len(loaded_loras): if isinstance(self, torch.nn.MultiheadAttention): weights_backup = (self.in_proj_weight.to(devices.cpu, copy=True), self.out_proj.weight.to(devices.cpu, copy=True)) else: weights_backup = self.weight.to(devices.cpu, copy=True) self.lora_weights_backup = weights_backup + elif lora_prev_names != current_names: + self.lora_weights_backup = None + weights_backup = None + elif len(loaded_loras) == 0: + self.lora_weights_backup = None - if current_names != wanted_names: - if weights_backup is not None: + if current_names != wanted_names or current_names != lora_prev_names: + if weights_backup is not None and current_names != lora_prev_names: + if isinstance(self, torch.nn.MultiheadAttention): + self.in_proj_weight.copy_(weights_backup[0]) + self.out_proj.weight.copy_(weights_backup[1]) + else: + self.weight.copy_(weights_backup) + elif weights_backup is not None and current_names == (): + # print('lora restore weight') if isinstance(self, torch.nn.MultiheadAttention): self.in_proj_weight.copy_(weights_backup[0]) self.out_proj.weight.copy_(weights_backup[1]) @@ -310,9 +323,11 @@ def lora_apply_weights(self: Union[torch.nn.Conv2d, torch.nn.Linear, torch.nn.Mu print(f'failed to calculate lora weights for layer {lora_layer_name}') + setattr(self, "lora_prev_names", current_names) setattr(self, "lora_current_names", wanted_names) + def lora_reset_cached_weight(self: Union[torch.nn.Conv2d, torch.nn.Linear]): setattr(self, "lora_current_names", ()) setattr(self, "lora_weights_backup", None) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 4366c66e8..815b93021 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 4366c66e8393ca307dadf7431689416f61b91e1b +Subproject commit 815b930217873dc3bd72f7d9b518b017a6404ad8 diff --git a/launch.py b/launch.py index 76745b4c2..72e65eeb8 100644 --- a/launch.py +++ b/launch.py @@ -41,8 +41,7 @@ def commit_hash(): def run(command, desc=None, errdesc=None, custom_env=None, live=False): if desc is not None: - from rich import print # pylint: disable=redefined-builtin,wrong-import-order - print(desc) + installer.log(desc) if live: result = subprocess.run(command, check=False, shell=True, env=os.environ if custom_env is None else custom_env) if result.returncode != 0: @@ -97,7 +96,7 @@ if __name__ == "__main__": installer.extensions_preload(force=True) installer.log.info(f"Server arguments: {sys.argv[1:]}") installer.log.debug('Starting WebUI') - logging.disable(logging.INFO) + logging.disable(logging.NOTSET if args.debug else logging.DEBUG) if args.test: installer.log.info("Test only") import webui diff --git a/modules/api/api.py b/modules/api/api.py index fbe64a037..fa8110469 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -561,7 +561,7 @@ class Api: return TrainResponse(info=f"train embedding error: {error}") def shutdown(self): - print('shutdown request received') + shared.log.info('Shutdown request received') # from modules.shared import demo # demo.close() # time.sleep(0.5) diff --git a/modules/errors.py b/modules/errors.py index 181592d62..6b1efabc7 100644 --- a/modules/errors.py +++ b/modules/errors.py @@ -1,11 +1,10 @@ -import sys import logging import warnings -from rich import print # pylint: disable=redefined-builtin from rich.console import Console from rich.theme import Theme from rich.pretty import install as pretty_install from rich.traceback import install as traceback_install +from installer import log console = Console(log_time=True, log_time_format='%H:%M:%S-%f', theme=Theme({ "traceback.border": "black", @@ -23,18 +22,18 @@ def install(suppress=[]): pretty_install(console=console) traceback_install(console=console, extra_lines=1, width=console.width, word_wrap=False, indent_guides=False, suppress=suppress) logging.basicConfig(level=logging.INFO, format='%(asctime)s | %(levelname)s | %(pathname)s | %(message)s') - for handler in logging.getLogger().handlers: - handler.setLevel(logging.INFO) + # for handler in logging.getLogger().handlers: + # handler.setLevel(logging.INFO) def print_error_explanation(message): lines = message.strip().split("\n") for line in lines: - print(line, file=sys.stderr) + log.error(line) def display(e: Exception, task, suppress=[]): - print(f"{task or 'error'}: {type(e).__name__}", file=sys.stderr) + log.error(f"{task or 'error'}: {type(e).__name__}") console.print_exception(show_locals=False, max_frames=2, extra_lines=1, suppress=suppress, theme="ansi_dark", word_wrap=False, width=min([console.width, 200])) diff --git a/modules/extras.py b/modules/extras.py index 6c6704079..df0def4fd 100644 --- a/modules/extras.py +++ b/modules/extras.py @@ -53,9 +53,7 @@ def create_config(ckpt_result, config_source, a, b, c): filename, _ = os.path.splitext(ckpt_result) checkpoint_filename = filename + ".yaml" - print("Copying config:") - print(" from:", cfg) - print(" to:", checkpoint_filename) + shared.log.info("Copying config: {cfg} -> {checkpoint_filename}") shutil.copyfile(cfg, checkpoint_filename) @@ -134,14 +132,14 @@ def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_ if theta_func2: shared.state.textinfo = "Loading B" - print(f"Loading {secondary_model_info.filename}...") + shared.log.info(f"Loading {secondary_model_info.filename}...") theta_1 = sd_models.read_state_dict(secondary_model_info.filename) else: theta_1 = None if theta_func1: shared.state.textinfo = "Loading C" - print(f"Loading {tertiary_model_info.filename}...") + shared.log.info(f"Loading {tertiary_model_info.filename}...") theta_2 = sd_models.read_state_dict(tertiary_model_info.filename) shared.state.textinfo = 'Merging B and C' @@ -163,10 +161,10 @@ def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_ shared.state.nextjob() shared.state.textinfo = f"Loading {primary_model_info.filename}..." - print(f"Loading {primary_model_info.filename}...") + shared.log.info(f"Loading {primary_model_info.filename}...") theta_0 = sd_models.read_state_dict(primary_model_info.filename) - print("Merging...") + shared.log.info("Merging...") shared.state.textinfo = 'Merging A and B' shared.state.sampling_steps = len(theta_0.keys()) for key in tqdm.tqdm(theta_0.keys()): @@ -205,7 +203,7 @@ def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_ bake_in_vae_filename = sd_vae.vae_dict.get(bake_in_vae, None) if bake_in_vae_filename is not None: - print(f"Baking in VAE from {bake_in_vae_filename}") + shared.log.info(f"Baking in VAE from {bake_in_vae_filename}") shared.state.textinfo = 'Baking in VAE' vae_dict = sd_vae.load_vae_dict(bake_in_vae_filename) @@ -237,7 +235,7 @@ def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_ shared.state.nextjob() shared.state.textinfo = "Saving" - print(f"Saving to {output_modelname}...") + shared.log.info(f"Saving to {output_modelname}...") _, extension = os.path.splitext(output_modelname) if extension.lower() == ".safetensors": @@ -249,7 +247,7 @@ def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_ create_config(output_modelname, config_source, primary_model_info, secondary_model_info, tertiary_model_info) - print(f"Checkpoint saved to {output_modelname}.") + shared.log.info(f"Checkpoint saved to {output_modelname}.") shared.state.textinfo = "Checkpoint saved" shared.state.end() diff --git a/modules/generation_parameters_copypaste.py b/modules/generation_parameters_copypaste.py index b6609e224..3f8b5fbf0 100644 --- a/modules/generation_parameters_copypaste.py +++ b/modules/generation_parameters_copypaste.py @@ -56,7 +56,7 @@ def image_from_url_text(filedata): if is_in_right_dir: return Image.open(filename) else: - print(f'Attempted to open file outside of allowed directories: {filename}') + shared.log.warning(f'Attempted to open file outside of allowed directories: {filename}') if type(filedata) == list: if len(filedata) == 0: diff --git a/modules/hashes.py b/modules/hashes.py index 7a19e31c5..68c8422e3 100644 --- a/modules/hashes.py +++ b/modules/hashes.py @@ -1,13 +1,11 @@ import hashlib import json import os.path - import filelock - +from rich import progress from modules import shared from modules.paths import data_path - cache_filename = os.path.join(data_path, "cache.json") cache_data = None @@ -19,8 +17,7 @@ def dump_cache(): def cache(subsection): - global cache_data - + global cache_data # pylint: disable=global-statement if cache_data is None: with filelock.FileLock(cache_filename+".lock"): if not os.path.isfile(cache_filename): @@ -39,7 +36,7 @@ def calculate_sha256(filename): hash_sha256 = hashlib.sha256() blksize = 1024 * 1024 - with open(filename, "rb") as f: + with progress.open(filename, 'rb', description=f'Calculating model hash: [cyan]{filename}', auto_refresh=True) as f: for chunk in iter(lambda: f.read(blksize), b""): hash_sha256.update(chunk) @@ -72,9 +69,7 @@ def sha256(filename, title): if shared.cmd_opts.no_hashing: return None - print(f"Calculating sha256: {filename}", end='') sha256_value = calculate_sha256(filename) - print(f"{sha256_value}") hashes[title] = { "mtime": os.path.getmtime(filename), diff --git a/modules/images.py b/modules/images.py index ce384fd71..610fd7291 100644 --- a/modules/images.py +++ b/modules/images.py @@ -14,7 +14,7 @@ import piexif.helper from PIL import Image, ImageFont, ImageDraw, PngImagePlugin, ExifTags from modules import sd_samplers, shared, script_callbacks, errors -from modules.shared import opts, cmd_opts # pylint: disable=unused-import +from modules.shared import opts, log LANCZOS = (Image.Resampling.LANCZOS if hasattr(Image, 'Resampling') else Image.LANCZOS) @@ -258,7 +258,7 @@ def resize_image(resize_mode, im, width, height, upscaler_name=None): upscalers = [x for x in shared.sd_upscalers if x.name == upscaler_name] if len(upscalers) == 0: upscaler = shared.sd_upscalers[0] - print(f"could not find upscaler named {upscaler_name or ''}, using {upscaler.name} as a fallback") + log.warning(f"could not find upscaler named {upscaler_name or ''}, using {upscaler.name} as a fallback") else: upscaler = upscalers[0] @@ -588,7 +588,7 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i return fullfn, txt_fullfn def safe_decode_string(s: bytes): - remove_prefix = lambda text, prefix: text[len(prefix):] if text.startswith(prefix) else text + remove_prefix = lambda text, prefix: text[len(prefix):] if text.startswith(prefix) else text # pylint: disable=unnecessary-lambda-assignment for encoding in ['utf-8', 'utf-16', 'ascii', 'latin_1', 'cp1252', 'cp437']: # try different encodings try: s = remove_prefix(s, b'UNICODE') diff --git a/modules/img2img.py b/modules/img2img.py index de889d4b7..612d68b79 100644 --- a/modules/img2img.py +++ b/modules/img2img.py @@ -4,10 +4,11 @@ from PIL import Image, ImageOps, ImageFilter, ImageEnhance, ImageChops, Unidenti import modules.scripts from modules import sd_samplers from modules.generation_parameters_copypaste import create_override_settings_dict -from modules.processing import Processed, StableDiffusionProcessingImg2Img, process_images, memory_stats -from modules.shared import opts, cmd_opts, log, state, listfiles, sd_model +from modules.processing import Processed, StableDiffusionProcessingImg2Img, process_images +from modules.shared import opts, debug, state, listfiles, sd_model, log from modules.ui import plaintext_to_html import modules.processing as processing +from modules.memstats import memory_stats def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args): @@ -18,8 +19,8 @@ def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args): inpaint_masks = listfiles(inpaint_mask_dir) is_inpaint_batch = len(inpaint_masks) > 0 if is_inpaint_batch: - print(f"\nInpaint batch is enabled. {len(inpaint_masks)} masks found.") - print(f"Will process {len(images)} images, creating {p.n_iter * p.batch_size} new images for each.") + log.info(f"\nInpaint batch is enabled. {len(inpaint_masks)} masks found.") + log.info(f"Will process {len(images)} images, creating {p.n_iter * p.batch_size} new images for each.") save_normally = output_dir == '' p.do_not_save_grid = True p.do_not_save_samples = not save_normally @@ -60,8 +61,7 @@ def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args): if processed_image.mode == 'RGBA': processed_image = processed_image.convert("RGB") processed_image.save(os.path.join(output_dir, filename)) - if cmd_opts.debug: - log.info(f'Processed: {len(images)} Memory: {memory_stats()} batch') + debug(f'Processed: {len(images)} Memory: {memory_stats()} batch') def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_styles, init_img, sketch, init_img_with_mask, inpaint_color_sketch, inpaint_color_sketch_orig, init_img_inpaint, init_mask_inpaint, steps: int, sampler_index: int, mask_blur: int, mask_alpha: float, inpainting_fill: int, restore_faces: bool, tiling: bool, n_iter: int, batch_size: int, cfg_scale: float, image_cfg_scale: float, denoising_strength: float, seed: int, subseed: int, subseed_strength: float, seed_resize_from_h: int, seed_resize_from_w: int, seed_enable_extras: bool, height: int, width: int, resize_mode: int, inpaint_full_res: bool, inpaint_full_res_padding: int, inpainting_mask_invert: int, img2img_batch_input_dir: str, img2img_batch_output_dir: str, img2img_batch_inpaint_mask_dir: str, override_settings_texts, *args): # pylint: disable=unused-argument @@ -137,7 +137,6 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s if mask: p.extra_generation_params["Mask blur"] = mask_blur if is_batch: - assert not cmd_opts.hide_ui_dir_config, "Launched with --hide-ui-dir-config, batch img2img disabled" process_batch(p, img2img_batch_input_dir, img2img_batch_output_dir, img2img_batch_inpaint_mask_dir, args) processed = Processed(p, [], p.seed, "") else: @@ -146,6 +145,5 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s processed = process_images(p) p.close() generation_info_js = processed.js() - if cmd_opts.debug: - log.info(f'Processed: {len(processed.images)} Memory: {memory_stats()} img') + debug(f'Processed: {len(processed.images)} Memory: {memory_stats()} img') return processed.images, generation_info_js, plaintext_to_html(processed.info), plaintext_to_html(processed.comments) diff --git a/modules/import_hook.py b/modules/import_hook.py index 0cdac360f..c94c3b16b 100644 --- a/modules/import_hook.py +++ b/modules/import_hook.py @@ -1,15 +1,15 @@ import sys -from modules.shared import opts +from modules.shared import opts, log # this will break any attempt to import xformers which will prevent stability diffusion repo from trying to use it try: - import xformers # pylint: disable=unused-import - import xformers.ops # pylint: disable=unused-import + import xformers # pylint: disable=unused-import, import-error + import xformers.ops # pylint: disable=unused-import, import-error except: pass if opts.cross_attention_optimization != "xFormers": if sys.modules.get("xformers", None) is not None: - print('Unloading xFormers') + log.info('Unloading xFormers') sys.modules["xformers"] = None sys.modules["xformers.ops"] = None diff --git a/modules/interrogate.py b/modules/interrogate.py index 93bb08f20..d355d70eb 100644 --- a/modules/interrogate.py +++ b/modules/interrogate.py @@ -6,10 +6,10 @@ import re import torch try: - import intel_extension_for_pytorch as ipex + import intel_extension_for_pytorch as ipex # pylint: disable=unused-import,import-error except: pass -import torch.hub +import torch.hub # pylint: disable=ungrouped-imports from torchvision import transforms from torchvision.transforms.functional import InterpolationMode @@ -28,7 +28,7 @@ def category_types(): def download_default_clip_interrogate_categories(content_dir): - print("Downloading CLIP categories...") + shared.log.info("Downloading CLIP categories...") tmpdir = content_dir + "_tmp" cat_types = ["artists", "flavors", "mediums", "movements"] diff --git a/modules/memmon.py b/modules/memmon.py index 97199445d..c9d7131ef 100644 --- a/modules/memmon.py +++ b/modules/memmon.py @@ -64,27 +64,6 @@ class MemUsageMonitor(threading.Thread): self.data["min_free"] = min(self.data["min_free"], free) time.sleep(1 / self.opts.memmon_poll_rate) - def dump_debug(self): - try: - print(self, 'recorded data:') - for k, v in self.read().items(): - print(k, -(v // -(1024 ** 2))) - print(self, 'raw torch memory stats:') - if shared.cmd_opts.use_ipex: - tm = torch.xpu.memory_stats("xpu") - else: - tm = torch.cuda.memory_stats(self.device) - for k, v in tm.items(): - if 'bytes' not in k: - continue - print('\t' if 'peak' in k else '', k, -(v // -(1024 ** 2))) - if shared.cmd_opts.use_ipex: - print(torch.xpu.memory_summary()) - else: - print(torch.cuda.memory_summary()) - except: - self.disabled = True - def monitor(self): self.run_flag.set() diff --git a/modules/memstats.py b/modules/memstats.py new file mode 100644 index 000000000..5e59bb07d --- /dev/null +++ b/modules/memstats.py @@ -0,0 +1,40 @@ +import os +import psutil +import torch + +def memory_stats(): + def gb(val: float): + return round(val / 1024 / 1024 / 1024, 2) + mem = {} + try: + process = psutil.Process(os.getpid()) + res = process.memory_info() + ram_total = 100 * res.rss / process.memory_percent() + ram = { 'used': gb(res.rss), 'total': gb(ram_total) } + mem.update({ 'ram': ram }) + except Exception as e: + mem.update({ 'ram': e }) + try: + s = torch.cuda.mem_get_info() + gpu = { 'used': gb(s[1] - s[0]), 'total': gb(s[1]) } + s = dict(torch.cuda.memory_stats()) + mem.update({ + 'gpu': gpu, + 'retries': s['num_alloc_retries'], + 'oom': s['num_ooms'] + }) + return mem + except: + pass + try: + gpu = { 'used': gb(torch.xpu.memory_allocated()), 'total': gb(torch.xpu.get_device_properties("xpu").total_memory) } + s = dict(torch.xpu.memory_stats("xpu")) + mem.update({ + 'gpu': gpu, + 'retries': s['num_alloc_retries'], + 'oom': s['num_ooms'] + }) + return mem + except: + pass + return mem diff --git a/modules/middleware.py b/modules/middleware.py index 6520a0ed6..74c12303c 100644 --- a/modules/middleware.py +++ b/modules/middleware.py @@ -10,12 +10,13 @@ from starlette.responses import JSONResponse from fastapi import FastAPI, Request, Response from fastapi.exceptions import HTTPException from fastapi.encoders import jsonable_encoder +from installer import log import modules.errors as errors errors.install() def setup_middleware(app: FastAPI, cmd_opts): - print('Initializing middleware') + log.info('Initializing middleware') uvicorn_logger=logging.getLogger("uvicorn.error") uvicorn_logger.disabled = True from fastapi.middleware.cors import CORSMiddleware @@ -38,7 +39,7 @@ def setup_middleware(app: FastAPI, cmd_opts): res.headers["X-Process-Time"] = duration endpoint = req.scope.get('path', 'err') if cmd_opts.api_log and endpoint.startswith('/sdapi'): - print('API {t} {code} {prot}/{ver} {method} {endpoint} {cli} {duration}'.format( # pylint: disable=consider-using-f-string + log.info('API {t} {code} {prot}/{ver} {method} {endpoint} {cli} {duration}'.format( # pylint: disable=consider-using-f-string t = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f"), code = res.status_code, ver = req.scope.get('http_version', '0.0'), @@ -57,7 +58,7 @@ def setup_middleware(app: FastAPI, cmd_opts): "body": vars(e).get('body', ''), "errors": str(e), } - print(f"API error: {req.method}: {req.url} {err}") + log.error(f"API error: {req.method}: {req.url} {err}") if not isinstance(e, HTTPException) and err['error'] != 'TypeError': # do not print backtrace on known httpexceptions errors.display(e, 'HTTP API', [anyio, fastapi, uvicorn, starlette]) return JSONResponse(status_code=vars(e).get('status_code', 500), content=jsonable_encoder(err)) @@ -67,7 +68,7 @@ def setup_middleware(app: FastAPI, cmd_opts): try: return await call_next(req) except CancelledError: - print('WebSocket closed (ignore asyncio.exceptions.CancelledError)') + log.warning('WebSocket closed (ignore asyncio.exceptions.CancelledError)') except BaseException as e: return handle_exception(req, e) diff --git a/modules/processing.py b/modules/processing.py index 41be44010..b8beaf314 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -1,12 +1,9 @@ import json import math import os -import sys import random import logging from typing import Any, Dict, List - -import psutil import torch try: import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import @@ -16,12 +13,10 @@ import numpy as np from PIL import Image, ImageFilter, ImageOps import cv2 from skimage import exposure - from ldm.data.util import AddMiDaS from ldm.models.diffusion.ddpm import LatentDepth2ImageDiffusion from einops import repeat, rearrange from blendmodes.blend import blendLayers, BlendType - import modules.sd_hijack from modules import devices, prompt_parser, masking, sd_samplers, lowvram, generation_parameters_copypaste, script_callbacks, extra_networks, sd_vae_approx, scripts # pylint: disable=unused-import from modules.sd_hijack import model_hijack @@ -39,41 +34,6 @@ opt_C = 4 opt_f = 8 -def memory_stats(): - def gb(val: float): - return round(val / 1024 / 1024 / 1024, 2) - mem = {} - try: - process = psutil.Process(os.getpid()) - res = process.memory_info() - ram_total = 100 * res.rss / process.memory_percent() - ram = { 'used': gb(res.rss), 'total': gb(ram_total) } - mem.update({ 'ram': ram }) - except Exception as e: - mem.update({ 'ram': e }) - try: - if cmd_opts.use_ipex: - gpu = { 'used': gb(torch.xpu.memory_allocated()), 'total': gb(torch.xpu.get_device_properties("xpu").total_memory) } - s = dict(torch.xpu.memory_stats("xpu")) - mem.update({ - 'gpu': gpu, - 'retries': s['num_alloc_retries'], - 'oom': s['num_ooms'] - }) - elif torch.cuda.is_available(): - s = torch.cuda.mem_get_info() - gpu = { 'used': gb(s[1] - s[0]), 'total': gb(s[1]) } - s = dict(torch.cuda.memory_stats(shared.device)) - mem.update({ - 'gpu': gpu, - 'retries': s['num_alloc_retries'], - 'oom': s['num_ooms'] - }) - except: - pass - return mem - - def setup_color_correction(image): logging.info("Calibrating color correction.") correction_target = cv2.cvtColor(np.asarray(image.copy()), cv2.COLOR_RGB2LAB) @@ -145,8 +105,6 @@ class StableDiffusionProcessing: The first set of paramaters: sd_models -> do_not_reload_embeddings represent the minimum required to create a StableDiffusionProcessing """ def __init__(self, sd_model=None, outpath_samples=None, outpath_grids=None, prompt: str = "", styles: List[str] = None, seed: int = -1, subseed: int = -1, subseed_strength: float = 0, seed_resize_from_h: int = -1, seed_resize_from_w: int = -1, seed_enable_extras: bool = True, sampler_name: str = None, batch_size: int = 1, n_iter: int = 1, steps: int = 20, cfg_scale: float = 6.0, width: int = 512, height: int = 512, restore_faces: bool = False, tiling: bool = False, do_not_save_samples: bool = False, do_not_save_grid: bool = False, extra_generation_params: Dict[Any, Any] = None, overlay_images: Any = None, negative_prompt: str = None, eta: float = None, do_not_reload_embeddings: bool = False, denoising_strength: float = 0, ddim_discretize: str = None, s_churn: float = 0.0, s_tmax: float = None, s_tmin: float = 0.0, s_noise: float = 1.0, override_settings: Dict[str, Any] = None, override_settings_restore_afterwards: bool = True, sampler_index: int = None, script_args: list = None): # pylint: disable=unused-argument - if sampler_index is not None: - print("sampler_index argument for StableDiffusionProcessing does not do anything; use sampler_name", file=sys.stderr) self.outpath_samples: str = outpath_samples self.outpath_grids: str = outpath_grids @@ -723,7 +681,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: devices.test_for_nans(x, "vae") except devices.NansException as e: if not shared.cmd_opts.no_half and not shared.cmd_opts.no_half_vae and shared.cmd_opts.rollback_vae: - print('\nA tensor with all NaNs was produced in VAE, try converting to bf16.') + log.warning('Tensor with all NaNs was produced in VAE') devices.dtype_vae = torch.bfloat16 vae_file, vae_source = sd_vae.resolve_vae(p.sd_model.sd_model_checkpoint) sd_vae.load_vae(p.sd_model, vae_file, vae_source) diff --git a/modules/safe.py b/modules/safe.py index dd463ccdd..3a4aec4d7 100644 --- a/modules/safe.py +++ b/modules/safe.py @@ -7,14 +7,14 @@ import re import torch try: - import intel_extension_for_pytorch as ipex + import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import except: pass import numpy import _codecs # PyTorch 1.13 and later have _TypedStorage renamed to TypedStorage -TypedStorage = torch.storage.TypedStorage if hasattr(torch.storage, 'TypedStorage') else torch.storage._TypedStorage +TypedStorage = torch.storage.TypedStorage if hasattr(torch.storage, 'TypedStorage') else torch.storage._TypedStorage # pylint: disable=protected-access def encode(*args): @@ -27,7 +27,10 @@ class RestrictedUnpickler(pickle.Unpickler): def persistent_load(self, saved_id): assert saved_id[0] == 'storage' - return TypedStorage() + try: + return TypedStorage(_internal=True) + except TypeError: + return TypedStorage() # PyTorch before 2.0 does not have the _internal argument def find_class(self, module, name): if self.extra_handler is not None: @@ -38,7 +41,7 @@ class RestrictedUnpickler(pickle.Unpickler): if module == 'collections' and name == 'OrderedDict': return getattr(collections, name) if module == 'torch._utils' and name in ['_rebuild_tensor_v2', '_rebuild_parameter', '_rebuild_device_tensor_from_numpy']: - return getattr(torch._utils, name) + return getattr(torch._utils, name) # pylint: disable=protected-access if module == 'torch' and name in ['FloatStorage', 'HalfStorage', 'IntStorage', 'LongStorage', 'DoubleStorage', 'ByteStorage', 'float32']: return getattr(torch, name) if module == 'torch.nn.modules.container' and name in ['ParameterDict']: @@ -59,7 +62,7 @@ class RestrictedUnpickler(pickle.Unpickler): return set # Forbid everything else. - raise Exception(f"global '{module}/{name}' is forbidden") + raise Exception(f"global '{module}/{name}' is forbidden") # pylint: disable=broad-exception-raised # Regular expression that accepts 'dirname/version', 'dirname/data.pkl', and 'dirname/data/' @@ -71,7 +74,7 @@ def check_zip_filenames(filename, names): if allowed_zip_names_re.match(name): continue - raise Exception(f"bad file inside {filename}: {name}") + raise Exception(f"bad file inside {filename}: {name}") # pylint: disable=broad-exception-raised def check_pt(filename, extra_handler): @@ -84,9 +87,9 @@ def check_pt(filename, extra_handler): # find filename of data.pkl in zip file: '/data.pkl' data_pkl_filenames = [f for f in z.namelist() if data_pkl_re.match(f)] if len(data_pkl_filenames) == 0: - raise Exception(f"data.pkl not found in {filename}") + raise Exception(f"data.pkl not found in {filename}") # pylint: disable=broad-exception-raised if len(data_pkl_filenames) > 1: - raise Exception(f"Multiple data.pkl found in {filename}") + raise Exception(f"Multiple data.pkl found in {filename}") # pylint: disable=broad-exception-raised with z.open(data_pkl_filenames[0]) as file: unpickler = RestrictedUnpickler(file) unpickler.extra_handler = extra_handler @@ -98,7 +101,7 @@ def check_pt(filename, extra_handler): with open(filename, "rb") as file: unpickler = RestrictedUnpickler(file) unpickler.extra_handler = extra_handler - for i in range(5): + for _i in range(5): unpickler.load() @@ -106,7 +109,7 @@ def load(filename, *args, **kwargs): return load_with_extra(filename, extra_handler=global_extra_handler, *args, **kwargs) -def load_with_extra(filename, extra_handler=None, *args, **kwargs): +def load_with_extra(filename, extra_handler=None, *args, **kwargs): # pylint: disable=keyword-arg-before-vararg """ this function is intended to be used by extensions that want to load models with some extra classes in them that the usual unpickler would find suspicious. @@ -164,13 +167,13 @@ with safe.Extra(handler): self.handler = handler def __enter__(self): - global global_extra_handler + global global_extra_handler # pylint: disable=global-statement assert global_extra_handler is None, 'already inside an Extra() block' global_extra_handler = self.handler def __exit__(self, exc_type, exc_val, exc_tb): - global global_extra_handler + global global_extra_handler # pylint: disable=global-statement global_extra_handler = None @@ -178,4 +181,3 @@ with safe.Extra(handler): unsafe_torch_load = torch.load torch.load = load global_extra_handler = None - diff --git a/modules/sd_hijack.py b/modules/sd_hijack.py index 49acdf3dd..e06692213 100644 --- a/modules/sd_hijack.py +++ b/modules/sd_hijack.py @@ -1,8 +1,7 @@ from types import MethodType -from rich import print # pylint: disable=redefined-builtin import torch try: - import intel_extension_for_pytorch as ipex + import intel_extension_for_pytorch as ipex # pylint: disable=unused-import except: pass from torch.nn.functional import silu @@ -41,49 +40,48 @@ def apply_optimizations(): can_use_sdp = hasattr(torch.nn.functional, "scaled_dot_product_attention") and callable(getattr(torch.nn.functional, "scaled_dot_product_attention")) if devices.device == torch.device("cpu"): if opts.cross_attention_optimization == "Scaled-Dot-Product": - print("Scaled dot product cross attention is not available on CPU") + shared.log.warning("Scaled dot product cross attention is not available on CPU") can_use_sdp = False if opts.cross_attention_optimization == "xFormers": - print("xFormers cross attention is not available on CPU") + shared.log.warning("xFormers cross attention is not available on CPU") shared.xformers_available = False if opts.cross_attention_optimization == "Disable cross-attention layer optimization": - print("Cross-attention optimization disabled") + shared.log.warning("Cross-attention optimization disabled") optimization_method = 'none' if can_use_sdp and opts.cross_attention_optimization == "Scaled-Dot-Product" and 'SDP disable memory attention' in opts.cross_attention_options: - print("Applying scaled dot product cross attention optimization (without memory efficient attention)") + shared.log.info("Applying scaled dot product cross attention optimization (without memory efficient attention)") ldm.modules.attention.CrossAttention.forward = sd_hijack_optimizations.scaled_dot_product_no_mem_attention_forward ldm.modules.diffusionmodules.model.AttnBlock.forward = sd_hijack_optimizations.sdp_no_mem_attnblock_forward optimization_method = 'sdp-no-mem' elif can_use_sdp and opts.cross_attention_optimization == "Scaled-Dot-Product": - print("Applying scaled dot product cross attention optimization") + shared.log.info("Applying scaled dot product cross attention optimization") ldm.modules.attention.CrossAttention.forward = sd_hijack_optimizations.scaled_dot_product_attention_forward ldm.modules.diffusionmodules.model.AttnBlock.forward = sd_hijack_optimizations.sdp_attnblock_forward optimization_method = 'sdp' if shared.xformers_available and opts.cross_attention_optimization == "xFormers": - print("Applying xformers cross attention optimization") + shared.log.info("Applying xformers cross attention optimization") ldm.modules.attention.CrossAttention.forward = sd_hijack_optimizations.xformers_attention_forward ldm.modules.diffusionmodules.model.AttnBlock.forward = sd_hijack_optimizations.xformers_attnblock_forward optimization_method = 'xformers' if opts.cross_attention_optimization == "Sub-quadratic": - print("Applying sub-quadratic cross attention optimization") + shared.log.info("Applying sub-quadratic cross attention optimization") ldm.modules.attention.CrossAttention.forward = sd_hijack_optimizations.sub_quad_attention_forward ldm.modules.diffusionmodules.model.AttnBlock.forward = sd_hijack_optimizations.sub_quad_attnblock_forward optimization_method = 'sub-quadratic' if opts.cross_attention_optimization == "Split attention": - print("Applying split attention optimization") + shared.log.info("Applying split attention optimization") ldm.modules.attention.CrossAttention.forward = sd_hijack_optimizations.split_cross_attention_forward_v1 optimization_method = 'v1' if opts.cross_attention_optimization == "InvokeAI's": - print("Applying InvokeAI's cross attention optimization") + shared.log.info("Applying InvokeAI cross attention optimization") ldm.modules.attention.CrossAttention.forward = sd_hijack_optimizations.split_cross_attention_forward_invokeAI optimization_method = 'invokeai' if opts.cross_attention_optimization == "Doggettx's": - print("Applying cross attention optimization (Doggettx).") + shared.log.info("Applying Doggettx cross attention optimization") ldm.modules.attention.CrossAttention.forward = sd_hijack_optimizations.split_cross_attention_forward ldm.modules.diffusionmodules.model.AttnBlock.forward = sd_hijack_optimizations.cross_attention_attnblock_forward optimization_method = 'doggettx' - return optimization_method @@ -190,9 +188,9 @@ class StableDiffusionModelHijack: hidet.torch.dynamo_config.use_tensor_core(True) hidet.torch.dynamo_config.search_space(2) m.model = torch.compile(m.model, mode="default", backend=opts.cuda_compile_mode, fullgraph=False, dynamic=False) - print("Model compile enabled:", opts.cuda_compile_mode) + shared.log.info(f"Model compile enabled: {opts.cuda_compile_mode}") except Exception as err: - print(f"Model compile not supported: {err}") + shared.log.warning(f"Model compile not supported: {err}") self.optimization_method = apply_optimizations() diff --git a/modules/sd_hijack_optimizations.py b/modules/sd_hijack_optimizations.py index 6c6824175..f4c89acc3 100644 --- a/modules/sd_hijack_optimizations.py +++ b/modules/sd_hijack_optimizations.py @@ -120,8 +120,6 @@ def split_cross_attention_forward(self, x, context=None, mask=None): steps = 1 if mem_required > mem_free_total: steps = 2 ** (math.ceil(math.log(mem_required / mem_free_total, 2))) - # print(f"Expected tensor size:{tensor_size/gb:0.1f}GB, cuda free:{mem_free_cuda/gb:0.1f}GB " - # f"torch free:{mem_free_torch/gb:0.1f} total:{mem_free_total/gb:0.1f} steps:{steps}") if steps > 64: max_res = math.floor(math.sqrt(math.sqrt(mem_free_total / 2.5)) / 8) * 64 raise RuntimeError(f'Not enough memory, use lower resolution (max approx. {max_res}x{max_res}). ' diff --git a/modules/sd_models.py b/modules/sd_models.py index 332a19e65..ed570c909 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -6,10 +6,10 @@ import re import io from os import mkdir from urllib import request -from rich import print, progress # pylint: disable=redefined-builtin +from rich import progress # pylint: disable=redefined-builtin import torch try: - import intel_extension_for_pytorch as ipex + import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import except: pass import safetensors.torch @@ -20,11 +20,11 @@ from ldm.util import instantiate_from_config from modules import paths, shared, modelloader, devices, script_callbacks, sd_vae, sd_disable_initialization, errors, hashes, sd_models_config from modules.sd_hijack_inpainting import do_inpainting_hijack from modules.timer import Timer +from modules.memstats import memory_stats model_dir = "Stable-diffusion" model_path = os.path.abspath(os.path.join(paths.models_path, model_dir)) - checkpoints_list = {} checkpoint_aliases = {} checkpoints_loaded = collections.OrderedDict() @@ -34,27 +34,21 @@ class CheckpointInfo: def __init__(self, filename): self.filename = filename abspath = os.path.abspath(filename) - if shared.opts.ckpt_dir is not None and abspath.startswith(shared.opts.ckpt_dir): name = abspath.replace(shared.opts.ckpt_dir, '') elif abspath.startswith(model_path): name = abspath.replace(model_path, '') else: name = os.path.basename(filename) - if name.startswith("\\") or name.startswith("/"): name = name[1:] - self.name = name self.name_for_extra = os.path.splitext(os.path.basename(filename))[0] self.model_name = os.path.splitext(name.replace("/", "_").replace("\\", "_"))[0] self.hash = model_hash(filename) - self.sha256 = hashes.sha256_from_cache(self.filename, "checkpoint/" + name) self.shorthash = self.sha256[0:10] if self.sha256 else None - self.title = name if self.shorthash is None else f'{name} [{self.shorthash}]' - self.ids = [self.hash, self.model_name, self.title, name, f'{name} [{self.hash}]'] + ([self.shorthash, self.sha256, f'{self.name} [{self.shorthash}]'] if self.shorthash else []) def register(self): @@ -66,16 +60,12 @@ class CheckpointInfo: self.sha256 = hashes.sha256(self.filename, "checkpoint/" + self.name) if self.sha256 is None: return - self.shorthash = self.sha256[0:10] - if self.shorthash not in self.ids: self.ids += [self.shorthash, self.sha256, f'{self.name} [{self.shorthash}]'] - checkpoints_list.pop(self.title) self.title = f'{self.name} [{self.shorthash}]' self.register() - return self.shorthash @@ -90,7 +80,6 @@ except Exception: def setup_model(): if not os.path.exists(model_path): os.makedirs(model_path) - list_models() enable_midas_autodownload() @@ -98,10 +87,8 @@ def setup_model(): def checkpoint_tiles(): def convert(name): return int(name) if name.isdigit() else name.lower() - def alphanumeric_key(key): return [convert(c) for c in re.split('([0-9]+)', key)] - return sorted([x.title for x in checkpoints_list.values()], key=alphanumeric_key) @@ -116,11 +103,11 @@ def list_models(): checkpoint_info.register() shared.opts.data['sd_model_checkpoint'] = checkpoint_info.title elif shared.cmd_opts.ckpt != shared.default_sd_model_file: - print(f"Checkpoint not found: {shared.cmd_opts.ckpt}", file=sys.stderr) + shared.log.warning(f"Checkpoint not found: {shared.cmd_opts.ckpt}", file=sys.stderr) for filename in sorted(model_list, key=str.lower): checkpoint_info = CheckpointInfo(filename) checkpoint_info.register() - print(f'Available models: {shared.opts.ckpt_dir} {len(checkpoints_list)}') + shared.log.info(f'Available models: {shared.opts.ckpt_dir} {len(checkpoints_list)}') if len(checkpoints_list) == 0: if not shared.cmd_opts.no_download: key = input('Download the default model? (y/N) ') @@ -136,17 +123,14 @@ def get_closet_checkpoint_match(search_string): checkpoint_info = checkpoint_aliases.get(search_string, None) if checkpoint_info is not None: return checkpoint_info - found = sorted([info for info in checkpoints_list.values() if search_string in info.title], key=lambda x: len(x.title)) if found: return found[0] - return None def model_hash(filename): """old hash that only looks at a small part of the file and is prone to collisions""" - try: with open(filename, "rb") as file: import hashlib @@ -161,20 +145,16 @@ def model_hash(filename): def select_checkpoint(): model_checkpoint = shared.opts.sd_model_checkpoint - checkpoint_info = checkpoint_aliases.get(model_checkpoint, None) if checkpoint_info is not None: return checkpoint_info - if len(checkpoints_list) == 0: - print("Cannot run without a checkpoint", file=sys.stderr) - print("Use --ckpt to force using existing checkpoint", file=sys.stderr) + shared.log.error("Cannot run without a checkpoint") + shared.log.error("Use --ckpt to force using existing checkpoint") exit(1) - checkpoint_info = next(iter(checkpoints_list.values())) if model_checkpoint is not None: - print(f"Checkpoint {model_checkpoint} not found; loading fallback {checkpoint_info.title}", file=sys.stderr) - + shared.log.warning(f"Checkpoint {model_checkpoint} not found; loading fallback {checkpoint_info.title}") return checkpoint_info @@ -189,39 +169,31 @@ def transform_checkpoint_dict_key(k): for text, replacement in checkpoint_dict_replacements.items(): if k.startswith(text): k = replacement + k[len(text):] - return k def get_state_dict_from_checkpoint(pl_sd): pl_sd = pl_sd.pop("state_dict", pl_sd) pl_sd.pop("state_dict", None) - sd = {} for k, v in pl_sd.items(): new_key = transform_checkpoint_dict_key(k) - if new_key is not None: sd[new_key] = v - pl_sd.clear() pl_sd.update(sd) - return pl_sd def read_metadata_from_safetensors(filename): import json - with open(filename, mode="rb") as file: metadata_len = file.read(8) metadata_len = int.from_bytes(metadata_len, "little") json_start = file.read(2) - assert metadata_len > 2 and json_start in (b'{"', b"{'"), f"{filename} is not a safetensors file" json_data = json_start + file.read(metadata_len-2) json_obj = json.loads(json_data) - res = {} for k, v in json_obj.get("__metadata__", {}).items(): res[k] = v @@ -230,7 +202,6 @@ def read_metadata_from_safetensors(filename): res[k] = json.loads(v) except Exception: pass - return res @@ -239,7 +210,7 @@ def read_state_dict(checkpoint_file, map_location=None): # pylint: disable=unuse pl_sd = None with progress.open(checkpoint_file, 'rb', description=f'Loading weights: [cyan]{checkpoint_file}', auto_refresh=True) as f: _, extension = os.path.splitext(checkpoint_file) - if 'v1-5-pruned-emaonly.safetensors' or 'vae-ft-mse-840000-ema-pruned.ckpt' in checkpoint_file: + if 'v1-5-pruned-emaonly.safetensors' in checkpoint_file and not shared.opts.stream_load: if extension.lower() == ".safetensors": pl_sd = safetensors.torch.load_file(checkpoint_file, device='cpu') else: @@ -262,67 +233,52 @@ def read_state_dict(checkpoint_file, map_location=None): # pylint: disable=unuse def get_checkpoint_state_dict(checkpoint_info: CheckpointInfo, timer): if checkpoint_info in checkpoints_loaded: # use checkpoint cache - print("Loading weights from cache") + shared.log.info("Loading weights from cache") return checkpoints_loaded[checkpoint_info] - res = read_state_dict(checkpoint_info.filename) timer.record("load") - return res -def load_model_weights(model, checkpoint_info: CheckpointInfo, state_dict, timer): +def load_model_weights(model: torch.nn.Module, checkpoint_info: CheckpointInfo, state_dict, timer): sd_model_hash = checkpoint_info.calculate_shorthash() timer.record("hash") - shared.opts.data["sd_model_checkpoint"] = checkpoint_info.title - if state_dict is None: state_dict = get_checkpoint_state_dict(checkpoint_info, timer) - model.load_state_dict(state_dict, strict=False) del state_dict timer.record("apply") - if shared.opts.sd_checkpoint_cache > 0: # cache newly loaded model checkpoints_loaded[checkpoint_info] = model.state_dict().copy() - if shared.opts.opt_channelslast: model.to(memory_format=torch.channels_last) timer.record("channels") - if not shared.cmd_opts.no_half: vae = model.first_stage_model depth_model = getattr(model, 'depth_model', None) - # with --no-half-vae, remove VAE from model when doing half() to prevent its weights from being converted to float16 if shared.cmd_opts.no_half_vae: model.first_stage_model = None # with --upcast-sampling, don't convert the depth model weights to float16 if shared.opts.upcast_sampling and depth_model: model.depth_model = None - model.half() model.first_stage_model = vae if depth_model: model.depth_model = depth_model - devices.set_cuda_params() devices.dtype_unet = model.model.diffusion_model.dtype model.first_stage_model.to(devices.dtype_vae) - # clean up cache if limit is reached while len(checkpoints_loaded) > shared.opts.sd_checkpoint_cache: checkpoints_loaded.popitem(last=False) - model.sd_model_hash = sd_model_hash model.sd_model_checkpoint = checkpoint_info.filename model.sd_checkpoint_info = checkpoint_info shared.opts.data["sd_checkpoint_hash"] = checkpoint_info.sha256 - model.logvar = model.logvar.to(devices.device) # fix for training - sd_vae.delete_base_vae() sd_vae.clear_loaded_vae() vae_file, vae_source = sd_vae.resolve_vae(checkpoint_info.filename) @@ -339,23 +295,16 @@ def enable_midas_autodownload(): This function applies a wrapper to download the model to the correct location automatically. """ - midas_path = os.path.join(paths.models_path, 'midas') - - # stable-diffusion-stability-ai hard-codes the midas model path to - # a location that differs from where other scripts using this model look. - # HACK: Overriding the path here. for k, v in midas.api.ISL_PATHS.items(): file_name = os.path.basename(v) midas.api.ISL_PATHS[k] = os.path.join(midas_path, file_name) - midas_urls = { "dpt_large": "https://github.com/intel-isl/DPT/releases/download/1_0/dpt_large-midas-2f21e586.pt", "dpt_hybrid": "https://github.com/intel-isl/DPT/releases/download/1_0/dpt_hybrid-midas-501f0c75.pt", "midas_v21": "https://github.com/AlexeyAB/MiDaS/releases/download/midas_dpt/midas_v21-f6b98070.pt", "midas_v21_small": "https://github.com/AlexeyAB/MiDaS/releases/download/midas_dpt/midas_v21_small-70d6b9c8.pt", } - midas.api.load_model_inner = midas.api.load_model def load_model_wrapper(model_type): @@ -363,29 +312,23 @@ def enable_midas_autodownload(): if not os.path.exists(path): if not os.path.exists(midas_path): mkdir(midas_path) - - print(f"Downloading midas model weights for {model_type} to {path}") + shared.log.info(f"Downloading midas model weights for {model_type} to {path}") request.urlretrieve(midas_urls[model_type], path) - print(f"{model_type} downloaded") - + shared.log.info(f"{model_type} downloaded") return midas.api.load_model_inner(model_type) midas.api.load_model = load_model_wrapper def repair_config(sd_config): - if not "use_ema" in sd_config.model.params: sd_config.model.params.use_ema = False - if shared.cmd_opts.no_half: sd_config.model.params.unet_config.params.use_fp16 = False elif shared.opts.upcast_sampling: sd_config.model.params.unet_config.params.use_fp16 = True - if getattr(sd_config.model.params.first_stage_config.params.ddconfig, "attn_type", None) == "vanilla-xformers" and not shared.xformers_available: sd_config.model.params.first_stage_config.params.ddconfig.attn_type = "vanilla" - # For UnCLIP-L, override the hardcoded karlo directory if "noise_aug_config" in sd_config.model.params and "clip_stats_path" in sd_config.model.params.noise_aug_config.params: karlo_path = os.path.join(paths.models_path, 'karlo') @@ -395,14 +338,13 @@ def repair_config(sd_config): sd1_clip_weight = 'cond_stage_model.transformer.text_model.embeddings.token_embedding.weight' sd2_clip_weight = 'cond_stage_model.model.transformer.resblocks.0.attn.in_proj_weight' -def load_model(checkpoint_info=None, already_loaded_state_dict=None): + +def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None): from modules import lowvram, sd_hijack checkpoint_info = checkpoint_info or select_checkpoint() - do_inpainting_hijack() - - timer = Timer() - + if timer is None: + timer = Timer() current_checkpoint_info = None if shared.sd_model: current_checkpoint_info = shared.sd_model.sd_checkpoint_info @@ -410,122 +352,100 @@ def load_model(checkpoint_info=None, already_loaded_state_dict=None): shared.sd_model = None gc.collect() devices.torch_gc() - + shared.debug(f'Model unloaded: {memory_stats()}') if already_loaded_state_dict is not None: state_dict = already_loaded_state_dict else: state_dict = get_checkpoint_state_dict(checkpoint_info, timer) - checkpoint_config = sd_models_config.find_checkpoint_config(state_dict, checkpoint_info) if state_dict is None or checkpoint_config is None: - print(f"Failed to load checkpooint: {checkpoint_info.filename}") + shared.log.error(f"Failed to load checkpooint: {checkpoint_info.filename}") if current_checkpoint_info is not None: - print(f"Restoring previous checkpoint: {current_checkpoint_info.filename}") + shared.log.info(f"Restoring previous checkpoint: {current_checkpoint_info.filename}") load_model(current_checkpoint_info, None) return - + shared.debug(f'Model dict loaded: {memory_stats()}') clip_is_included_into_sd = sd1_clip_weight in state_dict or sd2_clip_weight in state_dict - sd_config = OmegaConf.load(checkpoint_config) repair_config(sd_config) - timer.record("config") - - print(f"Creating model from config: {checkpoint_config}") - + shared.debug(f'Model config loaded: {memory_stats()}') + shared.log.info(f"Creating model from config: {checkpoint_config}") sd_model = None try: with sd_disable_initialization.DisableInitialization(disable_clip=clip_is_included_into_sd): sd_model = instantiate_from_config(sd_config.model) except Exception: sd_model = instantiate_from_config(sd_config.model) - sd_model.used_config = checkpoint_config - timer.record("create") - load_model_weights(sd_model, checkpoint_info, state_dict, timer) - + timer.record("load") + shared.debug(f'Model weights loaded: {memory_stats()}') if shared.cmd_opts.lowvram or shared.cmd_opts.medvram: lowvram.setup_for_low_vram(sd_model, shared.cmd_opts.medvram) else: sd_model.to(shared.device) - timer.record("move") - + shared.debug(f'Model weights moved: {memory_stats()}') sd_hijack.model_hijack.hijack(sd_model) - timer.record("hijack") - sd_model.eval() shared.sd_model = sd_model - sd_hijack.model_hijack.embedding_db.load_textual_inversion_embeddings(force_reload=True) # Reload embeddings after model load as they may or may not fit the model - timer.record("embeddings") - script_callbacks.model_loaded_callback(sd_model) - timer.record("callbacks") - - print(f"Model loaded in {timer.summary()}") - + shared.log.info(f"Model loaded in {timer.summary()}") + shared.debug(f'Model load finished: {memory_stats()}') return sd_model def reload_model_weights(sd_model=None, info=None): from modules import lowvram, sd_hijack checkpoint_info = info or select_checkpoint() - if not sd_model: sd_model = shared.sd_model - + if not shared.opts.model_reuse_dict and sd_model is not None: + sd_model = None + else: + shared.log.info('Reusing previous model dictionary') if sd_model is None: # previous model load failed current_checkpoint_info = None else: current_checkpoint_info = sd_model.sd_checkpoint_info if sd_model.sd_model_checkpoint == checkpoint_info.filename: return - if shared.cmd_opts.lowvram or shared.cmd_opts.medvram: lowvram.send_everything_to_cpu() else: sd_model.to(devices.cpu) - sd_hijack.model_hijack.undo_hijack(sd_model) - timer = Timer() - state_dict = get_checkpoint_state_dict(checkpoint_info, timer) - checkpoint_config = sd_models_config.find_checkpoint_config(state_dict, checkpoint_info) - - timer.record("find config") - + timer.record("config") if sd_model is None or checkpoint_config != sd_model.used_config: del sd_model checkpoints_loaded.clear() - load_model(checkpoint_info, already_loaded_state_dict=state_dict) + load_model(checkpoint_info, already_loaded_state_dict=state_dict, timer=timer) return shared.sd_model - try: load_model_weights(sd_model, checkpoint_info, state_dict, timer) except Exception: - print("Failed to load checkpoint, restoring previous") + shared.log.error("Failed to load checkpoint, restoring previous") load_model_weights(sd_model, current_checkpoint_info, None, timer) raise finally: sd_hijack.model_hijack.hijack(sd_model) timer.record("hijack") - script_callbacks.model_loaded_callback(sd_model) timer.record("callbacks") - if not shared.cmd_opts.lowvram and not shared.cmd_opts.medvram: sd_model.to(devices.device) timer.record("device") + shared.log.info(f"Weights loaded in {timer.summary()}") - print(f"Weights loaded in {timer.summary()}") def unload_model_weights(sd_model=None, _info=None): from modules import sd_hijack @@ -539,7 +459,7 @@ def unload_model_weights(sd_model=None, _info=None): sd_model = None gc.collect() devices.torch_gc() - print(f"Unloaded weights {timer.summary()}") + shared.log.info(f"Unloaded weights {timer.summary()}") return sd_model diff --git a/modules/sd_vae.py b/modules/sd_vae.py index a13d73be7..bc5820b70 100644 --- a/modules/sd_vae.py +++ b/modules/sd_vae.py @@ -2,16 +2,13 @@ import os import collections import glob from copy import deepcopy -from rich import print # pylint: disable=redefined-builtin -from modules import shared import torch +from modules import shared, paths, devices, script_callbacks, sd_models try: - import intel_extension_for_pytorch as ipex + import intel_extension_for_pytorch as ipex # pylint: disable=unused-import except: if shared.cmd_opts.use_ipex: - print("Failed to import IPEX") -from modules import paths, devices, script_callbacks, sd_models - + shared.log.error("Failed to import IPEX") vae_ignore_keys = {"model_ema.decay", "model_ema.num_updates"} vae_dict = {} @@ -44,7 +41,7 @@ def delete_base_vae(): def restore_base_vae(model): global loaded_vae_file # pylint: disable=global-statement if base_vae is not None and checkpoint_info == model.sd_checkpoint_info: - print("Restoring base VAE") + shared.log.info("Restoring base VAE") _load_vae_dict(model, base_vae) loaded_vae_file = None delete_base_vae() @@ -120,7 +117,7 @@ def resolve_vae(checkpoint_file): return vae_from_options, 'specified in settings' if not is_automatic: - print(f"VAE not found: {shared.opts.sd_vae}") + shared.log.warning(f"VAE not found: {shared.opts.sd_vae}") return None, None @@ -140,7 +137,7 @@ def load_vae(model, vae_file=None, vae_source="from unknown source"): if vae_file: if cache_enabled and vae_file in checkpoints_loaded: # use vae checkpoint cache - print(f"Loading VAE weights {vae_source}: cached {get_filename(vae_file)}") + shared.log.info(f"Loading VAE weights {vae_source}: cached {get_filename(vae_file)}") store_base_vae(model) _load_vae_dict(model, checkpoints_loaded[vae_file]) else: @@ -220,5 +217,5 @@ def reload_vae_weights(sd_model=None, vae_file=unspecified): if not shared.cmd_opts.lowvram and not shared.cmd_opts.medvram: sd_model.to(devices.device) - print("VAE weights loaded.") + shared.log.info("VAE weights loaded.") return sd_model diff --git a/modules/shared.py b/modules/shared.py index 77d5b3e14..32e8b0ab7 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -162,6 +162,12 @@ state.server_start = time.time() interrogator = modules.interrogate.InterrogateModels("interrogate") face_restorers = [] + +def debug(message): + if cmd_opts.debug: + log.info(message) + + class OptionInfo: def __init__(self, default=None, label="", component=None, component_args=None, onchange=None, section=None, refresh=None): self.default = default @@ -215,9 +221,9 @@ def refresh_themes(): with open(os.path.join('javascript', 'themes.json'), mode='w', encoding='utf=8') as f: f.write(json.dumps(res)) else: - print('Error refreshing UI themes') + log.error('Error refreshing UI themes') except: - print('Exception refreshing UI themes') + log.error('Exception refreshing UI themes') hide_dirs = {"visible": not cmd_opts.hide_ui_dir_config} tab_names = [] @@ -229,6 +235,8 @@ options_templates.update(options_section(('sd', "Stable Diffusion"), { "sd_checkpoint_cache": OptionInfo(0, "Model checkpoints to cache in RAM", gr.Slider, {"minimum": 0, "maximum": 10, "step": 1}), "sd_vae_checkpoint_cache": OptionInfo(0, "VAE checkpoints to cache in RAM", gr.Slider, {"minimum": 0, "maximum": 10, "step": 1}), "sd_vae": OptionInfo("Automatic", "Select VAE", gr.Dropdown, lambda: {"choices": shared_items.sd_vae_items()}, refresh=shared_items.refresh_vae_list), + "stream_load": OptionInfo(False, "When loading models attempt stream loading optimized for slow or network storage"), + "model_reuse_dict": OptionInfo(False, "When loading models attempt to reuse previous model dictionary"), "inpainting_mask_weight": OptionInfo(1.0, "Inpainting conditioning mask strength", gr.Slider, {"minimum": 0.0, "maximum": 1.0, "step": 0.01}), "initial_noise_multiplier": OptionInfo(1.0, "Noise multiplier for img2img", gr.Slider, {"minimum": 0.5, "maximum": 1.5, "step": 0.01}), "img2img_color_correction": OptionInfo(False, "Apply color correction to img2img results to match original colors."), @@ -314,7 +322,7 @@ options_templates.update(options_section(('cuda', "CUDA Settings"), { "memmon_poll_rate": OptionInfo(2, "VRAM usage polls per second during generation. Set to 0 to disable.", gr.Slider, {"minimum": 0, "maximum": 40, "step": 1}), "precision": OptionInfo("Autocast", "Precision type", gr.Radio, lambda: {"choices": ["Autocast", "Full"]}), "cuda_dtype": OptionInfo("FP32" if sys.platform == "darwin" else "FP16", "Device precision type", gr.Radio, lambda: {"choices": ["FP32", "FP16", "BF16"]}), - "no_half": OptionInfo(True if is_device_dml else False, "Use full precision for model (--no-half)", None, None, lambda: print("Warning: Most of DirectML devices do not fully support half mode. Recommend to use full precision to model.") if is_device_dml else None), + "no_half": OptionInfo(True if is_device_dml else False, "Use full precision for model (--no-half)", None, None, None), "no_half_vae": OptionInfo(True if is_device_dml else False, "Use full precision for VAE (--no-half-vae)"), "upcast_sampling": OptionInfo(True if sys.platform == "darwin" or cmd_opts.use_ipex else False, "Enable upcast sampling. Usually produces similar results to --no-half with better performance while using less memory"), "disable_nan_check": OptionInfo(True, "Do not check if produced images/latent spaces have NaN values"), @@ -468,10 +476,10 @@ class Options: if self.data is not None: if key in self.data or key in self.data_labels: if cmd_opts.freeze: - print(f'Settings are frozen: {key}') + log.warning(f'Settings are frozen: {key}') return if cmd_opts.hide_ui_dir_config and key in restricted_opts: - print(f'Settings key is restricted: {key}') + log.warning(f'Settings key is restricted: {key}') return else: self.data[key] = value @@ -531,11 +539,11 @@ class Options: for k, v in self.data.items(): info = self.data_labels.get(k, None) if info is not None and not self.same_type(info.default, v): - log.error(f"Warning: bad setting value: {k}: {v} ({type(v).__name__}; expected {type(info.default).__name__})", file=sys.stderr) + log.error(f"Warning: bad setting value: {k}: {v} ({type(v).__name__}; expected {type(info.default).__name__})") bad_settings += 1 if bad_settings > 0: - log.error(f"The program is likely to not work with bad settings.\nSettings file: {filename}\nEither fix the file, or delete it and restart.", file=sys.stderr) + log.error(f"The program is likely to not work with bad settings.\nSettings file: {filename}\nEither fix the file, or delete it and restart.") def onchange(self, key, func, call=True): item = self.data_labels.get(key) @@ -630,9 +638,9 @@ def reload_gradio_theme(theme_name=None): try: gradio_theme = gr.themes.ThemeClass.from_hub(theme_name) except: - print("Theme download error accessing HuggingFace") + log.error("Theme download error accessing HuggingFace") gradio_theme = gr.themes.Default() - print(f'Loading theme: {theme_name}') + log.info(f'Loading theme: {theme_name}') class TotalTQDM: @@ -678,14 +686,14 @@ def restart_server(): return try: import logging - logging.disable(logging.CRITICAL) + log.setLevel(logging.DEBUG if cmd_opts.debug else logging.CRITICAL) demo.server.should_exit = True demo.server.force_exit = True demo.close(verbose=False) demo.server.close() except: pass - print('Server shutdown') + log.info('Server shutdown') def listfiles(dirname): diff --git a/modules/shared_items.py b/modules/shared_items.py index 4c2924518..c329e73e9 100644 --- a/modules/shared_items.py +++ b/modules/shared_items.py @@ -1,5 +1,3 @@ - - def realesrgan_models_names(): import modules.realesrgan_model return [x.name for x in modules.realesrgan_model.get_realesrgan_models(None)] @@ -32,6 +30,3 @@ def list_crossattention(): "Sub-quadratic", "Split attention" ] -# parser.add_argument("--sub-quad-q-chunk-size", type=int, help="query chunk size for the sub-quadratic cross-attention layer optimization to use", default=1024) -# parser.add_argument("--sub-quad-kv-chunk-size", type=int, help="kv chunk size for the sub-quadratic cross-attention layer optimization to use", default=None) -# parser.add_argument("--sub-quad-chunk-threshold", type=int, help="the percentage of VRAM threshold for the sub-quadratic cross-attention layer optimization to use chunking", default=None) diff --git a/modules/styles.py b/modules/styles.py index e7c33025d..fb151da96 100644 --- a/modules/styles.py +++ b/modules/styles.py @@ -1,11 +1,9 @@ # We need this so Python doesn't complain about the unknown StableDiffusionProcessing-typehint at runtime from __future__ import annotations - import csv import os import os.path import typing -import collections.abc as abc import tempfile import shutil @@ -49,7 +47,6 @@ class StyleDatabase: self.styles.clear() if not os.path.exists(self.path): - print(f'Creating styles database: {self.path}') self.save_styles(self.path) with open(self.path, "r", encoding="utf-8-sig", newline='') as file: diff --git a/modules/textual_inversion/textual_inversion.py b/modules/textual_inversion/textual_inversion.py index 343e55539..d4e210e62 100644 --- a/modules/textual_inversion/textual_inversion.py +++ b/modules/textual_inversion/textual_inversion.py @@ -9,7 +9,6 @@ except: pass import tqdm import safetensors.torch -from rich import print # pylint: disable=redefined-builtin import numpy as np from PIL import Image, PngImagePlugin from torch.utils.tensorboard import SummaryWriter @@ -131,7 +130,7 @@ class EmbeddingDatabase: def get_expected_shape(self): if shared.sd_model is None: - print('Model not loaded') + shared.log.error('Model not loaded') return 0 vec = shared.sd_model.cond_stage_model.encode_embedding_init_text(",", 1) return vec.shape[1] @@ -234,9 +233,9 @@ class EmbeddingDatabase: displayed_embeddings = (tuple(self.word_embeddings.keys()), tuple(self.skipped_embeddings.keys())) if self.previously_displayed_embeddings != displayed_embeddings: self.previously_displayed_embeddings = displayed_embeddings - print(f"Embeddings loaded: {', '.join(self.word_embeddings.keys())} ({len(self.word_embeddings)})") + shared.log.info(f"Embeddings loaded: {', '.join(self.word_embeddings.keys())} ({len(self.word_embeddings)})") if len(self.skipped_embeddings) > 0: - print(f"Textual inversion embeddings skipped({len(self.skipped_embeddings)}): {', '.join(self.skipped_embeddings.keys())}") + shared.log.info(f"Textual inversion embeddings skipped({len(self.skipped_embeddings)}): {', '.join(self.skipped_embeddings.keys())}") def find_embedding_at_position(self, tokens, offset): token = tokens[offset] @@ -271,12 +270,12 @@ def create_embedding(name, num_vectors_per_token, overwrite_old, init_text='*'): name = "".join( x for x in name if (x.isalnum() or x in "._- ")) fn = os.path.join(shared.opts.embeddings_dir, f"{name}.pt") if not overwrite_old and os.path.exists(fn): - print(f"Embedding already exists: {fn}") + shared.log.warning(f"Embedding already exists: {fn}") else: embedding = Embedding(vec, name) embedding.step = 0 embedding.save(fn) - print(f'Created embedding: {fn} vectors {num_vectors_per_token} init {init_text}') + shared.log.info(f'Created embedding: {fn} vectors {num_vectors_per_token} init {init_text}') return fn @@ -424,9 +423,9 @@ def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_st optimizer_state_dict = optimizer_saved_dict.get('optimizer_state_dict', None) if optimizer_state_dict is not None: optimizer.load_state_dict(optimizer_state_dict) - print("Loaded existing optimizer from checkpoint") + shared.log.info("Loaded existing optimizer from checkpoint") else: - print("No saved optimizer exists in checkpoint") + shared.log.info("No saved optimizer exists in checkpoint") if shared.cmd_opts.use_ipex: scaler = torch.xpu.amp.GradScaler() diff --git a/modules/txt2img.py b/modules/txt2img.py index 17e5ce909..36bf6dfb6 100644 --- a/modules/txt2img.py +++ b/modules/txt2img.py @@ -1,9 +1,10 @@ import modules.scripts from modules import sd_samplers from modules.generation_parameters_copypaste import create_override_settings_dict -from modules.processing import StableDiffusionProcessingTxt2Img, process_images, memory_stats -from modules.shared import opts, sd_model, cmd_opts, log +from modules.processing import StableDiffusionProcessingTxt2Img, process_images +from modules.shared import opts, sd_model, debug from modules.ui import plaintext_to_html +from modules.memstats import memory_stats def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, steps: int, sampler_index: int, restore_faces: bool, tiling: bool, n_iter: int, batch_size: int, cfg_scale: float, seed: int, subseed: int, subseed_strength: float, seed_resize_from_h: int, seed_resize_from_w: int, seed_enable_extras: bool, height: int, width: int, enable_hr: bool, denoising_strength: float, hr_scale: float, hr_upscaler: str, hr_second_pass_steps: int, hr_resize_x: int, hr_resize_y: int, override_settings_texts, *args): # pylint: disable=unused-argument @@ -46,6 +47,5 @@ def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, step processed = process_images(p) p.close() generation_info_js = processed.js() - if cmd_opts.debug: - log.info(f'Processed: {len(processed.images)} Memory: {memory_stats()} txt') + debug(f'Processed: {len(processed.images)} Memory: {memory_stats()} txt') return processed.images, generation_info_js, plaintext_to_html(processed.info), plaintext_to_html(processed.comments) diff --git a/modules/ui.py b/modules/ui.py index e9d6c6efc..d2397bb26 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -109,9 +109,7 @@ def process_interrogate(interrogation_function, mode, ii_input_dir, ii_output_di elif mode == 2: return [interrogation_function(ii_singles[mode]["image"]), None] elif mode == 5: - assert not shared.cmd_opts.hide_ui_dir_config, "Launched with --hide-ui-dir-config, batch img2img disabled" images = shared.listfiles(ii_input_dir) - print(f"Will process {len(images)} images.") if ii_output_dir != "": os.makedirs(ii_output_dir, exist_ok=True) else: @@ -183,8 +181,7 @@ def connect_reuse_seed(seed: gr.Number, reuse_seed: gr.Button, generation_info: res = all_seeds[index if 0 <= index < len(all_seeds) else 0] except json.decoder.JSONDecodeError: if gen_info_string != '': - print("Error parsing JSON generation info:", file=sys.stderr) - print(gen_info_string, file=sys.stderr) + shared.log.error(f"Error parsing JSON generation info: {gen_info_string}") return [res, gr_show(False)] reuse_seed.click(fn=copy_seed, _js="(x, y) => [x, selected_gallery_index()]", show_progress=False, inputs=[generation_info, dummy_component], outputs=[seed, dummy_component]) @@ -1496,9 +1493,6 @@ def create_ui(): ui_settings[key] = getattr(obj, field) elif condition and not condition(saved_value): pass - - # this warning is generally not useful; - # print(f'Warning: Bad ui setting value: {key}: {saved_value}; Default value "{getattr(obj, field)}" will be used instead.') else: setattr(obj, field, saved_value) if init_field is not None: diff --git a/modules/ui_common.py b/modules/ui_common.py index cb9870196..d823e7d45 100644 --- a/modules/ui_common.py +++ b/modules/ui_common.py @@ -2,7 +2,6 @@ import json import html import os import platform -import sys import subprocess as sp import gradio as gr @@ -107,15 +106,10 @@ def create_output_panel(tabname, outdir): def open_folder(f): if not os.path.exists(f): - print(f'Folder "{f}" does not exist. After you create an image, the folder will be created.') + shared.log.warning(f'Folder "{f}" does not exist. After you create an image, the folder will be created.') return elif not os.path.isdir(f): - print(f""" -WARNING -An open_folder request was made with an argument that is not a folder. -This could be an error or a malicious attempt to run code on your computer. -Requested path was: {f} -""", file=sys.stderr) + shared.log.warning(f"An open_folder request was made with an argument that is not a folder: {f}") return if not shared.cmd_opts.hide_ui_dir_config: diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py index 66754f58c..fb7624bff 100644 --- a/modules/ui_extensions.py +++ b/modules/ui_extensions.py @@ -4,11 +4,8 @@ import time import shutil import errno import html - import git import gradio as gr - -from rich import print # pylint: disable=redefined-builtin from modules import extensions, shared, paths, errors from modules.call_queue import wrap_gradio_gpu_call @@ -46,7 +43,7 @@ def apply_and_restart(disable_list, update_list, disable_all): # shared.state.interrupt() # shared.state.need_restart = True # shared.restart_server() - print('Extension list updated - please restart the server') + shared.log.warning('Extension list updated - please restart the server') def check_updates(_id_task, disable_list): @@ -135,12 +132,12 @@ def install_extension_from_url(dirname, url): assert url, 'No URL specified' if dirname is None or dirname == "": - *parts, last_part = url.split('/') + *parts, last_part = url.split('/') # pylint: disable=unused-variable last_part = normalize_git_url(last_part) dirname = last_part target_dir = os.path.join(extensions.extensions_dir, dirname) - print(f'Installing extension: {url} into {target_dir}') + shared.log.info(f'Installing extension: {url} into {target_dir}') assert not os.path.exists(target_dir), f'Extension directory already exists: {target_dir}' normalized_url = normalize_git_url(url) diff --git a/modules/upscaler.py b/modules/upscaler.py index 9ca6e4596..560ca6167 100644 --- a/modules/upscaler.py +++ b/modules/upscaler.py @@ -40,7 +40,7 @@ class Upscaler: os.makedirs(self.model_path, exist_ok=True) try: - import cv2 + import cv2 # pylint: disable=unused-import self.can_tile = True except: pass diff --git a/webui.py b/webui.py index d3afac97f..60b75915e 100644 --- a/webui.py +++ b/webui.py @@ -6,7 +6,6 @@ import signal import asyncio import logging import warnings -from rich import print # pylint: disable=W0622 from modules import timer, errors startup_timer = timer.Timer() @@ -18,6 +17,9 @@ except: pass import torchvision # pylint: disable=W0611,C0411 import pytorch_lightning # pytorch_lightning should be imported after torch, but it re-enables warnings on import so import once to disable them # pylint: disable=W0611,C0411 +if ".dev" in torch.__version__ or "+git" in torch.__version__: + torch.__long_version__ = torch.__version__ + torch.__version__ = re.search(r'[\d.]+[\d]', torch.__version__).group(0) logging.getLogger("xformers").addFilter(lambda record: 'A matching Triton is not available' not in record.getMessage()) logging.getLogger("pytorch_lightning").disabled = True warnings.filterwarnings(action="ignore", category=DeprecationWarning, module="pytorch_lightning") @@ -34,12 +36,6 @@ from modules import extra_networks, ui_extra_networks_checkpoints # pylint: disa from modules import extra_networks_hypernet, ui_extra_networks_hypernets, ui_extra_networks_textual_inversion from modules.call_queue import wrap_queued_call, queue_lock, wrap_gradio_gpu_call # pylint: disable=W0611,C0411 from modules.paths import create_paths - -# Truncate version number of nightly/local build of PyTorch to not cause exceptions with CodeFormer or Safetensors -if ".dev" in torch.__version__ or "+git" in torch.__version__: - torch.__long_version__ = torch.__version__ - torch.__version__ = re.search(r'[\d.]+[\d]', torch.__version__).group(0) - from modules import shared, extensions, ui_tempdir, ui_extra_networks import modules.devices import modules.sd_samplers @@ -59,11 +55,14 @@ import modules.textual_inversion.textual_inversion import modules.progress import modules.ui from modules import modelloader -from modules.shared import cmd_opts, opts +from modules.shared import cmd_opts, opts, log import modules.hypernetworks.hypernetwork from modules.middleware import setup_middleware startup_timer.record("libraries") + +log.setLevel(logging.DEBUG if cmd_opts.debug else logging.INFO) +logging.disable(logging.NOTSET if cmd_opts.debug else logging.DEBUG) if cmd_opts.server_name: server_name = cmd_opts.server_name else: @@ -73,17 +72,18 @@ else: def check_rollback_vae(): if shared.cmd_opts.rollback_vae: if not torch.cuda.is_available(): - print("Rollback VAE functionality requires compatible GPU") + log.error("Rollback VAE functionality requires compatible GPU") shared.cmd_opts.rollback_vae = False elif not torch.__version__.startswith('2.1'): - print("Rollback VAE functionality requires Torch 2.1 or higher") + log.error("Rollback VAE functionality requires Torch 2.1 or higher") shared.cmd_opts.rollback_vae = False elif 0 < torch.cuda.get_device_capability()[0] < 8: - print('Rollback VAE functionality device capabilities not met') + log.error('Rollback VAE functionality device capabilities not met') shared.cmd_opts.rollback_vae = False def initialize(): + log.debug('Entering Initialize') check_rollback_vae() extensions.list_extensions() @@ -127,19 +127,19 @@ def initialize(): if cmd_opts.tls_keyfile is not None and cmd_opts.tls_keyfile is not None: try: if not os.path.exists(cmd_opts.tls_keyfile): - print("Invalid path to TLS keyfile given") + log.error("Invalid path to TLS keyfile given") if not os.path.exists(cmd_opts.tls_certfile): - print(f"Invalid path to TLS certfile: '{cmd_opts.tls_certfile}'") + log.error(f"Invalid path to TLS certfile: '{cmd_opts.tls_certfile}'") except TypeError: cmd_opts.tls_keyfile = cmd_opts.tls_certfile = None - print("TLS setup invalid, running webui without TLS") + log.error("TLS setup invalid, running webui without TLS") else: - print("Running with TLS") + log.info("Running with TLS") startup_timer.record("TLS") # make the program just exit at ctrl+c without waiting for anything def sigint_handler(_sig, _frame): - print('Exiting') + log.info('Exiting') os._exit(0) signal.signal(signal.SIGINT, sigint_handler) @@ -152,10 +152,10 @@ def load_model(): modules.sd_models.load_model() except Exception as e: errors.display(e, "loading stable diffusion model") - print("Stable diffusion model failed to load") + log.error("Stable diffusion model failed to load") exit(1) if shared.sd_model is None: - print("No stable diffusion model loaded") + log.error("No stable diffusion model loaded") exit(1) shared.opts.data["sd_model_checkpoint"] = shared.sd_model.sd_checkpoint_info.title shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights())) @@ -185,7 +185,8 @@ def async_policy(): def start_ui(): - logging.disable(logging.INFO) + log.debug('Entering StartUI') + logging.disable(logging.NOTSET if cmd_opts.debug else logging.DEBUG) create_paths(opts) async_policy() initialize() @@ -197,7 +198,7 @@ def start_ui(): shared.demo = modules.ui.create_ui() startup_timer.record("ui") if cmd_opts.disable_queue: - print('Server queues disabled') + log.info('Server queues disabled') shared.demo.progress_tracking = False else: shared.demo.queue(concurrency_count=16) @@ -238,10 +239,10 @@ def start_ui(): def webui(): + log.debug('Entering WebUI') start_ui() load_model() - print(f"Startup time: {startup_timer.summary()}") - logging.disable(logging.DEBUG) + log.info(f"Startup time: {startup_timer.summary()}") while True: try: @@ -249,10 +250,10 @@ def webui(): except: alive = False if not alive: - print('Server restart') + log.warning('Server restart') startup_timer.reset() start_ui() - print(f"Startup time: {startup_timer.summary()}") + log.info(f"Startup time: {startup_timer.summary()}") time.sleep(1) """ From 7a083d322b4216babe2faffdcd2b2993f7cbdbb6 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 2 May 2023 15:06:06 -0400 Subject: [PATCH 037/282] merge commits --- extensions-builtin/Lora/lora.py | 6 +++++- javascript/imageviewer.js | 4 +++- modules/call_queue.py | 1 + modules/interrogate.py | 4 ++-- modules/middleware.py | 4 ++-- modules/postprocessing.py | 9 +++++++-- modules/progress.py | 8 ++++++++ modules/sd_models.py | 9 ++++++++- modules/textual_inversion/textual_inversion.py | 6 ++++++ modules/ui.py | 2 +- modules/ui_components.py | 9 +++++++++ modules/ui_extra_networks.py | 2 +- scripts/outpainting_mk_2.py | 2 +- 13 files changed, 54 insertions(+), 12 deletions(-) diff --git a/extensions-builtin/Lora/lora.py b/extensions-builtin/Lora/lora.py index 40863787b..32f55eafe 100644 --- a/extensions-builtin/Lora/lora.py +++ b/extensions-builtin/Lora/lora.py @@ -211,7 +211,11 @@ def load_loras(names, multipliers=None): lora_on_disk = loras_on_disk[i] if lora_on_disk is not None: if lora is None or os.path.getmtime(lora_on_disk.filename) > lora.mtime: - lora = load_lora(name, lora_on_disk.filename) + try: + lora = load_lora(name, lora_on_disk.filename) + except Exception as e: + errors.display(e, f"loading Lora {lora_on_disk.filename}") + continue if lora is None: print(f"Couldn't find Lora with name {name}") diff --git a/javascript/imageviewer.js b/javascript/imageviewer.js index 149177430..96714b573 100644 --- a/javascript/imageviewer.js +++ b/javascript/imageviewer.js @@ -106,7 +106,8 @@ function setupImageForLightbox(e) { var event = isFirefox ? 'mousedown' : 'click' e.addEventListener(event, function (evt) { if (evt.button != 0) return; - modalZoomSet(gradioApp().getElementById('modalImage'), true) + initialZoom = (localStorage.getItem('modalZoom') || true) == 'yes' + modalZoomSet(gradioApp().getElementById('modalImage'), initialZoom) evt.preventDefault() showModal(evt) }, true); @@ -115,6 +116,7 @@ function setupImageForLightbox(e) { function modalZoomSet(modalImage, enable) { if (enable) modalImage.classList.add('modalImageFullscreen'); else modalImage.classList.remove('modalImageFullscreen'); + localStorage.setItem('modalZoom', enable ? 'yes' : 'no') } function modalZoomToggle(event) { diff --git a/modules/call_queue.py b/modules/call_queue.py index 43aaf9fc0..479f6bffc 100644 --- a/modules/call_queue.py +++ b/modules/call_queue.py @@ -36,6 +36,7 @@ def wrap_gradio_gpu_call(func, extra_outputs=None): try: res = func(*args, **kwargs) + progress.record_results(id_task, res) finally: progress.finish_task(id_task) diff --git a/modules/interrogate.py b/modules/interrogate.py index d355d70eb..9892d326f 100644 --- a/modules/interrogate.py +++ b/modules/interrogate.py @@ -34,7 +34,7 @@ def download_default_clip_interrogate_categories(content_dir): cat_types = ["artists", "flavors", "mediums", "movements"] try: - os.makedirs(tmpdir) + os.makedirs(tmpdir, exist_ok=True) for category_type in cat_types: torch.hub.download_url_to_file(f"https://raw.githubusercontent.com/pharmapsychotic/clip-interrogator/main/clip_interrogator/data/{category_type}.txt", os.path.join(tmpdir, f"{category_type}.txt")) os.rename(tmpdir, content_dir) @@ -43,7 +43,7 @@ def download_default_clip_interrogate_categories(content_dir): errors.display(e, "downloading default CLIP interrogate categories") finally: if os.path.exists(tmpdir): - os.remove(tmpdir) + os.removedirs(tmpdir) class InterrogateModels: diff --git a/modules/middleware.py b/modules/middleware.py index 74c12303c..7e29a2c91 100644 --- a/modules/middleware.py +++ b/modules/middleware.py @@ -39,7 +39,7 @@ def setup_middleware(app: FastAPI, cmd_opts): res.headers["X-Process-Time"] = duration endpoint = req.scope.get('path', 'err') if cmd_opts.api_log and endpoint.startswith('/sdapi'): - log.info('API {t} {code} {prot}/{ver} {method} {endpoint} {cli} {duration}'.format( # pylint: disable=consider-using-f-string + log.info('API {t} {code} {prot}/{ver} {method} {endpoint} {cli} {duration}'.format( # pylint: disable=consider-using-f-string, logging-format-interpolation t = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f"), code = res.status_code, ver = req.scope.get('http_version', '0.0'), @@ -58,8 +58,8 @@ def setup_middleware(app: FastAPI, cmd_opts): "body": vars(e).get('body', ''), "errors": str(e), } - log.error(f"API error: {req.method}: {req.url} {err}") if not isinstance(e, HTTPException) and err['error'] != 'TypeError': # do not print backtrace on known httpexceptions + log.error(f"API error: {req.method}: {req.url} {err}") errors.display(e, 'HTTP API', [anyio, fastapi, uvicorn, starlette]) return JSONResponse(status_code=vars(e).get('status_code', 500), content=jsonable_encoder(err)) diff --git a/modules/postprocessing.py b/modules/postprocessing.py index cceb3b463..6b6fe3b07 100644 --- a/modules/postprocessing.py +++ b/modules/postprocessing.py @@ -20,9 +20,14 @@ def run_postprocessing(extras_mode, image, image_folder: List[tempfile.NamedTemp if extras_mode == 1: for img in image_folder: - image = Image.open(os.path.abspath(img.name)) + if isinstance(img, Image.Image): + image = img + fn = '' + else: + image = Image.open(os.path.abspath(img.name)) + fn = os.path.splitext(img.orig_name)[0] image_data.append(image) - image_names.append(os.path.splitext(img.orig_name)[0]) + image_names.append(fn) elif extras_mode == 2: assert not shared.cmd_opts.hide_ui_dir_config, '--hide-ui-dir-config option must be disabled' assert input_dir, 'input directory not selected' diff --git a/modules/progress.py b/modules/progress.py index 93246eb08..42ed01052 100644 --- a/modules/progress.py +++ b/modules/progress.py @@ -8,6 +8,8 @@ import modules.shared as shared current_task = None pending_tasks = {} finished_tasks = [] +recorded_results = [] +recorded_results_limit = 2 def start_task(id_task): @@ -16,6 +18,12 @@ def start_task(id_task): pending_tasks.pop(id_task, None) +def record_results(id_task, res): + recorded_results.append((id_task, res)) + if len(recorded_results) > recorded_results_limit: + recorded_results.pop(0) + + def finish_task(id_task): global current_task # pylint: disable=global-statement if current_task == id_task: diff --git a/modules/sd_models.py b/modules/sd_models.py index ed570c909..f9094f6e0 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -50,7 +50,14 @@ class CheckpointInfo: self.shorthash = self.sha256[0:10] if self.sha256 else None self.title = name if self.shorthash is None else f'{name} [{self.shorthash}]' self.ids = [self.hash, self.model_name, self.title, name, f'{name} [{self.hash}]'] + ([self.shorthash, self.sha256, f'{self.name} [{self.shorthash}]'] if self.shorthash else []) - + self.metadata = {} + _, ext = os.path.splitext(self.filename) + if ext.lower() == ".safetensors": + try: + self.metadata = read_metadata_from_safetensors(filename) + except Exception as e: + errors.display(e, f"reading checkpoint metadata: {filename}") + def register(self): checkpoints_list[self.title] = self for i in self.ids: diff --git a/modules/textual_inversion/textual_inversion.py b/modules/textual_inversion/textual_inversion.py index d4e210e62..95ebfb4f0 100644 --- a/modules/textual_inversion/textual_inversion.py +++ b/modules/textual_inversion/textual_inversion.py @@ -230,6 +230,12 @@ class EmbeddingDatabase: self.load_from_dir(embdir) embdir.update() + # re-sort word_embeddings because load_from_dir may not load in alphabetic order. + # using a temporary copy so we don't reinitialize self.word_embeddings in case other objects have a reference to it. + sorted_word_embeddings = {e.name: e for e in sorted(self.word_embeddings.values(), key=lambda e: e.name.lower())} + self.word_embeddings.clear() + self.word_embeddings.update(sorted_word_embeddings) + displayed_embeddings = (tuple(self.word_embeddings.keys()), tuple(self.skipped_embeddings.keys())) if self.previously_displayed_embeddings != displayed_embeddings: self.previously_displayed_embeddings = displayed_embeddings diff --git a/modules/ui.py b/modules/ui.py index d2397bb26..475d6c889 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1038,7 +1038,7 @@ def create_ui(): with gr.Column(elem_id='ti_gallery_container'): ti_output = gr.Text(elem_id="ti_output", value="", show_label=False) - _ti_gallery = gr.Gallery(label='Output', show_label=False, elem_id='ti_gallery').style(grid=4) + _ti_gallery = gr.Gallery(label='Output', show_label=False, elem_id='ti_gallery').style(columns=4) _ti_progress = gr.HTML(elem_id="ti_progress", value="") ti_outcome = gr.HTML(elem_id="ti_error", value="") diff --git a/modules/ui_components.py b/modules/ui_components.py index 2b1da2cb2..6d2186b92 100644 --- a/modules/ui_components.py +++ b/modules/ui_components.py @@ -62,3 +62,12 @@ class DropdownMulti(FormComponent, gr.Dropdown): def get_block_name(self): return "dropdown" + + +class DropdownEditable(FormComponent, gr.Dropdown): + """Same as gr.Dropdown but allows editing value""" + def __init__(self, **kwargs): + super().__init__(allow_custom_value=True, **kwargs) + + def get_block_name(self): + return "dropdown" diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py index acaf4df64..065f155a4 100644 --- a/modules/ui_extra_networks.py +++ b/modules/ui_extra_networks.py @@ -210,7 +210,7 @@ def create_ui(container, button, tabname): ui.tabname = tabname with gr.Tabs(elem_id=tabname+"_extra_tabs"): for page in ui.stored_extra_pages: - with gr.Tab(page.title): + with gr.Tab(page.title, id=page.title.lower().replace(" ", "_")): page_elem = gr.HTML(page.create_html(ui.tabname)) ui.pages.append(page_elem) _filter = gr.Textbox('', show_label=False, elem_id=tabname+"_extra_search", placeholder="Search...", visible=False) diff --git a/scripts/outpainting_mk_2.py b/scripts/outpainting_mk_2.py index 4e764fee4..d375ff764 100644 --- a/scripts/outpainting_mk_2.py +++ b/scripts/outpainting_mk_2.py @@ -278,6 +278,6 @@ class Script(scripts.Script): images.save_image(img, p.outpath_samples, "", res.seed, p.prompt, opts.samples_format, info=res.info, p=p) if opts.grid_save and not unwanted_grid_because_of_img_count: - images.save_image(combined_grid_image, p.outpath_grids, "grid", res.seed, p.prompt, opts.grid_format, info=res.info, short_filename=not opts.grid_extended_filename, grid=True, p=p) + images.save_image(combined_grid_image, p.outpath_grids, "grid", res.seed, p.prompt, opts.samples_format, info=res.info, short_filename=not opts.grid_extended_filename, grid=True, p=p) return res From e379da2f5f0e977f3abf55f9d627b8eb115717b5 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 2 May 2023 15:55:33 -0400 Subject: [PATCH 038/282] fix logger --- ...ification_default.mp3 => notification.mp3} | Bin launch.py | 2 +- modules/shared.py | 48 +++++++++--------- modules/ui.py | 3 +- 4 files changed, 26 insertions(+), 27 deletions(-) rename html/{notification_default.mp3 => notification.mp3} (100%) diff --git a/html/notification_default.mp3 b/html/notification.mp3 similarity index 100% rename from html/notification_default.mp3 rename to html/notification.mp3 diff --git a/launch.py b/launch.py index 72e65eeb8..4dece79ea 100644 --- a/launch.py +++ b/launch.py @@ -41,7 +41,7 @@ def commit_hash(): def run(command, desc=None, errdesc=None, custom_env=None, live=False): if desc is not None: - installer.log(desc) + installer.log.info(desc) if live: result = subprocess.run(command, check=False, shell=True, env=os.environ if custom_env is None else custom_env) if result.returncode != 0: diff --git a/modules/shared.py b/modules/shared.py index 5bf2d14d7..570ebae0c 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -239,10 +239,10 @@ options_templates.update(options_section(('sd', "Stable Diffusion"), { "model_reuse_dict": OptionInfo(False, "When loading models attempt to reuse previous model dictionary"), "inpainting_mask_weight": OptionInfo(1.0, "Inpainting conditioning mask strength", gr.Slider, {"minimum": 0.0, "maximum": 1.0, "step": 0.01}), "initial_noise_multiplier": OptionInfo(1.0, "Noise multiplier for img2img", gr.Slider, {"minimum": 0.5, "maximum": 1.5, "step": 0.01}), - "img2img_color_correction": OptionInfo(False, "Apply color correction to img2img results to match original colors."), - "img2img_fix_steps": OptionInfo(False, "For image processing do exactly the amount of steps as specified."), - "img2img_background_color": OptionInfo("#ffffff", "With img2img, fill image's transparent parts with this color.", ui_components.FormColorPicker, {}), - "enable_quantization": OptionInfo(True, "Enable quantization in K samplers for sharper and cleaner results. This may change existing seeds."), + "img2img_color_correction": OptionInfo(False, "Apply color correction to img2img results to match original colors"), + "img2img_fix_steps": OptionInfo(False, "For image processing do exactly the amount of steps as specified"), + "img2img_background_color": OptionInfo("#ffffff", "With img2img fill image's transparent parts with this color", ui_components.FormColorPicker, {}), + "enable_quantization": OptionInfo(True, "Enable quantization in K samplers for sharper and cleaner results"), "comma_padding_backtrack": OptionInfo(20, "Increase coherency by padding from the last comma within n tokens when using more than 75 tokens", gr.Slider, {"minimum": 0, "maximum": 74, "step": 1 }), "CLIP_stop_at_last_layers": OptionInfo(1, "Clip skip", gr.Slider, {"minimum": 1, "maximum": 12, "step": 1, "visible": False}), "upcast_attn": OptionInfo(False, "Upcast cross attention layer to float32"), @@ -261,7 +261,7 @@ options_templates.update(options_section(('system-paths', "System Paths"), { "vae_dir": OptionInfo(os.path.join(paths.models_path, 'VAE'), "Path to directory with VAE files"), "embeddings_dir": OptionInfo(os.path.join(paths.models_path, 'embeddings'), "Embeddings directory for textual inversion"), "hypernetwork_dir": OptionInfo(os.path.join(paths.models_path, 'hypernetworks'), "Hypernetwork directory"), - "codeformer_models_path": OptionInfo(os.path.join(paths.models_path, 'Codeformer'), "Path to directory with codeformer model file(s)."), + "codeformer_models_path": OptionInfo(os.path.join(paths.models_path, 'Codeformer'), "Path to directory with codeformer model file(s)"), "gfpgan_models_path": OptionInfo(os.path.join(paths.models_path, 'GFPGAN'), "Path to directory with GFPGAN model file(s)"), "esrgan_models_path": OptionInfo(os.path.join(paths.models_path, 'ESRGAN'), "Path to directory with ESRGAN model file(s)"), "bsrgan_models_path": OptionInfo(os.path.join(paths.models_path, 'BSRGAN'), "Path to directory with BSRGAN model file(s)"), @@ -288,9 +288,9 @@ options_templates.update(options_section(('saving-images', "Image options"), { "grid_prevent_empty_spots": OptionInfo(True, "Prevent empty spots in grid (when set to autodetect)"), "n_rows": OptionInfo(-1, "Grid row count; use -1 for autodetect and 0 for it to be same as batch size", gr.Slider, {"minimum": -1, "maximum": 16, "step": 1}), "enable_pnginfo": OptionInfo(True, "Save text information about generation parameters as chunks to png files"), - "save_txt": OptionInfo(False, "Create a text file next to every image with generation parameters."), - "save_images_before_face_restoration": OptionInfo(True, "Save a copy of image before doing face restoration."), - "save_images_before_highres_fix": OptionInfo(True, "Save a copy of image before applying highres fix."), + "save_txt": OptionInfo(False, "Create a text file next to every image with generation parameters"), + "save_images_before_face_restoration": OptionInfo(True, "Save a copy of image before doing face restoration"), + "save_images_before_highres_fix": OptionInfo(True, "Save a copy of image before applying highres fix"), "save_images_before_color_correction": OptionInfo(True, "Save a copy of image before applying color correction to img2img results"), "save_mask": OptionInfo(False, "For inpainting, save a copy of the greyscale mask"), "save_mask_composite": OptionInfo(False, "For inpainting, save a masked composite"), @@ -319,7 +319,7 @@ options_templates.update(options_section(('saving-paths', "Image Paths"), { })) options_templates.update(options_section(('cuda', "CUDA Settings"), { - "memmon_poll_rate": OptionInfo(2, "VRAM usage polls per second during generation. Set to 0 to disable.", gr.Slider, {"minimum": 0, "maximum": 40, "step": 1}), + "memmon_poll_rate": OptionInfo(2, "VRAM usage polls per second during generation", gr.Slider, {"minimum": 0, "maximum": 40, "step": 1}), "precision": OptionInfo("Autocast", "Precision type", gr.Radio, lambda: {"choices": ["Autocast", "Full"]}), "cuda_dtype": OptionInfo("FP32" if sys.platform == "darwin" else "FP16", "Device precision type", gr.Radio, lambda: {"choices": ["FP32", "FP16", "BF16"]}), "no_half": OptionInfo(True if is_device_dml else False, "Use full precision for model (--no-half)", None, None, None), @@ -343,7 +343,7 @@ options_templates.update(options_section(('upscaling', "Upscaling"), { "realesrgan_enabled_models": OptionInfo(["R-ESRGAN 4x+", "R-ESRGAN 4x+ Anime6B"], "Real-ESRGAN available models", gr.CheckboxGroup, lambda: {"choices": shared_items.realesrgan_models_names()}), "upscaler_for_img2img": OptionInfo("None", "Default upscaler for image resize operations", gr.Dropdown, lambda: {"choices": [x.name for x in sd_upscalers]}), "use_old_hires_fix_width_height": OptionInfo(False, "Hires fix uses width & height to set final resolution rather than first pass"), - "dont_fix_second_order_samplers_schedule": OptionInfo(False, "Do not fix prompt schedule for second order samplers."), + "dont_fix_second_order_samplers_schedule": OptionInfo(False, "Do not fix prompt schedule for second order samplers"), })) options_templates.update(options_section(('face-restoration', "Face restoration"), { @@ -353,23 +353,23 @@ options_templates.update(options_section(('face-restoration', "Face restoration" })) options_templates.update(options_section(('training', "Training"), { - "unload_models_when_training": OptionInfo(False, "Move VAE and CLIP to RAM when training if possible. Saves VRAM."), - "pin_memory": OptionInfo(True, "Turn on pin_memory for DataLoader. Makes training slightly faster but can increase memory usage."), - "save_optimizer_state": OptionInfo(False, "Saves Optimizer state as separate *.optim file. Training of embedding or HN can be resumed with the matching optim file."), - "save_training_settings_to_txt": OptionInfo(True, "Save textual inversion and hypernet settings to a text file whenever training starts."), + "unload_models_when_training": OptionInfo(False, "Move VAE and CLIP to RAM when training if possible"), + "pin_memory": OptionInfo(True, "Turn on pin_memory for DataLoader"), + "save_optimizer_state": OptionInfo(False, "Saves resumable optimizer state when training embedding or hypernetwork"), + "save_training_settings_to_txt": OptionInfo(True, "Save textual inversion and hypernet settings to a text file whenever training starts"), "dataset_filename_word_regex": OptionInfo("", "Filename word regex"), "dataset_filename_join_string": OptionInfo(" ", "Filename join string"), "embeddings_templates_dir": OptionInfo(os.path.join(paths.script_path, 'train', 'templates'), "Embeddings train templates directory"), "training_image_repeats_per_epoch": OptionInfo(1, "Number of repeats for a single input image per epoch; used only for displaying epoch number", gr.Number, {"precision": 0}), "training_write_csv_every": OptionInfo(0, "Save an csv containing the loss to log directory every N steps, 0 to disable"), - "training_enable_tensorboard": OptionInfo(False, "Enable tensorboard logging."), - "training_tensorboard_save_images": OptionInfo(False, "Save generated images within tensorboard."), - "training_tensorboard_flush_every": OptionInfo(120, "How often, in seconds, to flush the pending tensorboard events and summaries to disk."), + "training_enable_tensorboard": OptionInfo(False, "Enable tensorboard logging"), + "training_tensorboard_save_images": OptionInfo(False, "Save generated images within tensorboard"), + "training_tensorboard_flush_every": OptionInfo(120, "How often, in seconds, to flush the pending tensorboard events and summaries to disk"), })) options_templates.update(options_section(('interrogate', "Interrogate Options"), { "interrogate_keep_models_in_memory": OptionInfo(False, "Interrogate: keep models in VRAM"), - "interrogate_return_ranks": OptionInfo(True, "Interrogate: include ranks of model tags matches in results (Has no effect on caption-based interrogators)."), + "interrogate_return_ranks": OptionInfo(True, "Interrogate: include ranks of model tags matches in results"), "interrogate_clip_num_beams": OptionInfo(1, "Interrogate: num_beams for BLIP", gr.Slider, {"minimum": 1, "maximum": 16, "step": 1}), "interrogate_clip_min_length": OptionInfo(32, "Interrogate: minimum description length (excluding artists, etc..)", gr.Slider, {"minimum": 1, "maximum": 128, "step": 1}), "interrogate_clip_max_length": OptionInfo(192, "Interrogate: maximum description length", gr.Slider, {"minimum": 1, "maximum": 256, "step": 1}), @@ -396,7 +396,7 @@ options_templates.update(options_section(('ui', "User interface"), { "return_grid": OptionInfo(True, "Show grid in results for web"), "return_mask": OptionInfo(False, "For inpainting, include the greyscale mask in results for web"), "return_mask_composite": OptionInfo(False, "For inpainting, include masked composite in results for web"), - "disable_weights_auto_swap": OptionInfo(True, "Do not change the selected model when reading generation parameters."), + "disable_weights_auto_swap": OptionInfo(True, "Do not change the selected model when reading generation parameters"), "send_seed": OptionInfo(True, "Send seed when sending prompt or image to other interface"), "send_size": OptionInfo(True, "Send size when sending prompt or image to another interface"), "font": OptionInfo("", "Font for image grids that have text"), @@ -412,8 +412,8 @@ options_templates.update(options_section(('ui', "Live previews"), { "show_progressbar": OptionInfo(True, "Show progressbar"), "live_previews_enable": OptionInfo(True, "Show live previews of the created image"), "show_progress_grid": OptionInfo(True, "Show previews of all images generated in a batch as a grid"), - "notification_audio_enable": OptionInfo(False, "Play a sound when images are finished generating."), - "notification_audio_path": OptionInfo("html/notification_default.mp3","Path to notification sound",component_args=hide_dirs), + "notification_audio_enable": OptionInfo(False, "Play a sound when images are finished generating"), + "notification_audio_path": OptionInfo("html/notification.mp3","Path to notification sound",component_args=hide_dirs), "show_progress_every_n_steps": OptionInfo(1, "Show new live preview image every N sampling steps. Set to -1 to show after completion of batch.", gr.Slider, {"minimum": -1, "maximum": 32, "step": 1}), "show_progress_type": OptionInfo("Approx NN", "Image creation progress preview mode", gr.Radio, {"choices": ["Full", "Approx NN", "Approx cheap"]}), "live_preview_content": OptionInfo("Combined", "Live preview subject", gr.Radio, {"choices": ["Combined", "Prompt", "Negative prompt"]}), @@ -438,8 +438,8 @@ options_templates.update(options_section(('sampler-params', "Sampler parameters" })) options_templates.update(options_section(('token_merging', 'Token Merging'), { - "token_merging": OptionInfo(False, "Enable redundant token merging via tomesd. This can provide significant speed and memory improvements.", gr.Checkbox), - "token_merging_ratio": OptionInfo(0.5, "Merging Ratio. Higher merging ratio = faster generation, smaller VRAM usage, lower quality.", gr.Slider, {"minimum": 0, "maximum": 0.9, "step": 0.1}), + "token_merging": OptionInfo(False, "Enable redundant token merging via tomesd for speed and memory improvements", gr.Checkbox), + "token_merging_ratio": OptionInfo(0.5, "Token merging Ratio. Higher merging ratio = faster generation, smaller VRAM usage, lower quality.", gr.Slider, {"minimum": 0, "maximum": 0.9, "step": 0.1}), "token_merging_hr_only": OptionInfo(True, "Apply only to high-res fix pass. Disabling can yield a ~20-35% speedup on contemporary resolutions.", gr.Checkbox), "token_merging_ratio_hr": OptionInfo(0.5, "Merging Ratio (high-res pass) - If 'Apply only to high-res' is enabled, this will always be the ratio used.", gr.Slider, {"minimum": 0, "maximum": 0.9, "step": 0.1}), "token_merging_random": OptionInfo(False, "Use random perturbations - Can improve outputs for certain samplers. For others, it may cause visual artifacting.", gr.Checkbox), @@ -545,7 +545,7 @@ class Options: bad_settings += 1 if bad_settings > 0: - log.error(f"The program is likely to not work with bad settings.\nSettings file: {filename}\nEither fix the file, or delete it and restart.") + log.error(f"Error: Bad settings found in {filename}") def onchange(self, key, func, call=True): item = self.data_labels.get(key) diff --git a/modules/ui.py b/modules/ui.py index 1edb4111c..b893dd880 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1,7 +1,6 @@ import json import mimetypes import os -import sys from functools import reduce import gradio as gr @@ -1385,7 +1384,7 @@ def create_ui(): interface.render() if opts.notification_audio_enable and os.path.exists(os.path.join(script_path, opts.notification_audio_path)): - audio_notification = gr.Audio(interactive=False, value=os.path.join(script_path, opts.notification_audio_path), elem_id="audio_notification", visible=False) + _audio_notification = gr.Audio(interactive=False, value=os.path.join(script_path, opts.notification_audio_path), elem_id="audio_notification", visible=False) text_settings = gr.Textbox(elem_id="settings_json", value=lambda: opts.dumpjson(), visible=False) settings_submit.click( From eb03fce3e4733ef98f8233e5170c12938502674d Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 2 May 2023 15:57:28 -0400 Subject: [PATCH 039/282] fix logger --- modules/sd_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sd_models.py b/modules/sd_models.py index f9094f6e0..cfc2cde78 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -110,7 +110,7 @@ def list_models(): checkpoint_info.register() shared.opts.data['sd_model_checkpoint'] = checkpoint_info.title elif shared.cmd_opts.ckpt != shared.default_sd_model_file: - shared.log.warning(f"Checkpoint not found: {shared.cmd_opts.ckpt}", file=sys.stderr) + shared.log.warning(f"Checkpoint not found: {shared.cmd_opts.ckpt}") for filename in sorted(model_list, key=str.lower): checkpoint_info = CheckpointInfo(filename) checkpoint_info.register() From bfac50d113f42fcbfb06424cc99dbdc3816b2bf6 Mon Sep 17 00:00:00 2001 From: Scott Mudge Date: Tue, 2 May 2023 16:20:21 -0400 Subject: [PATCH 040/282] fix issue with gradio UI not loading when google fonts API is not accessible --- modules/shared.py | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/modules/shared.py b/modules/shared.py index 570ebae0c..748e4f9f6 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -5,6 +5,7 @@ import json import datetime import gradio as gr import tqdm +import urllib.request from modules import errors, ui_components, shared_items, cmd_args 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 # pylint: disable=W0611 import modules.interrogate @@ -623,25 +624,38 @@ def reload_gradio_theme(theme_name=None): global gradio_theme # pylint: disable=global-statement if not theme_name: theme_name = opts.gradio_theme + default_font_params = {} + ret_code = 0 + try: + req = urllib.request.Request("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono", method="HEAD") + ret_code = urllib.request.urlopen(req, timeout=3.0).get_code() + except: + ret_code = 0 + if (ret_code != 200): + log.info('No internet access detected, using default fonts') + default_font_params = { + 'font':['Helvetica', 'ui-sans-serif', 'system-ui', 'sans-serif'], + 'font_mono':['IBM Plex Mono', 'ui-monospace', 'Consolas', 'monospace'] + } if theme_name == "black-orange": - gradio_theme = gr.themes.Default() + gradio_theme = gr.themes.Default(**default_font_params) elif theme_name.startswith("gradio/"): if theme_name == "gradio/default": - gradio_theme = gr.themes.Default() + gradio_theme = gr.themes.Default(**default_font_params) if theme_name == "gradio/base": - gradio_theme = gr.themes.Base() + gradio_theme = gr.themes.Base(**default_font_params) if theme_name == "gradio/glass": - gradio_theme = gr.themes.Glass() + gradio_theme = gr.themes.Glass(**default_font_params) if theme_name == "gradio/monochrome": - gradio_theme = gr.themes.Monochrome() + gradio_theme = gr.themes.Monochrome(**default_font_params) if theme_name == "gradio/soft": - gradio_theme = gr.themes.Soft() + gradio_theme = gr.themes.Soft(**default_font_params) else: try: gradio_theme = gr.themes.ThemeClass.from_hub(theme_name) except: log.error("Theme download error accessing HuggingFace") - gradio_theme = gr.themes.Default() + gradio_theme = gr.themes.Default(**default_font_params) log.info(f'Loading theme: {theme_name}') From 6f976c358f6f2db4d23af0c210f4dbb01f8a24d4 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 2 May 2023 21:30:31 -0400 Subject: [PATCH 041/282] optimize model load --- extensions-builtin/Lora/lora.py | 21 +++---------------- extensions-builtin/sd-webui-controlnet | 2 +- modules/sd_models.py | 20 +++++++++++------- modules/shared.py | 2 +- .../textual_inversion/textual_inversion.py | 4 ++-- webui.py | 3 ++- 6 files changed, 22 insertions(+), 30 deletions(-) diff --git a/extensions-builtin/Lora/lora.py b/extensions-builtin/Lora/lora.py index 32f55eafe..ee4d91974 100644 --- a/extensions-builtin/Lora/lora.py +++ b/extensions-builtin/Lora/lora.py @@ -269,32 +269,19 @@ def lora_apply_weights(self: Union[torch.nn.Conv2d, torch.nn.Linear, torch.nn.Mu return current_names = getattr(self, "lora_current_names", ()) - lora_prev_names = getattr(self, "lora_prev_names", ()) wanted_names = tuple((x.name, x.multiplier) for x in loaded_loras) weights_backup = getattr(self, "lora_weights_backup", None) - if weights_backup is None and len(loaded_loras): + if weights_backup is None: if isinstance(self, torch.nn.MultiheadAttention): weights_backup = (self.in_proj_weight.to(devices.cpu, copy=True), self.out_proj.weight.to(devices.cpu, copy=True)) else: weights_backup = self.weight.to(devices.cpu, copy=True) self.lora_weights_backup = weights_backup - elif lora_prev_names != current_names: - self.lora_weights_backup = None - weights_backup = None - elif len(loaded_loras) == 0: - self.lora_weights_backup = None - if current_names != wanted_names or current_names != lora_prev_names: - if weights_backup is not None and current_names != lora_prev_names: - if isinstance(self, torch.nn.MultiheadAttention): - self.in_proj_weight.copy_(weights_backup[0]) - self.out_proj.weight.copy_(weights_backup[1]) - else: - self.weight.copy_(weights_backup) - elif weights_backup is not None and current_names == (): - # print('lora restore weight') + if current_names != wanted_names: + if weights_backup is not None: if isinstance(self, torch.nn.MultiheadAttention): self.in_proj_weight.copy_(weights_backup[0]) self.out_proj.weight.copy_(weights_backup[1]) @@ -327,11 +314,9 @@ def lora_apply_weights(self: Union[torch.nn.Conv2d, torch.nn.Linear, torch.nn.Mu print(f'failed to calculate lora weights for layer {lora_layer_name}') - setattr(self, "lora_prev_names", current_names) setattr(self, "lora_current_names", wanted_names) - def lora_reset_cached_weight(self: Union[torch.nn.Conv2d, torch.nn.Linear]): setattr(self, "lora_current_names", ()) setattr(self, "lora_weights_backup", None) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 815b93021..a482867ee 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 815b930217873dc3bd72f7d9b518b017a6404ad8 +Subproject commit a482867ee5e82b08b221c53662ff0c70c2f18d09 diff --git a/modules/sd_models.py b/modules/sd_models.py index cfc2cde78..812356c94 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -1,6 +1,5 @@ import collections import os.path -import sys import gc import re import io @@ -57,7 +56,7 @@ class CheckpointInfo: self.metadata = read_metadata_from_safetensors(filename) except Exception as e: errors.display(e, f"reading checkpoint metadata: {filename}") - + def register(self): checkpoints_list[self.title] = self for i in self.ids: @@ -109,7 +108,7 @@ def list_models(): checkpoint_info = CheckpointInfo(shared.cmd_opts.ckpt) checkpoint_info.register() shared.opts.data['sd_model_checkpoint'] = checkpoint_info.title - elif shared.cmd_opts.ckpt != shared.default_sd_model_file: + elif shared.cmd_opts.ckpt != shared.default_sd_model_file and shared.cmd_opts.ckpt is not None: shared.log.warning(f"Checkpoint not found: {shared.cmd_opts.ckpt}") for filename in sorted(model_list, key=str.lower): checkpoint_info = CheckpointInfo(filename) @@ -347,6 +346,7 @@ sd2_clip_weight = 'cond_stage_model.model.transformer.resblocks.0.attn.in_proj_w def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None): + shared.debug(f'Load model: {checkpoint_info}') from modules import lowvram, sd_hijack checkpoint_info = checkpoint_info or select_checkpoint() do_inpainting_hijack() @@ -407,16 +407,23 @@ def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None) shared.debug(f'Model load finished: {memory_stats()}') return sd_model +skip_next_load = False def reload_model_weights(sd_model=None, info=None): + global skip_next_load # pylint: disable=global-statement + if skip_next_load: + shared.debug('Reload model weights skip') + skip_next_load = False + return + shared.debug(f'Reload model weights: {sd_model} {info}') from modules import lowvram, sd_hijack checkpoint_info = info or select_checkpoint() if not sd_model: sd_model = shared.sd_model - if not shared.opts.model_reuse_dict and sd_model is not None: - sd_model = None - else: + if shared.opts.model_reuse_dict and sd_model is not None: shared.log.info('Reusing previous model dictionary') + else: + sd_model = None if sd_model is None: # previous model load failed current_checkpoint_info = None else: @@ -442,7 +449,6 @@ def reload_model_weights(sd_model=None, info=None): except Exception: shared.log.error("Failed to load checkpoint, restoring previous") load_model_weights(sd_model, current_checkpoint_info, None, timer) - raise finally: sd_hijack.model_hijack.hijack(sd_model) timer.record("hijack") diff --git a/modules/shared.py b/modules/shared.py index 748e4f9f6..499b11b83 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -166,7 +166,7 @@ face_restorers = [] def debug(message): if cmd_opts.debug: - log.info(message) + log.debug(message) class OptionInfo: diff --git a/modules/textual_inversion/textual_inversion.py b/modules/textual_inversion/textual_inversion.py index 95ebfb4f0..fc4507ac3 100644 --- a/modules/textual_inversion/textual_inversion.py +++ b/modules/textual_inversion/textual_inversion.py @@ -239,7 +239,7 @@ class EmbeddingDatabase: displayed_embeddings = (tuple(self.word_embeddings.keys()), tuple(self.skipped_embeddings.keys())) if self.previously_displayed_embeddings != displayed_embeddings: self.previously_displayed_embeddings = displayed_embeddings - shared.log.info(f"Embeddings loaded: {', '.join(self.word_embeddings.keys())} ({len(self.word_embeddings)})") + shared.log.info(f"Embeddings loaded: {len(self.word_embeddings)} {[k for k in self.word_embeddings.keys()]}") if len(self.skipped_embeddings) > 0: shared.log.info(f"Textual inversion embeddings skipped({len(self.skipped_embeddings)}): {', '.join(self.skipped_embeddings.keys())}") @@ -351,7 +351,7 @@ def validate_train_inputs(model_name, learn_rate, batch_size, gradient_step, dat assert log_directory, "Log directory is empty" -def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_step, data_root, log_directory, training_width, training_height, varsize, steps, clip_grad_mode, clip_grad_value, shuffle_tags, tag_drop_out, latent_sampling_method, use_weight, create_image_every, save_embedding_every, template_filename, save_image_with_stored_embedding, preview_from_txt2img, preview_prompt, preview_negative_prompt, preview_steps, preview_sampler_index, preview_cfg_scale, preview_seed, preview_width, preview_height): # pylint: disable=unused_argument +def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_step, data_root, log_directory, training_width, training_height, varsize, steps, clip_grad_mode, clip_grad_value, shuffle_tags, tag_drop_out, latent_sampling_method, use_weight, create_image_every, save_embedding_every, template_filename, save_image_with_stored_embedding, preview_from_txt2img, preview_prompt, preview_negative_prompt, preview_steps, preview_sampler_index, preview_cfg_scale, preview_seed, preview_width, preview_height): # pylint: disable=unused-argument save_embedding_every = save_embedding_every or 0 create_image_every = create_image_every or 0 diff --git a/webui.py b/webui.py index 60b75915e..5b2157f0d 100644 --- a/webui.py +++ b/webui.py @@ -60,7 +60,7 @@ import modules.hypernetworks.hypernetwork from modules.middleware import setup_middleware startup_timer.record("libraries") - +log.info('Libraries loaded') log.setLevel(logging.DEBUG if cmd_opts.debug else logging.INFO) logging.disable(logging.NOTSET if cmd_opts.debug else logging.DEBUG) if cmd_opts.server_name: @@ -150,6 +150,7 @@ def load_model(): shared.state.job = 'load model' try: modules.sd_models.load_model() + modules.sd_models.skip_next_load = True except Exception as e: errors.display(e, "loading stable diffusion model") log.error("Stable diffusion model failed to load") From 0495afa1a29a87cd0b0b32c4d82746dd03c311f5 Mon Sep 17 00:00:00 2001 From: cool-bigdogs-tshirt <131823432+cool-bigdogs-tshirt@users.noreply.github.com> Date: Tue, 2 May 2023 20:52:06 -0500 Subject: [PATCH 042/282] adjust unipc img2img parameters --- modules/models/diffusion/uni_pc/sampler.py | 69 ++++++++++------------ modules/models/diffusion/uni_pc/uni_pc.py | 44 +++++++------- 2 files changed, 53 insertions(+), 60 deletions(-) diff --git a/modules/models/diffusion/uni_pc/sampler.py b/modules/models/diffusion/uni_pc/sampler.py index 953e786db..e3f8a6651 100644 --- a/modules/models/diffusion/uni_pc/sampler.py +++ b/modules/models/diffusion/uni_pc/sampler.py @@ -7,9 +7,8 @@ try: except: pass -from .uni_pc import NoiseScheduleVP, model_wrapper, UniPC +from .uni_pc import NoiseScheduleVP, model_wrapper, UniPC, get_time_steps from modules import shared, devices -from ldm.modules.diffusionmodules.util import extract_into_tensor class UniPCSampler(object): @@ -21,6 +20,8 @@ class UniPCSampler(object): self.after_sample = None self.register_buffer('alphas_cumprod', to_torch(model.alphas_cumprod)) + self.noise_schedule = NoiseScheduleVP("discrete", alphas_cumprod=self.alphas_cumprod) + def make_schedule(self, ddim_num_steps, ddim_discretize="uniform", ddim_eta=0., verbose=True): # persist steps so we can eventually find denoising strength self.inflated_steps = ddim_num_steps @@ -33,35 +34,32 @@ class UniPCSampler(object): # first time we have all the info to get the real parameters from the ui # value from the hires steps slider: num_inference_steps = t[0] + 1 - # (num_inference_steps // denoising_strength): - inflated_steps = self.inflated_steps - # not exact: - self.denoising_strength = num_inference_steps/inflated_steps + approx_denoise_strength = num_inference_steps / self.inflated_steps + self.denoise_steps = max(num_inference_steps, shared.opts.uni_pc_order) - # values used for timesteps that generate noise in diffusers repo - init_timestep = min( - int(num_inference_steps * self.denoising_strength), - num_inference_steps, - ) - t_start = max(num_inference_steps - init_timestep, 0) + init_timestep = max(self.inflated_steps - self.denoise_steps, 0) # actual number of steps we'll run - self.steps = max( - init_timestep, - shared.opts.uni_pc_order+1, - ) - scheduler_timesteps = np.linspace( - 0, - self.model.num_timesteps-1, - num_inference_steps + 1, - ).round()[::-1][:-1].copy().astype(np.int64) - _, unique_indices = np.unique(scheduler_timesteps, return_index=True) - scheduler_timesteps = scheduler_timesteps[np.sort(unique_indices)] - scheduler_timesteps = torch.from_numpy(scheduler_timesteps).to(t.device) + all_timesteps = get_time_steps( + self.noise_schedule, + shared.opts.uni_pc_skip_type, + self.noise_schedule.T, + 1./self.noise_schedule.total_N, + self.inflated_steps+1, + t.device, + ) - sample_timesteps = scheduler_timesteps[t_start:] - latent_timestep = sample_timesteps[:1].repeat(x0.shape[0]) + # the rest of the timesteps will be used for denoising + self.timesteps = all_timesteps[-(self.denoise_steps+1):] + + latent_timestep = ( + ( # get the timestep of our first denoise step + self.timesteps[:1] + # multiply by number of alphas to get int index + * self.noise_schedule.total_N + ).int() - 1 # minus one for 0-indexed + ).repeat(x0.shape[0]) alphas_cumprod = self.alphas_cumprod sqrt_alpha_prod = alphas_cumprod[latent_timestep] ** 0.5 @@ -78,16 +76,12 @@ class UniPCSampler(object): def decode(self, x_latent, conditioning, t_start, unconditional_guidance_scale=1.0, unconditional_conditioning=None, use_original_steps=False, callback=None): - #print(f'steps {self.steps} denoising {self.denoising_strength}') - - noise_schedule = NoiseScheduleVP("discrete", alphas_cumprod=self.alphas_cumprod) - # same as in .sample(), i guess model_type = "v" if self.model.parameterization == "v" else "noise" model_fn = model_wrapper( lambda x, t, c: self.model.apply_model(x, t, c), - noise_schedule, + self.noise_schedule, model_type=model_type, guidance_type="classifier-free", #condition=conditioning, @@ -97,7 +91,7 @@ class UniPCSampler(object): self.uni_pc = UniPC( model_fn, - noise_schedule, + self.noise_schedule, predict_x0=True, thresholding=False, variant=shared.opts.uni_pc_variant, @@ -110,12 +104,13 @@ class UniPCSampler(object): return self.uni_pc.sample( x_latent, - steps=self.steps, + steps=self.denoise_steps, skip_type=shared.opts.uni_pc_skip_type, method="multistep", order=shared.opts.uni_pc_order, lower_order_final=shared.opts.uni_pc_lower_order_final, - t_start=self.denoising_strength, + denoise_to_zero=True, + timesteps=self.timesteps, ) def register_buffer(self, name, attr): @@ -182,14 +177,12 @@ class UniPCSampler(object): else: img = x_T - ns = NoiseScheduleVP('discrete', alphas_cumprod=self.alphas_cumprod) - # SD 1.X is "noise", SD 2.X is "v" model_type = "v" if self.model.parameterization == "v" else "noise" model_fn = model_wrapper( lambda x, t, c: self.model.apply_model(x, t, c), - ns, + self.noise_schedule, model_type=model_type, guidance_type="classifier-free", #condition=conditioning, @@ -197,7 +190,7 @@ class UniPCSampler(object): guidance_scale=unconditional_guidance_scale, ) - uni_pc = UniPC(model_fn, ns, predict_x0=True, thresholding=False, variant=shared.opts.uni_pc_variant, condition=conditioning, unconditional_condition=unconditional_conditioning, before_sample=self.before_sample, after_sample=self.after_sample, after_update=self.after_update) + uni_pc = UniPC(model_fn, self.noise_schedule, predict_x0=True, thresholding=False, variant=shared.opts.uni_pc_variant, condition=conditioning, unconditional_condition=unconditional_conditioning, before_sample=self.before_sample, after_sample=self.after_sample, after_update=self.after_update) x = uni_pc.sample(img, steps=S, skip_type=shared.opts.uni_pc_skip_type, method="multistep", order=shared.opts.uni_pc_order, lower_order_final=shared.opts.uni_pc_lower_order_final) return x.to(device), None diff --git a/modules/models/diffusion/uni_pc/uni_pc.py b/modules/models/diffusion/uni_pc/uni_pc.py index 895fc58c3..d86572f69 100644 --- a/modules/models/diffusion/uni_pc/uni_pc.py +++ b/modules/models/diffusion/uni_pc/uni_pc.py @@ -371,6 +371,22 @@ def model_wrapper( assert guidance_type in ["uncond", "classifier", "classifier-free"] return model_fn +def get_time_steps(noise_schedule, skip_type, t_T, t_0, N, device): + """Compute the intermediate time steps for sampling. + """ + if skip_type == 'logSNR': + lambda_T = noise_schedule.marginal_lambda(torch.tensor(t_T).to(device)) + lambda_0 = noise_schedule.marginal_lambda(torch.tensor(t_0).to(device)) + logSNR_steps = torch.linspace(lambda_T.cpu().item(), lambda_0.cpu().item(), N + 1).to(device) + return noise_schedule.inverse_lambda(logSNR_steps) + elif skip_type == 'time_uniform': + return torch.linspace(t_T, t_0, N + 1).to(device) + elif skip_type == 'time_quadratic': + t_order = 2 + t = torch.linspace(t_T**(1. / t_order), t_0**(1. / t_order), N + 1).pow(t_order).to(device) + return t + else: + raise ValueError("Unsupported skip_type {}, need to be 'logSNR' or 'time_uniform' or 'time_quadratic'".format(skip_type)) class UniPC: def __init__( @@ -459,23 +475,6 @@ class UniPC: else: return self.noise_prediction_fn(x, t) - def get_time_steps(self, skip_type, t_T, t_0, N, device): - """Compute the intermediate time steps for sampling. - """ - if skip_type == 'logSNR': - lambda_T = self.noise_schedule.marginal_lambda(torch.tensor(t_T).to(device)) - lambda_0 = self.noise_schedule.marginal_lambda(torch.tensor(t_0).to(device)) - logSNR_steps = torch.linspace(lambda_T.cpu().item(), lambda_0.cpu().item(), N + 1).to(device) - return self.noise_schedule.inverse_lambda(logSNR_steps) - elif skip_type == 'time_uniform': - return torch.linspace(t_T, t_0, N + 1).to(device) - elif skip_type == 'time_quadratic': - t_order = 2 - t = torch.linspace(t_T**(1. / t_order), t_0**(1. / t_order), N + 1).pow(t_order).to(device) - return t - else: - raise ValueError("Unsupported skip_type {}, need to be 'logSNR' or 'time_uniform' or 'time_quadratic'".format(skip_type)) - def get_orders_and_timesteps_for_singlestep_solver(self, steps, order, skip_type, t_T, t_0, device): """ Get the order of each step for sampling by the singlestep DPM-Solver. @@ -502,9 +501,9 @@ class UniPC: raise ValueError("'order' must be '1' or '2' or '3'.") if skip_type == 'logSNR': # To reproduce the results in DPM-Solver paper - timesteps_outer = self.get_time_steps(skip_type, t_T, t_0, K, device) + timesteps_outer = get_time_steps(self.noise_schedule, skip_type, t_T, t_0, K, device) else: - timesteps_outer = self.get_time_steps(skip_type, t_T, t_0, steps, device)[torch.cumsum(torch.tensor([0,] + orders), 0).to(device)] + timesteps_outer = get_time_steps(self.noise_schedule, skip_type, t_T, t_0, steps, device)[torch.cumsum(torch.tensor([0,] + orders), 0).to(device)] return timesteps_outer, orders def denoise_to_zero_fn(self, x, s): @@ -748,15 +747,16 @@ class UniPC: def sample(self, x, steps=20, t_start=None, t_end=None, order=3, skip_type='time_uniform', method='singlestep', lower_order_final=True, denoise_to_zero=False, solver_type='dpm_solver', - atol=0.0078, rtol=0.05, corrector=False, + atol=0.0078, rtol=0.05, corrector=False, timesteps=None, ): t_0 = 1. / self.noise_schedule.total_N if t_end is None else t_end t_T = self.noise_schedule.T if t_start is None else t_start device = x.device if method == 'multistep': - assert steps >= order, "UniPC order must be < sampling steps" - timesteps = self.get_time_steps(skip_type=skip_type, t_T=t_T, t_0=t_0, N=steps, device=device) + if timesteps == None: + timesteps = get_time_steps(self.noise_schedule, skip_type=skip_type, t_T=t_T, t_0=t_0, N=steps, device=device) #print(f"Running UniPC Sampling with {timesteps.shape[0]} timesteps, order {order}") + assert steps >= order, "UniPC order must be < sampling steps" assert timesteps.shape[0] - 1 == steps with Progress(TextColumn('[cyan]{task.description}'), BarColumn(), TaskProgressColumn(), TimeRemainingColumn(), TimeElapsedColumn()) as progress: task = progress.add_task(description="Initializing", total=steps) From e566fed3a15e725cc494997ece29f7b1e51ffdd2 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 3 May 2023 08:00:26 -0400 Subject: [PATCH 043/282] fonts and upscale fix --- .../multidiffusion-upscaler-for-automatic1111 | 2 +- extensions-builtin/sd-webui-controlnet | 2 +- javascript/notification.js | 3 ++- modules/lora | 2 +- modules/postprocessing.py | 2 +- modules/scripts.py | 3 +++ modules/shared.py | 10 +++++----- modules/styles.py | 10 ++++++---- 8 files changed, 20 insertions(+), 14 deletions(-) diff --git a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 index 860f8a405..8d8be4c33 160000 --- a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 +++ b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 @@ -1 +1 @@ -Subproject commit 860f8a405193bcd992e21d82e43fa18137bc4923 +Subproject commit 8d8be4c3390b7356d06645b1f8eb486a09663b71 diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index a482867ee..8fd1fcdc5 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit a482867ee5e82b08b221c53662ff0c70c2f18d09 +Subproject commit 8fd1fcdc536792a957fc4734636765550edbbfcc diff --git a/javascript/notification.js b/javascript/notification.js index 9f7c2e439..712d64258 100644 --- a/javascript/notification.js +++ b/javascript/notification.js @@ -16,7 +16,8 @@ onUiUpdate(function(){ if (headImg.search(regExpTempImage) != -1) return; lastHeadImg = headImg; // play notification sound if available - gradioApp().querySelector('#audio_notification audio')?.play(); + const audioNotification = gradioApp().querySelector('#audio_notification audio'); + if (audioNotification) audioNotification.play(); if (document.hasFocus()) return; // Multiple copies of the images are in the DOM when one is selected. Dedup with a Set to get the real number generated. const imgs = new Set(Array.from(galleryPreviews).map(img => img.src)); diff --git a/modules/lora b/modules/lora index bc803e01c..b9085fc80 160000 --- a/modules/lora +++ b/modules/lora @@ -1 +1 @@ -Subproject commit bc803e01c7028471efc8db5bc9aa183fde06080c +Subproject commit b9085fc80a618dfec1e92aeda445e6867813635a diff --git a/modules/postprocessing.py b/modules/postprocessing.py index 6b6fe3b07..4e0ee9489 100644 --- a/modules/postprocessing.py +++ b/modules/postprocessing.py @@ -84,7 +84,7 @@ def run_postprocessing(extras_mode, image, image_folder: List[tempfile.NamedTemp return outputs, ui_common.plaintext_to_html(infotext), '' -def run_extras(extras_mode, resize_mode, image, image_folder, input_dir, output_dir, show_extras_results, gfpgan_visibility, codeformer_visibility, codeformer_weight, upscaling_resize, upscaling_resize_w, upscaling_resize_h, upscaling_crop, extras_upscaler_1, extras_upscaler_2, extras_upscaler_2_visibility, _upscale_first: bool, save_output: bool = True): +def run_extras(extras_mode, resize_mode, image, image_folder, input_dir, output_dir, show_extras_results, gfpgan_visibility, codeformer_visibility, codeformer_weight, upscaling_resize, upscaling_resize_w, upscaling_resize_h, upscaling_crop, extras_upscaler_1, extras_upscaler_2, extras_upscaler_2_visibility, upscale_first: bool, save_output: bool = True): #pylint: disable=unused-argument """old handler for API""" args = scripts.scripts_postproc.create_args_for_run({ diff --git a/modules/scripts.py b/modules/scripts.py index fa8a3cef8..47da0309b 100644 --- a/modules/scripts.py +++ b/modules/scripts.py @@ -4,6 +4,7 @@ import sys from collections import namedtuple import gradio as gr from modules import paths, script_callbacks, extensions, script_loading, scripts_postprocessing, errors +from installer import log AlwaysVisible = object() @@ -189,6 +190,7 @@ def list_scripts(scriptdirname, extension): else: priority = priority + script.priority priority_list.append(ScriptFile(script.basedir, script.filename, script.path, priority)) + # log.debug(f'Adding script: {script.basedir} {script.filename} {script.path} {priority}') priority_sort = sorted(priority_list, key=lambda item: item.priority + item.path.lower(), reverse=False) return priority_sort @@ -217,6 +219,7 @@ def load_scripts(): for _key, script_class in module.__dict__.items(): if type(script_class) != type: continue + log.debug(f'Registering script: {scriptfile.path}') if issubclass(script_class, Script): scripts_data.append(ScriptClassData(script_class, scriptfile.path, scriptfile.basedir, module)) elif issubclass(script_class, scripts_postprocessing.ScriptPostprocessing): diff --git a/modules/shared.py b/modules/shared.py index 499b11b83..3c74d0b99 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -3,9 +3,9 @@ import sys import time import json import datetime +import urllib.request import gradio as gr import tqdm -import urllib.request from modules import errors, ui_components, shared_items, cmd_args 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 # pylint: disable=W0611 import modules.interrogate @@ -625,13 +625,13 @@ def reload_gradio_theme(theme_name=None): if not theme_name: theme_name = opts.gradio_theme default_font_params = {} - ret_code = 0 + res = 0 try: req = urllib.request.Request("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono", method="HEAD") - ret_code = urllib.request.urlopen(req, timeout=3.0).get_code() + res = urllib.request.urlopen(req, timeout=3.0).status except: - ret_code = 0 - if (ret_code != 200): + res = 0 + if res != 200: log.info('No internet access detected, using default fonts') default_font_params = { 'font':['Helvetica', 'ui-sans-serif', 'system-ui', 'sans-serif'], diff --git a/modules/styles.py b/modules/styles.py index fb151da96..22d1a7f92 100644 --- a/modules/styles.py +++ b/modules/styles.py @@ -52,10 +52,12 @@ class StyleDatabase: with open(self.path, "r", encoding="utf-8-sig", newline='') as file: reader = csv.DictReader(file) for row in reader: - # Support loading old CSV format with "name, text"-columns - prompt = row["prompt"] if "prompt" in row else row["text"] - negative_prompt = row.get("negative_prompt", "") - self.styles[row["name"]] = PromptStyle(row["name"], prompt, negative_prompt) + try: + prompt = row["prompt"] if "prompt" in row else row["text"] + negative_prompt = row.get("negative_prompt", "") + self.styles[row["name"]] = PromptStyle(row["name"], prompt, negative_prompt) + except: + pass def get_style_prompts(self, styles): return [self.styles.get(x, self.no_style).prompt for x in styles] From d86b081ed399900f3eeb87d24fdc5e936e3c5aac Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 3 May 2023 08:22:57 -0400 Subject: [PATCH 044/282] update ssl --- installer.py | 1 + modules/lora | 2 +- requirements.txt | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/installer.py b/installer.py index 010ee1980..c51fc10fc 100644 --- a/installer.py +++ b/installer.py @@ -400,6 +400,7 @@ def set_environment(): os.environ.setdefault('GRADIO_ANALYTICS_ENABLED', 'False') os.environ.setdefault('SAFETENSORS_FAST_GPU', '1') os.environ.setdefault('NUMEXPR_MAX_THREADS', '16') + os.environ.setdefault('PYTHONHTTPSVERIFY', '0') if sys.platform == 'darwin': os.environ.setdefault('PYTORCH_ENABLE_MPS_FALLBACK', '1') diff --git a/modules/lora b/modules/lora index b9085fc80..ad5f318d0 160000 --- a/modules/lora +++ b/modules/lora @@ -1 +1 @@ -Subproject commit b9085fc80a618dfec1e92aeda445e6867813635a +Subproject commit ad5f318d066c52e5b27306b399bc87e41f2eef2b diff --git a/requirements.txt b/requirements.txt index 1409e2960..b52d2f05f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -61,3 +61,4 @@ pytorch_lightning==1.9.4 transformers==4.26.1 timm==0.6.13 tomesd==0.1.2 +urllib3==1.24.3 From 660a17a0f9810c13248907b69548399d1cac4da6 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 3 May 2023 08:31:27 -0400 Subject: [PATCH 045/282] update requirements --- modules/ui.py | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ui.py b/modules/ui.py index b893dd880..5fca87597 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -293,7 +293,7 @@ def create_output_panel(tabname, outdir): def create_sampler_and_steps_selection(choices, tabname): with FormRow(elem_id=f"sampler_selection_{tabname}"): sampler_index = gr.Dropdown(label='Sampling method', elem_id=f"{tabname}_sampling", choices=[x.name for x in choices], value="UniPC" if tabname == 'txt2img' else "Euler a", type="index") - steps = gr.Slider(minimum=1, maximum=150, step=1, elem_id=f"{tabname}_steps", label="Sampling steps", value=10 if tabname == 'txt2img' else 20) + steps = gr.Slider(minimum=1, maximum=150, step=1, elem_id=f"{tabname}_steps", label="Sampling steps", value=20) return steps, sampler_index diff --git a/requirements.txt b/requirements.txt index b52d2f05f..032371214 100644 --- a/requirements.txt +++ b/requirements.txt @@ -61,4 +61,4 @@ pytorch_lightning==1.9.4 transformers==4.26.1 timm==0.6.13 tomesd==0.1.2 -urllib3==1.24.3 +urllib3==1.26.15 From b401d9ed3d49153a21ee4af974e76691b7ae2054 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 3 May 2023 08:40:50 -0400 Subject: [PATCH 046/282] fix image temp files --- modules/ui_common.py | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/modules/ui_common.py b/modules/ui_common.py index d823e7d45..a191eb422 100644 --- a/modules/ui_common.py +++ b/modules/ui_common.py @@ -65,13 +65,13 @@ def save_files(js_data, images, do_make_zip, index): for image_index, filedata in enumerate(images, start_index): image = image_from_url_text(filedata) - is_grid = image_index < p.index_of_first_image - i = 0 if is_grid else (image_index - p.index_of_first_image) - if len(p.all_seeds) <= i: - p.all_seeds.append(p.seed) - if len(p.all_prompts) <= i: - p.all_prompts.append(p.prompt) - fullfn, txt_fullfn = modules.images.save_image(image, path, "", seed=p.all_seeds[i], prompt=p.all_prompts[i], extension=extension, info=p.infotexts[image_index], grid=is_grid, p=p, save_to_dirs=save_to_dirs) + is_grid = image_index < p.index_of_first_image # pylint: disable=no-member + i = 0 if is_grid else (image_index - p.index_of_first_image) # pylint: disable=no-member + if len(p.all_seeds) <= i: # pylint: disable=no-member + p.all_seeds.append(p.seed) # pylint: disable=no-member + if len(p.all_prompts) <= i: # pylint: disable=no-member + p.all_prompts.append(p.prompt) # pylint: disable=no-member + fullfn, txt_fullfn = modules.images.save_image(image, path, "", seed=p.all_seeds[i], prompt=p.all_prompts[i], extension=extension, info=p.infotexts[image_index], grid=is_grid, p=p, save_to_dirs=save_to_dirs) # pylint: disable=no-member filename = os.path.relpath(fullfn, path) filenames.append(filename) @@ -96,11 +96,6 @@ def save_files(js_data, images, do_make_zip, index): return gr.File.update(value=fullfns, visible=True), plaintext_to_html(f"Saved: {filenames[0]}") -def initial_image(): - from PIL import Image - img = Image.open('automatic.png') - return [img] - def create_output_panel(tabname, outdir): import modules.generation_parameters_copypaste as parameters_copypaste @@ -125,7 +120,7 @@ def create_output_panel(tabname, outdir): with gr.Column(variant='panel', elem_id=f"{tabname}_results"): with gr.Group(elem_id=f"{tabname}_gallery_container"): - result_gallery = gr.Gallery(initial_image, label='Output', show_label=False, elem_id=f"{tabname}_gallery").style(grid=4) + result_gallery = gr.Gallery(value=['automatic.png'], label='Output', show_label=False, elem_id=f"{tabname}_gallery").style(grid=4) generation_info = None with gr.Column(): From e324e54cfb5cf52b029064aeee156a76a11ab973 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 3 May 2023 10:36:08 -0400 Subject: [PATCH 047/282] set default gallery view --- javascript/black-orange.css | 2 +- modules/ui_common.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript/black-orange.css b/javascript/black-orange.css index 703425ece..51ff3298a 100644 --- a/javascript/black-orange.css +++ b/javascript/black-orange.css @@ -64,7 +64,7 @@ svg.feather.feather-image, .feather .feather-image { display: none } #tab_extensions table thead { background-color: var(--neutral-700); } /* automatic style classes */ -.progressDiv { border-radius: 0 !important; position: fixed; top: 318px; right: 26px; max-width: 262px; height: 48px; z-index: 99; } +.progressDiv { border-radius: 0 !important; position: fixed; top: 44px; right: 26px; max-width: 262px; height: 48px; z-index: 99; box-shadow: var(--button-shadow); } .progressDiv .progress { border-radius: 0 !important; background: var(--highlight-color); line-height: 3rem; height: 48px; } .gallery-item { box-shadow: none !important; } .performance { color: #888; } diff --git a/modules/ui_common.py b/modules/ui_common.py index a191eb422..6dd0f323d 100644 --- a/modules/ui_common.py +++ b/modules/ui_common.py @@ -120,7 +120,7 @@ def create_output_panel(tabname, outdir): with gr.Column(variant='panel', elem_id=f"{tabname}_results"): with gr.Group(elem_id=f"{tabname}_gallery_container"): - result_gallery = gr.Gallery(value=['automatic.png'], label='Output', show_label=False, elem_id=f"{tabname}_gallery").style(grid=4) + result_gallery = gr.Gallery(value=['automatic.png'], label='Output', show_label=False, elem_id=f"{tabname}_gallery").style(preview=False, container=False, columns=[1,2,3,4,5,6]) # <576px, <768px, <992px, <1200px, <1400px, >1400px generation_info = None with gr.Column(): From 7577a095288f89676008009f49ee659c095feddf Mon Sep 17 00:00:00 2001 From: Disty0 Date: Wed, 3 May 2023 18:12:38 +0300 Subject: [PATCH 048/282] Add IPEX Optimizers and use XPU instead of CPU when using IPEX --- modules/devices.py | 6 +++++- modules/sd_models.py | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/devices.py b/modules/devices.py index 8be1e3866..d6442078a 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -111,7 +111,11 @@ def set_cuda_params(): unet_needs_upcast = shared.opts.upcast_sampling -cpu = torch.device("cpu") +from launch import args +if args.use_ipex: + cpu = torch.device("xpu") #Use XPU instead of CPU. %20 Perf improvement on weak CPUs. +else: + cpu = torch.device("cpu") device = device_interrogate = device_gfpgan = device_esrgan = device_codeformer = None dtype = torch.float16 dtype_vae = torch.float16 diff --git a/modules/sd_models.py b/modules/sd_models.py index 812356c94..a2615afd2 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -398,6 +398,9 @@ def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None) sd_hijack.model_hijack.hijack(sd_model) timer.record("hijack") sd_model.eval() + if shared.cmd_opts.use_ipex: + sd_model = torch.xpu.optimize(sd_model, dtype=devices.dtype) + shared.log.info("Applied IPEX Optimize") shared.sd_model = sd_model sd_hijack.model_hijack.embedding_db.load_textual_inversion_embeddings(force_reload=True) # Reload embeddings after model load as they may or may not fit the model timer.record("embeddings") From 53f35672241f764f5f01077f62b5cb0fb3aa4b8b Mon Sep 17 00:00:00 2001 From: Disty0 Date: Wed, 3 May 2023 21:25:23 +0300 Subject: [PATCH 049/282] Use cmd_args parser instead of launch.py --- modules/devices.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/devices.py b/modules/devices.py index d6442078a..4db77cb96 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -111,9 +111,11 @@ def set_cuda_params(): unet_needs_upcast = shared.opts.upcast_sampling -from launch import args +from modules.cmd_args import parser +args = parser.parse_args() if args.use_ipex: cpu = torch.device("xpu") #Use XPU instead of CPU. %20 Perf improvement on weak CPUs. + print("Using XPU instead of CPU.") else: cpu = torch.device("cpu") device = device_interrogate = device_gfpgan = device_esrgan = device_codeformer = None From 8cbce7ea199173a07f4b2716fc2b81d4ffc53f05 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 3 May 2023 11:56:32 -0400 Subject: [PATCH 050/282] add version flag --- installer.py | 14 ++++++++++---- launch.py | 8 ++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/installer.py b/installer.py index c51fc10fc..6169857e0 100644 --- a/installer.py +++ b/installer.py @@ -211,7 +211,7 @@ def check_torch(): log.info('Using CPU-only Torch') torch_command = os.environ.get('TORCH_COMMAND', 'torch torchaudio torchvision') xformers_package = os.environ.get('XFORMERS_PACKAGE', 'none') - if 'torch' in torch_command: + if 'torch' in torch_command and not args.version: install(torch_command, 'torch torchvision torchaudio') try: import torch @@ -243,6 +243,8 @@ def check_torch(): except Exception as e: log.error(f'Could not load torch: {e}') exit(1) + if args.version: + return try: if 'xformers' in xformers_package: install(f'--no-deps {xformers_package}', ignore=True) @@ -429,7 +431,7 @@ def check_extensions(): # check version of the main repo and optionally upgrade it -def check_version(): +def check_version(offline=False): if not os.path.exists('.git'): log.error('Not a git repository') exit(1) @@ -439,12 +441,14 @@ def check_version(): # exit(1) ver = git('log -1 --pretty=format:"%h %ad"') log.info(f'Version: {ver}') + if args.version: + return commit = git('rev-parse HEAD') try: import requests except ImportError: return - logging.getLogger("urllib3").setLevel(logging.WARNING) + logging.getLogger("urllib3").setLevel(logging.ERROR) commits = None try: commits = requests.get('https://api.github.com/repos/vladmandic/automatic/branches/master', timeout=10).json() @@ -521,7 +525,8 @@ def add_args(): group.add_argument('--skip-extensions', default = False, action='store_true', help = "Skips running individual extension installers, default: %(default)s") group.add_argument('--skip-git', default = False, action='store_true', help = "Skips running all GIT operations, default: %(default)s") group.add_argument('--experimental', default = False, action='store_true', help = "Allow unsupported versions of libraries, default: %(default)s") - group.add_argument('--test', default = False, action='store_true', help = "Run test only, default: %(default)s") + group.add_argument('--test', default = False, action='store_true', help = "Run test only and exit") + group.add_argument('--version', default = False, action='store_true', help = "Print version information") def parse_args(): @@ -567,6 +572,7 @@ def read_options(): # entry method when used as module def run_setup(): setup_logging(args.upgrade) + log.info('Starting SD.Next') read_options() check_python() if args.reset: diff --git a/launch.py b/launch.py index 4dece79ea..7646dd8c2 100644 --- a/launch.py +++ b/launch.py @@ -92,6 +92,14 @@ def run_extension_installer(ext_dir): installer.run_extension_installer(ext_dir) if __name__ == "__main__": + if args.version: + installer.add_args() + installer.setup_logging(clean=False) + installer.log.info('SD.Next version information') + installer.check_python() + installer.check_version() + installer.check_torch() + exit(0) installer.run_setup() installer.extensions_preload(force=True) installer.log.info(f"Server arguments: {sys.argv[1:]}") From 0af6c70b94a6401bd59d3b4dd9b6de4cdd94079e Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 3 May 2023 14:29:07 -0400 Subject: [PATCH 051/282] add notifications --- installer.py | 2 +- javascript/notification.js | 30 +++++++++++++++--------------- javascript/progressbar.js | 7 ++++--- modules/ui.py | 2 +- wiki | 2 +- 5 files changed, 22 insertions(+), 21 deletions(-) diff --git a/installer.py b/installer.py index 6169857e0..a5501529d 100644 --- a/installer.py +++ b/installer.py @@ -11,7 +11,7 @@ try: from modules.cmd_args import parser except: import argparse - parser = argparse.ArgumentParser(description="Stable Diffusion", conflict_handler='resolve', formatter_class=lambda prog: argparse.HelpFormatter(prog, max_help_position=55, indent_increment=2, width=200)) + parser = argparse.ArgumentParser(description="SD.Next", conflict_handler='resolve', formatter_class=lambda prog: argparse.HelpFormatter(prog, max_help_position=55, indent_increment=2, width=200)) class Dot(dict): # dot notation access to dictionary attributes __getattr__ = dict.get diff --git a/javascript/notification.js b/javascript/notification.js index 712d64258..d443d5474 100644 --- a/javascript/notification.js +++ b/javascript/notification.js @@ -2,32 +2,32 @@ let lastHeadImg = null; let notificationButton = null; -const regExpTempImage = /(?<=\/|\\)tmp[\w\d]{8}\.png$/gm; onUiUpdate(function(){ - if(notificationButton == null){ - notificationButton = gradioApp().getElementById('request_notifications') - if (notificationButton != null) notificationButton.addEventListener('click', (evt) => Notification.requestPermission(), true); + if (!notificationButton) { + notificationButton = gradioApp().getElementById('request_notifications') + if (notificationButton) notificationButton.addEventListener('click', (evt) => Notification.requestPermission(), true); } const galleryPreviews = gradioApp().querySelectorAll('div[id^="tab_"][style*="display: block"] div[id$="_results"] .thumbnail-item > img'); - if (galleryPreviews == null) return; - const headImg = galleryPreviews[0]?.src; - if (headImg == null || headImg == lastHeadImg) return; - if (headImg.search(regExpTempImage) != -1) return; - lastHeadImg = headImg; - // play notification sound if available + if (!galleryPreviews) return; + + if (document.hasFocus()) return; // window is in focus so don't send notifications + const audioNotification = gradioApp().querySelector('#audio_notification audio'); if (audioNotification) audioNotification.play(); - if (document.hasFocus()) return; - // Multiple copies of the images are in the DOM when one is selected. Dedup with a Set to get the real number generated. - const imgs = new Set(Array.from(galleryPreviews).map(img => img.src)); + + const headImg = galleryPreviews[0]?.src; + if (!headImg || headImg == lastHeadImg || headImg.endsWith('automatic.png')) return; + lastHeadImg = headImg; + console.log(headImg) + const imgs = new Set(Array.from(galleryPreviews).map(img => img.src)); // Multiple copies of the images are in the DOM when one is selected const notification = new Notification( - 'Stable Diffusion', { + 'SD.Next', { body: `Generated ${imgs.size > 1 ? imgs.size - opts.return_grid : 1} image${imgs.size > 1 ? 's' : ''}`, icon: headImg, image: headImg } ); - notification.onclick = function(_) { + notification.onclick = () => { parent.focus(); this.close(); }; diff --git a/javascript/progressbar.js b/javascript/progressbar.js index 7d218ff05..1eb49c35a 100644 --- a/javascript/progressbar.js +++ b/javascript/progressbar.js @@ -37,9 +37,10 @@ function formatTime(secs) { } function setTitle(progress) { - var title = 'Stable Diffusion' - if(opts.show_progress_in_title && progress) title = '[' + progress.trim() + '] ' + title; - if(document.title != title) document.title = title; + var title = 'SD.Next' + console.log('progress:', progress) + if (progress) title += ' ' + progress.split(' ')[0].trim(); + if (document.title != title) document.title = title; } function randomId() { diff --git a/modules/ui.py b/modules/ui.py index 5fca87597..412fafbee 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1368,7 +1368,7 @@ def create_ui(): for _interface, label, _ifid in interfaces: shared.tab_names.append(label) - with gr.Blocks(theme=shared.gradio_theme, analytics_enabled=False, title="Stable Diffusion") as demo: + with gr.Blocks(theme=shared.gradio_theme, analytics_enabled=False, title="SD.Next") as demo: with gr.Row(elem_id="quicksettings", variant="compact"): for i, k, item in sorted(quicksettings_list, key=lambda x: quicksettings_names.get(x[1], x[0])): component = create_setting_component(k, is_quicksettings=True) diff --git a/wiki b/wiki index ab46c9f35..fad4a1168 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit ab46c9f3583bbd155623fd7d59a969a353aa96be +Subproject commit fad4a11686c93951f9b6a8a4f847c7915f708118 From 5d8c787a7bee2a5ac0ae5e3ee91fe9c6e371bfa2 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 3 May 2023 17:20:22 -0400 Subject: [PATCH 052/282] restart server redesign --- extensions-builtin/sd-webui-controlnet | 2 +- .../stable-diffusion-webui-images-browser | 2 +- javascript/progressbar.js | 1 - javascript/ui.js | 30 ++++++- launch.py | 81 ++++++++++++++----- modules/devices.py | 15 ++-- modules/mac_specific.py | 12 +-- modules/scripts.py | 3 +- modules/shared.py | 9 ++- modules/ui.py | 17 ++-- webui.py | 23 +----- 11 files changed, 117 insertions(+), 78 deletions(-) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 8fd1fcdc5..23c0c8030 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 8fd1fcdc536792a957fc4734636765550edbbfcc +Subproject commit 23c0c80306861c1b90a9025dd1f52d3810a3c0d5 diff --git a/extensions-builtin/stable-diffusion-webui-images-browser b/extensions-builtin/stable-diffusion-webui-images-browser index a396a9f90..2f5bbd88e 160000 --- a/extensions-builtin/stable-diffusion-webui-images-browser +++ b/extensions-builtin/stable-diffusion-webui-images-browser @@ -1 +1 @@ -Subproject commit a396a9f90c6cd2fbd16fd2dc5aef3d210491bbc6 +Subproject commit 2f5bbd88e814d446f873ebfa1a752864cfd1cc53 diff --git a/javascript/progressbar.js b/javascript/progressbar.js index 1eb49c35a..09c7539cf 100644 --- a/javascript/progressbar.js +++ b/javascript/progressbar.js @@ -38,7 +38,6 @@ function formatTime(secs) { function setTitle(progress) { var title = 'SD.Next' - console.log('progress:', progress) if (progress) title += ' ' + progress.split(' ')[0].trim(); if (document.title != title) document.title = title; } diff --git a/javascript/ui.js b/javascript/ui.js index db8e1f381..e5781767a 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -277,9 +277,33 @@ function update_token_counter(button_id) { token_timeouts[button_id] = setTimeout(() => gradioApp().getElementById(button_id)?.click(), wait_time); } +function monitor_server_status() { + document.open(); + document.write(` + + SD.Next + +

Waiting for server...

+ + + + `); + document.close(); +} + function restart_reload(){ - document.body.innerHTML='

Reloading...

'; - setTimeout(function(){location.reload()},8000) + document.body.style = "background: #222222; font-size: 1rem; font-family:monospace; margin-top:20%; color:lightgray; text-align:center" + document.body.innerHTML = "

Server shutdown in progress...

" + fetch('http://127.0.0.1:7860/sdapi/v1/progress') + .then((res) => setTimeout(restart_reload, 1000)) + .catch((e) => setTimeout(monitor_server_status, 500)) return [] } @@ -307,7 +331,7 @@ function create_theme_element() { } function preview_theme() { - const name = gradioApp().getElementById('setting_gradio_theme').querySelectorAll('span')[1].innerText; // ugly but we want current value without the need to set apply + const name = gradioApp().getElementById('setting_gradio_theme').querySelectorAll('input')?.[0].value || ''; if (name === 'black-orange' || name.startsWith('gradio/')) { el = document.getElementById('theme-preview') || create_theme_element(); el.style.display = el.style.display === 'block' ? 'none' : 'block'; diff --git a/launch.py b/launch.py index 7646dd8c2..29c6f90ef 100644 --- a/launch.py +++ b/launch.py @@ -1,10 +1,9 @@ -### majority of this file is superflous, but used by some extensions as helpers during extension installation - -import subprocess import os import sys +import time import shlex import logging +import subprocess commandline_args = os.environ.get('COMMANDLINE_ARGS', "") sys.argv += shlex.split(commandline_args) @@ -28,7 +27,7 @@ python = sys.executable # used by some extensions to run python skip_install = False # parsed by some extensions -def commit_hash(): +def commit_hash(): # compatbility function global stored_commit_hash # pylint: disable=global-statement if stored_commit_hash is not None: return stored_commit_hash @@ -39,7 +38,7 @@ def commit_hash(): return stored_commit_hash -def run(command, desc=None, errdesc=None, custom_env=None, live=False): +def run(command, desc=None, errdesc=None, custom_env=None, live=False): # compatbility function if desc is not None: installer.log.info(desc) if live: @@ -56,41 +55,74 @@ def run(command, desc=None, errdesc=None, custom_env=None, live=False): return result.stdout.decode(encoding="utf8", errors="ignore") -def check_run(command): +def check_run(command): # compatbility function result = subprocess.run(command, check=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) return result.returncode == 0 -def is_installed(package): +def is_installed(package): # compatbility function return installer.installed(package) -def repo_dir(name): +def repo_dir(name): # compatbility function return os.path.join(script_path, dir_repos, name) -def run_python(code, desc=None, errdesc=None): +def run_python(code, desc=None, errdesc=None): # compatbility function return run(f'"{sys.executable}" -c "{code}"', desc, errdesc) -def run_pip(pkg, desc=None): +def run_pip(pkg, desc=None): # compatbility function if desc is None: desc = pkg index_url_line = f' --index-url {index_url}' if index_url != '' else '' return run(f'"{sys.executable}" -m pip {pkg} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}") -def check_run_python(code): +def check_run_python(code): # compatbility function return check_run(f'"{sys.executable}" -c "{code}"') -def git_clone(url, tgt, _name, commithash=None): +def git_clone(url, tgt, _name, commithash=None): # compatbility function installer.clone(url, tgt, commithash) -def run_extension_installer(ext_dir): +def run_extension_installer(ext_dir): # compatbility function installer.run_extension_installer(ext_dir) + +def get_memory_stats(): + import psutil + def gb(val: float): + return round(val / 1024 / 1024 / 1024, 2) + process = psutil.Process(os.getpid()) + res = process.memory_info() + ram_total = 100 * res.rss / process.memory_percent() + return f'used: {gb(res.rss)} total: {gb(ram_total)}' + + +def start_server(immediate=True, server=None): + import gc + import importlib.util + collected = 0 + if server is not None: + server = None + collected = gc.collect() + if not immediate: + time.sleep(3) + installer.log.debug(f'Memory {get_memory_stats()} Collected {collected}') + module_spec = importlib.util.spec_from_file_location('webui', 'webui.py') + server = importlib.util.module_from_spec(module_spec) + module_spec.loader.exec_module(server) + if args.test: + installer.log.info("Test only") + server.wants_restart = False + else: + server = server.webui() + installer.log.info(f'Memory {get_memory_stats()}') + return server + + if __name__ == "__main__": if args.version: installer.add_args() @@ -105,9 +137,20 @@ if __name__ == "__main__": installer.log.info(f"Server arguments: {sys.argv[1:]}") installer.log.debug('Starting WebUI') logging.disable(logging.NOTSET if args.debug else logging.DEBUG) - if args.test: - installer.log.info("Test only") - import webui - exit(0) - import webui - webui.webui() + + instance = start_server(immediate=True, server=None) + while True: + try: + alive = instance.thread.is_alive() + except: + alive = False + if round(time.time()) % 30 == 0: + installer.log.debug(f'Server alive: {alive} Memory {get_memory_stats()}') + if not alive: + if instance.wants_restart: + installer.log.info('Server restarting...') + instance = start_server(immediate=False, server=instance) + else: + installer.log.info('Exiting...') + break + time.sleep(1) diff --git a/modules/devices.py b/modules/devices.py index 4db77cb96..529f75152 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -1,14 +1,14 @@ import sys import contextlib import torch -from modules import shared +from modules import cmd_args, shared try: - import intel_extension_for_pytorch as ipex + import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import except: pass if sys.platform == "darwin": - from modules import mac_specific + from modules import mac_specific # pylint: disable=ungrouped-imports def has_mps() -> bool: @@ -17,11 +17,10 @@ def has_mps() -> bool: else: return mac_specific.has_mps -def extract_device_id(args, name): +def extract_device_id(args, name): # pylint: disable=redefined-outer-name for x in range(len(args)): if name in args[x]: return args[x + 1] - return None @@ -48,7 +47,7 @@ def get_optimal_device_name(): if has_mps(): return "mps" try: - import torch_directml + import torch_directml # pylint: disable=import-error if torch_directml.is_available(): return get_dml_device_string() else: @@ -110,9 +109,7 @@ def set_cuda_params(): dtype_vae = torch.float32 unet_needs_upcast = shared.opts.upcast_sampling - -from modules.cmd_args import parser -args = parser.parse_args() +args = cmd_args.parser.parse_args() if args.use_ipex: cpu = torch.device("xpu") #Use XPU instead of CPU. %20 Perf improvement on weak CPUs. print("Using XPU instead of CPU.") diff --git a/modules/mac_specific.py b/modules/mac_specific.py index 2455800d5..4c5efa544 100644 --- a/modules/mac_specific.py +++ b/modules/mac_specific.py @@ -1,11 +1,11 @@ +import platform +from packaging import version import torch try: - import intel_extension_for_pytorch as ipex + import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import except: pass -import platform from modules.sd_hijack_utils import CondFunc -from packaging import version # has_mps is only available in nightly pytorch (for now) and macOS 12.3+. @@ -22,7 +22,7 @@ has_mps = check_for_mps() # MPS workaround for https://github.com/pytorch/pytorch/issues/89784 -def cumsum_fix(input, cumsum_func, *args, **kwargs): +def cumsum_fix(input, cumsum_func, *args, **kwargs): # pylint: disable=redefined-builtin if input.device.type == 'mps': output_dtype = kwargs.get('dtype', input.dtype) if output_dtype == torch.int64: @@ -46,14 +46,14 @@ if has_mps: # MPS workaround for https://github.com/pytorch/pytorch/issues/79383 CondFunc('torch.Tensor.to', lambda orig_func, self, *args, **kwargs: orig_func(self.contiguous(), *args, **kwargs), lambda _, self, *args, **kwargs: self.device.type != 'mps' and (args and isinstance(args[0], torch.device) and args[0].type == 'mps' or isinstance(kwargs.get('device'), torch.device) and kwargs['device'].type == 'mps')) - # MPS workaround for https://github.com/pytorch/pytorch/issues/80800 + # MPS workaround for https://github.com/pytorch/pytorch/issues/80800 CondFunc('torch.nn.functional.layer_norm', lambda orig_func, *args, **kwargs: orig_func(*([args[0].contiguous()] + list(args[1:])), **kwargs), lambda _, *args, **kwargs: args and isinstance(args[0], torch.Tensor) and args[0].device.type == 'mps') # MPS workaround for https://github.com/pytorch/pytorch/issues/90532 CondFunc('torch.Tensor.numpy', lambda orig_func, self, *args, **kwargs: orig_func(self.detach(), *args, **kwargs), lambda _, self, *args, **kwargs: self.requires_grad) elif version.parse(torch.__version__) > version.parse("1.13.1"): cumsum_needs_int_fix = not torch.Tensor([1,2]).to(torch.device("mps")).equal(torch.ShortTensor([1,1]).to(torch.device("mps")).cumsum(0)) - cumsum_fix_func = lambda orig_func, input, *args, **kwargs: cumsum_fix(input, orig_func, *args, **kwargs) + cumsum_fix_func = lambda orig_func, input, *args, **kwargs: cumsum_fix(input, orig_func, *args, **kwargs) # pylint: disable=unnecessary-lambda-assignment CondFunc('torch.cumsum', cumsum_fix_func, None) CondFunc('torch.Tensor.cumsum', cumsum_fix_func, None) CondFunc('torch.narrow', lambda orig_func, *args, **kwargs: orig_func(*args, **kwargs).clone(), None) diff --git a/modules/scripts.py b/modules/scripts.py index 47da0309b..1f244c66c 100644 --- a/modules/scripts.py +++ b/modules/scripts.py @@ -4,7 +4,6 @@ import sys from collections import namedtuple import gradio as gr from modules import paths, script_callbacks, extensions, script_loading, scripts_postprocessing, errors -from installer import log AlwaysVisible = object() @@ -219,7 +218,7 @@ def load_scripts(): for _key, script_class in module.__dict__.items(): if type(script_class) != type: continue - log.debug(f'Registering script: {scriptfile.path}') + # log.debug(f'Registering script: {scriptfile.path}') if issubclass(script_class, Script): scripts_data.append(ScriptClassData(script_class, scriptfile.path, scriptfile.basedir, module)) elif issubclass(script_class, scripts_postprocessing.ScriptPostprocessing): diff --git a/modules/shared.py b/modules/shared.py index 3c74d0b99..682fe9fef 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -697,19 +697,20 @@ mem_mon = modules.memmon.MemUsageMonitor("MemMon", device, opts) mem_mon.start() -def restart_server(): +def restart_server(restart=True): if demo is None: return + log.info('Server shutdown requested') try: - import logging - log.setLevel(logging.DEBUG if cmd_opts.debug else logging.CRITICAL) + demo.server.wants_restart = restart demo.server.should_exit = True demo.server.force_exit = True demo.close(verbose=False) demo.server.close() except: pass - log.info('Server shutdown') + if restart: + log.info('Server will restart') def listfiles(dirname): diff --git a/modules/ui.py b/modules/ui.py index 412fafbee..32cb6a216 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1229,38 +1229,32 @@ def create_ui(): def run_settings(*args): changed = [] - for key, value, comp in zip(opts.data_labels.keys(), args, components): assert comp == dummy_component or opts.same_type(value, opts.data_labels[key].default), f"Bad value for setting {key}: {value}; expecting {type(opts.data_labels[key].default).__name__}" - for key, value, comp in zip(opts.data_labels.keys(), args, components): if comp == dummy_component: continue - if opts.set(key, value): changed.append(key) - try: opts.save(shared.config_filename) except RuntimeError: - return opts.dumpjson(), f'{len(changed)} settings changed without save: {", ".join(changed)}.' - return opts.dumpjson(), f'{len(changed)} settings changed{": " if len(changed) > 0 else ""}{", ".join(changed)}.' + return opts.dumpjson(), f'{len(changed)} Settings changed without save: {", ".join(changed)}' + return opts.dumpjson(), f'{len(changed)} Settings changed{": " if len(changed) > 0 else ""}{", ".join(changed)}' def run_settings_single(value, key): if not opts.same_type(value, opts.data_labels[key].default): return gr.update(visible=True), opts.dumpjson() - if not opts.set(key, value): return gr.update(value=getattr(opts, key)), opts.dumpjson() - opts.save(shared.config_filename) - return get_value_for_setting(key), opts.dumpjson() with gr.Blocks(analytics_enabled=False) as settings_interface: with gr.Row(): settings_submit = gr.Button(value="Apply settings", variant='primary', elem_id="settings_submit") - restart_submit = gr.Button(value="Restart UI", variant='primary', elem_id="restart_submit") + restart_submit = gr.Button(value="Restart server", variant='primary', elem_id="restart_submit") + shutdown_submit = gr.Button(value="Shutdown server", variant='primary', elem_id="shutdown_submit") preview_theme = gr.Button(value="Preview theme", variant='primary', elem_id="settings_preview_theme") unload_sd_model = gr.Button(value='Unload checkpoint', variant='primary', elem_id="sett_unload_sd_model") reload_sd_model = gr.Button(value='Reload checkpoint', variant='primary', elem_id="sett_reload_sd_model") @@ -1392,7 +1386,8 @@ def create_ui(): inputs=components, outputs=[text_settings, result], ) - restart_submit.click(fn=shared.restart_server, _js="restart_reload") + restart_submit.click(fn=lambda x: shared.restart_server(restart=True), _js="restart_reload") + shutdown_submit.click(fn=lambda x: shared.restart_server(restart=False), _js="restart_reload") for i, k, item in quicksettings_list: component = component_dict[k] diff --git a/webui.py b/webui.py index 5b2157f0d..5309aa7df 100644 --- a/webui.py +++ b/webui.py @@ -1,7 +1,6 @@ import os import re import sys -import time import signal import asyncio import logging @@ -226,6 +225,7 @@ def start_ui(): show_api=True, favicon_path='automatic.ico', ) + shared.demo.server.wants_restart = False setup_middleware(app, cmd_opts) cmd_opts.autolaunch = False @@ -244,26 +244,7 @@ def webui(): start_ui() load_model() log.info(f"Startup time: {startup_timer.summary()}") - - while True: - try: - alive = shared.demo.server.thread.is_alive() - except: - alive = False - if not alive: - log.warning('Server restart') - startup_timer.reset() - start_ui() - log.info(f"Startup time: {startup_timer.summary()}") - time.sleep(1) - - """ - import sys - import types - from modules.paths_internal import script_path - libs = [name for name, m in sys.modules.items() if isinstance(m, types.ModuleType) and (getattr(m, '__file__', '') or '').startswith(script_path)] - print(libs) - """ + return shared.demo.server if __name__ == "__main__": From ba3a0827da1efe41b09ac070ab83b53f65bb9939 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 3 May 2023 18:14:13 -0400 Subject: [PATCH 053/282] minor formatting updates --- modules/call_queue.py | 7 ++----- modules/shared.py | 2 +- modules/ui.py | 2 +- wiki | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/modules/call_queue.py b/modules/call_queue.py index 479f6bffc..f8c4a9ce7 100644 --- a/modules/call_queue.py +++ b/modules/call_queue.py @@ -93,14 +93,11 @@ def wrap_gradio_call(func, extra_outputs=None, add_stats=False): reserved_peak = mem_stats['reserved_peak'] sys_peak = mem_stats['system_peak'] sys_total = mem_stats['total'] - sys_pct = round(sys_peak/max(sys_total, 1) * 100, 2) - - vram_html = f"

Torch active/reserved: {active_peak}/{reserved_peak} MiB, Sys VRAM: {sys_peak}/{sys_total} MiB ({sys_pct}%)

" + vram_html = f" |

GPU active {active_peak} MB reserved {reserved_peak} MB | System peak {sys_peak} MB total {sys_total} MB

" else: vram_html = '' - # last item is always HTML - res[-1] += f"

Time taken: {elapsed_text}

{vram_html}
" + res[-1] += f"

Time taken: {elapsed_text}

{vram_html}
" return tuple(res) diff --git a/modules/shared.py b/modules/shared.py index 682fe9fef..012c0af31 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -245,7 +245,7 @@ options_templates.update(options_section(('sd', "Stable Diffusion"), { "img2img_background_color": OptionInfo("#ffffff", "With img2img fill image's transparent parts with this color", ui_components.FormColorPicker, {}), "enable_quantization": OptionInfo(True, "Enable quantization in K samplers for sharper and cleaner results"), "comma_padding_backtrack": OptionInfo(20, "Increase coherency by padding from the last comma within n tokens when using more than 75 tokens", gr.Slider, {"minimum": 0, "maximum": 74, "step": 1 }), - "CLIP_stop_at_last_layers": OptionInfo(1, "Clip skip", gr.Slider, {"minimum": 1, "maximum": 12, "step": 1, "visible": False}), + "CLIP_stop_at_last_layers": OptionInfo(1, "Clip skip", gr.Slider, {"minimum": 1, "maximum": 8, "step": 1, "visible": False}), "upcast_attn": OptionInfo(False, "Upcast cross attention layer to float32"), "cross_attention_optimization": OptionInfo("Sub-quadratic" if is_device_dml else "Scaled-Dot-Product", "Cross-attention optimization method", gr.Radio, lambda: {"choices": shared_items.list_crossattention() }), "cross_attention_options": OptionInfo([], "Cross-attention advanced options", gr.CheckboxGroup, lambda: {"choices": ['xFormers enable flash Attention', 'SDP disable memory attention']}), diff --git a/modules/ui.py b/modules/ui.py index 32cb6a216..6d8054a3c 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -623,7 +623,7 @@ def create_ui(): cfg_scale = gr.Slider(minimum=1.0, maximum=30.0, step=0.5, label='CFG Scale', value=6.0, elem_id="img2img_cfg_scale") image_cfg_scale = gr.Slider(minimum=0, maximum=3.0, step=0.05, label='Image CFG Scale', value=1.5, elem_id="img2img_image_cfg_scale", visible=shared.sd_model and shared.sd_model.cond_stage_key == "edit") denoising_strength = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label='Denoising strength', value=0.75, elem_id="img2img_denoising_strength") - clip_skip = gr.Slider(label='CLIP Skip', value=1, minimum=1, maximum=4, step=1, elem_id='img2img_clip_skip', interactive=True) + clip_skip = gr.Slider(label='CLIP Skip', value=shared.opts.CLIP_stop_at_last_layers, minimum=1, maximum=4, step=1, elem_id='img2img_clip_skip', interactive=True) clip_skip.change(fn=change_clip_skip, show_progress=False, inputs=clip_skip) elif category == "seed": diff --git a/wiki b/wiki index fad4a1168..df283d4f7 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit fad4a11686c93951f9b6a8a4f847c7915f708118 +Subproject commit df283d4f766c139d59fa00230b9975d5cdcaa91c From e7b88e6a50c06b7c9bdbc2b2d1b1724325b34745 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 3 May 2023 18:40:34 -0400 Subject: [PATCH 054/282] fix notifications --- javascript/notification.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/javascript/notification.js b/javascript/notification.js index d443d5474..517cb42c1 100644 --- a/javascript/notification.js +++ b/javascript/notification.js @@ -8,18 +8,14 @@ onUiUpdate(function(){ notificationButton = gradioApp().getElementById('request_notifications') if (notificationButton) notificationButton.addEventListener('click', (evt) => Notification.requestPermission(), true); } + if (document.hasFocus()) return; // window is in focus so don't send notifications const galleryPreviews = gradioApp().querySelectorAll('div[id^="tab_"][style*="display: block"] div[id$="_results"] .thumbnail-item > img'); if (!galleryPreviews) return; - - if (document.hasFocus()) return; // window is in focus so don't send notifications - - const audioNotification = gradioApp().querySelector('#audio_notification audio'); - if (audioNotification) audioNotification.play(); - const headImg = galleryPreviews[0]?.src; if (!headImg || headImg == lastHeadImg || headImg.endsWith('automatic.png')) return; + const audioNotification = gradioApp().querySelector('#audio_notification audio'); + if (audioNotification) audioNotification.play(); lastHeadImg = headImg; - console.log(headImg) const imgs = new Set(Array.from(galleryPreviews).map(img => img.src)); // Multiple copies of the images are in the DOM when one is selected const notification = new Notification( 'SD.Next', { From 65f0ba43fd436fced600dff347c8e1ab4447f890 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 3 May 2023 19:11:39 -0400 Subject: [PATCH 055/282] update gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 26240bd12..b1a2ad517 100644 --- a/.gitignore +++ b/.gitignore @@ -27,7 +27,7 @@ venv /*.bat /*.sh /*.txt -/notification.mp3 +/*.mp3 !webui.bat !webui.sh From e0543e4475b6de07fb40a03ccad413a5bbd2397f Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 3 May 2023 19:15:18 -0400 Subject: [PATCH 056/282] add ignore flag --- installer.py | 16 +++++++++++----- wiki | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/installer.py b/installer.py index a5501529d..c3601de10 100644 --- a/installer.py +++ b/installer.py @@ -176,11 +176,13 @@ def check_python(): log.info(f'Python {platform.python_version()} on {platform.system()}') if not (int(sys.version_info.major) == 3 and int(sys.version_info.minor) in supported_minors): log.error(f"Incompatible Python version: {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro} required 3.{supported_minors}") - exit(1) + if not args.ignore: + exit(1) git_cmd = os.environ.get('GIT', "git") if shutil.which(git_cmd) is None: log.error('Git not found') - exit(1) + if not args.ignore: + exit(1) else: git_version = git('--version', folder=None, ignore=False) log.debug(f'Git {git_version.replace("git version", "").strip()}') @@ -242,7 +244,8 @@ def check_torch(): log.warning("Torch repoorts CUDA not available") except Exception as e: log.error(f'Could not load torch: {e}') - exit(1) + if not args.ignore: + exit(1) if args.version: return try: @@ -434,7 +437,8 @@ def check_extensions(): def check_version(offline=False): if not os.path.exists('.git'): log.error('Not a git repository') - exit(1) + if not args.ignore: + exit(1) _status = git('status') # if 'branch' not in status: # log.error('Cannot get git repository status') @@ -498,7 +502,8 @@ def check_timestamp(): version_time = int(git('log -1 --pretty=format:"%at"')) except Exception as e: log.error(f'Error getting local repository version: {e}') - exit(1) + if not args.ignore: + exit(1) log.debug(f'Repository update time: {time.ctime(int(version_time))}') if setup_time == -1: return False @@ -527,6 +532,7 @@ def add_args(): group.add_argument('--experimental', default = False, action='store_true', help = "Allow unsupported versions of libraries, default: %(default)s") group.add_argument('--test', default = False, action='store_true', help = "Run test only and exit") group.add_argument('--version', default = False, action='store_true', help = "Print version information") + group.add_argument('--ignore', default = False, action='store_true', help = "Ignore any errors and attempt to continue") def parse_args(): diff --git a/wiki b/wiki index df283d4f7..d9ab45ee1 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit df283d4f766c139d59fa00230b9975d5cdcaa91c +Subproject commit d9ab45ee180f2b79a904830c3781f212d49af981 From 8171d57c367c1c1b57017f7c4661977fd1703501 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Thu, 4 May 2023 02:33:17 +0300 Subject: [PATCH 057/282] Remove unnecessary IPEX imports --- modules/api/api.py | 1 - modules/codeformer/codeformer_arch.py | 4 ---- modules/codeformer/vqgan_arch.py | 4 ---- modules/codeformer_model.py | 4 ---- modules/deepbooru.py | 4 ---- modules/deepbooru_model.py | 4 ---- modules/devices.py | 4 ---- modules/esrgan_model.py | 4 ---- modules/esrgan_model_arch.py | 4 ---- modules/extras.py | 4 ---- modules/hypernetworks/hypernetwork.py | 4 ---- modules/interrogate.py | 4 ---- modules/lowvram.py | 4 ---- modules/mac_specific.py | 4 ---- modules/memmon.py | 5 ----- modules/models/diffusion/ddpm_edit.py | 4 ---- modules/models/diffusion/uni_pc/sampler.py | 4 ---- modules/models/diffusion/uni_pc/uni_pc.py | 4 ---- modules/processing.py | 4 ---- modules/prompt_parser.py | 4 ---- modules/safe.py | 4 ---- modules/sd_disable_initialization.py | 4 ---- modules/sd_hijack.py | 4 ---- modules/sd_hijack_clip.py | 4 ---- modules/sd_hijack_inpainting.py | 4 ---- modules/sd_hijack_open_clip.py | 4 ---- modules/sd_hijack_optimizations.py | 4 ---- modules/sd_hijack_unet.py | 4 ---- modules/sd_hijack_xlmr.py | 4 ---- modules/sd_models.py | 4 ---- modules/sd_models_config.py | 4 ---- modules/sd_samplers_common.py | 4 ---- modules/sd_samplers_compvis.py | 4 ---- modules/sd_samplers_kdiffusion.py | 4 ---- modules/sd_vae.py | 5 ----- modules/sd_vae_approx.py | 4 ---- modules/sub_quadratic_attention.py | 4 ---- modules/textual_inversion/dataset.py | 4 ---- modules/textual_inversion/image_embedding.py | 4 ---- modules/textual_inversion/textual_inversion.py | 4 ---- modules/xlmr.py | 4 ---- 41 files changed, 163 deletions(-) diff --git a/modules/api/api.py b/modules/api/api.py index fa8110469..28ccff02f 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -583,7 +583,6 @@ class Api: try: import torch if shared.cmd_opts.use_ipex(): - import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import system = { 'free': (torch.xpu.get_device_properties("xpu").total_memory - torch.xpu.memory_allocated()), 'used': torch.xpu.memory_allocated(), 'total': torch.xpu.get_device_properties("xpu").total_memory } s = dict(torch.xpu.memory_stats("xpu")) allocated = { 'current': s['allocated_bytes.all.current'], 'peak': s['allocated_bytes.all.peak'] } diff --git a/modules/codeformer/codeformer_arch.py b/modules/codeformer/codeformer_arch.py index 6d7b926fe..11dcc3ee7 100644 --- a/modules/codeformer/codeformer_arch.py +++ b/modules/codeformer/codeformer_arch.py @@ -3,10 +3,6 @@ import math import numpy as np import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass from torch import nn, Tensor import torch.nn.functional as F from typing import Optional, List diff --git a/modules/codeformer/vqgan_arch.py b/modules/codeformer/vqgan_arch.py index e66bb2a72..e72936838 100644 --- a/modules/codeformer/vqgan_arch.py +++ b/modules/codeformer/vqgan_arch.py @@ -7,10 +7,6 @@ https://github.com/samb-t/unleashing-transformers/blob/master/models/vqgan.py ''' import numpy as np import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass import torch.nn as nn import torch.nn.functional as F import copy diff --git a/modules/codeformer_model.py b/modules/codeformer_model.py index 9d75e823d..c2b0689ba 100644 --- a/modules/codeformer_model.py +++ b/modules/codeformer_model.py @@ -3,10 +3,6 @@ import sys import cv2 import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass import modules.face_restoration from modules import shared, devices, modelloader, errors diff --git a/modules/deepbooru.py b/modules/deepbooru.py index 50e400fd8..1c4554a20 100644 --- a/modules/deepbooru.py +++ b/modules/deepbooru.py @@ -2,10 +2,6 @@ import os import re import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass import numpy as np from modules import modelloader, paths, deepbooru_model, devices, images, shared diff --git a/modules/deepbooru_model.py b/modules/deepbooru_model.py index ef53494a2..c2c77cd25 100644 --- a/modules/deepbooru_model.py +++ b/modules/deepbooru_model.py @@ -1,8 +1,4 @@ import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass import torch.nn as nn import torch.nn.functional as F diff --git a/modules/devices.py b/modules/devices.py index 529f75152..40dc6548d 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -2,10 +2,6 @@ import sys import contextlib import torch from modules import cmd_args, shared -try: - import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import -except: - pass if sys.platform == "darwin": from modules import mac_specific # pylint: disable=ungrouped-imports diff --git a/modules/esrgan_model.py b/modules/esrgan_model.py index 769d66f01..bb4c6619b 100644 --- a/modules/esrgan_model.py +++ b/modules/esrgan_model.py @@ -2,10 +2,6 @@ import os import numpy as np import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass from PIL import Image from basicsr.utils.download_util import load_file_from_url diff --git a/modules/esrgan_model_arch.py b/modules/esrgan_model_arch.py index fc352d0ba..411d98d38 100644 --- a/modules/esrgan_model_arch.py +++ b/modules/esrgan_model_arch.py @@ -2,10 +2,6 @@ import math import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass import torch.nn as nn import torch.nn.functional as F diff --git a/modules/extras.py b/modules/extras.py index df0def4fd..76f74b248 100644 --- a/modules/extras.py +++ b/modules/extras.py @@ -4,10 +4,6 @@ import html import shutil import torch -try: - import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import -except: - pass import tqdm import gradio as gr import safetensors.torch diff --git a/modules/hypernetworks/hypernetwork.py b/modules/hypernetworks/hypernetwork.py index a1caecbe4..9500c0410 100644 --- a/modules/hypernetworks/hypernetwork.py +++ b/modules/hypernetworks/hypernetwork.py @@ -8,10 +8,6 @@ import inspect import modules.textual_inversion.dataset import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass import tqdm from einops import rearrange, repeat from ldm.util import default diff --git a/modules/interrogate.py b/modules/interrogate.py index 9892d326f..38956a8aa 100644 --- a/modules/interrogate.py +++ b/modules/interrogate.py @@ -5,10 +5,6 @@ from pathlib import Path import re import torch -try: - import intel_extension_for_pytorch as ipex # pylint: disable=unused-import,import-error -except: - pass import torch.hub # pylint: disable=ungrouped-imports from torchvision import transforms diff --git a/modules/lowvram.py b/modules/lowvram.py index 7dba01593..e254cc131 100644 --- a/modules/lowvram.py +++ b/modules/lowvram.py @@ -1,8 +1,4 @@ import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass from modules import devices module_in_gpu = None diff --git a/modules/mac_specific.py b/modules/mac_specific.py index 4c5efa544..9e3d13243 100644 --- a/modules/mac_specific.py +++ b/modules/mac_specific.py @@ -1,10 +1,6 @@ import platform from packaging import version import torch -try: - import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import -except: - pass from modules.sd_hijack_utils import CondFunc diff --git a/modules/memmon.py b/modules/memmon.py index c9d7131ef..66bf0303c 100644 --- a/modules/memmon.py +++ b/modules/memmon.py @@ -2,11 +2,6 @@ import threading import time from collections import defaultdict import torch -try: - import intel_extension_for_pytorch as ipex # pylint: disable=unused-import,import-error -except: - pass - from modules import shared diff --git a/modules/models/diffusion/ddpm_edit.py b/modules/models/diffusion/ddpm_edit.py index 846a74fc4..f3d49c44c 100644 --- a/modules/models/diffusion/ddpm_edit.py +++ b/modules/models/diffusion/ddpm_edit.py @@ -10,10 +10,6 @@ https://github.com/CompVis/taming-transformers # See more details in LICENSE. import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass import torch.nn as nn import numpy as np import pytorch_lightning as pl diff --git a/modules/models/diffusion/uni_pc/sampler.py b/modules/models/diffusion/uni_pc/sampler.py index e3f8a6651..e46befd06 100644 --- a/modules/models/diffusion/uni_pc/sampler.py +++ b/modules/models/diffusion/uni_pc/sampler.py @@ -2,10 +2,6 @@ import numpy as np import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass from .uni_pc import NoiseScheduleVP, model_wrapper, UniPC, get_time_steps from modules import shared, devices diff --git a/modules/models/diffusion/uni_pc/uni_pc.py b/modules/models/diffusion/uni_pc/uni_pc.py index d86572f69..fc78bd42d 100644 --- a/modules/models/diffusion/uni_pc/uni_pc.py +++ b/modules/models/diffusion/uni_pc/uni_pc.py @@ -1,8 +1,4 @@ import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass import torch.nn.functional as F import math import time diff --git a/modules/processing.py b/modules/processing.py index b8beaf314..2ba6bd3ed 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -5,10 +5,6 @@ import random import logging from typing import Any, Dict, List import torch -try: - import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import -except: - pass import numpy as np from PIL import Image, ImageFilter, ImageOps import cv2 diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py index 6722d9f80..7006f2822 100644 --- a/modules/prompt_parser.py +++ b/modules/prompt_parser.py @@ -368,7 +368,3 @@ if __name__ == "__main__": doctest.testmod(optionflags=doctest.NORMALIZE_WHITESPACE) else: import torch # doctest faster - try: - import intel_extension_for_pytorch as ipex - except: - pass diff --git a/modules/safe.py b/modules/safe.py index 3a4aec4d7..483b85a90 100644 --- a/modules/safe.py +++ b/modules/safe.py @@ -6,10 +6,6 @@ import zipfile import re import torch -try: - import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import -except: - pass import numpy import _codecs diff --git a/modules/sd_disable_initialization.py b/modules/sd_disable_initialization.py index 5cc5e4e7a..c4a09d15d 100644 --- a/modules/sd_disable_initialization.py +++ b/modules/sd_disable_initialization.py @@ -1,10 +1,6 @@ import ldm.modules.encoders.modules import open_clip import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass import transformers.utils.hub diff --git a/modules/sd_hijack.py b/modules/sd_hijack.py index e06692213..29475e1ed 100644 --- a/modules/sd_hijack.py +++ b/modules/sd_hijack.py @@ -1,9 +1,5 @@ from types import MethodType import torch -try: - import intel_extension_for_pytorch as ipex # pylint: disable=unused-import -except: - pass from torch.nn.functional import silu import ldm.modules.attention import ldm.modules.diffusionmodules.model diff --git a/modules/sd_hijack_clip.py b/modules/sd_hijack_clip.py index cf4abf84f..945f7732d 100644 --- a/modules/sd_hijack_clip.py +++ b/modules/sd_hijack_clip.py @@ -2,10 +2,6 @@ import math from collections import namedtuple import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass from modules import prompt_parser, devices, sd_hijack from modules.shared import opts diff --git a/modules/sd_hijack_inpainting.py b/modules/sd_hijack_inpainting.py index 1a9ea9b4c..4b23c132d 100644 --- a/modules/sd_hijack_inpainting.py +++ b/modules/sd_hijack_inpainting.py @@ -1,8 +1,4 @@ import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass import ldm.models.diffusion.ddpm import ldm.models.diffusion.ddim diff --git a/modules/sd_hijack_open_clip.py b/modules/sd_hijack_open_clip.py index c0c204a82..f76fc1f3b 100644 --- a/modules/sd_hijack_open_clip.py +++ b/modules/sd_hijack_open_clip.py @@ -1,9 +1,5 @@ import open_clip.tokenizer import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass from modules import sd_hijack_clip, devices diff --git a/modules/sd_hijack_optimizations.py b/modules/sd_hijack_optimizations.py index f4c89acc3..a79bf6ae0 100644 --- a/modules/sd_hijack_optimizations.py +++ b/modules/sd_hijack_optimizations.py @@ -2,10 +2,6 @@ import math import psutil import torch -try: - import intel_extension_for_pytorch as ipex # pylint: disable=unused-import,import-error -except: - pass from torch import einsum from ldm.util import default diff --git a/modules/sd_hijack_unet.py b/modules/sd_hijack_unet.py index ce6ac1306..7ff553ae3 100644 --- a/modules/sd_hijack_unet.py +++ b/modules/sd_hijack_unet.py @@ -1,8 +1,4 @@ import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass from packaging import version from modules import devices diff --git a/modules/sd_hijack_xlmr.py b/modules/sd_hijack_xlmr.py index a9cb9454c..28528329b 100644 --- a/modules/sd_hijack_xlmr.py +++ b/modules/sd_hijack_xlmr.py @@ -1,8 +1,4 @@ import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass from modules import sd_hijack_clip, devices diff --git a/modules/sd_models.py b/modules/sd_models.py index a2615afd2..f422b0133 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -7,10 +7,6 @@ from os import mkdir from urllib import request from rich import progress # pylint: disable=redefined-builtin import torch -try: - import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import -except: - pass import safetensors.torch from omegaconf import OmegaConf import tomesd diff --git a/modules/sd_models_config.py b/modules/sd_models_config.py index 5bc3799a0..a9c515b14 100644 --- a/modules/sd_models_config.py +++ b/modules/sd_models_config.py @@ -1,10 +1,6 @@ import os import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass from modules import paths, sd_disable_initialization diff --git a/modules/sd_samplers_common.py b/modules/sd_samplers_common.py index dfb478251..888f9a30e 100644 --- a/modules/sd_samplers_common.py +++ b/modules/sd_samplers_common.py @@ -1,10 +1,6 @@ from collections import namedtuple import numpy as np import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass from PIL import Image from modules import devices, processing, images, sd_vae_approx diff --git a/modules/sd_samplers_compvis.py b/modules/sd_samplers_compvis.py index 6f08a9022..8de719323 100644 --- a/modules/sd_samplers_compvis.py +++ b/modules/sd_samplers_compvis.py @@ -4,10 +4,6 @@ import ldm.models.diffusion.plms import numpy as np import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass from modules.shared import state from modules import sd_samplers_common, prompt_parser, shared diff --git a/modules/sd_samplers_kdiffusion.py b/modules/sd_samplers_kdiffusion.py index 5ba34cc33..a30d351fc 100644 --- a/modules/sd_samplers_kdiffusion.py +++ b/modules/sd_samplers_kdiffusion.py @@ -1,10 +1,6 @@ from collections import deque import inspect import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass import k_diffusion.sampling from modules import prompt_parser, devices, sd_samplers_common diff --git a/modules/sd_vae.py b/modules/sd_vae.py index bc5820b70..27bfb070d 100644 --- a/modules/sd_vae.py +++ b/modules/sd_vae.py @@ -4,11 +4,6 @@ import glob from copy import deepcopy import torch from modules import shared, paths, devices, script_callbacks, sd_models -try: - import intel_extension_for_pytorch as ipex # pylint: disable=unused-import -except: - if shared.cmd_opts.use_ipex: - shared.log.error("Failed to import IPEX") vae_ignore_keys = {"model_ema.decay", "model_ema.num_updates"} vae_dict = {} diff --git a/modules/sd_vae_approx.py b/modules/sd_vae_approx.py index 56c3fb15f..e2f004683 100644 --- a/modules/sd_vae_approx.py +++ b/modules/sd_vae_approx.py @@ -1,10 +1,6 @@ import os import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass from torch import nn from modules import devices, paths diff --git a/modules/sub_quadratic_attention.py b/modules/sub_quadratic_attention.py index 0af680de2..87c18a38d 100644 --- a/modules/sub_quadratic_attention.py +++ b/modules/sub_quadratic_attention.py @@ -14,10 +14,6 @@ from functools import partial import math from typing import Optional, NamedTuple, List import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass from torch import Tensor from torch.utils.checkpoint import checkpoint diff --git a/modules/textual_inversion/dataset.py b/modules/textual_inversion/dataset.py index 272ae76ea..af9fbcf28 100644 --- a/modules/textual_inversion/dataset.py +++ b/modules/textual_inversion/dataset.py @@ -2,10 +2,6 @@ import os import numpy as np import PIL import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass from PIL import Image from torch.utils.data import Dataset, DataLoader, Sampler from torchvision import transforms diff --git a/modules/textual_inversion/image_embedding.py b/modules/textual_inversion/image_embedding.py index a2c518af3..0ba5db8a4 100644 --- a/modules/textual_inversion/image_embedding.py +++ b/modules/textual_inversion/image_embedding.py @@ -4,10 +4,6 @@ import numpy as np import zlib from PIL import Image, PngImagePlugin, ImageDraw, ImageFont import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass from modules.shared import opts diff --git a/modules/textual_inversion/textual_inversion.py b/modules/textual_inversion/textual_inversion.py index fc4507ac3..72be41bb4 100644 --- a/modules/textual_inversion/textual_inversion.py +++ b/modules/textual_inversion/textual_inversion.py @@ -3,10 +3,6 @@ import html import csv from collections import namedtuple import torch -try: - import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import -except: - pass import tqdm import safetensors.torch import numpy as np diff --git a/modules/xlmr.py b/modules/xlmr.py index a891beb6d..9da3161cc 100644 --- a/modules/xlmr.py +++ b/modules/xlmr.py @@ -1,9 +1,5 @@ from typing import Optional import torch -try: - import intel_extension_for_pytorch as ipex -except: - pass import torch.nn as nn from transformers import XLMRobertaModel,XLMRobertaTokenizer, BertPreTrainedModel, BertModel, BertConfig # pylint: disable=unused-import from transformers.models.xlm_roberta.configuration_xlm_roberta import XLMRobertaConfig From 865c0bc7a38579574ba2047b2a028279ec84bf93 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 4 May 2023 07:51:28 -0400 Subject: [PATCH 058/282] merge from upstream --- extensions-builtin/LDSR/scripts/ldsr_model.py | 20 +-- .../ScuNET/scripts/scunet_model.py | 81 +++++++++--- extensions-builtin/a1111-sd-webui-lycoris | 2 +- .../multidiffusion-upscaler-for-automatic1111 | 2 +- .../javascript/prompt-bracket-checker.js | 119 +++++------------- extensions-builtin/sd-webui-controlnet | 2 +- javascript/edit-attention.js | 38 ++++-- modules/api/api.py | 17 ++- modules/extensions.py | 33 ++++- modules/extras.py | 47 ++++++- modules/images.py | 32 ++++- modules/img2img.py | 8 +- modules/processing.py | 21 +++- modules/realesrgan_model.py | 17 ++- modules/script_callbacks.py | 14 +++ modules/sd_samplers_kdiffusion.py | 44 +++++-- modules/textual_inversion/preprocess.py | 20 +-- 17 files changed, 339 insertions(+), 178 deletions(-) diff --git a/extensions-builtin/LDSR/scripts/ldsr_model.py b/extensions-builtin/LDSR/scripts/ldsr_model.py index b8cff29b9..da19cff12 100644 --- a/extensions-builtin/LDSR/scripts/ldsr_model.py +++ b/extensions-builtin/LDSR/scripts/ldsr_model.py @@ -25,22 +25,28 @@ class UpscalerLDSR(Upscaler): yaml_path = os.path.join(self.model_path, "project.yaml") old_model_path = os.path.join(self.model_path, "model.pth") new_model_path = os.path.join(self.model_path, "model.ckpt") - safetensors_model_path = os.path.join(self.model_path, "model.safetensors") + + local_model_paths = self.find_models(ext_filter=[".ckpt", ".safetensors"]) + local_ckpt_path = next(iter([local_model for local_model in local_model_paths if local_model.endswith("model.ckpt")]), None) + local_safetensors_path = next(iter([local_model for local_model in local_model_paths if local_model.endswith("model.safetensors")]), None) + local_yaml_path = next(iter([local_model for local_model in local_model_paths if local_model.endswith("project.yaml")]), None) + if os.path.exists(yaml_path): statinfo = os.stat(yaml_path) if statinfo.st_size >= 10485760: print("Removing invalid LDSR YAML file.") os.remove(yaml_path) + if os.path.exists(old_model_path): print("Renaming model from model.pth to model.ckpt") os.rename(old_model_path, new_model_path) - if os.path.exists(safetensors_model_path): - model = safetensors_model_path + + if local_safetensors_path is not None and os.path.exists(local_safetensors_path): + model = local_safetensors_path else: - model = load_file_from_url(url=self.model_url, model_dir=self.model_path, - file_name="model.ckpt", progress=True) - yaml = load_file_from_url(url=self.yaml_url, model_dir=self.model_path, - file_name="project.yaml", progress=True) + model = local_ckpt_path if local_ckpt_path is not None else load_file_from_url(url=self.model_url, model_dir=self.model_path, file_name="model.ckpt", progress=True) + + yaml = local_yaml_path if local_yaml_path is not None else load_file_from_url(url=self.yaml_url, model_dir=self.model_path, file_name="project.yaml", progress=True) try: return LDSR(model, yaml) diff --git a/extensions-builtin/ScuNET/scripts/scunet_model.py b/extensions-builtin/ScuNET/scripts/scunet_model.py index e0fbf3a33..c7fd5739b 100644 --- a/extensions-builtin/ScuNET/scripts/scunet_model.py +++ b/extensions-builtin/ScuNET/scripts/scunet_model.py @@ -5,11 +5,15 @@ import traceback import PIL.Image import numpy as np import torch +from tqdm import tqdm + from basicsr.utils.download_util import load_file_from_url import modules.upscaler from modules import devices, modelloader from scunet_model_arch import SCUNet as net +from modules.shared import opts +from modules import images class UpscalerScuNET(modules.upscaler.Upscaler): @@ -42,28 +46,78 @@ class UpscalerScuNET(modules.upscaler.Upscaler): scalers.append(scaler_data2) self.scalers = scalers - def do_upscale(self, img: PIL.Image, selected_file): + @staticmethod + @torch.no_grad() + def tiled_inference(img, model): + # test the image tile by tile + h, w = img.shape[2:] + tile = opts.SCUNET_tile + tile_overlap = opts.SCUNET_tile_overlap + if tile == 0: + return model(img) + + device = devices.get_device_for('scunet') + assert tile % 8 == 0, "tile size should be a multiple of window_size" + sf = 1 + + stride = tile - tile_overlap + h_idx_list = list(range(0, h - tile, stride)) + [h - tile] + w_idx_list = list(range(0, w - tile, stride)) + [w - tile] + E = torch.zeros(1, 3, h * sf, w * sf, dtype=img.dtype, device=device) + W = torch.zeros_like(E, dtype=devices.dtype, device=device) + + with tqdm(total=len(h_idx_list) * len(w_idx_list), desc="ScuNET tiles") as pbar: + for h_idx in h_idx_list: + + for w_idx in w_idx_list: + + in_patch = img[..., h_idx: h_idx + tile, w_idx: w_idx + tile] + + out_patch = model(in_patch) + out_patch_mask = torch.ones_like(out_patch) + + E[ + ..., h_idx * sf: (h_idx + tile) * sf, w_idx * sf: (w_idx + tile) * sf + ].add_(out_patch) + W[ + ..., h_idx * sf: (h_idx + tile) * sf, w_idx * sf: (w_idx + tile) * sf + ].add_(out_patch_mask) + pbar.update(1) + output = E.div_(W) + + return output + + def do_upscale(self, img: PIL.Image.Image, selected_file): + torch.cuda.empty_cache() model = self.load_model(selected_file) if model is None: + print(f"ScuNET: Unable to load model from {selected_file}", file=sys.stderr) return img device = devices.get_device_for('scunet') - img = np.array(img) - img = img[:, :, ::-1] - img = np.moveaxis(img, 2, 0) / 255 - img = torch.from_numpy(img).float() - img = img.unsqueeze(0).to(device) + tile = opts.SCUNET_tile + h, w = img.height, img.width + np_img = np.array(img) + np_img = np_img[:, :, ::-1] # RGB to BGR + np_img = np_img.transpose((2, 0, 1)) / 255 # HWC to CHW + torch_img = torch.from_numpy(np_img).float().unsqueeze(0).to(device) # type: ignore - with torch.no_grad(): - output = model(img) - output = output.squeeze().float().cpu().clamp_(0, 1).numpy() - output = 255. * np.moveaxis(output, 0, 2) - output = output.astype(np.uint8) - output = output[:, :, ::-1] + if tile > h or tile > w: + _img = torch.zeros(1, 3, max(h, tile), max(w, tile), dtype=torch_img.dtype, device=torch_img.device) + _img[:, :, :h, :w] = torch_img # pad image + torch_img = _img + + torch_output = self.tiled_inference(torch_img, model).squeeze(0) + torch_output = torch_output[:, :h * 1, :w * 1] # remove padding, if any + np_output: np.ndarray = torch_output.float().cpu().clamp_(0, 1).numpy() + del torch_img, torch_output torch.cuda.empty_cache() - return PIL.Image.fromarray(output, 'RGB') + + output = np_output.transpose((1, 2, 0)) # CHW to HWC + output = output[:, :, ::-1] # BGR to RGB + return PIL.Image.fromarray((output * 255).astype(np.uint8)) def load_model(self, path: str): device = devices.get_device_for('scunet') @@ -84,4 +138,3 @@ class UpscalerScuNET(modules.upscaler.Upscaler): model = model.to(device) return model - diff --git a/extensions-builtin/a1111-sd-webui-lycoris b/extensions-builtin/a1111-sd-webui-lycoris index 3176baedf..b2a4e5f92 160000 --- a/extensions-builtin/a1111-sd-webui-lycoris +++ b/extensions-builtin/a1111-sd-webui-lycoris @@ -1 +1 @@ -Subproject commit 3176baedf003c382fea4dfc32bd926ce210bf883 +Subproject commit b2a4e5f9292ab0f4cb17739afc7af5d3a713eb54 diff --git a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 index 8d8be4c33..fbe34db70 160000 --- a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 +++ b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 @@ -1 +1 @@ -Subproject commit 8d8be4c3390b7356d06645b1f8eb486a09663b71 +Subproject commit fbe34db704736e5745c3a4e855939508eef344ce diff --git a/extensions-builtin/prompt-bracket-checker/javascript/prompt-bracket-checker.js b/extensions-builtin/prompt-bracket-checker/javascript/prompt-bracket-checker.js index f0918e260..5c7a836a2 100644 --- a/extensions-builtin/prompt-bracket-checker/javascript/prompt-bracket-checker.js +++ b/extensions-builtin/prompt-bracket-checker/javascript/prompt-bracket-checker.js @@ -1,103 +1,42 @@ // Stable Diffusion WebUI - Bracket checker -// Version 1.0 -// By Hingashi no Florin/Bwin4L +// By Hingashi no Florin/Bwin4L & @akx // Counts open and closed brackets (round, square, curly) in the prompt and negative prompt text boxes in the txt2img and img2img tabs. // If there's a mismatch, the keyword counter turns red and if you hover on it, a tooltip tells you what's wrong. -function checkBrackets(evt, textArea, counterElt) { - errorStringParen = '(...) - Different number of opening and closing parentheses detected.\n'; - errorStringSquare = '[...] - Different number of opening and closing square brackets detected.\n'; - errorStringCurly = '{...} - Different number of opening and closing curly brackets detected.\n'; +function checkBrackets(textArea, counterElt) { + var counts = {}; + (textArea.value.match(/[(){}\[\]]/g) || []).forEach(bracket => { + counts[bracket] = (counts[bracket] || 0) + 1; + }); + var errors = []; - openBracketRegExp = /\(/g; - closeBracketRegExp = /\)/g; - - openSquareBracketRegExp = /\[/g; - closeSquareBracketRegExp = /\]/g; - - openCurlyBracketRegExp = /\{/g; - closeCurlyBracketRegExp = /\}/g; - - totalOpenBracketMatches = 0; - totalCloseBracketMatches = 0; - totalOpenSquareBracketMatches = 0; - totalCloseSquareBracketMatches = 0; - totalOpenCurlyBracketMatches = 0; - totalCloseCurlyBracketMatches = 0; - - openBracketMatches = textArea.value.match(openBracketRegExp); - if(openBracketMatches) { - totalOpenBracketMatches = openBracketMatches.length; - } - - closeBracketMatches = textArea.value.match(closeBracketRegExp); - if(closeBracketMatches) { - totalCloseBracketMatches = closeBracketMatches.length; - } - - openSquareBracketMatches = textArea.value.match(openSquareBracketRegExp); - if(openSquareBracketMatches) { - totalOpenSquareBracketMatches = openSquareBracketMatches.length; - } - - closeSquareBracketMatches = textArea.value.match(closeSquareBracketRegExp); - if(closeSquareBracketMatches) { - totalCloseSquareBracketMatches = closeSquareBracketMatches.length; - } - - openCurlyBracketMatches = textArea.value.match(openCurlyBracketRegExp); - if(openCurlyBracketMatches) { - totalOpenCurlyBracketMatches = openCurlyBracketMatches.length; - } - - closeCurlyBracketMatches = textArea.value.match(closeCurlyBracketRegExp); - if(closeCurlyBracketMatches) { - totalCloseCurlyBracketMatches = closeCurlyBracketMatches.length; - } - - if(totalOpenBracketMatches != totalCloseBracketMatches) { - if(!counterElt.title.includes(errorStringParen)) { - counterElt.title += errorStringParen; + function checkPair(open, close, kind) { + if (counts[open] !== counts[close]) { + errors.push( + `${open}...${close} - Detected ${counts[open] || 0} opening and ${counts[close] || 0} closing ${kind}.` + ); } - } else { - counterElt.title = counterElt.title.replace(errorStringParen, ''); } - if(totalOpenSquareBracketMatches != totalCloseSquareBracketMatches) { - if(!counterElt.title.includes(errorStringSquare)) { - counterElt.title += errorStringSquare; - } - } else { - counterElt.title = counterElt.title.replace(errorStringSquare, ''); - } + checkPair('(', ')', 'round brackets'); + checkPair('[', ']', 'square brackets'); + checkPair('{', '}', 'curly brackets'); + counterElt.title = errors.join('\n'); + counterElt.classList.toggle('error', errors.length !== 0); +} - if(totalOpenCurlyBracketMatches != totalCloseCurlyBracketMatches) { - if(!counterElt.title.includes(errorStringCurly)) { - counterElt.title += errorStringCurly; - } - } else { - counterElt.title = counterElt.title.replace(errorStringCurly, ''); - } +function setupBracketChecking(id_prompt, id_counter) { + var textarea = gradioApp().querySelector("#" + id_prompt + " > label > textarea"); + var counter = gradioApp().getElementById(id_counter) - if(counterElt.title != '') { - counterElt.classList.add('error'); - } else { - counterElt.classList.remove('error'); + if (textarea && counter) { + textarea.addEventListener("input", () => checkBrackets(textarea, counter)); } } -function setupBracketChecking(id_prompt, id_counter){ - var textarea = gradioApp().querySelector("#" + id_prompt + " > label > textarea"); - var counter = gradioApp().getElementById(id_counter) - - textarea.addEventListener("input", function(evt){ - checkBrackets(evt, textarea, counter) - }); -} - -onUiLoaded(function(){ - setupBracketChecking('txt2img_prompt', 'txt2img_token_counter') - setupBracketChecking('txt2img_neg_prompt', 'txt2img_negative_token_counter') - setupBracketChecking('img2img_prompt', 'img2img_token_counter') - setupBracketChecking('img2img_neg_prompt', 'img2img_negative_token_counter') -}) \ No newline at end of file +onUiLoaded(function () { + setupBracketChecking('txt2img_prompt', 'txt2img_token_counter'); + setupBracketChecking('txt2img_neg_prompt', 'txt2img_negative_token_counter'); + setupBracketChecking('img2img_prompt', 'img2img_token_counter'); + setupBracketChecking('img2img_neg_prompt', 'img2img_negative_token_counter'); +}); diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 23c0c8030..5d387abf1 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 23c0c80306861c1b90a9025dd1f52d3810a3c0d5 +Subproject commit 5d387abf19d9eedf58dd294ccc373c0e361b2907 diff --git a/javascript/edit-attention.js b/javascript/edit-attention.js index 20a5aadfb..588c7b773 100644 --- a/javascript/edit-attention.js +++ b/javascript/edit-attention.js @@ -17,7 +17,7 @@ function keyupEditAttention(event){ // Find opening parenthesis around current cursor const before = text.substring(0, selectionStart); let beforeParen = before.lastIndexOf(OPEN); - if (beforeParen == -1) return false; + if (beforeParen == -1) return false; let beforeParenClose = before.lastIndexOf(CLOSE); while (beforeParenClose !== -1 && beforeParenClose > beforeParen) { beforeParen = before.lastIndexOf(OPEN, beforeParen - 1); @@ -27,7 +27,7 @@ function keyupEditAttention(event){ // Find closing parenthesis around current cursor const after = text.substring(selectionStart); let afterParen = after.indexOf(CLOSE); - if (afterParen == -1) return false; + if (afterParen == -1) return false; let afterParenOpen = after.indexOf(OPEN); while (afterParenOpen !== -1 && afterParen > afterParenOpen) { afterParen = after.indexOf(CLOSE, afterParen + 1); @@ -43,10 +43,28 @@ function keyupEditAttention(event){ target.setSelectionRange(selectionStart, selectionEnd); return true; } + + function selectCurrentWord(){ + if (selectionStart !== selectionEnd) return false; + const delimiters = opts.keyedit_delimiters + " \r\n\t"; + + // seek backward until to find beggining + while (!delimiters.includes(text[selectionStart - 1]) && selectionStart > 0) { + selectionStart--; + } + + // seek forward to find end + while (!delimiters.includes(text[selectionEnd]) && selectionEnd < text.length) { + selectionEnd++; + } - // If the user hasn't selected anything, let's select their current parenthesis block - if(! selectCurrentParenthesisBlock('<', '>')){ - selectCurrentParenthesisBlock('(', ')') + target.setSelectionRange(selectionStart, selectionEnd); + return true; + } + + // If the user hasn't selected anything, let's select their current parenthesis block or word + if (!selectCurrentParenthesisBlock('<', '>') && !selectCurrentParenthesisBlock('(', ')')) { + selectCurrentWord(); } event.preventDefault(); @@ -81,7 +99,13 @@ function keyupEditAttention(event){ weight = parseFloat(weight.toPrecision(12)); if(String(weight).length == 1) weight += ".0" - text = text.slice(0, selectionEnd + 1) + weight + text.slice(selectionEnd + 1 + end - 1); + if (closeCharacter == ')' && weight == 1) { + text = text.slice(0, selectionStart - 1) + text.slice(selectionStart, selectionEnd) + text.slice(selectionEnd + 5); + selectionStart--; + selectionEnd--; + } else { + text = text.slice(0, selectionEnd + 1) + weight + text.slice(selectionEnd + 1 + end - 1); + } target.focus(); target.value = text; @@ -93,4 +117,4 @@ function keyupEditAttention(event){ addEventListener('keydown', (event) => { keyupEditAttention(event); -}); \ No newline at end of file +}); diff --git a/modules/api/api.py b/modules/api/api.py index 28ccff02f..b3eb04f05 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -14,7 +14,7 @@ import piexif.helper import uvicorn import gradio as gr # from gradio.processing_utils import decode_base64_to_file # gradio 3.23 -from gradio_client.utils import decode_base64_to_file # gradio 3.28 +# from gradio_client.utils import decode_base64_to_file # gradio 3.28 from modules import errors, shared, sd_samplers, deepbooru, sd_hijack, images, scripts, ui, postprocessing from modules.api.models import * # pylint: disable=unused-wildcard-import, wildcard-import @@ -198,7 +198,9 @@ class Api: raise HTTPException(status_code=422, detail=f"Selectable script cannot be in always on params: {alwayson_script_name}") if "args" in request.alwayson_scripts[alwayson_script_name]: # TODO this can corrupt values for other scripts - script_args[alwayson_script.args_from:alwayson_script.args_to] = request.alwayson_scripts[alwayson_script_name]["args"] + # min between arg length in scriptrunner and arg length in the request + for idx in range(0, min((alwayson_script.args_to - alwayson_script.args_from), len(request.alwayson_scripts[alwayson_script_name]["args"]))): + script_args[alwayson_script.args_from + idx] = request.alwayson_scripts[alwayson_script_name]["args"][idx] p.per_script_args[alwayson_script.title()] = request.alwayson_scripts[alwayson_script_name]["args"] return script_args @@ -306,16 +308,11 @@ class Api: def extras_batch_images_api(self, req: ExtrasBatchImagesRequest): reqDict = setUpscalers(req) - def prepareFiles(file): - file = decode_base64_to_file(file.data, file_path=file.name) - file.orig_name = file.name - return file - - reqDict['image_folder'] = list(map(prepareFiles, reqDict['imageList'])) - reqDict.pop('imageList') + image_list = reqDict.pop('imageList', []) + image_folder = [decode_base64_to_image(x.data) for x in image_list] with self.queue_lock: - result = postprocessing.run_extras(extras_mode=1, image="", input_dir="", output_dir="", save_output=False, **reqDict) + result = postprocessing.run_extras(extras_mode=1, image_folder=image_folder, image="", input_dir="", output_dir="", save_output=False, **reqDict) return ExtrasBatchImagesResponse(images=list(map(encode_pil_to_base64, result[0])), html_info=result[1]) diff --git a/modules/extensions.py b/modules/extensions.py index 349c8e671..b0d78259a 100644 --- a/modules/extensions.py +++ b/modules/extensions.py @@ -28,12 +28,15 @@ class Extension: self.status = '' self.can_update = False self.is_builtin = is_builtin + self.commit_hash = '' + self.commit_date = None self.version = '' + self.branch = None self.remote = None self.have_info_from_repo = False def read_info_from_repo(self): - if self.have_info_from_repo: + if self.is_builtin or self.have_info_from_repo: return self.have_info_from_repo = True @@ -52,10 +55,15 @@ class Extension: self.status = 'unknown' self.remote = next(repo.remote().urls, None) head = repo.head.commit - ts = time.asctime(time.gmtime(repo.head.commit.committed_date)) - self.version = f'{head.hexsha[:8]} ({ts})' + self.commit_date = repo.head.commit.committed_date + ts = time.asctime(time.gmtime(self.commit_date)) + if repo.active_branch: + self.branch = repo.active_branch.name + self.commit_hash = head.hexsha + self.version = f'{self.commit_hash[:8]} ({ts})' - except Exception: + except Exception as ex: + shared.log.error(f"Failed reading extension data from Git repository: {self.name}: {ex}") self.remote = None def list_files(self, subdir, extension): @@ -82,18 +90,31 @@ class Extension: for fetch in repo.remote().fetch(dry_run=True): if fetch.flags != fetch.HEAD_UPTODATE: self.can_update = True - self.status = "behind" + self.status = "new commits" return + try: + origin = repo.rev_parse('origin') + if repo.head.commit != origin: + self.can_update = True + self.status = "behind HEAD" + return + except Exception: + self.can_update = False + self.status = "unknown (remote error)" + return + self.can_update = False self.status = "latest" - def fetch_and_reset_hard(self): + def fetch_and_reset_hard(self, commit='origin'): repo = git.Repo(self.path) # Fix: `error: Your local changes to the following files would be overwritten by merge`, # because WSL2 Docker set 755 file permissions instead of 644, this results to the error. repo.git.fetch(all=True) repo.git.reset('origin', hard=True) + repo.git.reset(commit, hard=True) + self.have_info_from_repo = False def list_extensions(): diff --git a/modules/extras.py b/modules/extras.py index 76f74b248..cdfb78410 100644 --- a/modules/extras.py +++ b/modules/extras.py @@ -1,6 +1,7 @@ import os import re import html +import json import shutil import torch @@ -63,7 +64,7 @@ def to_half(tensor, enable): return tensor -def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_model_name, interp_method, multiplier, save_as_half, custom_name, checkpoint_format, config_source, bake_in_vae, discard_weights): # pylint: disable=unused-argument +def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_model_name, interp_method, multiplier, save_as_half, custom_name, checkpoint_format, config_source, bake_in_vae, discard_weights, save_metadata): # pylint: disable=unused-argument shared.state.begin() shared.state.job = 'model-merge' @@ -231,15 +232,55 @@ def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_ shared.state.nextjob() shared.state.textinfo = "Saving" - shared.log.info(f"Saving to {output_modelname}...") + + metadata = {"format": "pt", "sd_merge_models": {}, "sd_merge_recipe": None} + + if save_metadata: + merge_recipe = { + "type": "webui", # indicate this model was merged with webui's built-in merger + "primary_model_hash": primary_model_info.sha256, + "secondary_model_hash": secondary_model_info.sha256 if secondary_model_info else None, + "tertiary_model_hash": tertiary_model_info.sha256 if tertiary_model_info else None, + "interp_method": interp_method, + "multiplier": multiplier, + "save_as_half": save_as_half, + "custom_name": custom_name, + "config_source": config_source, + "bake_in_vae": bake_in_vae, + "discard_weights": discard_weights, + "is_inpainting": result_is_inpainting_model, + "is_instruct_pix2pix": result_is_instruct_pix2pix_model + } + metadata["sd_merge_recipe"] = json.dumps(merge_recipe) + + def add_model_metadata(checkpoint_info): + checkpoint_info.calculate_shorthash() + metadata["sd_merge_models"][checkpoint_info.sha256] = { + "name": checkpoint_info.name, + "legacy_hash": checkpoint_info.hash, + "sd_merge_recipe": checkpoint_info.metadata.get("sd_merge_recipe", None) + } + + metadata["sd_merge_models"].update(checkpoint_info.metadata.get("sd_merge_models", {})) + + add_model_metadata(primary_model_info) + if secondary_model_info: + add_model_metadata(secondary_model_info) + if tertiary_model_info: + add_model_metadata(tertiary_model_info) + + metadata["sd_merge_models"] = json.dumps(metadata["sd_merge_models"]) _, extension = os.path.splitext(output_modelname) if extension.lower() == ".safetensors": - safetensors.torch.save_file(theta_0, output_modelname, metadata={"format": "pt"}) + safetensors.torch.save_file(theta_0, output_modelname, metadata=metadata) else: torch.save(theta_0, output_modelname) sd_models.list_models() + created_model = next((ckpt for ckpt in sd_models.checkpoints_list.values() if ckpt.name == filename), None) + if created_model: + created_model.calculate_shorthash() create_config(output_modelname, config_source, primary_model_info, secondary_model_info, tertiary_model_info) diff --git a/modules/images.py b/modules/images.py index 610fd7291..f23232225 100644 --- a/modules/images.py +++ b/modules/images.py @@ -313,6 +313,7 @@ re_nonletters = re.compile(r'[\s' + string.punctuation + ']+') re_pattern = re.compile(r"(.*?)(?:\[([^\[\]]+)\]|$)") re_pattern_arg = re.compile(r"(.*)<([^>]*)>$") max_filename_part_length = 128 +NOTHING_AND_SKIP_PREVIOUS_TEXT = object() def sanitize_filename_part(text, replace_spaces=True): @@ -347,6 +348,10 @@ class FilenameGenerator: 'prompt_no_styles': lambda self: self.prompt_no_style(), 'prompt_spaces': lambda self: sanitize_filename_part(self.prompt, replace_spaces=False), 'prompt_words': lambda self: self.prompt_words(), + 'batch_number': lambda self: NOTHING_AND_SKIP_PREVIOUS_TEXT if self.p.batch_size == 1 else self.p.batch_index + 1, + 'generation_number': lambda self: NOTHING_AND_SKIP_PREVIOUS_TEXT if self.p.n_iter == 1 and self.p.batch_size == 1 else self.p.iteration * self.p.batch_size + self.p.batch_index + 1, + 'hasprompt': lambda self, *args: self.hasprompt(*args), # accepts formats:[hasprompt..] + 'clip_skip': lambda self: opts.data["CLIP_stop_at_last_layers"], } default_time_format = '%Y%m%d%H%M%S' @@ -356,6 +361,22 @@ class FilenameGenerator: self.prompt = prompt self.image = image + def hasprompt(self, *args): + lower = self.prompt.lower() + if self.p is None or self.prompt is None: + return None + outres = "" + for arg in args: + if arg != "": + division = arg.split("|") + expected = division[0].lower() + default = division[1] if len(division) > 1 else "" + if lower.find(expected) >= 0: + outres = f'{outres}{expected}' + else: + outres = outres if default == "" else f'{outres}{default}' + return sanitize_filename_part(outres) + def prompt_no_style(self): if self.p is None or self.prompt is None: return None @@ -398,9 +419,8 @@ class FilenameGenerator: for m in re_pattern.finditer(x): text, pattern = m.groups() - res += text - if pattern is None: + res += text continue pattern_args = [] @@ -420,11 +440,13 @@ class FilenameGenerator: replacement = None errors.display(e, 'filename pattern') - if replacement is not None: - res += str(replacement) + if replacement == NOTHING_AND_SKIP_PREVIOUS_TEXT: + continue + elif replacement is not None: + res += text + str(replacement) continue - res += f'[{pattern}]' + res += f'{text}[{pattern}]' return res diff --git a/modules/img2img.py b/modules/img2img.py index 612d68b79..58b9449aa 100644 --- a/modules/img2img.py +++ b/modules/img2img.py @@ -64,7 +64,8 @@ def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args): debug(f'Processed: {len(images)} Memory: {memory_stats()} batch') -def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_styles, init_img, sketch, init_img_with_mask, inpaint_color_sketch, inpaint_color_sketch_orig, init_img_inpaint, init_mask_inpaint, steps: int, sampler_index: int, mask_blur: int, mask_alpha: float, inpainting_fill: int, restore_faces: bool, tiling: bool, n_iter: int, batch_size: int, cfg_scale: float, image_cfg_scale: float, denoising_strength: float, seed: int, subseed: int, subseed_strength: float, seed_resize_from_h: int, seed_resize_from_w: int, seed_enable_extras: bool, height: int, width: int, resize_mode: int, inpaint_full_res: bool, inpaint_full_res_padding: int, inpainting_mask_invert: int, img2img_batch_input_dir: str, img2img_batch_output_dir: str, img2img_batch_inpaint_mask_dir: str, override_settings_texts, *args): # pylint: disable=unused-argument +def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_styles, init_img, sketch, init_img_with_mask, inpaint_color_sketch, inpaint_color_sketch_orig, init_img_inpaint, init_mask_inpaint, steps: int, sampler_index: int, mask_blur: int, mask_alpha: float, inpainting_fill: int, restore_faces: bool, tiling: bool, n_iter: int, batch_size: int, cfg_scale: float, image_cfg_scale: float, denoising_strength: float, seed: int, subseed: int, subseed_strength: float, seed_resize_from_h: int, seed_resize_from_w: int, seed_enable_extras: bool, selected_scale_tab: int, height: int, width: int, scale_by: float, resize_mode: int, inpaint_full_res: bool, inpaint_full_res_padding: int, inpainting_mask_invert: int, img2img_batch_input_dir: str, img2img_batch_output_dir: str, img2img_batch_inpaint_mask_dir: str, override_settings_texts, *args): # pylint: disable=unused-argument + override_settings = create_override_settings_dict(override_settings_texts) is_batch = mode == 5 @@ -96,6 +97,11 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s mask = None if image is not None: image = ImageOps.exif_transpose(image) + if selected_scale_tab == 1: + assert image, "Can't scale by because no image is selected" + width = int(image.width * scale_by) + height = int(image.height * scale_by) + assert 0. <= denoising_strength <= 1., 'can only work with strength in [0.0, 1.0]' p = StableDiffusionProcessingImg2Img( diff --git a/modules/processing.py b/modules/processing.py index 2ba6bd3ed..6c2877576 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -1,6 +1,7 @@ import json import math import os +import hashlib import random import logging from typing import Any, Dict, List @@ -100,7 +101,7 @@ class StableDiffusionProcessing: """ The first set of paramaters: sd_models -> do_not_reload_embeddings represent the minimum required to create a StableDiffusionProcessing """ - def __init__(self, sd_model=None, outpath_samples=None, outpath_grids=None, prompt: str = "", styles: List[str] = None, seed: int = -1, subseed: int = -1, subseed_strength: float = 0, seed_resize_from_h: int = -1, seed_resize_from_w: int = -1, seed_enable_extras: bool = True, sampler_name: str = None, batch_size: int = 1, n_iter: int = 1, steps: int = 20, cfg_scale: float = 6.0, width: int = 512, height: int = 512, restore_faces: bool = False, tiling: bool = False, do_not_save_samples: bool = False, do_not_save_grid: bool = False, extra_generation_params: Dict[Any, Any] = None, overlay_images: Any = None, negative_prompt: str = None, eta: float = None, do_not_reload_embeddings: bool = False, denoising_strength: float = 0, ddim_discretize: str = None, s_churn: float = 0.0, s_tmax: float = None, s_tmin: float = 0.0, s_noise: float = 1.0, override_settings: Dict[str, Any] = None, override_settings_restore_afterwards: bool = True, sampler_index: int = None, script_args: list = None): # pylint: disable=unused-argument + def __init__(self, sd_model=None, outpath_samples=None, outpath_grids=None, prompt: str = "", styles: List[str] = None, seed: int = -1, subseed: int = -1, subseed_strength: float = 0, seed_resize_from_h: int = -1, seed_resize_from_w: int = -1, seed_enable_extras: bool = True, sampler_name: str = None, batch_size: int = 1, n_iter: int = 1, steps: int = 50, cfg_scale: float = 7.0, width: int = 512, height: int = 512, restore_faces: bool = False, tiling: bool = False, do_not_save_samples: bool = False, do_not_save_grid: bool = False, extra_generation_params: Dict[Any, Any] = None, overlay_images: Any = None, negative_prompt: str = None, eta: float = None, do_not_reload_embeddings: bool = False, denoising_strength: float = 0, ddim_discretize: str = None, s_min_uncond: float = 0.0, s_churn: float = 0.0, s_tmax: float = None, s_tmin: float = 0.0, s_noise: float = 1.0, override_settings: Dict[str, Any] = None, override_settings_restore_afterwards: bool = True, sampler_index: int = None, script_args: list = None): # pylint: disable=unused-argument self.outpath_samples: str = outpath_samples self.outpath_grids: str = outpath_grids @@ -133,6 +134,7 @@ class StableDiffusionProcessing: self.denoising_strength: float = denoising_strength self.sampler_noise_scheduler_override = None self.ddim_discretize = ddim_discretize or opts.ddim_discretize + self.s_min_uncond = s_min_uncond or opts.s_min_uncond self.s_churn = s_churn or opts.s_churn self.s_tmin = s_tmin or opts.s_tmin self.s_tmax = s_tmax or float('inf') # not representable as a standard ui option @@ -155,6 +157,7 @@ class StableDiffusionProcessing: self.all_subseeds = None self.clip_skip = opts.CLIP_stop_at_last_layers self.iteration = 0 + self.is_hr_pass = False @property def sd_model(self): @@ -465,6 +468,7 @@ def create_infotext(p: StableDiffusionProcessing, all_prompts, all_seeds, all_su "Conditional mask weight": getattr(p, "inpainting_mask_weight", shared.opts.inpainting_mask_weight) if p.is_using_inpainting_conditioning else None, "Clip skip": p.clip_skip, "ENSD": None if opts.eta_noise_seed_delta == 0 else opts.eta_noise_seed_delta, + "Init image hash": getattr(p, 'init_img_hash', None), "Token merging ratio": None if not (opts.token_merging or cmd_opts.token_merging) or opts.token_merging_hr_only else opts.token_merging_ratio, "Token merging ratio hr": None if not (opts.token_merging or cmd_opts.token_merging) else opts.token_merging_ratio_hr, "Token merging random": None if opts.token_merging_random is False else opts.token_merging_random, @@ -487,12 +491,12 @@ def process_images(p: StableDiffusionProcessing) -> Processed: stored_opts = {k: opts.data[k] for k in p.override_settings.keys()} try: + # if no checkpoint override or the override checkpoint can't be found, remove override entry and load opts checkpoint + if sd_models.checkpoint_aliases.get(p.override_settings.get('sd_model_checkpoint')) is None: + p.override_settings.pop('sd_model_checkpoint', None) + sd_models.reload_model_weights() for k, v in p.override_settings.items(): setattr(opts, k, v) - - if k == 'sd_model_checkpoint': - sd_models.reload_model_weights() - if k == 'sd_vae': sd_vae.reload_vae_weights() @@ -701,6 +705,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: p.scripts.postprocess_batch(p, x_samples_ddim, batch_number=n) for i, x_sample in enumerate(x_samples_ddim): + p.batch_index = i x_sample = 255. * np.moveaxis(x_sample.cpu().numpy(), 0, 2) x_sample = x_sample.astype(np.uint8) @@ -865,6 +870,7 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): samples = self.sampler.sample(self, x, conditioning, unconditional_conditioning, image_conditioning=self.txt2img_image_conditioning(x)) if not self.enable_hr: return samples + self.is_hr_pass = True target_width = self.hr_upscale_to_x target_height = self.hr_upscale_to_y @@ -928,6 +934,7 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): sd_models.apply_token_merging(sd_model=self.sd_model, hr=True) log.debug('Applied token merging for high-res pass') samples = self.sampler.sample_img2img(self, samples, noise, conditioning, unconditional_conditioning, steps=self.hr_second_pass_steps or self.steps, image_conditioning=image_conditioning) + self.is_hr_pass = False return samples @@ -988,6 +995,10 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing): self.color_corrections = [] imgs = [] for img in self.init_images: + # Save init image + if opts.save_init_img: + self.init_img_hash = hashlib.md5(img.tobytes()).hexdigest() # pylint: disable=attribute-defined-outside-init + images.save_image(img, path=opts.outdir_init_images, basename=None, forced_filename=self.init_img_hash, save_to_dirs=False) image = images.flatten(img, opts.img2img_background_color) if crop_region is None and self.resize_mode != 3: image = images.resize_image(self.resize_mode, image, self.width, self.height) diff --git a/modules/realesrgan_model.py b/modules/realesrgan_model.py index c9b6cddf0..5b6109eac 100644 --- a/modules/realesrgan_model.py +++ b/modules/realesrgan_model.py @@ -7,6 +7,7 @@ from basicsr.utils.download_util import load_file_from_url from modules.upscaler import Upscaler, UpscalerData from modules.shared import cmd_opts, opts, device +from modules import modelloader import modules.errors as errors @@ -16,13 +17,19 @@ class UpscalerRealESRGAN(Upscaler): self.model_path = path super().__init__() try: - from basicsr.archs.rrdbnet_arch import RRDBNet - from realesrgan import RealESRGANer - from realesrgan.archs.srvgg_arch import SRVGGNetCompact + from basicsr.archs.rrdbnet_arch import RRDBNet # pylint: disable=unused-import + from realesrgan import RealESRGANer # pylint: disable=unused-import + from realesrgan.archs.srvgg_arch import SRVGGNetCompact # pylint: disable=unused-import self.enable = True self.scalers = [] scalers = self.load_models(path) + local_model_paths = self.find_models(ext_filter=[".pth"]) for scaler in scalers: + if scaler.local_data_path.startswith("http"): + filename = modelloader.friendly_name(scaler.local_data_path) + local = next(iter([local_model for local_model in local_model_paths if local_model.endswith(filename + '.pth')]), None) + if local: + scaler.local_data_path = local if scaler.name in opts.realesrgan_enabled_models: self.scalers.append(scaler) @@ -64,11 +71,11 @@ class UpscalerRealESRGAN(Upscaler): def load_model(self, path): try: info = next(iter([scaler for scaler in self.scalers if scaler.data_path == path]), None) - if info is None: print(f"Unable to find model info: {path}") return None - info.local_data_path = load_file_from_url(url=info.data_path, model_dir=self.model_path, progress=True) + if info.local_data_path.startswith("http"): + info.local_data_path = load_file_from_url(url=info.data_path, model_dir=self.model_path, progress=True) return info except Exception as e: errors.display(e, 'real-esrgan model list') diff --git a/modules/script_callbacks.py b/modules/script_callbacks.py index 98cb1d98b..10141281f 100644 --- a/modules/script_callbacks.py +++ b/modules/script_callbacks.py @@ -110,6 +110,7 @@ callback_map = dict( callbacks_infotext_pasted=[], callbacks_script_unloaded=[], callbacks_before_ui=[], + callbacks_on_reload=[], ) @@ -126,6 +127,14 @@ def app_started_callback(demo: Optional[Blocks], app: FastAPI): report_exception(e, c, 'app_started_callback') +def app_reload_callback(): + for c in callback_map['callbacks_on_reload']: + try: + c.callback() + except Exception as e: + report_exception(e, c, 'callbacks_on_reload') + + def model_loaded_callback(sd_model): for c in callback_map['callbacks_model_loaded']: try: @@ -279,6 +288,11 @@ def on_app_started(callback): add_callback(callback_map['callbacks_app_started'], callback) +def on_before_reload(callback): + """register a function to be called just before the server reloads.""" + add_callback(callback_map['callbacks_on_reload'], callback) + + def on_model_loaded(callback): """register a function to be called when the stable diffusion model is created; the model is passed as an argument; this function is also called when the script is reloaded. """ diff --git a/modules/sd_samplers_kdiffusion.py b/modules/sd_samplers_kdiffusion.py index a30d351fc..8b4bf0652 100644 --- a/modules/sd_samplers_kdiffusion.py +++ b/modules/sd_samplers_kdiffusion.py @@ -76,7 +76,7 @@ class CFGDenoiser(torch.nn.Module): return denoised - def forward(self, x, sigma, uncond, cond, cond_scale, image_cond): + def forward(self, x, sigma, uncond, cond, cond_scale, s_min_uncond, image_cond): if state.interrupted or state.skipped: raise sd_samplers_common.InterruptedException @@ -115,12 +115,21 @@ class CFGDenoiser(torch.nn.Module): sigma_in = denoiser_params.sigma tensor = denoiser_params.text_cond uncond = denoiser_params.text_uncond + skip_uncond = False - if tensor.shape[1] == uncond.shape[1]: - if not is_edit_model: - cond_in = torch.cat([tensor, uncond]) - else: + # alternating uncond allows for higher thresholds without the quality loss normally expected from raising it + if self.step % 2 and s_min_uncond > 0 and sigma[0] < s_min_uncond and not is_edit_model: + skip_uncond = True + x_in = x_in[:-batch_size] + sigma_in = sigma_in[:-batch_size] + + if tensor.shape[1] == uncond.shape[1] or skip_uncond: + if is_edit_model: cond_in = torch.cat([tensor, uncond, uncond]) + elif skip_uncond: + cond_in = tensor + else: + cond_in = torch.cat([tensor, uncond]) if shared.batch_cond_uncond: x_out = self.inner_model(x_in, sigma_in, cond=make_condition_dict([cond_in], image_cond_in)) @@ -144,7 +153,13 @@ class CFGDenoiser(torch.nn.Module): x_out[a:b] = self.inner_model(x_in[a:b], sigma_in[a:b], cond=make_condition_dict(c_crossattn, image_cond_in[a:b])) - x_out[-uncond.shape[0]:] = self.inner_model(x_in[-uncond.shape[0]:], sigma_in[-uncond.shape[0]:], cond=make_condition_dict([uncond], image_cond_in[-uncond.shape[0]:])) + if not skip_uncond: + x_out[-uncond.shape[0]:] = self.inner_model(x_in[-uncond.shape[0]:], sigma_in[-uncond.shape[0]:], cond=make_condition_dict([uncond], image_cond_in[-uncond.shape[0]:])) + + denoised_image_indexes = [x[0][0] for x in conds_list] + if skip_uncond: + fake_uncond = torch.cat([x_out[i:i+1] for i in denoised_image_indexes]) + x_out = torch.cat([x_out, fake_uncond]) # we skipped uncond denoising, so we put cond-denoised image to where the uncond-denoised image should be denoised_params = CFGDenoisedParams(x_out, state.sampling_step, state.sampling_steps, self.inner_model) cfg_denoised_callback(denoised_params) @@ -154,14 +169,16 @@ class CFGDenoiser(torch.nn.Module): if opts.live_preview_content == "Prompt": p_step = len(x_out) // batch_size - 1 p_step = p_step if p_step > 1 else 1 - sd_samplers_common.store_latent(x_out[0:-uncond.shape[0]:p_step]) + sd_samplers_common.store_latent(torch.cat([x_out[i:i+1] for i in denoised_image_indexes])) elif opts.live_preview_content == "Negative prompt": sd_samplers_common.store_latent(x_out[-uncond.shape[0]:]) - if not is_edit_model: - denoised = self.combine_denoised(x_out, conds_list, uncond, cond_scale) - else: + if is_edit_model: denoised = self.combine_denoised_for_edit_model(x_out, cond_scale) + elif skip_uncond: + denoised = self.combine_denoised(x_out, conds_list, uncond, 1.0) + else: + denoised = self.combine_denoised(x_out, conds_list, uncond, cond_scale) if self.mask is not None: denoised = self.init_latent * self.mask + self.nmask * denoised @@ -217,7 +234,7 @@ class KDiffusionSampler: self.eta = None self.config = None self.last_latent = None - + self.s_min_uncond = None self.conditioning_key = sd_model.model.conditioning_key def callback_state(self, d): @@ -250,6 +267,7 @@ class KDiffusionSampler: self.model_wrap_cfg.step = 0 self.model_wrap_cfg.image_cfg_scale = getattr(p, 'image_cfg_scale', None) self.eta = p.eta if p.eta is not None else opts.eta_ancestral + self.s_min_uncond = getattr(p, 's_min_uncond', 0.0) k_diffusion.sampling.torch = TorchHijack(self.sampler_noises if self.sampler_noises is not None else []) @@ -328,6 +346,7 @@ class KDiffusionSampler: 'image_cond': image_conditioning, 'uncond': unconditional_conditioning, 'cond_scale': p.cfg_scale, + 's_min_uncond': self.s_min_uncond } samples = self.launch_sampling(t_enc + 1, lambda: self.func(self.model_wrap_cfg, xi, extra_args=extra_args, disable=False, callback=self.callback_state, **extra_params_kwargs)) @@ -361,7 +380,8 @@ class KDiffusionSampler: 'cond': conditioning, 'image_cond': image_conditioning, 'uncond': unconditional_conditioning, - 'cond_scale': p.cfg_scale + 'cond_scale': p.cfg_scale, + 's_min_uncond': self.s_min_uncond }, disable=False, callback=self.callback_state, **extra_params_kwargs)) return samples diff --git a/modules/textual_inversion/preprocess.py b/modules/textual_inversion/preprocess.py index de1ddb59b..2b0714df3 100644 --- a/modules/textual_inversion/preprocess.py +++ b/modules/textual_inversion/preprocess.py @@ -1,17 +1,12 @@ import os -from PIL import Image, ImageOps import math -import platform -import sys import tqdm -import time - +from PIL import Image, ImageOps from modules import paths, shared, images, deepbooru -from modules.shared import opts, cmd_opts from modules.textual_inversion import autocrop -def preprocess(id_task, process_src, process_dst, process_width, process_height, preprocess_txt_action, process_flip, process_split, process_caption, process_caption_deepbooru=False, split_threshold=0.5, overlap_ratio=0.2, process_focal_crop=False, process_focal_crop_face_weight=0.9, process_focal_crop_entropy_weight=0.3, process_focal_crop_edges_weight=0.5, process_focal_crop_debug=False, process_multicrop=None, process_multicrop_mindim=None, process_multicrop_maxdim=None, process_multicrop_minarea=None, process_multicrop_maxarea=None, process_multicrop_objective=None, process_multicrop_threshold=None): +def preprocess(id_task, process_src, process_dst, process_width, process_height, preprocess_txt_action, process_keep_original_size, process_flip, process_split, process_caption, process_caption_deepbooru=False, split_threshold=0.5, overlap_ratio=0.2, process_focal_crop=False, process_focal_crop_face_weight=0.9, process_focal_crop_entropy_weight=0.3, process_focal_crop_edges_weight=0.5, process_focal_crop_debug=False, process_multicrop=None, process_multicrop_mindim=None, process_multicrop_maxdim=None, process_multicrop_minarea=None, process_multicrop_maxarea=None, process_multicrop_objective=None, process_multicrop_threshold=None): # pylint: disable=unused-argument try: if process_caption: shared.interrogator.load() @@ -19,7 +14,7 @@ def preprocess(id_task, process_src, process_dst, process_width, process_height, if process_caption_deepbooru: deepbooru.model.start() - preprocess_work(process_src, process_dst, process_width, process_height, preprocess_txt_action, process_flip, process_split, process_caption, process_caption_deepbooru, split_threshold, overlap_ratio, process_focal_crop, process_focal_crop_face_weight, process_focal_crop_entropy_weight, process_focal_crop_edges_weight, process_focal_crop_debug, process_multicrop, process_multicrop_mindim, process_multicrop_maxdim, process_multicrop_minarea, process_multicrop_maxarea, process_multicrop_objective, process_multicrop_threshold) + preprocess_work(process_src, process_dst, process_width, process_height, preprocess_txt_action, process_keep_original_size, process_flip, process_split, process_caption, process_caption_deepbooru, split_threshold, overlap_ratio, process_focal_crop, process_focal_crop_face_weight, process_focal_crop_entropy_weight, process_focal_crop_edges_weight, process_focal_crop_debug, process_multicrop, process_multicrop_mindim, process_multicrop_maxdim, process_multicrop_minarea, process_multicrop_maxarea, process_multicrop_objective, process_multicrop_threshold) finally: @@ -129,9 +124,10 @@ def multicrop_pic(image: Image, mindim, maxdim, minarea, maxarea, objective, thr default=None ) return wh and center_crop(image, *wh) - -def preprocess_work(process_src, process_dst, process_width, process_height, preprocess_txt_action, process_flip, process_split, process_caption, process_caption_deepbooru=False, split_threshold=0.5, overlap_ratio=0.2, process_focal_crop=False, process_focal_crop_face_weight=0.9, process_focal_crop_entropy_weight=0.3, process_focal_crop_edges_weight=0.5, process_focal_crop_debug=False, process_multicrop=None, process_multicrop_mindim=None, process_multicrop_maxdim=None, process_multicrop_minarea=None, process_multicrop_maxarea=None, process_multicrop_objective=None, process_multicrop_threshold=None): + +def preprocess_work(process_src, process_dst, process_width, process_height, preprocess_txt_action, process_keep_original_size, process_flip, process_split, process_caption, process_caption_deepbooru=False, split_threshold=0.5, overlap_ratio=0.2, process_focal_crop=False, process_focal_crop_face_weight=0.9, process_focal_crop_entropy_weight=0.3, process_focal_crop_edges_weight=0.5, process_focal_crop_debug=False, process_multicrop=None, process_multicrop_mindim=None, process_multicrop_maxdim=None, process_multicrop_minarea=None, process_multicrop_maxarea=None, process_multicrop_objective=None, process_multicrop_threshold=None): + width = process_width height = process_height src = os.path.abspath(process_src) @@ -225,6 +221,10 @@ def preprocess_work(process_src, process_dst, process_width, process_height, pre print(f"skipped {img.width}x{img.height} image {filename} (can't find suitable size within error threshold)") process_default_resize = False + if process_keep_original_size: + save_pic(img, index, params, existing_caption=existing_caption) + process_default_resize = False + if process_default_resize: img = images.resize_image(1, img, width, height) save_pic(img, index, params, existing_caption=existing_caption) From 303574ebfc4d4ce9f9c458a5f72854e3799afb0d Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 4 May 2023 09:27:48 -0400 Subject: [PATCH 059/282] draft full merge from upstream --- .../multidiffusion-upscaler-for-automatic1111 | 2 +- automatic.ico => html/logo.ico | Bin automatic.png => html/logo.png | Bin automatic.svg => html/logo.svg | 0 javascript/notification.js | 2 +- script.js => javascript/script.js | 0 style.css => javascript/style.css | 29 ++++- javascript/ui.js | 10 ++ modules/shared.py | 12 +- modules/ui.py | 120 ++++++++++++++---- modules/ui_common.py | 2 +- modules/ui_extensions.py | 46 +++++-- modules/ui_postprocessing.py | 8 +- webui.py | 2 +- 14 files changed, 187 insertions(+), 46 deletions(-) rename automatic.ico => html/logo.ico (100%) rename automatic.png => html/logo.png (100%) rename automatic.svg => html/logo.svg (100%) rename script.js => javascript/script.js (100%) rename style.css => javascript/style.css (93%) diff --git a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 index fbe34db70..eada8e510 160000 --- a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 +++ b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 @@ -1 +1 @@ -Subproject commit fbe34db704736e5745c3a4e855939508eef344ce +Subproject commit eada8e5101417f60850efa15f7454a826da6cf0d diff --git a/automatic.ico b/html/logo.ico similarity index 100% rename from automatic.ico rename to html/logo.ico diff --git a/automatic.png b/html/logo.png similarity index 100% rename from automatic.png rename to html/logo.png diff --git a/automatic.svg b/html/logo.svg similarity index 100% rename from automatic.svg rename to html/logo.svg diff --git a/javascript/notification.js b/javascript/notification.js index 517cb42c1..c9be9e3c3 100644 --- a/javascript/notification.js +++ b/javascript/notification.js @@ -12,7 +12,7 @@ onUiUpdate(function(){ const galleryPreviews = gradioApp().querySelectorAll('div[id^="tab_"][style*="display: block"] div[id$="_results"] .thumbnail-item > img'); if (!galleryPreviews) return; const headImg = galleryPreviews[0]?.src; - if (!headImg || headImg == lastHeadImg || headImg.endsWith('automatic.png')) return; + if (!headImg || headImg == lastHeadImg || headImg.endsWith('logo.png')) return; const audioNotification = gradioApp().querySelector('#audio_notification audio'); if (audioNotification) audioNotification.play(); lastHeadImg = headImg; diff --git a/script.js b/javascript/script.js similarity index 100% rename from script.js rename to javascript/script.js diff --git a/style.css b/javascript/style.css similarity index 93% rename from style.css rename to javascript/style.css index c0fe31146..dee5b3704 100644 --- a/style.css +++ b/javascript/style.css @@ -155,10 +155,37 @@ button.custom-button{ margin-left: -0.75em } -#txtimg_hr_finalres .resolution{ +#img2img_scale_resolution_preview.block{ + display: flex; + align-items: end; +} + +#txtimg_hr_finalres .resolution, #img2img_scale_resolution_preview .resolution{ font-weight: bold; } +div#extras_scale_to_tab div.form{ + flex-direction: row; +} + +#img2img_column_batch{ + align-self: end; + margin-bottom: 0.9em; +} + +#img2img_unused_scale_by_slider{ + visibility: hidden; + width: 0.5em; + max-width: 0.5em; + min-width: 0.5em; +} + +.extra-network-cards{ + height: 725px; + overflow: scroll; + resize: vertical; +} + .inactive{ opacity: 0.5; } diff --git a/javascript/ui.js b/javascript/ui.js index e5781767a..2b7cfaf91 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -321,6 +321,16 @@ function selectCheckpoint(name){ gradioApp().getElementById('change_checkpoint').click() } +function updateImg2imgResizeToTextAfterChangingImage(){ + // At the time this is called from gradio, the image has no yet been replaced. + // There may be a better solution, but this is simple and straightforward so I'm going with it. + setTimeout(function() { + gradioApp().getElementById('img2img_update_resize_to').click() + }, 500); + + return [] +} + function create_theme_element() { el = document.createElement('img'); el.id = 'theme-preview'; diff --git a/modules/shared.py b/modules/shared.py index 012c0af31..b375dc6d4 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -6,6 +6,7 @@ import datetime import urllib.request import gradio as gr import tqdm +import requests from modules import errors, ui_components, shared_items, cmd_args 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 # pylint: disable=W0611 import modules.interrogate @@ -35,6 +36,7 @@ restricted_opts = { "outdir_grids", "outdir_txt2img_grids", "outdir_save", + "outdir_init_images" } ui_reorder_categories = [ @@ -301,6 +303,7 @@ options_templates.update(options_section(('saving-images', "Image options"), { "use_original_name_batch": OptionInfo(True, "Use original name for output filename during batch process in extras tab"), "use_upscaler_name_as_suffix": OptionInfo(True, "Use upscaler name as filename suffix in the extras tab"), "save_selected_only": OptionInfo(True, "When using 'Save' button, only save a single selected image"), + "save_init_img": OptionInfo(False, "Save init images when using image processing"), "save_to_dirs": OptionInfo(False, "Save images to a subdirectory"), "grid_save_to_dirs": OptionInfo(False, "Save grids to a subdirectory"), "use_save_to_dirs_for_ui": OptionInfo(False, "When using \"Save\" button, save images to a subdirectory"), @@ -317,6 +320,7 @@ options_templates.update(options_section(('saving-paths', "Image Paths"), { "outdir_txt2img_grids": OptionInfo("outputs/grids", 'Output directory for txt2img grids', component_args=hide_dirs), "outdir_img2img_grids": OptionInfo("outputs/grids", 'Output directory for img2img grids', component_args=hide_dirs), "outdir_save": OptionInfo("outputs/save", "Directory for saving images using the Save button", component_args=hide_dirs), + "outdir_init_images": OptionInfo("outputs/init-images", "Directory for saving init images when using img2img", component_args=hide_dirs), })) options_templates.update(options_section(('cuda', "CUDA Settings"), { @@ -339,10 +343,12 @@ options_templates.update(options_section(('cuda', "CUDA Settings"), { })) options_templates.update(options_section(('upscaling', "Upscaling"), { + "upscaler_for_img2img": OptionInfo("None", "Default upscaler for image resize operations", gr.Dropdown, lambda: {"choices": [x.name for x in sd_upscalers]}), + "realesrgan_enabled_models": OptionInfo(["R-ESRGAN 4x+", "R-ESRGAN 4x+ Anime6B"], "Real-ESRGAN available models", gr.CheckboxGroup, lambda: {"choices": shared_items.realesrgan_models_names()}), "ESRGAN_tile": OptionInfo(192, "Tile size for ESRGAN upscalers (0 = no tiling)", gr.Slider, {"minimum": 0, "maximum": 512, "step": 16}), "ESRGAN_tile_overlap": OptionInfo(8, "Tile overlap in pixels for ESRGAN upscalers", gr.Slider, {"minimum": 0, "maximum": 48, "step": 1}), - "realesrgan_enabled_models": OptionInfo(["R-ESRGAN 4x+", "R-ESRGAN 4x+ Anime6B"], "Real-ESRGAN available models", gr.CheckboxGroup, lambda: {"choices": shared_items.realesrgan_models_names()}), - "upscaler_for_img2img": OptionInfo("None", "Default upscaler for image resize operations", gr.Dropdown, lambda: {"choices": [x.name for x in sd_upscalers]}), + "SCUNET_tile": OptionInfo(256, "Tile size for SCUNET upscalers. 0 = no tiling.", gr.Slider, {"minimum": 0, "maximum": 512, "step": 16}), + "SCUNET_tile_overlap": OptionInfo(8, "Tile overlap, in pixels for SCUNET upscalers. Low values = visible seam.", gr.Slider, {"minimum": 0, "maximum": 64, "step": 1}), "use_old_hires_fix_width_height": OptionInfo(False, "Hires fix uses width & height to set final resolution rather than first pass"), "dont_fix_second_order_samplers_schedule": OptionInfo(False, "Do not fix prompt schedule for second order samplers"), })) @@ -403,6 +409,7 @@ options_templates.update(options_section(('ui', "User interface"), { "font": OptionInfo("", "Font for image grids that have text"), "keyedit_precision_attention": OptionInfo(0.1, "Ctrl+up/down precision when editing (attention:1.1)", gr.Slider, {"minimum": 0.01, "maximum": 0.2, "step": 0.001}), "keyedit_precision_extra": OptionInfo(0.05, "Ctrl+up/down precision when editing ", gr.Slider, {"minimum": 0.01, "maximum": 0.2, "step": 0.001}), + "keyedit_delimiters": OptionInfo(".,\/!?%^*;:{}=`~()", "Ctrl+up/down word delimiters"), "quicksettings": OptionInfo("sd_model_checkpoint", "Quicksettings list"), "hidden_tabs": OptionInfo([], "Hidden UI tabs", ui_components.DropdownMulti, lambda: {"choices": [x for x in tab_names]}), "ui_reorder": OptionInfo(", ".join(ui_reorder_categories), "txt2img/img2img UI item order"), @@ -428,6 +435,7 @@ options_templates.update(options_section(('sampler-params', "Sampler parameters" "eta_ddim": OptionInfo(0.0, "Noise multiplier for DDIM (eta)", gr.Slider, {"minimum": 0.0, "maximum": 1.0, "step": 0.01}), "ddim_discretize": OptionInfo('uniform', "DDIM discretize img2img", gr.Radio, {"choices": ['uniform', 'quad']}), 's_churn': OptionInfo(0.0, "sigma churn", gr.Slider, {"minimum": 0.0, "maximum": 1.0, "step": 0.01}), + 's_min_uncond': OptionInfo(0, "Negative Guidance minimum sigma", gr.Slider, {"minimum": 0.0, "maximum": 4.0, "step": 0.01}), 's_tmin': OptionInfo(0.0, "sigma tmin", gr.Slider, {"minimum": 0.0, "maximum": 1.0, "step": 0.01}), 's_noise': OptionInfo(1.0, "sigma noise", gr.Slider, {"minimum": 0.0, "maximum": 1.0, "step": 0.01}), 'eta_noise_seed_delta': OptionInfo(0, "Noise seed delta (eta)", gr.Number, {"precision": 0}), diff --git a/modules/ui.py b/modules/ui.py index 6d8054a3c..b0ad69c2a 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -71,6 +71,9 @@ def send_gradio_gallery_to_image(x): def visit(x, func, path=""): if hasattr(x, 'children'): + if isinstance(x, gr.Tabs) and x.elem_id is not None: + # Tabs element can't have a label, have to use elem_id instead + func(f"{path}/Tabs@{x.elem_id}", x) for c in x.children: visit(c, func, path) elif x.label is not None: @@ -96,6 +99,14 @@ def calc_resolution_hires(enable, width, height, hr_scale, hr_resize_x, hr_resiz return f"resize: from {p.width}x{p.height} to {p.hr_resize_x or p.hr_upscale_to_x}x{p.hr_resize_y or p.hr_upscale_to_y}" +def resize_from_to_html(width, height, scale_by): + target_width = int(width * scale_by) + target_height = int(height * scale_by) + if not target_width or not target_height: + return "no image selected" + return f"resize: from {width}x{height} to {target_width}x{target_height}" + + def apply_styles(prompt, prompt_neg, styles): prompt = shared.prompt_styles.apply_styles_to_prompt(prompt, styles) prompt_neg = shared.prompt_styles.apply_negative_styles_to_prompt(prompt_neg, styles) @@ -140,8 +151,8 @@ def create_seed_inputs(target_interface): with FormRow(elem_id=target_interface + '_seed_row', variant="compact"): seed = gr.Number(label='Seed', value=-1, elem_id=target_interface + '_seed') seed.style(container=False) - random_seed = ToolButton(random_symbol, elem_id=target_interface + '_random_seed') - reuse_seed = ToolButton(reuse_symbol, elem_id=target_interface + '_reuse_seed') + random_seed = ToolButton(random_symbol, elem_id=target_interface + '_random_seed', label='Random seed') + reuse_seed = ToolButton(reuse_symbol, elem_id=target_interface + '_reuse_seed', label='Reuse seed') seed_checkbox = gr.Checkbox(label='Extra', elem_id=target_interface + '_subseed_show', value=False, visible=False) # Ghost checkbox, so it still gets sent. For compatibility with extensions that call txt2img or img2img manually with FormRow(visible=True, elem_id=target_interface + '_subseed_row'): subseed = gr.Number(label='Variation seed', value=-1, elem_id=target_interface + '_subseed') @@ -343,7 +354,7 @@ def create_ui(): width = gr.Slider(minimum=64, maximum=2048, step=8, label="Width", value=512, elem_id="txt2img_width") height = gr.Slider(minimum=64, maximum=2048, step=8, label="Height", value=512, elem_id="txt2img_height") with gr.Column(elem_id="txt2img_dimensions_row", scale=1, elem_classes="dimensions-tools"): - res_switch_btn = ToolButton(value=switch_values_symbol, elem_id="txt2img_res_switch_btn") + res_switch_btn = ToolButton(value=switch_values_symbol, elem_id="txt2img_res_switch_btn", label="Switch dims") with gr.Column(elem_id="txt2img_column_batch"): with FormRow(elem_id="txt2img_row_batch"): batch_count = gr.Slider(minimum=1, step=1, label='Batch count', value=1, elem_id="txt2img_batch_count") @@ -536,6 +547,7 @@ def create_ui(): copy_image_buttons.append((button, name, elem)) with gr.Tabs(elem_id="mode_img2img"): + img2img_selected_tab = gr.State(0) # pylint: disable=abstract-class-instantiated with gr.TabItem('img2img', id='img2img', elem_id="img2img_img2img_tab") as tab_img2img: init_img = gr.Image(label="Image for img2img", elem_id="img2img_image", show_label=False, source="upload", interactive=True, type="pil", tool="editor", image_mode="RGBA").style(height=480) add_copy_image_controls('img2img', init_img) @@ -578,6 +590,12 @@ def create_ui(): img2img_batch_output_dir = gr.Textbox(label="Output directory", **shared.hide_dirs, elem_id="img2img_batch_output_dir") img2img_batch_inpaint_mask_dir = gr.Textbox(label="Inpaint batch mask directory (required for inpaint batch processing only)", **shared.hide_dirs, elem_id="img2img_batch_inpaint_mask_dir") + img2img_tabs = [tab_img2img, tab_sketch, tab_inpaint, tab_inpaint_color, tab_inpaint_upload, tab_batch] + img2img_image_inputs = [init_img, sketch, init_img_with_mask, inpaint_color_sketch] # pylint: disable=unused-variable + + for i, tab in enumerate(img2img_tabs): + tab.select(fn=lambda tabnum=i: tabnum, inputs=[], outputs=[img2img_selected_tab]) + def copy_image(img): if isinstance(img, dict) and 'image' in img: return img['image'] @@ -606,16 +624,49 @@ def create_ui(): elif category == "dimensions": with FormRow(): - with FormRow(elem_id="img2img_row_size"): - width = gr.Slider(minimum=64, maximum=2048, step=8, label="Width", value=512, elem_id="img2img_width") - height = gr.Slider(minimum=64, maximum=2048, step=8, label="Height", value=512, elem_id="img2img_height") + with gr.Column(elem_id="img2img_column_size", scale=4): + selected_scale_tab = gr.State(value=0) # pylint: disable=abstract-class-instantiated - with gr.Column(elem_id="img2img_dimensions_row", scale=1, elem_classes="dimensions-tools"): - res_switch_btn = ToolButton(value=switch_values_symbol, elem_id="img2img_res_switch_btn") + with gr.Tabs(): + with gr.Tab(label="Resize to") as tab_scale_to: + with FormRow(): + with gr.Column(elem_id="img2img_column_size", scale=4): + width = gr.Slider(minimum=64, maximum=2048, step=8, label="Width", value=512, elem_id="img2img_width") + height = gr.Slider(minimum=64, maximum=2048, step=8, label="Height", value=512, elem_id="img2img_height") + with gr.Column(elem_id="img2img_dimensions_row", scale=1, elem_classes="dimensions-tools"): + res_switch_btn = ToolButton(value=switch_values_symbol, elem_id="img2img_res_switch_btn") - with FormRow(elem_id="img2img_row_batch"): + with gr.Tab(label="Resize by") as tab_scale_by: + scale_by = gr.Slider(minimum=0.05, maximum=4.0, step=0.05, label="Scale", value=1.0, elem_id="img2img_scale") + + with FormRow(): + scale_by_html = FormHTML(resize_from_to_html(0, 0, 0.0), elem_id="img2img_scale_resolution_preview") + gr.Slider(label="Unused", elem_id="img2img_unused_scale_by_slider") + button_update_resize_to = gr.Button(visible=False, elem_id="img2img_update_resize_to") + + on_change_args = dict( + fn=resize_from_to_html, + _js="currentImg2imgSourceResolution", + inputs=[dummy_component, dummy_component, scale_by], + outputs=scale_by_html, + show_progress=False, + ) + + scale_by.release(**on_change_args) + button_update_resize_to.click(**on_change_args) + + # the code below is meant to update the resolution label after the image in the image selection UI has changed. + # as it is now the event keeps firing continuously for inpaint edits, which ruins the page with constant requests. + # I assume this must be a gradio bug and for now we'll just do it for non-inpaint inputs. + for component in [init_img, sketch]: + component.change(fn=lambda: None, _js="updateImg2imgResizeToTextAfterChangingImage", inputs=[], outputs=[], show_progress=False) + + tab_scale_to.select(fn=lambda: 0, inputs=[], outputs=[selected_scale_tab]) + tab_scale_by.select(fn=lambda: 1, inputs=[], outputs=[selected_scale_tab]) + + with gr.Column(elem_id="img2img_column_batch"): batch_count = gr.Slider(minimum=1, step=1, label='Batch count', value=1, elem_id="img2img_batch_count") - batch_size = gr.Slider(minimum=1, maximum=32, step=1, label='Batch size', value=1, elem_id="img2img_batch_size") + batch_size = gr.Slider(minimum=1, maximum=8, step=1, label='Batch size', value=1, elem_id="img2img_batch_size") elif category == "cfg": with FormGroup(): @@ -664,7 +715,7 @@ def create_ui(): def select_img2img_tab(tab): return gr.update(visible=tab in [2, 3, 4]), gr.update(visible=tab == 3), - for i, elem in enumerate([tab_img2img, tab_sketch, tab_inpaint, tab_inpaint_color, tab_inpaint_upload, tab_batch]): + for i, elem in enumerate(img2img_tabs): elem.select( fn=lambda tab=i: select_img2img_tab(tab), # pylint: disable=cell-var-from-loop inputs=[], @@ -716,10 +767,11 @@ def create_ui(): image_cfg_scale, denoising_strength, seed, - subseed, subseed_strength, seed_resize_from_h, seed_resize_from_w, - seed_checkbox, # seed_enable_extras + subseed, subseed_strength, seed_resize_from_h, seed_resize_from_w, seed_checkbox, + selected_scale_tab, height, width, + scale_by, resize_mode, inpaint_full_res, inpaint_full_res_padding, @@ -859,8 +911,9 @@ def create_ui(): interp_method.change(fn=update_interp_description, inputs=[interp_method], outputs=[interp_description]) with FormRow(): - checkpoint_format = gr.Radio(choices=["ckpt", "safetensors"], value="ckpt", label="Checkpoint format", elem_id="modelmerger_checkpoint_format") + checkpoint_format = gr.Radio(choices=["ckpt", "safetensors"], value="safetensors", label="Checkpoint format", elem_id="modelmerger_checkpoint_format") save_as_half = gr.Checkbox(value=False, label="Save as float16", elem_id="modelmerger_save_as_half") + save_metadata = gr.Checkbox(value=True, label="Save metadata (.safetensors only)", elem_id="modelmerger_save_metadata") with FormRow(): with gr.Column(): @@ -881,7 +934,7 @@ def create_ui(): with gr.Group(elem_id="modelmerger_results_panel"): modelmerger_result = gr.HTML(elem_id="modelmerger_result", show_label=False) - with gr.Tab(label="Create embedding"): + with gr.Tab(label="Create embedding", id="create_embedding"): new_embedding_name = gr.Textbox(label="Name", elem_id="train_new_embedding_name") initialization_text = gr.Textbox(label="Initialization text", value="*", elem_id="train_initialization_text") nvpt = gr.Slider(label="Number of vectors per token", minimum=1, maximum=75, step=1, value=1, elem_id="train_nvpt") @@ -894,7 +947,7 @@ def create_ui(): with gr.Column(): create_embedding = gr.Button(value="Create embedding", variant='primary', elem_id="train_create_embedding") - with gr.Tab(label="Create hypernetwork"): + with gr.Tab(label="Create hypernetwork", id="create_hypernetwork"): new_hypernetwork_name = gr.Textbox(label="Name", elem_id="train_new_hypernetwork_name") new_hypernetwork_sizes = gr.CheckboxGroup(label="Modules", value=["768", "320", "640", "1280"], choices=["768", "1024", "320", "640", "1280"], elem_id="train_new_hypernetwork_sizes") new_hypernetwork_layer_structure = gr.Textbox("1, 2, 1", label="Enter hypernetwork layer structure", placeholder="1st and last digit must be 1. ex:'1, 2, 1'", elem_id="train_new_hypernetwork_layer_structure") @@ -912,7 +965,7 @@ def create_ui(): with gr.Column(): create_hypernetwork = gr.Button(value="Create hypernetwork", variant='primary', elem_id="train_create_hypernetwork") - with gr.Tab(label="Preprocess images"): + with gr.Tab(label="Preprocess images", id="preprocess_images"): process_src = gr.Textbox(label='Source directory', elem_id="train_process_src") process_dst = gr.Textbox(label='Destination directory', elem_id="train_process_dst") process_width = gr.Slider(minimum=64, maximum=2048, step=8, label="Width", value=512, elem_id="train_process_width") @@ -920,6 +973,7 @@ def create_ui(): preprocess_txt_action = gr.Dropdown(label='Existing Caption txt Action', value="ignore", choices=["ignore", "copy", "prepend", "append"], elem_id="train_preprocess_txt_action") with gr.Row(): + process_keep_original_size = gr.Checkbox(label='Keep original size', elem_id="train_process_keep_original_size") process_flip = gr.Checkbox(label='Create flipped copies', elem_id="train_process_flip") process_split = gr.Checkbox(label='Split oversized images', elem_id="train_process_split") process_focal_crop = gr.Checkbox(label='Auto focal point crop', elem_id="train_process_focal_crop") @@ -979,7 +1033,7 @@ def create_ui(): def get_textual_inversion_template_names(): return sorted([x for x in textual_inversion.textual_inversion_templates]) - with gr.Tab(label="Train"): + with gr.Tab(label="Train", id="train"): gr.HTML(value="

Train an embedding or Hypernetwork; you must specify a directory with a set of 1:1 ratio images

") with FormRow(): train_embedding_name = gr.Dropdown(label='Embedding', elem_id="train_embedding", choices=sorted(sd_hijack.model_hijack.embedding_db.word_embeddings.keys())) @@ -1086,6 +1140,7 @@ def create_ui(): process_width, process_height, preprocess_txt_action, + process_keep_original_size, process_flip, process_split, process_caption, @@ -1297,7 +1352,7 @@ def create_ui(): request_notifications = gr.Button(value='Request browser notifications', elem_id="request_notifications", visible=False) _show_all_pages = gr.Button(value="Show all pages", variant='primary', elem_id="settings_show_all_pages") - with gr.TabItem("Licenses"): + with gr.TabItem("Licenses", id="licenses"): gr.HTML(shared.html("licenses.html"), elem_id="licenses") def unload_sd_weights(): @@ -1370,7 +1425,7 @@ def create_ui(): parameters_copypaste.connect_paste_params_buttons() - with gr.Tabs(elem_id="tabs") as _tabs: + with gr.Tabs(elem_id="tabs") as tabs: for interface, label, ifid in interfaces: if label in shared.opts.hidden_tabs: continue @@ -1393,7 +1448,8 @@ def create_ui(): component = component_dict[k] info = opts.data_labels[k] - component.change( + change_handler = component.release if hasattr(component, 'release') else component.change + change_handler( fn=lambda value, k=k: run_settings_single(value, key=k), inputs=[component], outputs=[component, text_settings], @@ -1452,6 +1508,7 @@ def create_ui(): config_source, bake_in_vae, discard_weights, + save_metadata, ], outputs=[ primary_model_name, @@ -1495,7 +1552,7 @@ def create_ui(): if init_field is not None: init_field(saved_value) - if type(x) in [gr.Slider, gr.Radio, gr.Checkbox, gr.Textbox, gr.Number, gr.Dropdown] and x.visible: + if type(x) in [gr.Slider, gr.Radio, gr.Checkbox, gr.Textbox, gr.Number, gr.Dropdown, ToolButton] and x.visible: apply_field(x, 'visible') if type(x) == gr.Slider: @@ -1525,11 +1582,25 @@ def create_ui(): apply_field(x, 'value', check_dropdown, getattr(x, 'init_field', None)) + def check_tab_id(tab_id): + tab_items = list(filter(lambda e: isinstance(e, gr.TabItem), x.children)) + if type(tab_id) == str: + tab_ids = [t.id for t in tab_items] + return tab_id in tab_ids + elif type(tab_id) == int: + return tab_id >= 0 and tab_id < len(tab_items) + else: + return False + + if type(x) == gr.Tabs: + apply_field(x, 'selected', check_tab_id) + visit(txt2img_interface, loadsave, "txt2img") visit(img2img_interface, loadsave, "img2img") visit(extras_interface, loadsave, "extras") visit(modelmerger_interface, loadsave, "modelmerger") visit(train_interface, loadsave, "train") + loadsave(f"webui/Tabs@{tabs.elem_id}", tabs) if not error_loading and (not os.path.exists(ui_config_file) or settings_count != len(ui_settings)): with open(ui_config_file, "w", encoding="utf8") as file: @@ -1551,7 +1622,7 @@ def webpath(fn): def html_head(): - script_js = os.path.join(script_path, "script.js") + script_js = os.path.join(script_path, "javascript", "script.js") head = f'\n' for script in modules.scripts.list_scripts("javascript", ".js"): head += f'\n' @@ -1573,9 +1644,10 @@ def html_body(): def html_css(): - head = "" def stylesheet(fn): + shared.log.debug(f'Adding stylesheet: {fn}') return f'' + head = stylesheet('javascript/style.css') for cssfile in modules.scripts.list_files_with_name("style.css"): if not os.path.isfile(cssfile): continue diff --git a/modules/ui_common.py b/modules/ui_common.py index 6dd0f323d..7ac745b8d 100644 --- a/modules/ui_common.py +++ b/modules/ui_common.py @@ -120,7 +120,7 @@ def create_output_panel(tabname, outdir): with gr.Column(variant='panel', elem_id=f"{tabname}_results"): with gr.Group(elem_id=f"{tabname}_gallery_container"): - result_gallery = gr.Gallery(value=['automatic.png'], label='Output', show_label=False, elem_id=f"{tabname}_gallery").style(preview=False, container=False, columns=[1,2,3,4,5,6]) # <576px, <768px, <992px, <1200px, <1400px, >1400px + result_gallery = gr.Gallery(value=['html/logo.png'], label='Output', show_label=False, elem_id=f"{tabname}_gallery").style(preview=False, container=False, columns=[1,2,3,4,5,6]) # <576px, <768px, <992px, <1200px, <1400px, >1400px generation_info = None with gr.Column(): diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py index fb7624bff..1c84e3dc7 100644 --- a/modules/ui_extensions.py +++ b/modules/ui_extensions.py @@ -4,12 +4,14 @@ import time import shutil import errno import html +from datetime import datetime import git import gradio as gr from modules import extensions, shared, paths, errors from modules.call_queue import wrap_gradio_gpu_call available_extensions = {"extensions": []} +STYLE_PRIMARY = ' style="color: var(--primary-400)"' def check_access(): @@ -71,6 +73,16 @@ def check_updates(_id_task, disable_list): return extension_table(), "" +def make_commit_link(commit_hash, remote, text=None): + if text is None: + text = commit_hash[:8] + if remote.startswith("https://github.com/"): + href = os.path.join(remote, "commit", commit_hash) + return f'{text}' + else: + return text + + def extension_table(): code = f""" @@ -98,14 +110,18 @@ def extension_table(): style = "" if shared.opts.disable_all_extensions == "extra" and not ext.is_builtin or shared.opts.disable_all_extensions == "all": - style = ' style="color: var(--primary-400)"' + style = STYLE_PRIMARY + + version_link = ext.version + if ext.commit_hash and ext.remote: + version_link = make_commit_link(ext.commit_hash, ext.remote, ext.version) code += f""" - + {ext_status} """ @@ -126,7 +142,7 @@ def normalize_git_url(url): return url -def install_extension_from_url(dirname, url): +def install_extension_from_url(dirname, url, branch_name=None): check_access() assert url, 'No URL specified' @@ -147,10 +163,17 @@ def install_extension_from_url(dirname, url): try: shutil.rmtree(tmpdir, True) - with git.Repo.clone_from(url, tmpdir) as repo: - repo.remote().fetch() - for submodule in repo.submodules: - submodule.update() + if not branch_name: + # if no branch is specified, use the default branch + with git.Repo.clone_from(url, tmpdir) as repo: + repo.remote().fetch() + for submodule in repo.submodules: + submodule.update() + else: + with git.Repo.clone_from(url, tmpdir, branch=branch_name) as repo: + repo.remote().fetch() + for submodule in repo.submodules: + submodule.update() try: os.rename(tmpdir, target_dir) except OSError as err: @@ -287,7 +310,7 @@ def create_ui(): with gr.Blocks(analytics_enabled=False) as ui: with gr.Tabs(elem_id="tabs_extensions"): - with gr.TabItem("Installed"): + with gr.TabItem("Installed", id="installed"): with gr.Row(elem_id="extensions_installed_top"): apply = gr.Button(value="Apply (restart required)", variant="primary") @@ -320,7 +343,7 @@ def create_ui(): outputs=[extensions_table, info], ) - with gr.TabItem("Available"): + with gr.TabItem("Available", id="available"): with gr.Row(): refresh_available_extensions_button = gr.Button(value="Load from:", variant="primary") available_extensions_index = gr.Text(value="https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui-extensions/master/index.json", label="Extension index URL").style(container=False) @@ -367,15 +390,16 @@ def create_ui(): outputs=[available_extensions_table, install_result] ) - with gr.TabItem("Install from URL"): + with gr.TabItem("Install from URL", id="install_from_url"): install_url = gr.Text(label="URL for extension's git repository") + install_branch = gr.Text(label="Specific branch name", placeholder="Leave empty for default main branch") install_dirname = gr.Text(label="Local directory name", placeholder="Leave empty for auto") install_button = gr.Button(value="Install", variant="primary") install_result = gr.HTML(elem_id="extension_install_result") install_button.click( fn=modules.ui.wrap_gradio_call(install_extension_from_url, extra_outputs=[gr.update()]), - inputs=[install_dirname, install_url], + inputs=[install_dirname, install_url, install_branch], outputs=[extensions_table, install_result], ) diff --git a/modules/ui_postprocessing.py b/modules/ui_postprocessing.py index c5ddbfae5..80c5d940e 100644 --- a/modules/ui_postprocessing.py +++ b/modules/ui_postprocessing.py @@ -11,13 +11,13 @@ def create_ui(): with gr.Column(variant='compact'): with gr.Tabs(elem_id="mode_extras"): - with gr.TabItem('Process Image', elem_id="extras_single_tab") as tab_single: + with gr.TabItem('Single Image', id="single_image", elem_id="extras_single_tab") as tab_single: extras_image = gr.Image(label="Source", source="upload", interactive=True, type="pil", elem_id="extras_image") - with gr.TabItem('Process Batch', elem_id="extras_batch_process_tab") as tab_batch: - image_batch = gr.File(label="Batch Process", file_count="multiple", interactive=True, type="file", elem_id="extras_image_batch") + with gr.TabItem('Process Batch', id="batch_process", elem_id="extras_batch_process_tab") as tab_batch: + image_batch = gr.Files(label="Batch Process", interactive=True, elem_id="extras_image_batch") - with gr.TabItem('Process Folder', elem_id="extras_batch_directory_tab") as tab_batch_dir: + with gr.TabItem('Process Folder', id="batch_from_directory", elem_id="extras_batch_directory_tab") as tab_batch_dir: extras_batch_input_dir = gr.Textbox(label="Input directory", **shared.hide_dirs, placeholder="A directory on the same machine where the server is running.", elem_id="extras_batch_input_dir") extras_batch_output_dir = gr.Textbox(label="Output directory", **shared.hide_dirs, placeholder="Leave blank to save images to the default path.", elem_id="extras_batch_output_dir") show_extras_results = gr.Checkbox(label='Show result images', value=True, elem_id="extras_show_extras_results") diff --git a/webui.py b/webui.py index 5309aa7df..841048237 100644 --- a/webui.py +++ b/webui.py @@ -223,7 +223,7 @@ def start_ui(): inbrowser=cmd_opts.autolaunch, prevent_thread_lock=True, show_api=True, - favicon_path='automatic.ico', + favicon_path='html/logo.ico', ) shared.demo.server.wants_restart = False setup_middleware(app, cmd_opts) From a677253b7ca8f01dff103b452d4a3c60176c2cbe Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 4 May 2023 10:45:25 -0400 Subject: [PATCH 060/282] add api-logo workaround --- installer.py | 1 + javascript/ui.js | 3 +++ modules/ui.py | 3 +++ webui.py | 9 +++++++-- wiki | 2 +- 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/installer.py b/installer.py index c3601de10..f2b4d5b5d 100644 --- a/installer.py +++ b/installer.py @@ -406,6 +406,7 @@ def set_environment(): os.environ.setdefault('SAFETENSORS_FAST_GPU', '1') os.environ.setdefault('NUMEXPR_MAX_THREADS', '16') os.environ.setdefault('PYTHONHTTPSVERIFY', '0') + os.environ.setdefault('HF_HUB_DISABLE_TELEMETRY', '1') if sys.platform == 'darwin': os.environ.setdefault('PYTORCH_ENABLE_MPS_FALLBACK', '1') diff --git a/javascript/ui.js b/javascript/ui.js index 2b7cfaf91..3825935aa 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -358,6 +358,9 @@ function preview_theme() { } function reconnect_ui() { + const api_logo = Array.from(gradioApp().querySelectorAll("img")).filter((el) => el?.src?.endsWith('api-logo.svg')) + if (api_logo.length > 0) api_logo[0].remove() + const el1 = gradioApp().getElementById('txt2img_gallery_container') const el2 = gradioApp().getElementById('txt2img_gallery') const task_id = localStorage.getItem('task') diff --git a/modules/ui.py b/modules/ui.py index b0ad69c2a..1a4316c7e 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1625,6 +1625,9 @@ def html_head(): script_js = os.path.join(script_path, "javascript", "script.js") head = f'\n' for script in modules.scripts.list_scripts("javascript", ".js"): + if script.path == script_js: + continue + print(script.path) head += f'\n' for script in modules.scripts.list_scripts("javascript", ".mjs"): head += f'\n' diff --git a/webui.py b/webui.py index 841048237..b6dcb2ff6 100644 --- a/webui.py +++ b/webui.py @@ -201,7 +201,7 @@ def start_ui(): log.info('Server queues disabled') shared.demo.progress_tracking = False else: - shared.demo.queue(concurrency_count=16) + shared.demo.queue(concurrency_count=64) gradio_auth_creds = [] if cmd_opts.auth: @@ -211,7 +211,7 @@ def start_ui(): for line in file.readlines(): gradio_auth_creds += [x.strip() for x in line.split(',') if x.strip()] - app, _local_url, _share_url = shared.demo.launch( + app, local_url, share_url = shared.demo.launch( share=cmd_opts.share, server_name=server_name, server_port=cmd_opts.port if cmd_opts.port != 7860 else None, @@ -222,9 +222,14 @@ def start_ui(): auth=[tuple(cred.split(':')) for cred in gradio_auth_creds] if gradio_auth_creds else None, inbrowser=cmd_opts.autolaunch, prevent_thread_lock=True, + max_threads=64, show_api=True, favicon_path='html/logo.ico', ) + shared.log.info(f'Local URL: {local_url}') + if share_url is not None: + shared.log.info(f'Share URL: {share_url}') + shared.log.debug(f'Gradio registered functions: {len(shared.demo.fns)}') shared.demo.server.wants_restart = False setup_middleware(app, cmd_opts) diff --git a/wiki b/wiki index d9ab45ee1..2eee6e3a2 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit d9ab45ee180f2b79a904830c3781f212d49af981 +Subproject commit 2eee6e3a2ba7a01695dd8c337056b23438e003b8 From c470f3991305be84c22dd4e049ad8143576be2d8 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 4 May 2023 16:55:41 -0400 Subject: [PATCH 061/282] merge fixes --- TODO.md | 2 ++ .../SwinIR/scripts/swinir_model.py | 8 ++--- extensions-builtin/a1111-sd-webui-lycoris | 2 +- .../multidiffusion-upscaler-for-automatic1111 | 2 +- html/card-no-preview.png | Bin 84440 -> 2380 bytes javascript/style.css | 6 ++-- javascript/ui.js | 1 - modules/extra_networks.py | 8 ++--- modules/generation_parameters_copypaste.py | 12 +++---- modules/hypernetworks/hypernetwork.py | 32 ++++++++---------- modules/processing.py | 4 ++- modules/scripts.py | 9 ++++- modules/sd_models.py | 22 ++++++------ modules/shared.py | 4 +-- modules/ui.py | 13 +++---- modules/ui_extensions.py | 14 ++------ 16 files changed, 69 insertions(+), 70 deletions(-) diff --git a/TODO.md b/TODO.md index 309c274fb..474717811 100644 --- a/TODO.md +++ b/TODO.md @@ -20,6 +20,8 @@ Stuff to be added... - Monitor file changes by misbehaving extensions - Kitchen theme: - Lightbox improvements +- Check duplicate extensions +- Reload browser on server restart ## Investigate diff --git a/extensions-builtin/SwinIR/scripts/swinir_model.py b/extensions-builtin/SwinIR/scripts/swinir_model.py index 86672cd9a..619f52e6d 100644 --- a/extensions-builtin/SwinIR/scripts/swinir_model.py +++ b/extensions-builtin/SwinIR/scripts/swinir_model.py @@ -4,10 +4,10 @@ import torch from PIL import Image from basicsr.utils.download_util import load_file_from_url from tqdm import tqdm -from rich import print, progress # pylint: disable=redefined-builtin +from rich import progress from modules import modelloader, devices, script_callbacks, shared -from modules.shared import cmd_opts, opts, state +from modules.shared import opts, state from swinir_model_arch import SwinIR as net from swinir_model_arch_v2 import Swin2SR as net2 from modules.upscaler import Upscaler, UpscalerData @@ -88,7 +88,7 @@ class UpscalerSwinIR(Upscaler): params = "params_ema" with progress.open(filename, 'rb', description=f'Loading weights: [cyan]{filename}', auto_refresh=True) as f: - pretrained_model = torch.load(filename) + pretrained_model = torch.load(f) if params is not None and params in pretrained_model: model.load_state_dict(pretrained_model[params], strict=True) else: @@ -151,7 +151,7 @@ def inference(img, model, tile, tile_overlap, window_size, scale): for w_idx in w_idx_list: if state.interrupted or state.skipped: break - + in_patch = img[..., h_idx: h_idx + tile, w_idx: w_idx + tile] out_patch = model(in_patch) out_patch_mask = torch.ones_like(out_patch) diff --git a/extensions-builtin/a1111-sd-webui-lycoris b/extensions-builtin/a1111-sd-webui-lycoris index b2a4e5f92..514511d72 160000 --- a/extensions-builtin/a1111-sd-webui-lycoris +++ b/extensions-builtin/a1111-sd-webui-lycoris @@ -1 +1 @@ -Subproject commit b2a4e5f9292ab0f4cb17739afc7af5d3a713eb54 +Subproject commit 514511d7260635e0eb7b67cabcbce2a484387a97 diff --git a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 index eada8e510..0f55e98e2 160000 --- a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 +++ b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 @@ -1 +1 @@ -Subproject commit eada8e5101417f60850efa15f7454a826da6cf0d +Subproject commit 0f55e98e27235984a31fbd38287ba6584c4884c5 diff --git a/html/card-no-preview.png b/html/card-no-preview.png index e2beb2692067db56ac5f7bd5bfc3d895d9063371..952d30580ce6240317e3123528fd648bae853eab 100644 GIT binary patch literal 2380 zcmbW2`9IYA7suZ-_N_&WWbcNXu5~OSjeRLwXoeA^FiJyZn;0|m>4q#Zh@x6scL0m@aIgjypA_eIgm8$JixmKscclauM0T{EyR(NU2x)0)+1c4opFXXwu4Xcsqobo74rgm?%VKZYo*j?GHAkOF0Cv6q zFJUcL=|KR97dzQndEFT14R>8t3{h(N7BV=t`te6wO6ml-RQvryv)y!p7wg>3eGiG2 za}uW6$x{7EHbl6**3mt(c&kYWbB*{+74rD-Oy;3)iZ6Yj@Cd!zKp;jlbfFwwxXt0L z#o|7)aN4mK)7BOkEI%aTBYi8xt)mHwcptZJ<5)Y4q8N^PejvA3~{Qjfq;=&rH~mgKe-;lkC8 zNR=hq0gzX9a~ldhRji2dd>?FK!pJzK2D( zQGsN6FXuQx3DWQ5XPHeq17r_BcKsw8@D?!0LRXW0O}&_H^r@}`&~UdV9)m#cYYH@v z(<lgig zor`~A86%tTU38HaR3?tJMmD(TKXoN$*Rsjl4_Yg-xX<^qA8PqfEjZ|*z=S97Ymh4) z$%HeEnw-Dt4o#kd-1wb%1LI+-N^aK3^NjEnHSD4bR%f6&{bxmghxim+?F0A>&g;E@$JW%=Gcq18$Oq3$GC{fo&rNWkEYHa^h#ndMMYeDC2OjEZgfC zKqS^w%?%#;k=mlteZR`5u@Z2X6kCc((oNFop5r!4eH!M+pmWGHW0*j{#8BLYz(Vi3 z-19BrA{hCcgPeCeL1sTtFuaAcAKKHT>OXVH5<9?WcNeH1gOtXjoWbB!0zH}Cn!jZ^ zolcy1Eg3R=hZwd|+sBO7s1{hwW;k>@8`yxnM?~oW^HtK5P`^xIMxzm4{q>|o!fG^|MAj?BfK~uhQ_XU zDq!rHu7|lvG_5+s5CQuWkNWa1DRmDf)uK-wJ$w$)tNgLT+^n}lRTY+C>L*>OQi1;I z8QYr8-uHdeR@2Tf%g2T;s0?4Tsgr;eF|#hZ#CG!Ll2W+T=Ys1GzyRst8Ca2IjjxYd z2_P>u&K7NymV7Lb5|~ybS%f8)xPPF&U!V=OY<>(}+e~HQCdSH*UUg@IxGn1hFt99H z<0&sT-RyW?{ZVhMMt#32QBsPgpKhc64Hk7~nrkwmQ`jK!WN9qSB&y5~E?#aR%+N^_ zdYE%P2>!@fW6(d-tmj^3#W}M|f`GiXsbYMNU*jbe&{a>Ws>*v;6#IVEAcH zy|zUi!5h%p@q<^IR6E4q?;?SaP}m=}bC3d@cczSHr7C4vYfQW$LpQ$ZV`OR89LX6) zZ}se&R1&)k*UfCNHSUSv1>j4q)|7=A!FP|rf=HHc_tgi2QgZH%|7j!arzI}DHmiF@ zxiR)-a-;DK?rY7n!}mlcaFym;O}7M>&yo(+M}pfO6Fe$4yR+U>v(EFV1Iwf;cw8wS zDJ>$ygkK|=BpK{>Bz4y;2hK=Oq^_508x6}{;mfk7KEbGkuCU8^b@1$bPI2>ic+n;vR%hU~qm#IRNnYufjKMn<99 zTgvxCxh?C!EW$I&TcHvs5-{`i`t5?$DzZ&uUR=^1$j>lAt6I5DX0`F1fZ}pjfjEC& zvZ;I}ylv!$uOKEkmkN9I#v(f8hmYy)hK4+?v)rxMQR34n-k0KRD@y5vkBoA2?Lkjma}1%k<`MDDoqNu`ZHL+wqW#Qjh?-#_ep zt~|uEcwuxWxU6mzdtaidI#X&*HtWkksZ1s9EJGF|`5zFvB)7$JxzgUlf-yJmn@r~( zQRq7g)oc&3hW{Qj54sgNKy_Yj8z^x8LeOmprHuKm2Cu*Nq`LQZWIT_iSxtKXQ z15BOFjBITzt<6AoX0A>~Hm@Hp?)FaBARBvgdytETkqgM#$kQ35pa@b@5!a9w*F;b- zGdFUvbTb1vIN94exbTA5Oc7LF%p9C~L9ER5AXOt<2OBddUXZx!>j%h)9wa6q334_u zvN7WYv9P`_Ff%iKUCPeR&BD&k!O8M^#?tHc8V3uj2Nx$dJxJc()XWBCVdQMV3*uqr z;bJy2;^OA`-+5lp|3hYQu&{Tre>K2{ftB%9GuX_|-qP99&K%_I;$&uL?(%v+Gb0BV zJxE+Z75s{mg^lg?hrE%qHOSb;^%Ww!yMuWa00;m`gGJOlGEbf?+dhoAlE8KDr+I@{ zDVs)1M@vO3XaFBXFm#0-td+6EOT52(llYIvFP$>?Ivd6-e6D4}eSQYIGxkc&X{ z$I{Jrn(t=2N5HxBnF}s$?aB7Xv<-Dw+OI`MUkt3SrqumnxfgmqS+A`{L#HJ`i+>*1 z!Y$XSQo7RnC4?(7W#v(!lHO;$w(`PW{bNnxa80ow1INg=)!tHEp)v)5GQJgK`%w)# zS7w|>Ef*@NKKsay%-_;0zl0cF4JgAXSmR|*-}`AYrO$Yvb;gKMpG$YzDhH0Sr;T(U zJ0*!r=0gT0(I1a-*B)cFUu&ggV8X`BT4IC zlZGd=M0T8#x#GZWT)!0#UD!;-jP^ejtq8HduA;DdJ0ty6WZEhx6<~4-1@4Jrc*P&| zZPyq5`B&5rzU9uzbG_NhOtI;L5R1$_d}6Lkzh}9p0vlZl*!@V$nD9s;h|@TV7tnRj5HXP^RvLqOm3Ecm_JF?$;}kA%;d|OW* zYIt~<8w15Df@<+`w~#Xeb89{zi5Z3*AoCI7Xv9^vs`$phi=X24FkvwsN2Ofq8ri{^s$`GScr8oUP{7u-xv(;exsuh(_u=&$O(!%w1E z!$_NW-+xj>m8ot#cr4}NiE?ml%2n44GRyp!;-bh)6vxcSraQ`dpr z%bin-mUU%av1%(F++`r+6HJy;-+Z_l!#JV~87Ba|0a=M<}x_`i@wCVkC zkyuXn$QxiGN=73LOBG;kLfJua9T5F`s0y#MtiN=kL2E0_V@A49f6d8xb)egDPj^`F z;Y_tc_<3X?y>Hy9wqN9f)oD$-sV?`;*Ij)nv)@)bsr?|-Y0cP?knDaJXqcQ9RhrOT%0JJl^lqT<-7OvkcXiw|4l^2?UA6hBr$g205x$M9C^o8z(>|am=;Aw%KMr}?%htoLomyJw5uDy#er@j z+YZk8;sC$#pJ_Q0Oe%{0clgII+tCwPsi^xje@StQRYtPmEwuWEW!o8XR7BT5K}4#% zG)Hf5{@EKlQrqZ16t{wI4W}?qfPN5FdcmUpv}uPmt+ZTr1dD$hD40juFOKfRNFFOq zn)+ZlH3sL59^n@mrT?NTGJ|i^lE6qGdw4k}(8Y_g%XXr>?9RhTSL%GR+Q*U#7i7)n z!B`XS%vy!R9*`8Z(cUlL>BlY7aAKnyo(c$451+HPIJi+rlYgPT9M*P4er+E5Mi!T}paLRuo=dNm|JZ{Zf=iVlfh5e;PG^c&jj}uS#$is_)e;Aw5E-X9om#4Tc)?kai)&P7v1mjt*06Alm$)ogi zE^eMl4G(0k6Fkk&NY8*c&U}>ivN<#SFyR@?b&AIIUHhBP47=%ojQc+d?GX6pp>^yQ zx=ZHMh>wfUxE{PnjsB*_b#Fm%&=r^H=k31c6C>5$zk>WCX}p zYi6EcBkOyP48Ki`7(Du|Ar>kTC6HY1OX%I9NcXg)ZA+IB~o_fT9cU6P{jInM6MpkV?2*n3UiMcERuF zm2#*4Vzb|}dSG5K{#s**@GNEq5f!K&z%M~v)4ZbI{+HaLojD@DuZ@Nrg@q!P7{*Jm z&R(hYyx;wECW&!My*PS4HThRmH)HAo;n!v`fl@Iw*byCVVrX%cIUUMe9F8(F{J~HFov%o2uB3xC z$}6-@#0(+|^~V3T5fP!6-2-YjvTCq=TjLs&x{a_`vX*@$2Jwy5Vd9HT233$k4Uq{v zVcbO}?ZeFyUP~`{My}*@WraVM5)~9K+9l$9%kRa-NdauK{s2 z{3Mn&`pTFqkq+cAgx8?xAFj}e*FH;8ek!w(IdmChoZu*QYa%hYVnhj3ZF82LVwkGx ztEXftnv>vYRE+`2jY^OS34FDdRRK4ZoA`D9d8LoF{6)07{H;ZrX7aN$LA~{E596Bb zmVm_qoY$I)k4r3Da#$)D5JHukRJf3S_CAqdjKS}#TtC&w3sWBwY1MbAy~~0i3Wg*7 z1)s_B-V_=JW<%0=u)%Ly28I%L_8TH0BBf1OHAmj21LUFHN$WI3nkwL1tI@(Al4@$! zXbCWm{Z|fr15+NlFvnnZ+xm48NMA7Y3G#K(a5EanW%#bf8JOjRXYsC4dIPj;Sm6Ws zbn!mpSb}Hng)ygRq6C3E6$NjziUP{~OUpbIdw5;q`1PXln?clJz;9k2)DG_gLL}ol zNq<4PBn}Veymc~@T(K=w*0O!#p0~Rh5qYuNO(1xuVI3-|a&7!y=^y5%!%$a$58~? ze=Kuzl)K|u=)MzP3$iFvw!0`crk04@R|UN`!W zy9oHR^rUxhK`00kT9h5Up^oN&EHY3SfpRe>5Wab*FOvwRgKQi<{35~<;K}hWQ92hB zy1o?tfZrD&>Fx7oy#(RVI>r@Jgya7}SmFHvW+Fuh1*+6;yf*LzM=LEmh}lJ&ArNyLQnB4Ev z@R|b_wZrk^JH=5Eh+9x@!}RYEcB<39A4yvQmc8D1s);_;gcX)# z>oeV!f78&qiAT_Fv~#&VdX^se?mBjjc>p=^r^{SG9otAVwHasp8`~0Eg+QhK^*KqZ zr+4BaLxDS|-EW3u)9ldXzM-JTf)osJrtJOn@JC6an3hvi^yTW(WrE;-$Z5uOiABk zZFj)v7U~R?;r6zIku$cQnmHa>^i4}DmKYLf?D6fZA^^n=qG}YS_WPUpuOzbIuafWR z3cp>$B@}bXRG5YLVI>g$O!0Px8dfr$DIAlVF!4?1B;0W$3ds6B#Hhmt*wqzT5e~Ep z`R1P97^oZkRv0{)@}AMEV*2ozuktUyh{AS~@ddu){7`Q}&%~efZcE9GF(Ae+{*%a? zugoMD-$N%`iT(m;I%WTUZm5;vy)F)O^SE$*`9uU=599Pgphosa&unfR^~Dwq2+6>i zbNbrrt*Q(b4IJr+l0@B;Xu27Et7Ckp5$?bWz~JDO?$(t>$$I!-wJQGs>_?o8z+kHQ z{Cbv)U&uJCJtV8gA>Yhp1ma*`pZNh0MaAFnvoca?Z~=G!qbe0G z3=wkTzp7ExLzmHOef(~C^jI_*GU%88+xlz()?wT==2PA5yUB}q2#^cV>x$^fe`DX2 zu?^n8@+I@`I$B}eXRS#K1?OF#(??O@}3o+Ojsbf=ZJf2 z;c4D@#N)=u(;o-aDrLVSbX0cuK%6c+nOjCXmLIU58`{L z1|<&j2AFwZ@@6Kh0($WQB)4m3B;*7BephVaRiv&-L~q8B=Y!!3UoU>4*#Zrkv@evU|>GW z%OE!DLy-m^23Tkleitk;C~dR^HLuv6F75XQTU;Wnl5`Eq zMKJe&gp;GJjAdzdT&%`pC%nO;$SVNSyygS(6@GCLhpE&X9$ct0OF-}kAL4L(1^Cpr zkm4sAfsMDcdzUyUqV{;9urZGN?o#MQeuTFee0@H4D0~7CO)6mHU6{VjIi^G?k_PZT z*;>EQ7Tz>P1ydg8{#GBM1Jtqb?Rx;(Ni${nb>^O*Z)qU7L(A7E$@AAM)w7vXNu$=5J z4xVYT+74e4$w^`*8u3ekJ$y@Nfse0sisM}Z+w5mu5Itqex9>p~un#mAYoVU4AB80b zE%OV^2hp2+{wQlGu`MEHp|_bzR^OCx5Dj=5R7V$a?@doPdP;grrtlj}XP5FDvQ46A zZAz{g3@u^)^NHsO7zVLZo-zPfO zAIx9rT=^~FA4e1v2f=9-D`$n2MT;3v1BJzeQdgVXcf>;AUol{!dhwO${zK|*Wkb5 zV-%0g4QK2(&H-g84>#QK1zK^;xX3a0F?R?iM9N zcrN94%BYt@ILhm3+_ z3v#Zg+Nf41ZlLKWOTERQT8ab$vN`x}9JY0Z=M`{ZJ0g${{?%;B1M4 z6WtZSR*x4CAB*SHaSk@!w**IKluTTPC!au==|-DGO^V7>*C{gKONkid<>-8z#UOGL)BlJYlk}9YUV<;5C?CE*Oo}SVxO{Lr1#U}8kA!G6o)tJ0^Je%c?%kx;6+Fp2 zk>kvhrQ;x6iIc|qekj{rc##v;@CKIAt}C5p9smB8P=gR_1Tm^Cj4xmjN5CNV;zAC= zg*BbDpj1j#!xa&~K1>9b-|6HX(Wce5gp0?6j6?%s$!OU;Th92)m(KIc_ic8|&)&{D zls-X4vJ{pVPEN{kunG@@>Pxih0Q3SN|02zi5l;3HVy@d zjCx_*%AHMqM$Y=32EinnWgHw$rNtJnCZByW;2V-?PLz*;t&B{Xf5Zs1v?5cX46?eW z>)BF7Q!iGe8E_L0<8oP_`-pv3TWNWqHT=9AUDTY51lo3Sfb*K+LRGG}fjU2|MkBJU zHc&2dB-W&_X~}@N)C^cVG9axHLo*{cX{MJ^#WN04VeTsvRj>cM6kA@|i2;g%`WBAF zW=N1&UYf5lAktAvrmz6w-VcO05sjmXJSSKW>P<8$q$OLC_~1U=20ME*VXQECxS7uu zz%QbJ6_$j93t!(cmS27nL&qqD+Hf|fK^L}Tja8Gyt^j4WS4$JkA_wk|os5D`2vXxP zV=2tHyVPKQu+SPTirCiZNX&(L-NmFLhrs__O=<<9TtnX2*s!Pp76HqBh)~QcY5$2W z>PVKLJZ?BcZ?9xA3X=$hU1k*TX?`hWLK`~)nDqQ&cI0n`2ci*JH*cPcVtW@ZO8_<<(}`&&WTN>u>kUafDMK~v=TI)oYry=pD{F;7hXU=(JHXHbg*QU)ENGg4u40Y&bJx1?{8FwtyXJjuRvk=09t4{0YALgb z$?uM~8Eu%m!OKJ-brGZ-qewMH0#sUHen5C_UOxS3{s)f|ZS~nJ+VDLvOaO*hux;3C zDS(O!iivTfoV}b*CgxeR5CbdtpeDx6=hk$VYKz(rEiFP`Id*6}W&)Xw)m8mxL&Zm( zsj{q&wWp_&1{@{oKM!1#AcySgKV&rISpmfxY}0$@IG(Hu7-RCnAETR`HL$Ltxyitr z9-r*pv@`PIf4KJQxC@!R!++|$_)NkdOGyu$cT%~$NQ=; zrvWcB+3!xL-R0sc|IL>D?5?}$tWyDx ze-@k>53S^BUm&>PzpR(B*>wabJqxVMrGWoDY|uzyw^XX6I+i%XVNM@WW)rd=3h^ji zwV>(23Wx71o<5&t@*Vv6v9{9L*wCQ*80GK^(yMRN$%O#Hv#2Gr0TY4Hsy1urYes*%EX#RjodOEMpkt2^?N-l0h zwS8Ijd{xzcb1zHBrn6vp1HrvP?yjPv$o$b0o5FzwLm3*|tfi%f2lMV((f=|jr^EB5 z#{?RZnXx94E>~T^e7K=Zv+Jh8;AJ+|V7-$(jzpmRvvW5u**cTlh5dGL#_WLOQA_?U z4y-{)c6V+u^g3HM|8&=Lo&Wycc|cA8LCG<|g=!j~j4i+!tXs4I=7SLYO}(PpPsg(6 zaewIl?>Cd+zk{SZU8|4A$J%OY<*rR|Z0J%(r#>&K`uA63)s@+=7QJNFiPno;!ARyU4BpU30W2q6x{F%zSMu+W=YINH0}Y4Shj z>Uu2FlrHtYJ^NMaWD{MoYmG8kW~dV-QY&55`eJHoSaL78@qipj375Mo81R>?y4)Z6 zC&@>A|5m9pI5KvN@@?hMN}`rjZk6Yq4kPGdk4hiC#c znL5V!TXJG=XB5@{V!Ib>GJz24sW9>AbW4dj5Ki4z95E=c6afr|B1c2l`l@ZH9)cwQ zc@7_njvdcP%xJmFD+yH%I76Tk%}J%%_%ii!_0#`Oa~+*!*A$Ui2@bq~KrbfU1NE7; z9}Ik5R~;P(@Bo*yLYGR|bk4uD-n1Q5AvN~#7fQ17j{qbK&MF3$cB_s2zv#g- z@ZiDl$RPC=9KxWdr0ItXD=dv`t9CfNRKlc+Q~z7im&fh6a~nH7b&d}JwfS=;n9C0t z!M>5XkNOswe^>K`^WD;G}MdeydS)cCPbO!mfeu}GFkZ#BVybS= zboufV&K3qU`R7pD$kEZ$sq=5O!W7}&QH4$EVMdaG@QMZ`5X6BX9vp}tDRwbu)!vS2Wh@n1nb z6>?@amL*RyI8d4s`(4=i)5dw{Evh&R1Z3_<%}Q)D_!tFeDt|;D9T>{74mXFuIpxp# zn!EV->C!JrUraIrCX?Xy^SltIp>vSiXZ(%eMM^coOYuk#Xve|e&=F?B&oJJJ@+VuO z5yD9E7})2&|A5!w;T^>7MYSIU0g_(CY=QA$N%op5Q&1)nsrvjXg8q?Q$2UYZ#BBcPd{v-2fR z$Y;BvsfnvHa$e=vrH2WBI!(zB@o;AZ4n%gLaz4Vu9ZiWL*Z7bpYN#mcML#dj5DCmgCc2Q=|8*W$D|pZi`a` zjZ7dkfORKY8***>M5NtgJtL3g*azjN^D~{p>lUJ*OpKo`Q6Z3sySw&Zwf@2F&=$#2 zRH84FU5-9G*4&d71B@MhweLYBreWR;=MGUDc>GyKvQEC*7R`~Pid0~Q!wmiU0;(-c zwnbvXQT?-9$qQ|{pc@PcQ}|E_Bq&v&vW7Z@OOBPxTazB$_O%r5nA^ACMcob&YJ$^+ zF>qnoeFpYhE&_QA$+EuCd7=iY`Ub6kVxSGEU468FIpuq}E~Te-6@XN;YHMj>A(3Cb zZvkCDa4mj03v(0SiA8K{p6k+@?mArNFZf9sc3O~9KL_ECs>{4Hv(gjL?Qx+VWdkw) zY^{fNrffSI7XH;mo&neo9{)|ffve6@pAMuE?~`pgWVGUJ3!&HuN^)nyx*PlJGNT~un#M-W53jT~Q!&;yV=%II!t z^RF(mZ)yw8>v(;|{A&PT5rL5xa`^rzVfywNS>bsACXjRYGAtkb3Pgv9GDMFMs%e4_nzE0Kv~NSx_LusiYk}x5?|VL z#y+pK+y-v%*ZNbKObl~bc`-@j@B@ZN><# za6o?6Wu@l=>IoAWhWjO=Wo&ua&XU~|_j%vW{^`wy^oT3P5m!#8R3lpZ63Ka!(x_*E zE=soP0->7B*EZLY)k2$zJwZaBvoHK7YJ__C(VHOjHwyj2qweTHn1xZ(EY#v$TcQsb`pyWAZ{%LZW=1i(};1__f?m2H5w&w47B zZsA=bQH`QX5m-V83u=tESqa(8ii`_UL!9#6HTvAQ4n8pJw%=}sA$*olBL1dBK12pV z2$PHKF2yY@_gC>mj=o1mv`2o!-7tEBnQmzP=`t=L!3s!Dc`5f5uU}4I-LOd^z{Q`l zqp{`gxa;a`)yrTN|LrOVF)dQ~aCKfaS4>sL910c`9&=zt!+^*3sr&D>^{lT2ENbE$ zHm>CjOEa%+o~W&RamjeaMSPYxflYPA;IJ#IkkX2DDl|7LTFh-(6|{Sm*erKP2b3!3)Jx1UHn zge0-9H z{@a-ln2&Z!Q^>20lUVA0D z`ppe&Ys(p@3j5xC-f^-O&&yn$&#M*1YV^1;qtJxhD43#InfRmL9BN}Td*0{%&DR!9 zcrmmVA0|z|RIBdpEq?iyZSmkG22fuqvXm^+q>98XvYn5l;gzx+*ODZX*5e~171qF> z!X#$#ANg~N2rn`~xOi`wYeLH~Ks^aO9F86}-r0Kc%{6b2rUCa3Va_u{nzvEg6Oh|O zIsr~NKbBV%Kd|XcJcq5nWSxH84qDsN-|yED)|I0P zQvG%LLFLERYX{@Vmcwea)V>`hM^m4fh>`zHC6iA4t%6!-`a8M?IJ-9$k9dtqL?7NK zefqq+hw&8c0mLJb-tOy7!NFy)x)3W!TM{c#kk34WL_F;KFGkqw3Et^5{=eR>JgIiQ z_763*_UoN`KaH0>DB_&=IJKp=@T9~{zuC(dCLk`vvATFr(ujaU(-5!wxcoFy2{( za7k(qz7|Z}uD?{5*3-y1&J_7kR$Jq{Mq98mPXCZMY9p9UW9RsTD(;O+$uM(&;s9%9 z-~gx%s#egNb$rsd+s+RQ{7etq&}E$gsHc8XG6wpKkLj+0d0Ml4skfzjP8jIErOYc? zlKQS=$(D~`tfkRl&B%d8Wo&ND{|3XxMb^5&Qxwty0aB1{mLGv4qo`f&kiEaIOxTN} zkX#k_^V^*tp0l!uFW{7N#(@gxaLc?Q;ZpNK2zguXeh)uOJ;g(lp_Is}`d}mitvJ1p z?i+CJ1gO&Pj!7JY>-g_QS4c zixlq|r2YV%SY2X-l%*TkYW~SFtGbX2M*ZK;FDIDl=e0~q^go#%vRDoY>caED>0;B{!S43`QlGT@Sw{`$LHzuAYJRot7kc z#~GC&ypD6V~5rnjPD^mBZ#lA3ThRB^1svgKhEW}q*3MQw$6kGVSa)K7bpX}34biJn|)iXs37Uhx5?F!4TTQM$)zC%qZlDkz!goROo(H0o**EoCSlY zuRo7vDk`@4XhDS#&`H=8MV*e$4|}Ry!$ZA^p-@70h~qTbh@k4yy_yqNo)=1j;( zYhjc|G}FQcZyyf*$FE6YwX|h^@277SbeAH}1hi&I4A>u)o{pHhD%oK{j)WOX0^}Gp z{pkp_+@bY#MJf&8~~={Y4Smw=O%d8J~L6p;*djl3*D|6k4Ktl#y|uR z9ubxQIPh?e7WZVw;z-D7K-h(w+I{*t*!m}@ymBdqH$#s(KBal7Io_7Gt@_WYbuTx5 z5?Zl-%7PoYIq#O9EjIPOQjYH)w@;|yvIx&>-MeV3M}i9^SfG_OIbkS;&+mQkyMwJh17rdo;M@y99jP@PaFLUOZ ze%LPa%`-9DCZ2K?6Db3~?hZ3UyONC_cj81G7H=YuLBN(=4vrKDE_&awBV>jzqNuPA zoIRh+Y_Ij6qe7AvVy+L^6D_MzCYbZtlM&4JhLlA_ZO!xzkxMM-BsF7;R3VWA0q8(2 z_$dMJq#4LqgQR*#!;kr+s^D9CBxX_v;WTl~)hX(O9O za~E3A^xDOiyupLJc+%9N;tMNZg1m4;##+`Am)C+$vhnT3iFUJJ|LK`}=%pU;!3O>W!d>uwM>Q2^ zphX?q0lu(f21-;(9T6Lwk8Wbol$=~}Atb4D*>)Fiwt*uu`FC@p06~kAI)>R4+z1ns z#p?W#^S1B5&7uC#`CnTEL*YNY+fPY)ply&8B|@%K(STOp1Y>PaXVGbabTQ`KP%({s zweAN1Q~z!r6KQ+m9;m{ODAq;nlE;Rl%ov%r)E@N1I4$+`v8mr)=EWG)$g<3ve5~w@ zV`yIa6&P&`2v^?CEVD0$DmPSCfpk1|(fg=@3}nrg(qLqX^Y)im8KY=r_|SBv!XK|y zvYK4xX#4lff)*JgeOP+>gbr!DB6C6ozPX%qR^@LiD&yUf;;I%K0lOSRD!ePpTw>on zDr)xf2EwG7*KJy`6}ww?{Ro`Cl{+op3BK_=x}sWPvW9b5WL0d18dX^Ix*r29RsFrFkGja zJs^o5XI^nVq<1I0PDb~qmj~p7b-8uRN9~I|E z4Gs;e!4mFcKDh5RuloYtkN+H%Q?}e);EM*=h9EGKJdbm$nlbD95CELefg}RIRXGCV zL+0(3;%lqYWIcgp_m6doQ56NW5zC0zGt!7nb$H2e>U-`p>qdgO89=iJW9I&8~XYw>zIl;oT1_*BtPz9_wE zW+Z0>@z-qt*rR{G2wONB4%0Ku7U4is85o4R@2D#!H$q5AXcx!uqc+M;nYkqfE3f<2 z3BBU@TW1{)-ODx@Z6Q{CIrN)JF8*1UP$AdO!$vGKZ_H>zt zq@giQchm&J)yJ6O{=%@OL)u^upp9IQoO50)lA zh*0ICIIZhL{9%VyBwv7T^oHbrd7ARCX>e`8v!#ps?RO4|hP$g3LmMT{Lx6AY9_xv& zV&cfBPnj5Rq2QA5gXxWBvvY)eYAigp-a25q>egDi1F=srMK^x%bo;x6A#J%8nLq&5 z*}H)&`6J4O#JGY~aw&wLssVKP-Q}doUhjVC#W;mSv;_VolN!!v>so2FCNAbA*>mAo z(tcUUBrKYv6+z!8f^;ovCpoUPA$A(P?2OvYDSQ93QL&Q}trv?QG98QvLE2xP_zAEF zL$F1<3qi8g*nb4a4SXM$32)uI9!AVbCvD84g9OH$R}d)mNo5$+`wA&XpJ7cihPiEt zf+Y+<$e`nIWx2lu;SXu3%o zDJPv4o6sxBNXiK3hfww7!;Jno;+l8G)uE)Z)SIvuaJOb9;b}{13(I)Y?EdaiU3Yu2 zNui2`rqU!^b!}KyoETG>y(Fbwk$=(lz}oZaLd5-SjT#d|ZViVKstFaTmmD5h<7%WC z4;NfWh43^9=(p=iZ8pb+j?h19{hcN^SP+yb1NM`4Y?A&vikQ^meM=IaG`;kFAmh8@ ztZjgr_}cG*T?;jwB9?IpWZ?Hz^XrI%bss->_7wiW%3VF zDEps0E5j?(Agd1bnlgdq*d~hXbJ1oN5f8QqcoRK^l+usk<%MzKD`dH|a8*|>CtwYL)*`_Wpj$a(Jn^hekpc@`yxbiTrh0V*(oR7UeHVv*z_ib;p9*A57ne{2b#0Wl~ z-0+e5j1P9V!rd!@bGM(p_Y>foZYmvAAx5lAQTL>uN!FUBW|(M*`uy6i^qOGM#z z`OdqTdM7*ROG~%vG~%ymVTp?c6N}w8DtL&u%o7KB&RS@O21au+5PUlKq_SF zXqfnYnoXSkKKq+p{`*f|T`vdDQTU^G**4fk4IBVCoua855)8JF4=32t7fMw7xJY3X zkzs#;<#QIp^ZszK4Kkorz5AVrcpA8e>!*(8`fT}+I$xowk`fTfT3UUdQvL5zzwH_$ z9IfUu_*f!W)xXNNQfkk@q!xEyZw37xz}-bS-j?_xc%~$g$D&v@`kojfdAmF(aaKOckE*T#0(soi4R#{7f%P>s~&0V29#argcp=p50dq zJtZ2-`tO&=EuK@M{Z@KY&xhyFH(ih0LjU|9XSnoRUB8}?{Gg*QsHLgY>mXBk*zi75 zhETlK=__2&f$zC~p4_85fB6s)esg>K`nsTrQ(}VL?8Cp51G`@VHkZ|w7aFier7@oI}omcf)^qW z0ZQ?!uqdhTpOJ}*iHd}pzmGrleGiw5E0^wm&nfDClpg92q21ipZ7)yrGF8!DR)+oN z&%TmRphAf8(5%|t)g?rL&6U$C@guO>If_n7d;ni6O_J3A%2AKD&XJEYvVnzFeY-B{ z$aO@sIXoi5(%+xdbn9Ey;A53Tv}&H8v!O7!v9S>w;l>d>LI~X^WU1>`o>!sn>TNyd z3==t#%4kUO#kLCcn(UUTi1TcC(^+h~GOUN}17V+WG>isUg~wYGY{?!W)@Wr3-~ zX$`Md?GwX9_}B<++*tv=Y7%jgZwm(Np#da6kSg~CpoKtue-@6BIG_R8Nd0ujO-x3` z`8{pwqiWin&*TT3g{rQbBm0+?RI?kc{kAzT1dfv;UC9bUf<-UxhE9s%)=79IClN+l z)ljb8;DD#Y>>s{&A-IoLEK?-mJxHO6iQN~!UHopJDOB-DlUGb3W;J{XqTG@&htXBK z+ycYH-P~?6`(rj5#K(-m7dq~qiFzqi+)kLAT$?T?{dOy-fJ;{%RU9e2$}rMp#7uRa|K^UhG!+FV)~BCPpQ@ zv!;WEQ*G+E-))~Z6aq#UZ=YjE3dGOPH^ha<53G~OVb)Jy*#jyGPvZx&L98o7h(rmia=BP13U6Tz(0NjC$pvpvnOKcg1C{@15np7qyClxgJm z`T;kpdI)uUGX!8WWNNgJdjt9asLC>Ja8AqJyal+QaVECO$WxjK4BETGweN&x3|I4E zgx?oAEu=W&h?xq(R3js&T3KF8ig#m+_Y_}3>nQ_0cSHym)P6zzDIJBnSF=~rnb+}E z(v_V+?CHp2$VrV5CBO6%M_Am{-#=&h!^CRDyj)9GRY577Qqvr^Sm~Ox-oeCkiG}d1#0_DgOby91R{aXsAd1kZG~W;n|FRYLJdLM1@p(}j zmyP5A?XL=RA*#i!R%mI9Ey>fiue^y5WnlPCv8r)$(#&6LO`)epmLBG%k==eM?ANEA zw3(qCAJZ}eYLod=x^Mx>h_Px6XH_L_z!xm1SXp#7^z+km*q`QgiXS{>qeH3wd}lX7 zs?kA^)IXKV{x%65sx+R{NvOpO6qUmgmsPtEL<0}tFGGQ*+rPDK%z{aZQG`GUWw@Cg z(YXkSV;cVFhvt6AixufwvqxSnHBDVi64EC^zIOvc_oHQeaU{nsdn$lIF8ea`EO_G5 zm5`gtac<{7)X%K-t=5;J%=@cFo?v1q`DY>+7?J-2TR^10G#21L~XOHRlEFtz1;I0iB!KEqNlQ?Ey*{MPs2Q~YR6W-{OW6B z=jxpUJ}a`nk3r0Jtq&hOG^P+$ViZ0Kzim(%XsjTUQ>3aqo6Vt}n_`Zn5F>zytEx`?$pb=p)bRX^k&0_0CV|#cv7K*< zZlIXY>$%o-U8!h2o664K{L$WQzp_@{B5;aU!j1{A)g-+}UC`DU7YGdlSTl;7$JIfg z_FsD3{S$grqq(?c4}xLwKEZ^@`B4@fH-4~Dlww6@c{ zsv3KZCgc>ssH1^lfs-t39PwxqjVX8YRn_)cFBNuu}-bCYwpO?g26fTwoG|V7%S&1*EUP{EAEW6M{q?iBtf}D#W$mv)iAWa;zX`qb|{=hSyG<-O)_qgP4et z#(=dpNgb5PJuzDm#V{%gZ5is*mzP_1q_j6&EGc|!D*#7{gM%BfHQmm`fQV3|Ycx$a z(AU)N5c1|ER&tws#z=l|023)p0Rp*{d+6DhTs%?#DNCN5v7R`nZx)$=bU@fU-jfcG zELg0DWinV;Q5ETNyeF6%04>W=wC}`B2>v^V^V}8Fkw@?{oeb;2BhU^vMg zPhHhf&JS;rHddgf?&X_!nY7j8I;xfi(&-cTT%WZ_wP8!H5xn3I2~14XI);@{;sL=t z(GIjJ#T^UjEj)jrhSL?sxP=VPRox@vN&briKxpea8S99}#Cfp^=-_+XIQdbK1&gK7 zgk~*lswAwhBZLRz13+crHxcZdMPl(z32yt#wp8Xu((v435)?`ewa!BeeVIcG9jK?@zYY z!lfXt%>R9TQ-r5=_QFB6QlC}*|;SE&*CN^wh4v22; z2?&O%<KkIz*G2#|@8! zReDH~ZYvz~FT_}LAQ&3lk!Y6!p(yyZ7heKu2?ls?n2;DrNp-Dv@7$qcRFs9HcJi_} zt8}UoJkbPzm;&7=Z|Vv5E$;^KA*?~L4hy zs+>65-KEu`O0l6e`4uce@eZd^fk4hD5j&(U#V2aTd6R;S6Gg8x57q!yMJC#3fV7iz z!S~L=#_Z7?PmKy(m_UXiIV1n9gbX%iF6-zaF4BBYtP}1_k}ClUTU)m|up@;pKmP?) z8&wVht9uh?zEK64ciw-G4Hw3!NJH$roZDgpKK+|2Gq(&Q%uS^ldEKQJjV!>wxrzjO z9}CyCQF<1jz>U5AN7Cb-83aAdXB7=yWw-!RqYn8v|L}_KNTPOI2g)DGe`6&g6$mMq z4LQSFG(?3f>GwSIFAi4G01njqP7PV1TmW7CW#Ppw{@@60L*JTfwJgdIsH4Gp zlH|Yd-~cgUpjy;uAZbRrF7Xl<1j%ksNK()AfPN(&F zGy;)AD4Yt)Mtpw_X7?cPhPE&q)PO;TNdLI#_pblif(it07X$0hz5z4FnD-Q+%qOOr4UkDNkm;D<4iCDCWwj^ON1|d@pV8* z)bIM`eF4tcqhPZ?v-ckDZcHYqh25qu!M>uQ*!VbtTUyJW8>xa&7!x%H1Qr$cBum=C z6LPiIy3HCJ!%=AExWuj7#tL?1-KUW7npRjF;Zpg#<#OWVg;Yo5u}>WonbSi0-_gq& zBOtX7`ehBGN>D?bT&|SbjSf;N+q@!6Y!?^N%x)Vms87`}F3WC`gT(d~oD=cwXf~at+^eCR-FEFX z5s8S1OT3_Qkp=uSqV=bt!lTi+dDXO`yG&-V*HY(%`@gB4Zy#=I(F$T(MEjFuc^Q`m zi<7~fwdCKjnP#-m(Ezk7-L=kkj}QC~dCuT++Q%@*=6W5t@t`Vpg~3Qw2rUMX1me5L z1Ut0)a2QpqDpu+n*REWO0RXFLX-4n8_rV))ylaYaD7~pVH5AYrkHq@` z0v{nQ%R-$0z*Vgg<{MH=jcE+CS;cH9eON;t`)?l$pxV|U4&QS`a_Q&-19eNd2yk2U zY)mHN_b*1nEmA4me|78jylz3sONT&TZR>tMg%A^QNOMiW+Z^9{QQr>@u{>ulFa{Wa zw*KjTKP_YpUR6i>#B}6rdU7UI7Gw@C=(H}h=}OsWbBv4g%@s`JAEmi z2E(&-1*o;AxS3Ybi$Gor@qTd%1xDZh60~P&p0gJo15V%p6+iR%^+A-uVyARiLT^6C zV4EgGnUi%@jkkdN-z!*?I;Yx|=#r3zP>@SQ;O~i|YJ3$hmek@D-R@iTJLBSGu@gA`oqK*w(CL)Ey58@p5a6T18WRsIP!uHsElTpi z^m$19Tx1ERHo2tMkw7EUpp&NTCZaKT4BQ5g3a#yUTz=uXTLKGi>_2YBfO-n=_l)$U zj8c(BBR>H_RSh!-H?oLWYp-9uN+iAN`d9Mr9V$$q{oOrglZfJ7U8!Lqz6MH!!W4UZ zdvSvoPt}_woKW()=G1Lj3~X#|*0yrnRmQ*YENwG_;8|`j^h4wj;izXgjyWm}bBO;+ zR&jR?j;#jCSa%$fRv)|}OeX$ogbrm&4=#ceY=f0U1JQD3Ze~ihB55dbx5$RB3`Q5m zJ5uve=epD`ky1^KWYCGR)K zR8>Uy^kbQDdwuH<8 zFescId~tV8lso8ILtGZ?4|hb!_Pp1kk{d$9#y1`H1@ZjB$im@;$6_b&f}a`Z2~GZ1xwxTvQ8rJQhzo}qzRCY^ zKN~8f;jpH6EUZl+kInX2q53WP)!UXrJd!s@xrlhN1cjXr8oAcn zfBZEe!Uo)=;GvKe0xBX_4D;q><`}rrieO1C8sS?)Spuo)j+lX=mzacl zuF}Tp(D0=YkLXuTxx1{bUwi3!kX5LVUqcWne<;26vPgo9oQk6^$UazD{5}LsqI%=T z4TbeA$cz0^j`zv{6pr8Q?e2p8>fvSqU38^(G$xl)n@B`=_ogl*bkuv;(O-h6{Hmm) zu=8p@nQU0pZof;n&zCfIEKUCRFWc4I7IsM}AX$y3O+ttzJ-G&0&stq@EL{k8rY)Yk z_aH>sZN;uhEiEw(Sqzg`AW1gdu@bdu{etQYZxY+7ZcFXxTCamqJ92|20Z-zbw6(o{ zW$XI2O(jtk^7{@XVtTWqVJZqor>KVaBlekpVA$<9rlR(RXPzaMKpPuYsDV*wco>tJ z&1-8bm#_gzjXS;(zp@Lg3T88#&#PL_EE}qOi(T@9j-*KJ}DUh>rnM5f$wja5Q#Z>*>Q5olf06 ztDyFwaNyu&pr=1idt52ghJ$f6}0ovG04lx;e*EhlE9D+awNcpOD ziuQ;oFLxj9W!uCR9oH=-^f+AaS&tWw849(kR;rhte{MV~8e2?yw zFn=c#84w^UqP0<&n@?TYpH6Gh+Da`dqJScC1|YCW4Ao;Hx~FxJd3Ae#SkpW9oLyc( ztXH42WjLHfgRGAR;E+4{ARHu@w=Q!C`2iep3L&9tI86t3)TVD)dfKESq3h_#n@H^p ziJ^%ayOK8nsRAORSGG2vy0HbSLpC4Ov#C2K(URR*6{9LVlKJ7bN8-jl=nl{RiCE8*IZRp%r{$(^8hMF8W&0fXCtt<|zq6%TATQ{GPy7p>9v#W07 zHb*e^5X>i^enw{G5_~3BqJ;D&Z_aGW(dgsbpS$dv6b(&*Dzlq}Dk=)_yuyvAZ*o!E zx>8ZG65RmMlrj^-Hks7wtu&CgU7PmNR%f&m#rFHLeWbe#?TA>VfXKusIg+smCt?CR zC*+Pj2uGT6fnsQ5Y6+ac2c>kMkjUeQLW`U94bh3UMq4)pLs47Tr-sg`DiMp77oK}& zV_bNu?z8AOX)Xi3@9HAa$_^j+*bk|=yWI86+9eOlPo zv=Ve$x_gZV7Sd<{?g7oZ!9HI&IYI5vQbv1>Wr^`5a1spQWO^d^=VJ5?>nlv2*4&Mz zk{H<&LgE*ccew7*#Xr5!natbtiP|D(!5q;c;i`bv)|Q69`0A@x<}M^gq97V_H6$de zF*qeV1StEWn-pkP#ny7;>h@$}qK(Aok8bkt1eE{)u~qu)^E;*}$)}-6-&Cn#AVi8$ zQGE9K=X2{hi|0kE@R=Z#AOulWD`26=v*`<8xK-IoAtDeTs-zOKU!?6DDStScn#>W+ zOKA0dQ`Pk5R&Vsz4JN|D`Jk@>WQh?c&>>40z*%;7rv6K@vK-c;yn~k7kVT<$HYF)X z?2H9OLxbg_Bd0cItwt`^@GA!6x49Vfl`p)&Tr;C_wsxQ1yo%=vA=3o~RY(IrbV`GW zHHEqL^i7qS+j+(>kW%$a%KY+Na+?vCRJ{A{dm$xUtZ`%K3Zl9aQCW8q*J>69x8r`O?*%xx z^ixF7l;yuf1@@$slP3pD7{FO_Sjr52RnW55>S*{tuv|Bk-iH%9s;14<(e~Ur9+Gl{ z_Zif-&@@k?kcFZ3Cea2IE3P8;`n9ba*RH~428Cb5)MPRvZ_MbLF34NVoeb{QTsfbt zLafxH_SKhOCRit9i;{#rWTG2@fDpi0e0KYDAs8lYywPcBC4pEKT$lppgO5Kp#sET4 zhR=c>18`IXR$;Z0V!yJtUVR#cu}~M3B%%sIkM=imaAFl|wd|mEAECL!73l)NJ`ZiH z6Xyi&J-lUj3*WJDQe-T_`uG4Ei7=y!POJ2%#4>2>{(dqyParAUIQkil4}(C8wfRJ2 zR!%PozvB8SmI z_SQ2`kH?0hO^4E2C|t;?a~+s+Z!Qn+?UbXD=cVadHZT0ELPy2u!NW&8yHg@V>=YtVtG2dvRaa7BHnlIl^z^pfnpL7&$3@a%#aCE7&}QJ&{MRh@2xnU> z&Z1P`we)Gq6Fnn~YarGIZLOyHq{XuXht-wW9;fgwYvKgX7{Z`{qpJz(+EBMZ*IUId zDxlH-lSNI3LL)pnQW8}Q&v2-7b@Xl$#q^!w@eQ%^bgi~lp|8I95|MaM22os0;Dp*% z&SRgn$EWV0NT8d_I;XJA=k-(9uRnF;nxI11tTA3Ep7?64qA30JjbChSUIT+fMFm0- z61Yvh%;seB!F%uTOf3~`NZF+?^}I<05G!g$h3d-ksQl>B!>|3?mnyA=m03xZA+FW9 zS(Om@9W|6c?KMrLcV`4^1xUG;^iGIWe@IRv44U;M0NVRRk5;An%UZFqV`A`Kj@L~q zJAuz)G+eUoIyU-toipiUAzx&zkd)u2=tXKj;lmS*Y#*B=a?$7`0cfY%}xeX8z zhdsZ11&xA4MC{yFOgf#iTt6+vqq* z%ZsJB^9?UyHm!PvWxNCuz}EGPU%0h79=XuVu;WblBZ!OLQK*3^ktzT3Ti@K>uQtY; zwOAMh6C0Y8D!Fo_Zrx}<55B+pR%TswWBuL@i;gHIo4YXUlZ zEFfu5I2H*wO9ZoK?P@S11AbOFf*&;jfpN)g5C9`h(2%(%itQAO=%^-$Pi!M5Zb+Wq z&>z2l7XcbJsA;UKhd@CTt=_sJg9M^>*HFGFHsI6>H z#$Wp4%hv8WhUY{4i3rRtlSJ6IhKWeW(@OsGn}0JG+1l7F*i6Qw&8i18{f(`>>5>-i4n!biu+t zrpA;5LI_V$#{oPwb`}fKU;)sC{3GTV3;B4Gd}>}=?{rd3YBm@`s?IsuGS&F1sJ7x( zTC1F*=8-f9sR(RU*DpNtj4`BeiTs^)JxOe!p)QF%1d7%kXsv7!#2|&#w*IBpUmuN( zLR7?bXf65DoJJr7V0{14?tl1;zrOu&SIzkD-JNg!_aFR!{*Qls_rc@I)>W}eDkQ35 z)tBF=#;S_7V&|3BQStG;d*ArYUmB0L=kwXv2rB`~U^Zlkn8*+@6Gxf9=|i92)M){J ze;NPE?pk&csZer02q>wtk84sQVl)Z$g1@F=*;t(9>8!9w52oa&wy$3!es%g-!VyqYz#0?Bi;Mn1k%+t?=F96n9Dtp(_bRY#2)X7GpAFEz&&D zz7p;tq8R$)ex`XYflfi*hwHWqwzb`uY(9PC>W7~_VvN1%f3KA_mpXe)&3dWyV1`2@T-H zTAX@co^13doc6z`Zr5(RwG@A9NpsGi!o<)PxSXS`v+sM1E;lQ%ZPRqx!@mdo4-;P>ZeR z)35&0mp3;`QLBI<4o0euO6Hy>3Q#fLymDoG``YIAjg5^f&=PDwq;Q+M3p)cBxrM!| zB2&S<25(&1o7>;|+N-5(%&jQq2>VsCll=`FCT3!0pG_j+MM2GTCL%u)44LiGWTP0D zY(zucQWE{DAipd^;j@rR+AJ}@9%;(s2Ya~PdJBJ^AUaf@lD|uj)!%U?9Z0bX1337h zC$DflQ7T*yi{?^SwvI>R1+8||DA4&+J`Iqw2MAPEEeZVITaGk%@}q9|T@K73@i8_; z9YJMSBJKs+Ow1Z99V$hhhU(<68p~m}JM+-%$T_z^xsveR6C*tH0(- zT|`)g0UZ3$(;5$JHqOo-%WXbOu5Zb;4Fl0=5mypXG6u>n53wb+5bKBt(TJ#IBkC>1 zP<9e*stPm&o!SqKkBc@XB1o)Rvqz)`aW*6<(xhYn-3_Z^I3|Itt+uu|Zd|+S0(PiN zyc!)KghDFRt;Rx|cm}&V0e}INbZ>v}%U^uyx#ypm)%$^MaL`wX3EXfg754@N@##GW zmR)%7govulM5ncY$2uyRrvKvie|J`uQ?Z5wmK1E53qvInGZDjU0FFd6LI9N}&Ek_H zk@Bb9{k?B)3aP@X3nwBbY`|{Mr&~J@ipTd$Vz|vPB|3mQ%f#ZU z=+r87-sHCP{Eqm4-nF|}SVJc;o*0epAVl5!ASFDJ${T`7>B%6f`+rr{)(kCJ%d%ub zX-o;;H05{7UVZsRkX4XqNU{S28r%svQdKo!UFM z>-LBY0yL@1=jI|;k*w}=6xw@YIjk9TzG4NesI{VXU8zD0*Shz6zx`{o68rO+!n!5M zZoQbhkJ++cJPfyW07r`4W{t{TF)@IdS8NI$Z^-U_z5CgO$gmWI4c2n+asB3xcE0;p zyZ`Xb-5>rPS5~c6ai%v7E#X@_`p`q;A7)CP6ctXVKw_gBxGcRO{eH>Nf2qN4S^3?U zIDw-P^?Y0Myq|yeSY%OIJOKxZu=YfAXL4~nPmN4*y%@>8&nLH@tIH8cbz0%kgPouL zQ{Xr*@}qKSlDbN`5~qfWUE;Z=f+QFDH9jQ*cSN zED#!4it{~?YF%6V(sM8TgZ{*Mx1C`}RXJ?D>s1g64*`rZ!_a9U<8c{<6yz3>x!W|xAO+)_Qh2O)gyh)7w**8BUrUwrWesrB3c@O{Ok;4-9LZ~;9{`e_9i{=;)0=kxMd{9!buGK3Cx36f*f`yTIJL@T<( zrG30F-3`h~OJ@HN`?|mwe3#=%zlYxt<{UIE3V%pGY3S?)!4kQqGt1&k7}SMY819e6 z1Vk|;o|(i}Y>X+#s!T-8hLuSmH7QuF*qw*;=;7AZR#}dS;{LbMAdqZ69;(-?fu|~} zI-ZQkIFmUM7=Ft|Qh>uMCQ}p?_DH9sjQAevw^D>R@vF|~^VeT_g-P6ksbr-T!R`MZ zi6ko#CZmzK)IUI6;G8yk2trlI&W9N z$zF0Nwf{QDm;6jCNQ?h64#MG`z>7?8r;9#a)MgU2eqKPNOsz9~57cuHC^ry|AhbIg zDQatLWwbTpQb7W>BHjteB&u51^J@0-JMUIA>ta`Yol-6Uz!T;{+7A#Itf~UJvbo6= zvg1VFa_8-F5g%6^1%c;FOqYzc=lKiMZ zEQtjyIh)tRy{Vno|F=K+)9tNtKCP@+h=7!d4RgUSIo_r3Qyjc znPU(QG1Xd4HVPH%$eX5RAh?`0z6YG8-`bkNUwrkYy58f03ufa3CcP7tQp*MF*5-y^ zZl;k=gdOAEHBkumDhB{nmHp{dsrsM($shji?|!YEU^d+Ws*R1&=0>?ODobXgfRHN0 zZQ)4DMp5Y8&UR+Io7PIF=8$a7sePvhN&=Qj24Cr z!L<+veJ33ap~KksnW4$X=$RWg?tb@Mdmq0KV|+{%a}uJYWY`7daxt;vD`KtGHpJzI zjWww^h>}5e!Z=WD?+8Pyi1v%U6TX{nbC*5$OKT*7gQLpxi3YJ%fVfV?iaI zgeoFW-@K-?{d#Jx8i@0!2Ya~uoKG8a^wJ&*>2DII-4l2?G<0^W;KVwVF+L z>iWwsec|<2Uj6vvPk->EpMG}dQvsEu(Wo3xMg_4^kX5l(_xJZ7?oXNO=bw4z8(;q? zH*Z|2=kuA}olR$k7)%16)svZBj4c?32`&SiA?E;y;hrJWQA-bSOp%BT%!tij{J;NS z_U_#mUV4SMukxrMBCV%}Md95D0v~9Lt*bL3u)2*7qKS{XQ%Vr}OIOKmXruS2{;!6r0a{t(#Rmvqd-KXDJcB%VMEdBu(7$p zh1q>Hoz3d`ysoOsiZzCdqS)Bn*xufrjLNFoulDyVwJpnZWHw!6kg9jL(s;Z%uk2gz ze=yydPiHe#wJOdoQW!JYoLswp?S_wGG@_;7bRSE0g~t*x!+pL^zuUwq}(&1=H6_xRD{ z-ThibYX}L16&BtYPtI^7N`_}#MfA96* z`5oE3M%J3T;_2S*yFcgYj*2DXT1A7UhVTR3!{Hjd^0!Jvo|DIvm+sTNGSC z)mgR+Xa6Cnh*(rrRo7NwK^hi$DjQd?_X=&co~IyS0I3|A8(garT0F7k(o$bjMw2>@b3=_ve@OQuHW!n$(8@S- zoB{*5l-WQB8>xRyV;nxCdYvv7F*)zrbJ32DX8XuXCM(3OwJHiQ8zHG^Yx8Trd*{Jj zltv){&1TbbG@_6j+6$loVFi{y+G>9X zG%@**(rP}R&u4KP$wa0k_aug2&r1Nn)J%isWxAF3zbUE<>I_USP#>tRt@rC0_EjaU zJ|GFT6^L2^gNY-7e6|A-Qxp&(g&MKNq?p_=^ZT}{O;Hj=fzgepcIz5Od?CRA&>A*<#t^#q#OBf> ziM7vcvVrK-u%5YqjtNTskbFUM{3@Rq-UzYmZF?&~PjeCFgv;`cAJX;-3oApPt;e<~_ALvUyv$Oqnh( zQL8HIR}Ls3$!EMsr^CRx+guDvNn#E30#6^Zcv(<(ApL!XvP$ z%&6q2p0zGm$>pzW)|jQQ+Eu$WKKG4>pi+wxiP?d2n?k z-nAN}ss~OhB_dd>Q>~`;{Mu`;O`iWkwevv7jM2u!de-cqm8cWDyL+3PTi)UlBl;5? zMPrp{wK@d}I#?b1q}>(J(kbHE0SjLDSrq6}yTn#?Lbwt%k{zX_@|}_g9+s9(2+X4~ z$f$;G36kPiUE0t{OoQKCE|m5yfT{0*tL4UNj;(Su!K0t8BP zJ9ky8q}IvSnbi zoRiWS|@Lw8QPmNh7sYa{DK(KQp2Nu0d ze5vH##n&X_EgHKDI!@*x-J{<)+cPZW+vfmYA}R&3(65QPsI8c9N%st}i|lgSIqKBbu|gQ{w7j46ysOO6Kqgez!D;eA5~%5~sq zYAY+Pe-4Yq&x$o^v4Mq;NoCK$(_RPYJUBFvYyBpoKk-xq$zFjb-%rRll)Qo_4cTG> z05Q>QKINi-lB$Z8NjZTCoLx=Cs@kvu#5qNLtd-9W6)Udk4Do}85c8_0Eph7Tr~-qh zPU(qjh$VG99tFCfK7g(e)D{jJ=?X!Zpn-!ywn=dK0dQ{AzoQ&$@?}Y#yun(2ss zpZszu2_h~0x?fLgT&@F!VmjNmR+>}VPEzLYO&hh_Q_I_HmBD0=A+@wuEmG=E=^Li>Y(d+$=tasq7Q8i0%e<6|WtBYvWnvpA-!ElUcpg3=aS34{r$QY;=(O@mf8}N zieu8wZ?Dc_-S8MR(M{bkqYcCH%z*sm3$&oLHx4HItp_b14TGckpt27;bJv;XpA9Z3 z0~i>$NXF>li}3T+`3O%`7hGgDp!m2R=b}h>2hkVNXz_%KHznjI;e9})RSGCc8q?#8 zC5j|~m_*bC1^M-41F~;lVbz5A486-Bxn0~1=`*{R(7=<1TBh}ygSA@713Jf>^|>kk zN|Lxae{P#XwnB`;U+kdBJ_037hPDDwE2@N@{XJU?7shpvt?TeSLfjl7WLI_NI3>a{ z?XU${hY>U?N3(lpXtIN+#!%xgyR6?ggX4Z#m$$Ault6rL`uhpuc%q2b6y6a_503waHCVgD#?sI3Ou5kOG#P#hROzcYKE# zP+;WCL7w5Z6^BNDh)e=;6vWt}K(#5p1OZSoWM;Fuh=Q4vp`;>8%7*>YYwvkLW90E8 zKtslA1ZfBD;nN5ogNYv&Dw@sYN?vraIj1SEV}$D5v+&O0TC9BSiiNE`j>p63< z5>gwKoY(ddEFXpg#k2z7j@Zso%ugffnp2&+42hYYN)H6C4AVgbYfjAE*?JL0>lPoS zqV1>kizWXWP7j!kM88(`gf&;Ei00Gtu;u2)({s_184?? zpC%o#t&wh4D~#HObP3Xm1r1iQMO0G(cd*2+Riay;;Y?gZqS8Vd6<*X^mcwLDw>6JO zXLl|-3V=q^2N6MZHm|I;E^lXtPkM^e>>xm04%mKiZQZ^2^@d)I296D1+#xCLvIiC$ zFM49Ts3Au%&}zl-BcYxhE)Zf#n?u@^Oo44H7{z>EHI-Fo{8tc|n}p83$ZoX=pu|kn zdFkG;iIqy&au~+RxL6F0t_$kNFD-m*s~HYL$}g4;q=Sn=(q7uD)@n1iSAmlu{inu2 zE+PZ)=r(bO3^e_)f@2ZwCQkT4DCTfHATWQ5LUW|NOYTZ?0QAqLr$3%1xFD z0%Dj^_)PYahu=wl7;!9wIiTH@8=+%6jXh8lH6q5)b)61hS?WjApv@>nw|x(|9nC;W zmqT~TYyGWA3aIzxz*?OPS`1(f>(@oQiplbt-X+5WVKFBiygtSW9Y}YFs~IL>BT2R9 zeCO(g_37R+EGQ>`Nr_#xV%c*NwCbi_lnWHc$(-ydUsccRsz(30O^{5=Ni^lB(KHd> zp>?*YL;BvGTiOry4{Gs^Ro=I`jfUEHkiK+jgRknMVbaotk{kTtwj85vdJ8Cs%xpGG z)_Qv$knFD9P1r|1{c9|UnucuC^ma{SCcab^Xej|0AaRj1e#2mgKktDSTN&3sZfOZGY0hQ@E4hBRxFE0+2*R82iw{7Dy z5(?cq6>CqPmXPx@RCOiLaXEr}ry!bkat8QTpr-rU?}dhzcU%Ge_et+hdorDRM@8tZ z!4X2O>c>IRp$D$x2sE%(qTSw+am06t?-7Q(J2st8z40dD4(bTgjszjg%I8D zD(fUgc<7;a6}3yjn%C`)uGS1B3N>=cDyZSpaZ1E$LX-D)E7STdo{YV;qMga!7jp=3 zE#JPf-BUEtj?A$HS;e8%7Yra*0DK8nO1 z*B+AEEc8oTMB7c~iVqjHLPNE=9MQ?F>CjK!soU-gM3|-(J2$0-d0FAXB^39y zMJd}PfV^g}3;VZyXAH7-k83@@J-6adZHQca=5XO4O>Ii9op$HLQi705N)U(MMs=^$$uY zF`BRGqP3Qsn-Ik&fGeq#wx*ai&+n}e7@Qi5u8Gx%5=wZ3)}4fI-zhcYFtRj7?>fYJ zPSJFk91j-FIDyiNrt)C==j-i$gu4ClkfXAVA-1EPM*6G*)@sE84n<&XNhZrh+xB$G6q z)Io?1hZEM@o6Mad(0^h~fYB7}o}-%fS|Sa%$Z2fT4%uoyA^vrKI=1LIJRq>v&gL^` zSW$^&D_-WyqafJFY~ArAk!zX*jgEk5Vhm)mEo+6!x7i=kHDXCjP@CL`@v6z|CQC+q zm6F02(a!d-W(0b%AmI|xG^2s?N9l_~tu*m|gf`b$;SPW9Nn!r!jeotv>IZRhmCyF-W^ zwR$XGpivw0caq;6ImXMz5Vz!iH1%*pD!h4GY}})4Pgk~5TsXCB6eQ4_IO2lBPFzpfJk2ATn}TXlNDh>B^SMchJ^DP zr7X{eG!*DZO?zOWBbxhvnz0?;wwd0(vNUL)YR@&KL)oRBr%2KwOJjlnd9^70u;uGV-jKedPJ%pt!8cgisBJBn=#)(K9TX6UF_EhX5#8t&&tqP8NN95D}D$%p1{jg4T4 z@!Jg$APIA!AUa6sqO^0|%d0|F{Jc&h_61;&sxY&va;!%BvatbO`-REmhf)|F6sxDL z7LSSoC@gnLW3wXlM`Z3p)9?^9c_~&bV&x}Y37$oFlS%V@@QVv<4nb+C?p=({zV)|)O=T}={^iW+NbI;nyk z0MeLi{reKZCGQOKrXne^Q>(xsn%kR-d&*6K+a=yN4-qQ@#rC_Yvyakqt*F8D5CvF; zc!ffViNFLB!Mv*Ld0mzxCL%V`HUqG--~HC*l}q?5#a@jTD9=GX6Xa;Q^?`m0vX00& zO@iG_B|rji4cuD*cfNPa6=G8A|a1Kq+ha2Dyf^sq^c_7YA9B$IJoHus8m&5Rn>I1Z^c5DNLj<2 zCWr#C~lysoNwHJ@4WmGx40j8}IQT*(l@Ff$uAU^2## zYk)u?typWduBxi89DkxlI3EzrA~TPy$uS8LF>FSY@u)1o1}Z@zQvx#+ltk*&1+Y#J$?O#R(5Z?yT7+<>zY{D={FR~7~oZ$ z;kMM)FGSgmf*Vgnm82-kThBcws_%U8@q_yhcK4^Xwbs^%YPQ0PB_+qJRPC&)RJE=x zRBCIPSga^itXip=$&j&*4TG$$nZeAX!fb3ze(5V;{^Cn7L-qm0`Zy_DRf!o4W;W%h zu4QLB-`RPzKb`JPD_h(7tX4=>*F-uRl~=a6UViDNtDD>Vv&U)`kcK2J9OFtcHUOeT zLOR|YKe)g9{>Pv0?#-;7tCNMnY?z6R;ZaGG$@tpV_RXu;xq#Z*$&JA><1O<}HfJs$ z@9#glzqdb~&8M^3d|p*j*VbCsT(z~@WQj-_^q!iYN=^+yt&UaTh)Q~yGGS^G=pn#aTc(;vfEcT%5uCvo4@`3NB15) znoVc(s#dQ?v*T87&=_YBWA?#HRzz$N`Bl^sSRHv*IC5DOytTD)b^F@$&)phNis{~t zdqKzlyrKdy$f_7Fn2it&7kjhWbbohlZNWS$%kiifjYef@g4{0q`+K$$VMer5DTpAp zF3S;!Oi`4hvE#XwRgqdmjN#F^C@gr3YpbME7<2Whr>bc+zP7b{|8cEir}NQhnCr@cR4_=wutf>j8BfmOm>)&wRO%KK9)^<6by!Fn9fBl_r zld>r%0IRiDtg5()BTh9{2|>J`x{D~6yg8YC;l-C<|KiIp+*{p6v%B+1YHJGP z1T~^y28p$dWVc;+PjFP(n9a#Vf&cdH?|ky{r=xOHRIQ_eD(;$KvvsP5=Vq=TQDrbl zAqqo)-gxTfFMZ`pU;5&!&%bbEw!eG-{=KT2vy%+NOb)^%T1tANskRQbTh>iNsqL-j zUwH87@qhlSzutMcOUx=xEO$XCVNnezI`){zsv2WN)fg55v#Nki0ae3=0w5+*HpI+@ z6;n9MrF&EP?%)3aLa)90LOq`;z|>4&rz;T?m&GsM`S9=l;RpNsl?Vv1RtaQ9mNTF$LLL*l8VblD)tgahU$%Ti^QV)yZg7GtH`s#N9~* z>9<61o{1@pVY4@#{>Q)k%Ln%!jYb;)MV(Ju11qSIagG24a+&G8n<4e5x=9nZBQ6Ym z*?#W{e4j}!~pwMBEh3BwkA{VO=o}qgYVw?{DBp9@vb65P-2Y6M6mk4F%@!J1p-Ku-AsUaj_I9S<{LZ%~qpRh3v#!K2*J4KqKG?A3wZwHrQGamz z=81j(owwe6^C#oc==ImX^jly1ji;Y|aW>t%|KN_XVoKv2m|jngj$*WXy5SEhBF2;( zqm4J;egD%>Ki`;KB{C{%jI#{bsGqX06$vyNFr(XAq2%3WcK7k)?|kPw-}&~po__Y3 z-~akIo_p?v`Tov>NB3C-tN^L=X0;kEwNgfJU_niw_9<8?E=19S#&3P_-YYM^;42;s z%8|2?8Up{_cmLkj#b~^(Rt%H1HhEj}JO?^9=DXkf{#U>DWsp&|Nf&kKR_Ly1Ya+Kg zfhOb0kAC#?N-*BMZUx4Ws5+V6TcpU#_(t*g(e89wZEugFg~riI5UU8WneNZ;+__s$ zt{7!_cTnJ?vGtXliOu(aaIQ*tIf@n=@;nWJ6MKD+L_uoQP$4q;^!A!(6+ zf;6GZ6he5Mgv0EH07L~c``MdsJb&w-u$kAk4u0pTX8XZ9+SvH^_rCY=!A>#WDq-Bt zmyQ8A(tGFb!_RKt`^TUB=zsj-S*{QUy?(E+E)nEM;fY=z~qEPQJ*|XaEZ}*!IsZ#axIrWdN!8Kfv>POx7@yp}+age;<{ja${R7RfSdY z(~z7u&>JJeDodzHjA39UF2-e1PGqa9tGC~L_r141c@$D#`@i?%i!VQXaC>KGkKOaVh7%i}2`hor=sh?MK?mJ~MAsDEr1pN^TVgMx0*$e^-E?kUCAko2l=xMjsv$++v;=PMRq*gtx z3?WC}WF9Kxf^9;Wf6#OhGWdHQV3jNL39nNZ7AJdul(*ee(UD=%Dua{oe1k=q=Wl&VH1bPh0Fb+qAc#;yT=$S z6@KoLs%M@)crG+*kartRAoZ63Uiyp5TeNgJc}c|WSxC;804_*LQl&&gu_6GM2&t02 zf+XI~;_L#Ek`tTHKD+z$&DV4~b3ydpAK4yEu?@WSLsX!p8O^8F?%qsj6OLyAQE&)> zvTzm;RuXVI8c~d+^5JH_K?yRi>#DL`__}+;5QjK}SP^pWRe)R+W}t^Lj6T*TsXs-I zPXI)TYf%POR?zs{*;_tAqtU3YZC%gB4G`bPek2lzl*kmjd;7JuT$WZ_a$S|}Ojjq%oGyz%27egFUa zZ~lLGA3c8gwO54w1aRy_#gok@WIe2Wf%h1)SX)(f+|o&`MabLUkjhxk_+qN0$^gN6 z+(M!1(q5=qA#hogMOnV})|>z4-~Ri14|kq_@e44lA&7#(UPB&OxHrwT`x^Z@ETAM+}Da#u|1ppgwxhdFC|mb0r3o68i`exL_*+tEz;WxY*M` z@O;avqAW^~B{=thH`)i14`Ya#3^BWqNH(9}zD;brjcCCP38o41Z9+r}F3blXeO!AP zJq@7p5wR|W)xEWnfOR|`i&X(6vczWklPIjM{Yxp4!Vp0M#dhq)cX((8jkW4@R??47 z&QT&aBt=!(aVK$}VPX(_=PEUvxG2qdJa(oSgp*M6!K?&hcxQJO8vz&{0QTZ5>sYZ0j{xpw91zxtp5 z^pF4W8?1U|YeQ?PtI7{eUp_T05$BfgoPjZ?oqvyjW8B)unlgYCUD6ePIwC|NmRT7^ zVVtTOXHpzU&hko7H|E`Za>fS^lOKSOq;?UCq6#gFVm#j1-`)K;fA(kp@cp0MdhTU1 zMQv*(wM}HY?`t=-gB(qwN=#K%k>OwkRbz-C%u$8VI7I?K5CWK^L>A>~^2?F{aWSnT zYL$phSxl$<|M5Tl=O6#%7q^~!u_#L`0+0lAO|&X|IufUXt91s55iph=>Wy;22dB1ig-a80JEdHyTY-N&T2{JWNHbhhEoZp(Rq`MxEU5 zEIZ;_MWKMLYGMvO6&%FuVm=MISRhllx$31NX4iDyEy9gqD%LQi&Kj1si3*Vc`S&3( zlOb=2lge5pf>J?-jqdL4Jb3u#a%1+%KE6&N0m zCdB5u-~I06$B+K#4}R~#y*s>QX$n}t@1 zw#eYa0zhB}pf<3!D3`mnK+W|bM@;AvrvP~|HjySw|-sxWNp;BRk6jQbMpc+onf z#+ZW3dk-GMThDEH#h}eN)sIL-T+)oK%?)vZW^5^N2jAWb1=tWbOX>i(K7`$p5!c9+ zG=@^+pr!Di6V=gldr&~bSUngLJJp$tN?D=1YFN4AP}i-O{QdHtXQd~FkFuKqYpn}Q(QcM{~E zPhY!sZ9bpD1-XJ24+v@vVHYnUDuIBJDmTW?5Qajbl1ch#ik2Z2Z>NfKAEI?6Fo8*t9V%6RCoU7_4>u{0q;EwKl}ada2y&ISPP{QLvMv*%^O4 zArF^^!ULa#Z(-LtB#EZ!+R*>`aYZ3EGrpCeC^)tvh0b%KMj)>!Lv>V+#-lL>?L&#- z$gX1=PN4UWgk~5-!sq?^XsAC0y(NxwigcP(NhKJP5Vo)swQfj|ArTE41&B!93}SXG zroCYiN>D~)aEuCc@b@IrADSOtByn<;DhHb$`TA;ITf;`eD@$Efv-xy3b1UJ18i1{Z zs5?@dDG+}wBf>|OtXCw+D;IwOOhDTDrvb%Ltsrj95(|_wH!;I9ny^qx$;ALUvdWJ5 zH_sz-OX1mFiej>HzP~6fw`_-;2MR5%u#GZd+Nny2O29K%tl_EaW^zh zN+Jze9i0KoYv5i`QYK(4y%?5vtQrQgYeuIRRt zw%4qF2@{8Ed(p0O6{^B5TMjKt>{V>G^HNxL`8m zT@gN5O9MxA%K<~|gLmWm@f_p=uM{$g55`x4cZ|DG2nCemaw>9-?1RJtAMtWp<8(;p zmah}J=v`;0Qs0QaHc4W)z*ERDJBLSLX`a3n6;5=DTQP@GUq z6vQi^|3N{DAdfiHvtKIgkLA@6mL?*~`zBMeM(9w9~lTUB|`G5JV&F!mKu3fFA z0+9&dd4PH{xnLMFkwOG+!IF9-Qmhq=*6yatcf^N~c1j z&k960pMJ)_Wn=u&z@t@FYmpl_u8v0qK}fYUMnw%9CNfkIxg-k=b(xa1Fy+S|f1=7@ zisPkuW#40|&PGIJjJf~tK`rXc7@jr+iBHvsu_&BplM6#vuUr$C%S-?zm4_Q{MdX044Do&G*^{%WyLa?W=lur^g&}4T!5A(K z6%1yOt16iy)=7ir<%09#GS1x)W*>r@ z10q{18^g?2t#b&gVmh6dWuaEsGdFk^6I7sPOtr{>4$iM*(N#Lu-F>X725^80D+&j` zLHy*6LRFw|t|TvAk%m+@aHOAz*i#>ZsCsR{Q4yl(lC>h_jH)CqW7KG}^^ZUP@ehCW zlP|pVib(Au-hJFlQ!hs&{GuO?G@;`YbAL)iuqxKpPTVO>S-`j;3a99*Pon6oRZb*Q z@)k^iLPU*=KNpmvjrTu%|C`_Z=FJ;7H#Rn{SZ8c;X6GR7A{eSdg~BYOr) z4cECMT(fvv6uTTYK^rq6PZL(7;PJHpVxu zUr|^EHIaURiTWU-4yDGF4<0?9%`0Xf$%^4|->5l3$=XKn^^p#R>wKp==~O7Dy%AK>F{ zmh60@VNJ1N6xiP0a(S7e4v;dIrXf5}00^culkwOT1_UyOh$VD(GH5;3bv3D2V*PB|LEg4wy`V$#`O|^WFnZ=mM#_WEg6Eg11mtip}Fz)&)u4*_0Ym zkdS~zD*)IB5;SsNn1%CdPDD&>MVuj&*i5H0GEf58*tlZ9;i~S@$>dH4*`NS>9ISHp z$~wlHG63q;Uz5*xO>@>u42`hUjz#xkxTq+}T<5cDR@W6^qp{H#!(@CWOXVnjs$22z ze0Ks75rz^rCs+RacfbGn{l_<+dZwypZp|lJ;UDnR!$zM(s@Fs*`4N z=kM9GLrrfpTL_A|rWha!AT*}o8vTJQ^U7Lv36&Z_EOBRN|F6IDw}1JSzj@=0d%=Tl z+|&IrahS445fKDpjQO^t?6?@qZUumb8d9c@1VBN8Fq%Nu4GhT0DV(Y##-r82QPQV{96nm=fMNs}q1o zKnfVX|KSISGxW%;IyJJR0szc+EFiMKze5;p(^*NJ-|Ei-9mm+kpZ@V5575TNan~+m zTy@fjFsU{du+ja3|b!}&l z)zgw3js<_pA61zW6ZAy1Gv5)30SQf6Am?x12a;ZgEW*Gii{s^TwOXw>w!(~&(PLPu zJh`GG93=|Jj=RWRj4`%zkb@i7x^{&~fWpF{o;TJivw$>>#i0_nR+UPJw06=n@X&pX$1iQVi#Eii7hc5L^8 z%`1VEZgBM=kj@T)Ec{CqF9jzpKL7=Quw5;G@Ux$Py4t z$i_mQ*CvyOEu!pPyY}Tj`10*rH(!7K^^ZRK5U2rR&n(jCJh{Y&+EsmU{ok0QwLq;c z1Q8|x0q(lhvW*SSLNgOwBA|rW0Fz)K)XWn=5ENwHM;|eO<(Cp7VrXVJ_wW4B=RZHA zw(FvAz6w66U85Hfz{vde{kwnumw(OCdN~A&?8z<=004y1Qjf49`skyN-+1FQh~~y9 ztV{Fmr9~nFKuFB;|#w?K^_drNE%Zq(Ie601zZtcB{AF zy!YS#cfbDh@$r+xpH-rC#Y*masQr9&uL2@uOe({N8-FTyzXA3u@RF1Uinu!V*bztcie{-DXY=?lyZ(bL-Zv zgM;09fKLur0J_%@i$}?|=H^b)ZNoL3AXb~6JV?9>d;b*nZZa*vg|!ias6|KEb_?N% z2+R>6pdfRMU57NwzMfJTLhs@LSg@f2&%swGN?QY&uF?Rfr-5$&#`6Vc1~Ao-H1ayA z;)F^TBQ1Hb-EP~%G6#O=-TSYS zIeh2Vt^Hqm`xlz|?8EOp_|w1s>-XP(A4K-{_5(H%xQmP-sOuIXd7u2`0LzYJl{T~4 z-oN>c-~4a?`9HsQ?cnLtCt)@d)+4`k<;%ciH7=KIWAQ#t^ClU*nr=k`|J}d*Z?Esn zMIdOVgh)dK0JB-6S$8aqsE4aSv|y=#uUz3_fdCdvDej7J#|3A%y1WES zT`Cee#;Cp(=$5SzfXHgqEmtRdySq^{>%2l*Ko{doHw5K0oe=?IlHf(NBvWW|1&O`f zR5~-#>{oFe3WYFmv|m(93n6rE7o*0#Bp_+-752<|XGH~B<&RSqz_eW02A5?4IMx<>; zVE@K^Ht)KQJ82~<#f#g+syK3F3>XMOWZvv9S0}&w?|%26{gZ#PTAj3-5ibZxWxpm_ zE9SoTIEoZwAp(fmAtC@#R?F4VqeI-AtyW7GCIa6LR2SdtF2GTJ1p#e`OPi9AcId-E z!JI~FauoX=xc34PP&kGix_kG|qo>~yBtqYloi#PZviF1qiBOO*eDdHEfuPbSiLru? zy!R1wtNsTce$=s1kANT%FsqQ!jv>_OCm^?sv%UR27U?24!8FNSx=Sv%x+Ll*44!4B zEQut@!EF>IpkgI}>8$G2KtvWM0g3#{0^ zkfYh=1tZMg_ypjBMy9A+^k=;ZjsSKkBWbiWck9d&px-x>>G`j>OW`B(rKUCU>L zvwK&xl3@!|3qSzCgKI$4fM$6CGQ^|9!{u`Ivp?}uKmH>>@vndD-!6~Z>(>s1Q4lpF zf+LG)VzTj90U#g-0fH{Jv)#Qf|HnW4-~WsMey2H(QIJYv1Vl8GBD7NxA5CEhA zfB;15VUF?PCm((C;K9z`-jDt04}R$y6}HR5yWf zkq8l+o!Q>rPTRI35?S-g!S@8Rj4QSLz=oDk#er`ar<*qrKr?UR5?wPb(zWza^?(5i zg%G4$F(HVC(kb{MivS?OmxT3uG4XH#JJ|+P*-nl2T8o)y9ZC)0q+5aH;X?)qVb*q0 z7y}~P<{O;eqSHX#k_;FKb>G@qXqslmkvT>{VdfY+5I_nNxr@TkA^?jtp+T4QETV}< z;p1H7)f&hH<@goeB zl3>AIAE{Jj5}J+q!AB3GkO_Oc*(3E}+Z2h!$lOVH{rWy4c3ot)LnkZ|Xh4aG;8|ix z07>dfkp_@(CTt7n>}S(WvpWL;0%4$roD+FB`g&h6PgSmP>PBy?f6K~;b3yPZsqWUA z)2s?YKzER;tB6H#7D7M@WU|jK7Xa21%2;&YR*sQ1F_jT8G`n5b>1krZ5@R&SpIgb~ zN;(KMWO-g@1W2O8)Iyu#43aXAQpF3BOca`*ku0aNYdh_nC=3XQcyh7`O~aZ#L1_;- zi-#mJFk;J-7yCay1Gax`3-upfRsoPSs-6<*6kh1sU~?y#vLYanV`u_u(kDnjXh4o0 zKl$X*gMa!De)aP|__-&K9{@%H&;vhwor|c$-Hbp46p0`!Zg=K8-~R6VAAS62wzDU~ z8g?^V6Cfrol4_qgZnn_X1{DDTJCRp|rw{-GVG{x}pB$b%`1qrD-g@W1{`LR$joUXC zC&vJSh#`4tZ5AMlsH#e#>0)ePwpg5e?Hk|N+rQ@Lua?F~USnjOQ^VhBa;cmUmsUrY@SX2{m!Kg(fYIm&F^eM;X~fJ=4v!InGD6b@A^DBj;)o0+7(2NC<~_if zx%^WeXhD9;q$On{WLc|wCAka=fda91S4!FeDSJ?#Qcs%Z{|kt1jcW4K)gaSu`|R7T zw>*J{Tq2JY`;O%)gAHA1SYard{~vTcu4vFV1-?aWQ&bTE3_({-H`GuF4K^UqwhQO= zDil0_r|d&B|Ik+a`DlTgqdt=8X%Hgjp~|w&=ATC~RBeD>Q6|^|65Ceg0wRP27@i)U z=)NT${xc)PQ{yMyj0-)ebE`M!!d{!IXmwk+Y?vNE`U0tP0 zv(gqIEl*aTJpTA+fAq(G;%9zz)h$BP=+YL828s(5&A@j>4GFpBhIaq-&;NL5ci(nO z%LJrs3$pSj<_*c*T3Nm8i()Qc%%llmjUtlBPaZ#BE)M_cul}RA-hDGliy??;)GfHL z1Q2a!0cHlo$Q;7_8{hakNNAeiQ8tmJOu2^Y_LNhx>+P67TU#tv2Qmx6mMXaBW%Eh- zc)HkAW=&GN1n_Bu#<~VcvuO+gF|q*4yKlb@&~eV?Kw;Bf3-*BmKs5i}_df*Nf+4H@ z-VjK}2@)<&7O?|RheHaKrg|d<5Q$NMIZ9||uid!GU5pycwsp`+T!1H~7Y@Mk)#zP` zZdmAsWqG@7S8p)sImp85B21){?K5;fO%}9-+@FJY15EUAIZ&XxYxtb9!NTOnLqv;( z`~KHti|9o+Xm$&RY)Ys-pnJ80k!Gh`X$kA#`MOCTM;{9dP(eG~bx6der`v0`7F)RML^4$c#FLYi*b02Wq81|!U;5uS@o(Ioy|24(^Yh!O|4<45 z>3z5q>GK>ISJL%tXZ*%pNA3&Pt111>cI?POs;*&V( z$hn>Z$p-Kw3J?&X5L6i)4oMo2G#D-gohf1(CA%)gP5uEhi&o_{uG;p^H|~a@QXSFG z8V9tEZj7mVt?}sSq-!;tJDjBjaUdam^5{{7yaAsT;tI8zMY=u+1m=4?``7kaH-R=) zJV^j7N>2(&AwPZK0gdko=P^O^9_Jx4dP6_~Ulf~iACkApVYHTU7%T~2ri#E9Sf{s*(!+=l&^T<4F6VEAlk134#TSmd@lhx24&ZO^w4LxGJY!9yQ?eEV8BG^IZS*!AC zt^OJz3L^0M=^+wLzE~{H6PqymyZ65pLSvghB|k};?ss-q(RQhb{w7kAkXz+wmnl2pp~qE)r1m0QT_?c|t<30$by zxTEV%YE}y(X;jVpQYM>}XqiR3C{WP@@;HNFRRq0a0Uz5%eWQ8CP*b*R5s?mw*f4%muWA^NpAd zZNDcsISICbE?3mK_kAD@5H;6cR_#iJ@7=wp+hMw;V>kI;F}7hDAcTMqK6#9kbKa!* zYdu6EgxUMw`w+ui+m708NgyIx@B&1b1e-VRzJ{v&qb-X-i}V(KlN;cJns~d{h0LR9 z%kKb_Gh95EsptnC7x%0|W|}>gFIe<;zcW+Ahp-d}-xkGv=Mx;kuLSq+5&F?XF8Bq2 zD6lXy3jqakjZ3qG)E(4e&JP=vUS9GpNc4%48kcN6K-7&S^w#9EvXL|=ZlVt-kMuS| zJx3uX85X-3xkXZXkYaurODX<8{4{97nf3n7x1W;{G2sHb+DK$(a3=zaTlX%iN3<{I zkO4^=k|dQkCHNv?jC^vuSgwx${+GUlGX`Q!dtlY&GkcTdF4VM>uH~nPhqKwt^bJ8_ zh~hFSX?NN6k&~94d+Hp|ZbpM`{)4J15rCi|hU4SK7eD*XPSddX;ll0#(eg}CiU>qP zIy^cO+nu=R$uc5nL5S2b-kI5*?GO1coI(lNUC<+ZuUGmmV{-Ec^OsVPr+S)ljMByU z?wj`oIs_mh_MKBj)Z?a3XYF1L*nIr)M|$o@u2Lc?01*fnR&BRhf$mO`*n+lNn-oY@ zQ6PY3*4#R{DN(l|S2+aaEj8l9+zKq4-|rsZaWtv4J+Y@mR`?xF4e1FOD87|;7nE8- z+2=#`S+6DMhDAy#+jEJw&{PX>cNYLKOH^T;WGWI8p>CG0_6oV-2_|MD5rKz}3i`1w z%*$J#w3x-|aY#e@Y!U!PwK0ndZG^Q`Tt2vnu>KbD&2AT~6$0wUtNF1$RrVOos7s$6 z>&n~`+r4_i0=U|eAUg>pX_){%UIS&P_?kvoBr`H4E!Sd{vXFoph+TX5^zhpC-5>ef z7rJf<>gd#+)Jr#|(-;CoVL*KJ@Noz;Cs>K90h!Dgs${O(d7}i8h&j5t0ho+h4_&18 zBM1iU+7(2(_xfvH+cL8Nu+L%vu2YpY^Wued6CXxWk6;hpj!oarApJWQhbNcbBmNw7yxj?VZTz4n!!oqnYRQYu5)ab@drzMBWSJPXKQBVKQg5-sHu z5a{^$#8=FS87pF$uDvn62&Oq%=5tDg5nehA005klb$+UijCKTMP9)6J#VuRq3jTwQ zAwrtAwh5?U0K`CD+Z`P~{le$o-r1SOsH^G&>+vrl0LbE$q~DQ{;qd6l&Lq)SMB`0a z4JnijQ}v5w`NmJ3^A~E2g$JC!XkY+DqLAFVeN&+GM7k712IYyq@u3I++b&1o{#0K$ zlNcMJTgYCkG<|FZlzFC%HD+g#B>SwF#L{EwS*Sp78lxv&`W4KRzvOJGk}<~J-JKiP z_W>h_pQdJsP01x>RiF@#j*i+DW8zt*7z0GaK;gR|e8{<*l`Vm7TB?VMf=CoW=vdx* z^L5?d2taIaP77gUrYXqG+dn2InOp0fQaI$3`vsCy-6J+K0r7h4&`^D9{rd zy*gq}v@r>o%I=ls!b6aBn`LD1NW6(HVHQ8>w+u)mwE_^_51$We%eD2FN&YI{FFnmW zd12Gdc}DfdIFC9K1=Csb*x2ktBJW;A#HWYHAq23EK741U!q=Q9_2r-xbmxK7VgQ%c zux%m5A7#6i`DZbJVF$UgVj91VtLTwcuDD4eT-Uk?1%ezMAEEH)e&F53>R8P}#N^5` zdi0rUk*%)l%Dyc2Hx`@FrP*OBEu=~kfLj2r4<+5lEmf_f=D-t$rkT&1hJ}$t7kOEz zOh6-ND4^#IGfS8?p!?NhV%Ol5En2Qswx=ShthFg8NfSm7Nn~Bhl{#y*u9(Y;Tpq^4 zTyQ3rhq;JOA{0fUi^&*U3iQV7cZ78I=b*n)t0Qpl`XT6 zo|-R%pIxpc-LS6^CvSARVuko>AQ54H=iWV$2!0}>Z3}0A5Xc1!3Lt#^@x#zGDWyF1 zs(?^vQ1Fw7j|rPRN=ehU4$^&g7^2K)^PBtE^fXR!;q9lPq_9+9)%LE#LbnDVC=l>{ z%1TmkT^9?jyVsdLZ8?js9&L@06<9Ark_`9wGjiEU0FY9@TsLtOOH--ctAnW=)}u8N zEr^RQ+r_8stD?e%_GCTgdYU)0v<}A2^sRjTwb1*l6(&m0N@02#qp;XJQlOKQMT$S? zB3ySoML&K{?YY;;b1HL$bpqhL-*axr6-#!yIWPNqPhR}e=SHrvCt3oVg!WOK3`{K$ zk!IE)0tt!aHGtw=NX-HlL9(|q@3;l=HI%|djUm;$!lNg12eZ6jMCH03fnk!O4VSYWlI3dk+U?u(#%8E4x=Z8FT7*SU z5QRSY=p)32EZCEc4iN}V({|m-B5JM|`m5aefjZ*K;RNB}#$GcEobt-R){DE}CFPl9 zT1{+IdX3M>gONI*{0>ef0>Y9dNY9)U=uPflr*aH+1zwnGGF-}Eir>eWawU_b;B z-8)Fzto!MjJoe#AX$8jq5h!@_9g45B>{ZmsEq9>bg5^!+J-JEcB{Z!8lJr$SXObsL z^r)4G(#8%z0wN%`tJZ&X$pAV1Xicw{RVndIO!a~}@st1kxreb69c2HU}NQ&O}>bmj=E(b*zd&J(8yrnAY`gr0g{VC!?+gVbX++P&# zb?Dmm`u^_T{!Zjo()&CzWSrYaT!>~LfAR^4o~_0vc}+S&2+i^Fi7u0rMPCA1*qcS9x{v29a}PD|w$y_nWc1`X@~B zEGIGa+tu5gS$yohh?0ua4|#2Wjt}bBD7u3wB1Z1oHkR)zVkFa@Gpv4J#BaEFTbxH3 zC8h+xdB5YlQSee%kj)9u4;!XW_9s~klC;u-MJ1l*{|O6*aP9i_uYUX6Kn)<+T7M|g z<&2B!+(Bl!fB$Y5SE}ad#sdV9@;kF01MXC@dZKMOpDy)PW7VZ}r`gCc;OzSK0}%Y3 z-~0D0L1+dddgiv|Rv33dLT11yZCw4pd+#kymK+g9&rWfIb_G==d-2ocGYu?XGOg70 zCf__>To||&;yROP&Hk#YwxtgW_1wX!Hs0^e&Ou?npzgCOfOIXU-QFNrF?xaOw`X!CCxGxkj zazw;gGi$pxb%TjY4QLhq1042oAA>HuWNh)mo&YHBzuH2eP^EHYNqnCI!%*WfmW3#2 zTl%>Uf<<{r7m>*E`u@S;!^6M+`qyW(9mp1jyVn8pY-5QayF0VpoxK=6{Kb|>Vl3QM zPJbKrS^@wTjdaI@^W=hVNhA`}!NHB$&ivo~{(pG%_$khI(GRz9g-Um35JDhzxiYU- zt7`|h_pj|8FBbrQj(G(z8sNIN!LjC~u-`8ucX#{FWWgXU(15;EA zwE(Ps$)_|?a+WteRk$Z6oN*@-13(4_Z6`mdhA9cUY1X?uJZrVbJsW_JK5iew?YaEx34309@ceq2$o-{vLn%(wlrM7dE@$x>tFtZ|M>oQz8~hhS_{s> z28-Y6k+~6}Yhwt_vW1`f(oe41Rog{P*Z|2a+MO+8>aKt(MY*$85Ew%&lI2H3;vFtY zWfB1Z7CjpZKv2w+B~!E7LXw#5rs1e(LA+co-@N-q)1dFsFQ9&T6ZJ;lX1*YP^6(K+ z1DSOJ01ySl@ZrY~LNgZ;9fI5eC}}Kp1g_uQZ<+wWgp&Av(g@t|2nEw9FZ8>qXrb!I z1q;g#u;j|hDg)W2EM+G8vAm%eN-6G0{|HF5m+Cu*vnXo_;we^Ug0nD!M2^eF;>pv) zP8N&9qod=KlarI>V%4^**v8mJi6Q_<)F2}Q`JNNm5D-bP$NsC6o>34c zB(of{v>mvNdSp}_ZSy3ba?o!?|iojdwx`{%|J^yHDMuo zc(knehkx*g7mK4Pj9`&E0SFWdF0b$RHA>~SMOse*-Kv_BT|&yPP$Ux2{*4>gZXEpk z-}?_={pvU8yL-Ya9mMp04SVX!7>1~aa05Pmy1euHty{Nle)P#BmdL1y&|=L8Fm8tk z0)#=lk&xo3sM)d_f7ZFLM|eZi1YI_SsAsy12TYcUC9MAAc``| z@I3lR6|%y@vspEjQOWDSryAMp7625qJxlb(L>AXbM`4yeK$jSvlOV8aSM$AV*QGnS zaoy-cP&5Rkbm`+^C(#Ko2z-2eqPeV+DN}s%Lt+K}%A~Iom0UYMFAkdzg@0jK*Qo$tV^DrE zH3WK&Tm3OV>`WUeM)u(|lF*@5nur{M!|wjI`E2&@|KbnZ7Uo0<49uo~SZ2Rzg+hSL zu@jEVot@d?lc&f&i9wyJ=+!iVfrVg2O$#xRz#yFwDH)ZC5}+_hbN%4P{*C>A_wT;^ zH-G!p+0Gt|?g1*qV5}JdKzE9OPK1HuDgu#+{1^ZD7mg0&@_4Z`BN7B*Tf5}JP0+Wc zuE>)~5PEyp1G+T;xWBVAo9~7YXR~=e08CGOx4rYg+*%lr2oN|5chbhyVzEF}w}Yy* zrH-E%_!b`h&!IpF;o+mlM2!W; z3qE0tg+NTKhGn~a_uaQR2bl#S?+%u9e(SRo5x_#(AMyuXy@u(GwycmOx=Gw7E5n$7 z88Z{VtLRf4{s7=6mXTh%hx=*u3NEW=GfhN4cUDnKG-ObViHK5qFJc`5(`a|EHiYx}ov-~Q9T_^ZEr|2up8H*6~h0U|;+_KJeG z6B$4R0LGvF(l0>Ub*r{XjwH}rIwfD5KuH$32m$35>cL@-%`8atvu#0-AdbR#`}QrF zhu{3|-}}bbzuD~U3Ftv(YzGkQsj~CdSy5B|V zSw)7if3fI@*dC4E-97y=eH9TrTJrz$r+*O|3A2X$;9Q-F8mnYqD?mVqAv82=!tT!Q z?VATT4z6*xlE}6s2ub-+!Td*xZAl+ySn#`VzV)?ld z07Rn!5ej}XPdWeq#14iR0c2zeP1xU^z4z{WU;M$(wVynQA^`v~XdP2JKO%~I6TNd) zhhy_e7CGNJ!k>+XQrPO5$&y6@2zcB~`=RT)Km;sp+o>!}(-uqGbY{@p+Rv%mbKKl#(0 zojqnk&3IFX1po>OFp(;F*mm8lnK9BAKL5Fsrw?O{1a?Ftic^0+L#zBZZL#Upio^`_ z-5s!buJp|e;ojXhPTIw9|J&dF@Pm(=`Hn~+-Jv=+F2x=}M3|9dB&4UYee3Pd{P2%_ z=IJMgBAsr|?mDZ0pI$2-4aXcFFSn+aqsYiHC8)cqrcQco z0AXZ!^yJCyTQiP;2rMuUfhc_N(MJTqls!o?S@RuG@RQyJcXz{l)*PNJ5d?(vV62o& z;JkK%+4m+_*|&*LW&eL60PP>~L)^T4u6z^WIM zWGln`fj$Ik1Ry{Nv`afGy$O*40+N6blG8S-HLRO9vM$BP*hTuAzxnEXXXo8F?>%|) z2xhtv4@Fo#P$?QzG^5byOWK6Y%&|u=S>$OKL)zIFY%6dTHyWjC+ZGT4g_GsdWSIN( za?-Bk%JfH}$E!98fi*)njk9XwiL6e0&2WR=oFZ(;9-8uCwr|HBNIX974sPu;FHe?B z7LI}->Nbi+4YN&>2-ejumjlSFb_D`q7CJqc3Tf8N@7;a<{qKG7<=^}Lr-z4OXIEG^ zwBWK@+q-999Qd{qjq7?D=X z)y;!j2M7BP9<2a%&pX|sCTEy>&55Y_{)ZpkdF@?+PC#QfArO81;2{f{L{*|NPY`NA zL6wV6`0Y3DF-K;x<6*rAF?Uo?flvST$vEGgejtzD=#n$Y>0c=*klZ2uxku_n!Os1Q zD_%$CsV>P?ukYBF4I=32E~-#DcN$Gpn0#@0AQHy zeC?}WefO<5o7s$G)J!-tIzW%OD7w-ovTk4jX1=f?J?q zvOy06u-hYx2#XNS@7}%p+H1G}?eBc~H@^J)d;8ZIcSv^ulcb~xc}|W}bK7+>;?v{f zfBI{`eEf9TwjBu|+ny>)#BOb7-4vi8(ezz?1`%T95CRbeqMHY|Z@+%$5C792|C@jN zn@1;0+SvnW2!nv0C>udo_iYeh{f`;i2$7{F>Z1IEpZl5p-D`(WPnf%aKw$PYy4H%R z8%;Jb08$7rg2@cmsnM7onj$5lnUdn3So@Db7??#ESU5&ufsP|KP2~9S$>U&onV9$S zg*!fB`p|==qwihhta=N^J~aQJYmXxSp^L{)5%sNLZR6XiXZB! zt`B;D+R=-;;8C!Powrj&lNvB7y(xa0yyjMtXIQCyko(IXkz~?X&R1431Q3urW|lTa z!Ekc2IyzqN?(8U0GK=jZXVz#hKxD4^_veb9TnqHD78b3_=d>iQ`)scvhb} zKYDcEp94v!EW&Q0%*1!ZRQ*mvn|AOrkbVUq2*GwYee(FIX&Uiq+!xo*R!gp0^q+t& z*zUUao%?ShM$KU|50+V4S&K$MJrN;tBqG-61W~(OwQbLmH-#3&c&vL21@P95n=vvA zFmU1ng~(b9XBIeO``*y90v?CfOY9A?|C}=y1@$$h{>hrXJ46J40aA!#xmx;}6(;a3 zX5(2|m;@5_Xh@g{vSg$7ZVtAzdigX`C?{rO-1 z{;3=qM}NFpw$$uI0X<%WQ7~!)8L|gKP$UYq zodCBhfRjc0Q$O;fKlIsm7mN1j=m{W(FhdXo3_*EeR;-IDt&v;ZM$I}J0W5}*lK+#l zP0FFkb0V)D>lGp{a|93=05KdNAJ1kxtHn~A;zL|&Rpp$=9t-gFnN_=b?X?@byR*fK z@*EG3Cbq3^To3^4A}<%+{tkiqIuM>beG&niqBo22(oteS#t302?967%c4caD+PuOR zmh@PAF9MwC)*M*<#E~LsA-U6%qGElR6O}Q-tAIy9p{GZOkz>H7 z31(7AufILh$tGOC>pex-2T5FR7Cg=zPCEDkCgw}CPX&iu79A{7|W zs!O9u8BmPKi^lrhK(&G|ND6H8+N>ms?S3XjrSlrAzUCmzn#j2`pYLBkxc$cKLh`SE z^SA%wAN|QJ%xSiRtQ&C(GOLR~d}R;MZCWDTmO(1w66!;#pv z5n{JwS#_%~{lt&|$QR!^Uap=V9znoB6aY0n4*^w|L)Vtj)gSbY5_7Z>U1iO)I>`(7 z0p-Ck*O04UE}(s8N@8{_mOs8+=~Q%uv8RTg0=4J}yRMrx;f>dCB6c7i4RUu1q&*4T zE%4~kBMd=XO&C7<_#t9&A*W4c=fV~b761l$?e+m7FsFeuRnuBujPwXtbly-bV734f zqxS2F=;xv5%gVe;4S(2K6W_Cl$}xUvnh?T_b&r!GB*e@%lonb`qTFMwXfccAd6$y+ z0~93gPwGW6>eZys==^)JY>|Rn@V1b$XkQMoD{C!jGT-Gx?k+U+V(f$R@sN%u^E_zV z91IYU+Gqw5vsh8eOb`Ujj3{)Q1WC0>|4dN>_Ws!t<=vAch8w@G$NF^uSHl3U zKKMRS<7%_GD(SW&05A~3(W3q0kG<6~xMd)P%PI{p!t@j`wM{5ETjE-NK7}fnxr6(R z#nv91&vRHjB&&Fn-s!R*R&9$A0x__3T{oLGuI7Mk6q0@Vy5%P#05jWZ5_)&B16Qt- zNWb|gSvS%G*^V9()}Z@xwPF?ztcwd(Ld~SeTZX!-kkbuvPg(cr+_TR0%w}N^0)u(> zZRLy}!^dg-R5GFHf+0aqWU{v>!BmVu?_*DhkB360FK>?xJn`%}Z6TNp==k!mUZiDp z+VYYucII0k7pw$aSQ{||2nzwui5@+D`v3iZ{p+VsSGR865KRtT7TC8Y>%+R1TX&sAL3J~f9 zB6FDK9wTJsLzq-Q*IxZk)=zW)_HuIovko>MMHL||an{gk)nfU6EwblXf|BGhDS41J zQxWJ^-J5ssh8c2e*-?ln9L1KHnYcwkgz(^#PXNhcD1aY7c!;=fyAy*s3~VSpqzwWh z_~sk0bBu0FxGJ1_W9?)qrfiR6*-)0MZpk^(!>CYrr<~@?^85Ut7>6OJNEwv~Vyqm% zIAG)`Zt|tU!dzFkqum>0wMNUwRow}a5+E#8G|L_YLDcLkw6Gn50278TvXhJ;xH6LR zZ<9)&8foqw*DpjhbR8T^+d?lv{R2wz>=|BODkLff00!tdnm?g9JTv=sZHlq79tRik5{o{ z21dZeV!2p$DiS^7U(g}yv5$g`K(N2JA0_r38<`}Bf@}bp`0P}WxqkMw6g5vD)8_%p z9~SMhxqq9aUqzs6BfB-H&M=m!_arL>OA!YE0G8QiTQ#sA9__s?;OABnw`qsRb|kaY!e&YCkF1(o??ZhLZ9W_=_%dWyEPp2nmUh$cc2AaX=)ipx4-3>4A` zw2=X*>o}(4{FIhFVrNsPbSwkpkosDKf19&A)4hRPc(-5E_Y z$g&=gfkoo-WI3Pj0*4StfI%XPiuFQA7eO?qxG=Xd#>jwS(JsFDxzB&`hu?kr(Gg4J zMswoH7O}eusTEMOv(Q#j>8{5BfFKc22(wwkB1FM-tRnrvty|j-7?FiJB1>Ez9v}b8 zFaOHtKKt3@qvOX`>}qJpg`1b?5t7_P1>phYDTk(XFj$n9P4%}m z6+%dQOi*Ul(3Zmtz8!lPa^F-N-zfH*PKn ziQgBhnJ?|uKnZly;N$SgEM(%2UB44Mb8iI^^tOj3?} zU4Znc%RJBXPsaB>g#(xgkx_s}5Beb2`O(*ou_n)nfF7?(1RzAhEW11N7}?(B#)Z## zkV$&L#643RP?)>ey?y`w*S`6^wiOV-fR^X086Jo%5?v@fc<{-MoA;67(Zk0q0d-xU zaxJh7b`w-0AjA>gcTDf z*NUJ!Y!Mh3xqIW*d%#S(eXh@N5cA%69}h%b?hsB9CJ@9~L!s>;Z?6YPNJU9hJ+9h38_H>H9!kl=R1=6_WvljYFB%^ z2lwB+_qDHn^WQIG8fB8ir#&c#z2yEQP+fEcUn zy6(#g~PMR`8uy;vp4E?Gp6xel9 ziW<30H(LNK1zNSDRCO03l!780Fc4zPZQHgSrD>Y3Z2<{{qr_woAOHnI0SrOIvP3xF zpU-AHyZbu_``7Qkap$$yZ><(549V^93ca|2nY}>$F4ZO7y19c;;@E- z3<8m(h(tjqn1#^HQAiihq&>m}kc5G7*>)?Y$A^cJp~1W~+IpP&=Sest%2(FnidX=> z2Tt1#`Vui{2#!AF3t4ajz(Ci}QxkK@FllIjpu3SMC)EpRdWTsE;#4aL$O3Jv^9G-G zCqMZ17k~C=e!S!M@bOX0OCo8)oB)W#mOH7ZL(?ol6DBCx_*mF4{&LNfG1q7a)OB4z z;wbK>5pS`1N7X{tE|3WO``2REakmO{5`>w#_noJB%*v&c)kXPcNx0&gj)-lH*6-Hz z4MorK00ENQw{HF8U-_lQ@rj5Kg`J%S1Q3~72r+h%MTn@G1zkjgs)P}M(9X`BW81b1 z3n3;+=W_*%&jZ@9q%ITsfCO#3x^eUNjT_gGjvuQ#xon*7Ga+W((I*cdA~Zz&=;@JW zNG1QZZd9%6o*i=-ff?@HKIr0#%VXyT5wuj})2C17tLSlkw4^i4oI?FIZeplI5)zS4 z&igFXy_8})s9Uj(F$&vS4@rU`+nI#Lc7}=Zn+~E}6POtQBeMjG0{8FV{pDZ!`Q`Dd zX>iueOezbj^MnXO2t;8P0$XeiNk9-|?6{4qc6oe!)Wt3bip+LYfB~7Kkf(SqiU;FlVKKkH$p_#KC zkp>Yo8yre)sT?co!!0a;bHEJRhRus`3^xG4jWFSP}5&3r_2 zJwnZ0ZQE3|MauMHcfBw( zN)~Q{y6q+>N&!3TLbYf?jxl!od%LT{!?pvE*0%O1j4_g6+cK`8V@8pVBZ#mL!Hny;IZG_&g zQKtBqt6FtuHQzZ3#~7pTUyn#AY#Jr#9*6)E1fc6yAb8xi82KOl%CCOzv+q87^zh{5 z7@-TuVKx)NhL8dVR8_&wW=}@9_;y-W6P`MNDvkzaN}5Vnn9w{tT+wDDQ2ITARse2 z$p%k*)u;~RY}Q2v3_8SW_i1!PI|Tud8jy})4q%%L33KXL^i_F7`V^-G>5qul@uIlu z=6Q1316v&kbLLl^9cSy9zLIaui@9KtHgR&rjWz%vdq==^WGJk8Op_}{YVdfuIM}`Z zYyafe4zA4}KKc0g_&5SUgF$8#I0%HGY=sC#b$?16!IUM)8XM-eVv*IM`W}mfkUXAR zm$W1Soqr`)fUk8C2owTf%=_?w20`5ja4tXEgaET5lXb7+Ijfv801cR<-;0QV%hgJv zNQ`B+lXbKGPv@rDFzD>nN`xYRJgHUXz-^#{LI+n?v05%~-8|Uan=ckibvO|r$C!At z`L02jl`KO5w=A#ZjwX@P^2ejws&ePGOajs za~A6?qZHSwsM|IMCTyKCr8Sr_Rhtx&e6l1(-PC3GvU)X!#ssw?@!f}(hOxzUB zC?jRM7M>fHp*vir=a{2%DuZ%XLEZCN7di@Z%dIf~=ofzU@BjRlmaC(WKK_Wi4jKW* zdD93>KtKc{LWBUe8rk&1Y?fmR01Rl-*eFAyCe&nB6aWdNVE}TjMTl%_I-*Df0T2dY ziIE6qfdF-_LsGn(7 z*w;W)DcLLI!52sdiof_2LUhJx>;e&%%jMqgwKwkEdHCo%UWRF%;5wexhXIz$RgBoK zA|M&_6DJZYQqMG`C3pAky%8k>FuDiLI2gJ^1}7>vYDM~LonfpIon2ekcpoRhV64}v zhCJ2MRNFz%x|UvaIRXMwY@@JyE%J}H?APMuY^pH;WhrC&zAgi>iuEgxgyg5?>0l*=##Wz8!Bz8V9*GkzJ+`KIPG{# z2TOTYXcF1}E0^)~M|>^KUKm$BeWGkaGf~1?zI%b##OsF?p1$T$aQy|vwHNVGtC;WW=bCsw}<8JxZ!= z*0vxyyC+6{3}pa1(ufo}#u(qafA4R<{yvD=i&G$1f*ni%7Jx3O#l=Gb!Ac7lBW_Uk|Q^FQ(4d-oqddhp<*j~6EkB&2x& zJ%-Uw;?+750t5ujvav)94=5zblxAz5P&#i5T0s=T5E=%a@6K4d5CX)&!a~kG$Tl@2 zq$m*)K&a)GMMA(35zMTyIbrN6ztECieL769D9sWfQMr3cZ6+BD1eJjzytlji^yFw4 zc1h1>21GL?oYfazyYgS0CNuPxpMt^TBD`vsZ``@HGjEp5Oi{*lfC-Snl75(Zu{hz_ zhR~QBSXBgD>%}a>LI`sG=I(rVzB*hW01BZnXppqz{z>W%T4}wV=op8co^BKOP1;f| z%*2s2Tz%e`TsWsKx3UHqmal0tbh22OGtQWJGK=Z(=t*qb{k>}lBIzidk7Dj}wYh&AXKnxs$+`fJA_FMPA_}RB^-MMxAm^dE=YRl&NPz(0`t{vgH?IlN@?^DIB*hL8KzA}> zVKiMHnR#)%n9XJ2L}h&R;$CrAHjVI zVp}sI2Bi7?!64SW-OCQ6#cN0g}l4=9~9KFtTV0ynEKrM6AbnysM#T$dKKS z+Jc~Yy&^Goe$7_p7Gq#c4hSqtPer*nDmBj!9R*l*ZQHhlWZT>O>?jDLMPb@_+d}&?okksQicdHvSsKl9d|*Wb8(aP!WMgKO7k6mZ#ghewCs{>H;DMg&130SU(Q zk|LJOO3+Yias+rTndE5`1?N~2s4-ce8z^9B{{kXlgQ0EP`K z#&3q*JrMNmuk1ONY}b7F;fHU&aqDn#RN6n;S1tL?xo7&H6AwZ6Yhd}iWr(vL zLLyN!`a+MX_PSOGc zdGO$==pL5-ylv7XLIl@#Z+`3j?|*~8qn-x_LEDldCcm4A0At5;_ugwU#%PoP)*5=H zVNDTKN_Q7~*jiGDaPf1VxS8yP2??Mx_1}DvLu=0(q5a1A>7Qu1UB<^bl%L9E=u>z?V>n}Z&1A`FbOSS)AFEJ{3l^7!8C zHx3SVj#dm15CVuUsTJFwS^$6$!iOJz@|pMEq(>H{vxb*^X{0QdI#cE=UNxWgwrwM7 zj9g32q;H0VZBr*a-RFVYlGVV78QXdWKU2DX#nIvf z_4rFb&mB`|kkz1TI}-<*^bdjvfygT1dW}A2TcRau(ZM%08++ES%^J+=zt0XQBGU!N z`t)#`h(!d7MqADgc&Lj|0~p}vjJeEk>Of$fNT5rD0aB|iMU}Ita!F^+@=!%D86r!V z-i6T}lRv#M^ybW(gZr?L^O{dfpOs{N+wZx~B2S z`sz1=@*PCbgF1{ZNdySP#}7W5HS<7$BLldbqgNTX9iY#U3Vl0^xSmHjDS$fhlQ&JT z3P&a))w!7C&fd|r6msp)tLO8liECW>kb6CZQIvw z-I_Plwq`X+;(Eq-kQ&@+c34Efw}EC&kP!k0QOu?EgoY`!lGM@!GM&U#ib7c zF;IxHV-N~7Yr?E)0yT(%fKrN_DGz8H@92~x)c*ug2nEp6MF3K|ffW8hSANjdlvH*5 zG^7*(nNgU{n%HrSod9=j`vY&iL&C-x#R}G$sm^zz@bJmQHpbBChIC-wSV-w}`Ne7a z6g`wWGxIYM6@F>v7}rDhe7QPiXBw;atjg)m&hFz!k6jbR#O{q%i|Nb*{cJG21MWZQ zyFvmL;|wMV+IDqqf9Kl%E<>BP;qwaE=GM05JEz_h?Joq-bqp#pqR2b%+{K7doeC(v zp&ocw*!}Bfy=?rNuZaYtWHc6PgAYJ2e?aV@bq{3vZ`m}{K{;A1I7Xz9#08E>(Ht5A znGYg@o*1MrPI5pG@^qU!hfIxTQbuzwKBvyCg_OPG!cfvzB^1n^4aH8?g{q|^A|e2* z*mhkTyA=Z?i0y(NFf<`Fva=JqRSRiGWxFL$57+m>H_Y}{xJ(#Htz_hEWdCbP{+w|3 zqOaU;pa}y}T5<%tQhZ@y^Y$7=dJq+5t{c617X zLXkl*7e@+T`Mj3&H`UrXVK2)?L?i+s3P>CUES7E85~V$VbmYa|Fa}QR3ev&10wO{fFcY_>pJ5Uo zMlG6Rgi+Uy=>PK_D8r!}d@lOJ|4G`N_h$Mj1#=~PV|@7avxr2Fuf2Bt`fR^jE?EEw z*`|XAvYPvM?+P!U7brEhbGOwftDwN&P+=O$i+&Z?!27 zeio=ZSY3xPF8@G>((Fsr$0wOC%|k{ZLGG$XQ?FZ z(L9W%%%PV##iV52sP{F)tAeevfG!7PMeh_ylF`XPPAZZrMul3T%M=A9G9n-qvctR- zL*Z;+M>d^vsGwL1j1!pS+nNNXBRi*;J!62P^C-Pvq*eB9=&`^31C!x+7Xr`gwZZ|lD*St&W}H2>1MjFj58 z=Qk+dN(q;yizH{aAOJ2_%T>Fg5Oj}&sSq`;l3mEO$pfJ)-2Dc&$~*P1D0`5%Bp z*sj{W{oRA>d%o>WTK&`y-ntXVbUtyHcSIyzRTxPtpjq2~D`8d0+2H&6swA}|9pAOwJh5D}X| zP168k6DS}822E%%$>@Co-pe?uKq>I1_)*z}b)E5oc6$HLa3{*c!y+6J$lk;H8 zrR)VC4^L25QYUlOi+d4$8Wis>1`@rTeyFH;<0KO(KBw4evL^FO%u(bIi9nPnS$&sw z)y`+lwS#Lq=OpK2S^+`;6q>O6Z-47|n!Ov>_xG2pHee7CWMeK?&#d;X=~eI*ke0Wj zmlDhORHu}8ArgqlkI1mlnTP-|$j*G$t-8g@LJtE_zDa<{8Z#b`ZSL44VT*r&^K~7FO~gjGo(|MF;^&zFXBcDdQKj zW^RP+902XJxEO`>t9~jf?o}+VNxs3=tf~H(v)|oLc9s@}*L0|(JEd}-T@3upR zT(yDWUJ-d}4Bs^<2Ov)ZNYpr`ER-)t06SOM=5*3UQ?^{!aw_iWFv3IyUW{JLV4E;=2{oJc$BIXogORUH^ zKLWU0OT?2P1w=#-ceN>Cx}0{SJcJ-zr`RzE6<=Vmcnc*)al(#4a8kpK!~zON2>bfx_O?65UIk=SmV*#*jro zB-kGKu0i;qX+=Hctlh4SPtk;R5*om>~IU2sde)sS`stOgqal%P4UspL^nziVvKFqz4O-F z!m*f$%7@i`DMHifVP>dPt-_V)H3e)93E;}9qX*|R{lUMxmLQf0CuXj_<*TL5Lb zT)c7ncGCpWZB+Y=#WRzNukM6l5g=G~ara<H=Vjn4qUf>uosT)zf;I zl7M+li`km}__ox$r;3#HiDj81)u3O+{15p_ewoFU(>7Xh*LNZfUN`^Jr? zK{WDBjn$b)Y#JHO=GXu3Ti^MA{(t`G!)5!~ANb6z>o=JtvZQGNfR;ur*_SESqi7nR z1t3yXH+Obc2Ssm}hER`o0yPN;^ekCDVO#_#G&}p(AAJ1r@yRMQ#H@9&AOj0nnu=@S zgZ`Ty(BW^HRX8K1wq5P)&Tihk&JeT6%;kvl^sEG;h%iGG5s5Lrb?=Tu=@2 zAdrabzW&mJ=8CHs?qDd6@8p|vJ!k&+xt(ZV4T}Jx}lcOVf$## zB0@omNp2;3!p*D6A@h@vJV8i&IfP^FK#zVnX9+OkLT5!!06bq&=ZVDL*7TQ?Suw^e zQ0xObR@}2L@unrt>sygo6i;>Sr_0d!ezcB<$@PO`=0s*)0su^S~v zW<=_`c6WDvaB$|Ct{DITNPS5}K~xZJpEeI^qB(zwhyjU61ZcMV9(} z!ciSjK%seZba-;I0)!~CTJdtxE>~UGGDiU}rlZf+vx3#U~Z6LUgeQs*i`Ruw$%k7y?~ zii7|_z$~$g?W$X?x^~rdD{fb@?Ygdwv2EM7>)LL$Ty<@X9Wx7ag5 z&mtNOgln6UC?z{XMF5aUM0A$9Au`Q0H!#w3=CRK$PkL#fGWc?J1i}D$d=YG^9wt_n zAbFH*4nfki03j_$%1UsiP@i>v$>qHaiCfaYCDY6rvvc;W;9{Yvg1fD)c9J-i&MSRe z*R_K3_FMNKJ^mU>V`pFhfFD*T36yPtjM*3BDF zpFTM`IiV1kBNkiw4th3KxNM?1U|s)7S(OpEna$=qySrUWc8aX|vzZx0h$zg$jGAWF znA{?o?S!439RgXc+SQ^xJ~>=2R}D5ItgaZFw!NxhS=IGlz@yMeB&)7{`~KZO{mOp^ z7Im1Q=T|0KoOn0_fH1Q#NbCTR?%cT1wJkFcrJK;*QpsE6r_J|f48p)7ovwFr6?x=B?6&tx;Ee2zt*j;U%x>_ApkW50uZ~7g=5!s%*;;yA{?1PK-#ujE|(mm z8ifMMi!Ok6Oof|#No&cIh25o;HXf%KWsHE+urRl8q`7XKZ z-FsSA9#VV6kIXCTR=nR5Ywexj!EF?A znXrs}i!B?Fp;-_(GBbC~ z5E%jzpony_i(OnS7KcYi$A`x(ytB9W+G}@y{6~Id@7m7d_-R8;F`v?ly=$Zx?g_4u zIuWh9fNi^c?dHMm&V0G>9}q33VdLOsh(${oI0_-i&fe_W{@(Ivi3qwaLdyL_eRW(^ z&-eH4(xr4ugLHR;v~(j40t!fXE(i!ncXxMpmvnbGNJ@$HZoX?&6)R^ zduQg11PgdckW+a~)w88#CpfW7Q%*;-|;mhelrm%NQXis#Y z0It+5Wj2ObFsm|Ik5p`T6bx5us{l{M`MJJT#G6QPuA7=FPP;88KA!0Ud>Gue{o9#;(}6{YR#K=tWXr5UR3T(TZC6+L zdIVF3Leii~mjuE_qjJrdbDwUH8yP@39zbgXl*F#A_W^Uh+)B^bHT#^(Pk3#$2_D=x zG3<{Z_bK6KT$e3g|B#Zk_##AGqT4{-(mP2bn^OQ*$d-~p&Lij@aZaxHBPCiid& z7GOPGxWE6C`Y6QA0R)F^T$wy3(em<#^kuVjKtPKi6L_L|%?JLZ+9FT!9!3y)tyCY99gO^b(M~64!X^Fn~^GM zYYeoeLt>sO89K)tNwn}|z3js+0pSCW@frbfKJWK#HihoFt}=nWzx6LvpK>x0VWPs$ zuGNaM5f4rF1V6-i5g;Xw^xr%k-=3{K{k;|b+9RJdS4cWP z(--k__@~?X)cW$+dAD&gejA|}aT#{u`ui)mCtu2x1F8fafvRIV4?Rg6rfL>}S zdg<4-*`hNnNTCmpp8u5)ueXLn_xU38x!?C`;+cFnB*kiJIfXDTLzwT01LO~=asoe& zKk;;4r6b%8k~Ch`OLkO{r-Fiwn?H3ttP6!iPvP-r&#yh2k`yx4^B-u-n*0tfWD^?< zNVKin0>S2WO>(8w?h1d1Rn=re4-i!#Gl?P-C`rV`OvRFNJ)hSnc!Xi6klY81eMf-g zOpdsaPA zz*3{bMCbvOR|2*jaMPFo46~oBCn)Njw1+B{;JlX*r*GC;_6?3te-6Lcdx;mlUtO#j zFn}37M8{QpIJm7N=LzJh9JEFw`>2QkD~4Gv^0gwJ^+;@$aS)XaR8;d$r-hc0{De6I z@3aI)hFe8Mc>S13W9LEZ{wNgB4_x)B;e5SwWD@6?w5vsHx(d1I*LNMT1O>du)4oE) zNwWxZ@5lYfCsbfsURE1ssWi2uWIZtkk_6plfJBk>su(*-`27SVQedgLg&_ujkM6fk)!qsQz*|jVVV6Tkhl4|*DI(9^Xy}=UH|hsl zc(IEh%Zvz1He1P&2aq+JsEt)#lRUcYS?+5^7Mce#GGzLJ!je__e%UtJM7d*xuMeKx zfaBk|4W_T;4h2lNnsVke!2^xP*Ph}C+8RBk^$yoYB$qP<3TZp73TnjrEm;t#O9dZ2 zr%z*nBB-}NM&|9nVX2M*qB|$&0By0agBglalY$R6B-4JDm%-b7;Q42n7xG19MEKui zQor$&_>e#TTCJ}}OmIuY>2VOkx#ne|aiIp$j`Uw{F0Vh2k8)Ve=@_A4Oba7{4Q$ad zt@pR~>#Z`QTt#8OS85s~#&4dyDT;zMpEBTLGwxD*z!^2UP{-)c_15 zXRBq^_YS_%4`=1XKP@GI#u&JV+Tvd(J$i~)Wam5;waAa=3uD}i85qU^YJ*5oPPfs1 zN9(qZNCT#b&A##8`gBW_CNIWbF?R^69qyA z0*)N@4K2Dkh)L3-WDU_E@+_pEV%zQR_MFMF-+1t8=?~v2L(Y!L79Yi$TaM40!A3_K zn&))VzdmhBdyj*P3z@Q`=VxT3vs))X1P5UA!3VUuo=cpyQK!6#%i$RKHJO9egK0~A zayEW2nnwKO0Y=0)!k7%<_;6v%m(pxNO&*8ivJVd%kYf0S$o(T`df?_wkGwP6M~TMh zE3YTcw@!v%fk5NgrxXnIBtCdg_&_l&%wX9oss?W->wa0er#fUj(=8k<@`Xu`px#-m zZSA&F38mEWX@cBxc`^Ixnhclw>uNk$a$3p(fbhF9Ah zzeho)+1m0LQn1~N&gAG3N%YtI{+cm@ZW-8>Y2sg>=>9IylNDr{u<=ug9zJZ{34Hq& z-;cstFt!h@(b6nKw9nq|<>iwL(P`0}u}DrV-8)$K)-pLDcdtYI#(#T@l_#Z5OW6E2&Y^6C>(W+$Cgk0n6riEeLd-i*8I}|s z#hRg)MtpW%%Kq%sogKtz4_Q!AF5%#tAKh3kD`u@mHC!nLO9j9|S(jlm3%cYl=E|Kt zj<1(XH^j>)0l?o+oWXZgXV!>A5G54hc}en6=I*TT(YI07RFAoG#*r*|`M1>&X(s zQefaDc!@giIRTiU@N-h2wjaz?{YPz5<|D~qh^ zIC5jzIEpC&Ds3JS=}pUGp<+sf(a!8uJD$e0N>p7I7BJeVTD#5t)_J9dFj_%OQ!8rE zx5Wezu?quo?!6%eiV5PTm*EVf!plNfYWG9FuPicVJ$w^8Qv+9XlNAEMew`EbL|#@v zO+Zy(=zhuhj}toq1!hv^FcL#@>d}c2JUo2x=$LgzSoyjeO@H^8fIN!dn%#}!G}p}b zHWDD375m2$BDl*fIB2npJ!n~WxmK5G|Iw%GNdrIHMumqi0*>=jybM1PL4Jt&-5Z~u zcW;;mqunGXo)Fyo5SWrVoimVPr>%)lZAUg5u>dQxz9S`R9Oys^vH+tQq38iH;?#}> z037$u?eK-=ACG)PlWVcaev~sUVBrxc#_1{{%D5teMC)75FnaVJS@N$%jZ1hWGDQY4 zDaD}D<6vYOV+2T5l)_F^SDnR?xXV8k#pKJ%eD0q1qgZ9*g-%Wv325-%fyR}DgQv7` zL~T;L<{zIiO$k?jnq4eNn0VdRb0?h+NT+jlw&=Cl>@1rKln%bPBm-gT6A;7!u( z`rrY-v@UXz=T8g*HolD;r^EU*pPUIY2mP?vV8%dnf%Jy;a69nD)3l zAy}Qal+o(|GS?N=oH@1;D4%bq9zXTDfljpu8UMiixLCAgFlBNWo)5?$Y)+6%r)P-K%KVMGxC zmq4^=U_Ia{BxOPPAKu~(+C2BaE#cf4Y#gp^18#PwpT5Yvd!WbdlF$~zTVF}qp=Q>N z1}?1%cR-eBk$}N{i)W{2qX!Cj0v3)sN-j9?`e_odS?Gv#+M}X_<`Mnyg8P-6(lKA| zIZuo6d!7|$-ljZ?uk3S7Rgh75Iz)u?lamKd{>vAWDq*umCO@6{g2_FBAThiQPj%Y~ zx8lrz*v;vUP`=o3IuUTiK)3ZcEy{u=M01+Jib3WlifkZeAX+3C9gGgyzF0-Bkb%ZH zGN;tOfDaMeGTl9rdrZbv$`{-{+Y>S*M-1 zC_QcsFzf1}a1oBTtfa}8_@2d^Il&}0lF*#pv^L{ez9ijFo}?Ovo@NH>DGAT?erS&% zpe?*wELCx&g#iG9%(*)q4_s!@(YXWsXwl(%z+Y778*Ugp#@&1kIc_FnOYv!7qM~SF zEdgW=YZn(=kjxVoLn_!!E~oq}3d43|JFzt-bqi|&Cgu^uIvg$n`?SQ#rnBfB8MyNP zw6u&}ReI@O`|Y>pu+_(~C+aMfw7i*EfJvNw2_Vx-Qr(eDD?-FvVF*B*3MJT8M7uDq zmzyvjX!j=-eCEt7-m({n=+_T`Y&n5N89tJpb}|X5G+qlqkhqJYLD{N}L;K?xXtx z01yel$4-Ii$GW^^xUWW@)zr$SY7*y z_wlnv6%44fm#06PjZF3nsGcUi&gQTK1{;8yeX9BX*AGbIqqkoFhM;f0-*q?&MJL4( zfntkqU>63zpHcz})PDlb&(Gb3>uERUU-FkxkO5fT&+Frs_2QO@!GRhHB_4=-;$z|{ zw-FLRzcib2i~gfwFKh==3@Zmr=hZQn9>|}kwuZKM-GoyoEI7jJkPg1(3w6;p$@Ir0#sIU1j@xy1>c$G`co)xqI{UMEbHt8q#){M@e0pCY1bPdf62uA3&Z(CW9>jGRHtn z@uVRO=xM07j^o`(R;g)Y%}0Dl>woSeP|TaczFc>DN0PE6-(+R(X!JP(jE}CZ&R?aP zK_>A#1>V)ge8lXhJ7eGb7(h+%$>_nTKBB;v4iV4jQbm_Q4r8lt!O^a+u7FFAoX?Ws zlB;>_?$1ewD>wLS$#7lC!|oV|w^h0}^e_~^h#+U;EttP0CE+sGvaZg|`<~$}2-SEF~=kTiz*=_=9H@|kw6QI zR?zPQ2VCBVfA_R)TX+6dyx8W#tH8Z?F_`Ioo9_FvCeq<^+CWB*>F5+Myn>&jD|k47 zZjCDDTQ`T=Q9=8yXrw>{87%QGX;9=QkaTTh#rw~ceb`!Pvy~P(4i;?fX%b!c=)&p5*f4V%cWUgG@LpF_Go=}?F_(o#8M4wxNwkx8##*;V*h(b*a!_Ore$AuKEz5^&x9Y2EiC(#LFlbEXi*ND91J`h{sRgxMUD zPoqc1FKGoo+FIX@u;KH8AG+Nxncc%C4M*&NL*5}?^6s;m_InK2q@5c`Y_VuM0;dQt!oz1d#aes`h73SV)qaw-ph@6XDZt@&`7idpw367Q3#?pdSTLZb z4?V>Sfd{e2@cDG1^Qs-Ptego2=DWbz7z!F~35gn+z@M&1D!;+_&wnXfw7uY{F;$b` z@+L=ny4SlsZQHM!NxdGrZ`XZ2u7e#ug#miXk|z#0);6Sq%BY`KQi*py4h!D8{AKIf zitV?Yf(YnJe3J!>%xh~7`6>$OW}dAN3Q^1zn$vQ>EHA8dhYs_2$s6556bSHC4~J+= z&KvblG|Mw0vS=_uKl#p6!LO%6kH!oa`By7)w~mm>xo8&_^5eS)y+n~1t8YNFV6e=N zXaF!eiWSzD@~!!2rzuy`!xirIw~peTg0uhwC}V zaBsHnMjV-^hOHfqwLB~7T=j@pVC*>QDkX=$Uiqqg%q>kPUZnK&kybqWA7RVcQQVBh#j=-)0R7g*j-#P#4Q zJ9mpF40HXSa5LU*k*dS-zSY%IS@LOCKmigs#ppdFI;hxhu3QsxDB}BH(xo;yfgG-y zCKusY1l!%+r&bFUDu~1%M2$jzH&NwlP&l)v==720xbK6MNQHz2eK4v0nR)O%-`t<3 zUt?PbR?myz0=z5I8I*SyT-J zl?yy2FBVyFt#9IP9MA4C@Pl5Iu=F<+7Lbl6jElPT#5)#$5C~3U+RCB2h z{{AIMhZSn#N8dQKNF>Z>_uv2k(O_&&7de2=@$ih%6DQ&Ei|TshW>pA1G%r zqrRuw6!)yrKbb zx9^2ByWw1L!NkI&6vOiXWicwxEt~6LGa4LKe-&v=vjAZXKQOAgXpM!X; zQZ*3oj8<+A!mE)W$Y-XX;-*^Y_=&&JU!UH?CbwI0OyP+AHWEFGEN^D5?I$u*HoDz1 zyd~(T%t=>o;uNl)dmczFi9N6hPDsY@5Jh^{LDgSM!dP5@aqufi+d{djWIWkVWC=3# z@Vc5(DT?t&L?UFmU@8y^Tu^sRQ~2uJUyQ2LN@So0LHMfUmWpG}vvQZJ#;MV#9t0lR z;h@z(04Jur$Tlq)liI`A4a*Uy?jw@SFC29cslXbw303 z+2Xz*VuQcpQe!$(qaneH4Mp#ru z-;DDa+&>^6$uj+eHB-u{-^!DrSMgK7v4@%>XfmK~w8zcGBm2m19H&p5 zWxnP!J>oy}iOm&4&w8qKN~3{TsZ*|t7*lKkWUO?yPh?e9ZB-|yj6$jh#&Y6}N2lEA zyJQ+i)7TN{nlNFAv~XV|@MVbNyzAtYtgb~W1?oh*C?M`Io4SlRK}P(~m4{s>lc zlO%>2UBrV^^zg=*v5yl4a!$c~Ok&6uI!b(OIwo`(+tzDD48@uH9tFbo(J9xI;JOt( zU*7l2P1L&UvuZ?1&+ePl!ytcoiev)-=7I8=VgUw&w@D}`2 zZipqYgK`A88*Mk^s%loM=bx~oNC9LEB`4#IZ5~RC?J@iuopr~{6)*4%k7#1(I z!A2480DyzgRE)@!k~Mdv^1Ma&Wr~D0ASWaD@R(3EhU&u%eLT+1wf9buqy^tky41A2 z?0_eOJm4l(_=5wmd2C7-?| zZFtJEq|s?#2wd>W=u60tu<`sI5g_lOyssWocIB78=^&^O&}XPms=#j@L(!kMtV;Mv zi2dokgCkC!5kh`woN(|w|8IlInQ1aSo_B8sEn|w=k`-r2H~!XAxl{M6ekBbRVv<(P zovwqCSz-Sdo}dH6wuK^0ti`li)?-j-y8ldJD7k&lrFArt=tMXtcAN{&j6+kJJI zzAyz*ro!{@KK|(&`Zsi$3wwsRmd|pwb=MEJx<>o3D?+rAi3!+TI$g=7Grca-;x?41 z8I>d!LCd+^&lGewx~t19Dy%4^BQdu?s+=owk<%L?A={GQ%(Cb)m+@^NIEL{?8oKFH zU9sF9t!s-Iwjcf7q*}Y%5S3jZUsZ);_;rQIqkR2=?5X4 z;V)l`GH-;5UWh;Az%*GOy>)ER_`wJ_0?OtL^Egi_vAvAKRa63(Y3$uG-9-!Mp*OU* z=%9_j<=iFrWC}6X{vuO5_5wWOxXb5Fs((cCZ&xqamKnz1wBE_vv zMbU|_{2#-;d^`DA0Hmd8k$u9&_W>9yOg`TohWQx^Y&wc^WG@Sy;amN*(XfBZ~^n?k9vA^(>K&!W`+E9ZLmV z^)`Sf&f!#Q|G2{yyYt_`aPDb~&r0R^7aSq&uQppG`OlMD`dswhA}; z=|!5H)yLQdwB{Hm7TzbxRqP-3^l8cV;|9b@j07*BHT~isca{&WMt)<9{}~p0`QghW zJlY@Y_}N=oOgCd9tH>uM)p?qQq8H~>TqPx*lPA6LW4bwl1+C7Bf%;!nFR>%f7({p>9eq?k4h6|5ZorC)zSxe9 z0Jpp$1T>Y=^K2G6<7=7l`o{?u6Ql?y`&>>gg zF8#3A!1g*^W?}|q8_%riKO;q*(RK3Tbm63(`l^|5hG!ect2j~81q7+ikG2&F_CH61 zAI`qp6Zky*`^6Df>83yagI6_Q>YNuwil-Cy04UGJ%3!reo!lgCd);{~?Md0lr_U?D zo>*)*Ml=xC>ZT|Kmncq!XBbM1KjfD7PaSzQEsU?|GdtJx(+&Y2o#!yW{NGVrY=I0G z-O;Sq^yKcJmSYrl_qPa#=wsK`NG4J{8y~|C z|2r)a_$aETxNq;G-1sWI-9=hFdp*aWdy{H!X|03%WPUk#IpF_l%s*zo7r0ndw^XR4 zZ!YU-g_q+f+02==b#Sjf3D5b2m?6+{+NS%{xn2FSqdz}H$2$nw*cZE@Xm0rz(8KN+wZ9cBkF7bDoN^ho?d1LZK$D zxOTJrbx?UKhm}=*hqKjwbE05$(-R|ay=&$<7mFXrLt1aQ7)KqoG-0L`s8Tp|dT&(6%DoI<-Wgc;LoXoR;0<{d=4HuSE1B$6eu- zwpB6>?&n#@0}~PP%R@xmDaENiDK&MOFvt5-yGE#olUm^2{GOHBuQ9ldP3>I+Tl6ja zUZ~&@yfg-$j(cXZ4;yc_q(-#@w22 z3w{pYP*9DpFiyDOgvrUz>!U;dc2(ZhcH6}KXIYyGl7rGGw^)XLdV1mZEEFo1O=rUR@_bmqnwQT2x=_LWh#oZ z7OL~aGC1tUo8E@)`uJZMxGLewRyl; zHO#h1M@&9Mu^yfdw|(okv5KxzPt0D~OcyNjhh5axCq3c@8-oa7S@})#C*p$uP9g*X z#KP+1+P7nWmBIpNQZfXrqJN+7#zj9X?JaP$TYb?0mRWT*feNv`=2PSywwYKDi^lR5 zg*)z+V&KXczR8DI6`uyi(aB|!%xr6Eb8N5Fh$Inqo=O#Ytu;`pnS(?`Scw{9B7wZ7 zNEUtY)s~s#Q`fvi{X4>g z#`017u?_!7l0u3%of9-g8_n&(VI{-2!%SdcoV-+ClKDiB#Ct0jIdb!szrWPm zd}0~*uL;BR5&q#E&OB9>U9kD7RSFWNE)iN_n#A&C{%T8Nbo1)1jq}tbVIz6|=CM;& zzg*B|e|H=Rj0@migg;2G_M_+a%7{yh-IJg9!DJa7Qk&mwt6t*=00JN}8q zT~+qE;C7)n)u)33gzFVN#@;h^pjq}%8)bbndAVOacc%fpJM6cZ6t&-3D1}M;=T;G) zUWYdkgg3#$jH-J?&7y~D{ax*}qcjk22h;-Cm~l5UaZqewG#UdKreCa2&#?cEw>4Ls zI2&)tp%nJ>LvvNEH#pGe-An!kzt>EE6N4((zqh5c?=tWkw0UGV)M5EBJ$T~S*EEJV z_na6$Wo`GnC*N*-M48I4L9Dnb=J5CXV^e@u^fI%fl%aDQ>(nhs-`v9Y3-RBjnku!^ zlIvR#ac$w;4z;7Mx*pYdAEGpmtt-tRoSx54S2Mgw2HJ`}W~%+k{!Vc4($dv=DqxyENdyH>>6UMVI`)1P zm4ZQ-|ERnZiqdrz`A`%P4l?=xIO@+rZEN2wQEy`}x>mn%*t|n>Qtw$(g7u7Emi`J< zXDZ5pTwP1a+e>g=wJgm1EU36Gn(C0t+K(g8FQdKeqXgGH13kU48E^bv#xUMQH(cG* z2s6waViDv5KoZ}Rzv(OnG&xMIhtom~*ARmPxeh{sjYQJo6MSfOQ2N`UMx$rHD2!7P zeu5fs0a`M19gAaH^pMLy)A}#yhTuIe$Vec;gW5%dnJJSH215B?-L`tF(bW?riqXzY zVl|q*B;@LsO55O0V(~=HLe2>d4OJqTXA0!M$y-ukn|Kc}V0|e6=noaOKWTNrZbaaL z4V;L9=R+tBt*O!d_r#}_2p+dyHo#fEEGR{`fwc3m zkG%$#Kvq#47>FjBHrCCYqv!e2!EOZa#6lAr_o4a~Zn^WW63VhR07^*oRa8{$Z>khf zjnYxR95ZGmsz+APWkaj73mW30w|!y*NWPN7(KS{DwB<>40W>gQE!>j_81%Zz$ALR^ zt~AMlm`N?N{Ck&j%~N8sYr^}1w$W3ljolQ>ruM#GO|X>1MS-n^wIEf!mM@Or{2;1A zJ)=+#Aj1WM{>Bv6009i(GBu$J>)0od{b2~QCvI8>LWQA8!-VyTuO0&(LG%nwB(>Q6 zmI)68lLxN0;a&x|X80S>ng9t?!H7yX4` zYIpl5y{kD(1t=fKow=Vtc^mLk2|fqZGzW!a9UjbC7h>J)EvgU_kZ&$TK7V5}kse3c zWu&|e4KzbEA;l`&kGxAbcz}tr+T3$QA@u(o%8lBN#AI_01(e7JIJxpJlM;onkQA@o zYGmkQY+UO2=A|@rUnxon)wY6a6?9mwoYwT$q)GwDZfxP`x)S0yPCNPh*ghlFtSxcvEfnhPJ=JSs+Bi*vO( zEnuiU4CvD~$bZNJ^mHU!|0@|s5sGN(2JxoKxCsll8!t>iTR!wkJhD1773C1L-K8~8 zTMVJ=hLZ)_w5(aS1VS~^!>)pV^(})pX(gDMDzTmXsonYtSb5NnJPeQ~h39RZ`D_IQ zCl2J7vO?w3jy$-GuuX;I3`DUQzoEK?a{1ZY{~4(9N{@b^a4$ne+E)_@ChGXFNDw~l z_T){R1tuU@yU*S2TggEolsY3X!vb;f5fNP1e5iLl0IC%;5$}CVG9F4AHKHJ$0evl` zHH(`3wGTiZ1C-?NNr^f)1trCCSfJ+91r+*s#U7rL+^6Y?7BWk@G0)0C{iok$F$Sqp zL}Zh1TGZ@18^S1OyF_f>$Nde^uDamW!}t5j3fsc~4{0=GrQFVkug)Sn^_f+=zR&ay+ z#$E0w0Q3Rgk6Lq}Mt&QVbAFeO`k@EaXDF9Kykoeo{EDlRj7%txkNpE2ek{)ETFx9$ zGo`^DWOEz7!&8ojc3>Rc%|}5REeXK2OKIt=)lnFqg$>ytB~-IUuX;+!T-@G;Hd}%q zSOVb`qYU?2{4o%XIg8^yumk|D=B8mM)v1gNVBviHWZDTOoEXjsFmU>JBiY#rt)>>l zqzUS!W<3~wf+7qv(XpPWYCAjhpOxGYy@t>6m{CjWppMgIZ5<6)cNUinl|D3)VC5ZR zEx`d9Nl5_oDK84M14k1F3B#+a+9&hA9q{}cXtd)98dvkK?0NO47&{jrtNGNyP+cht zG!$*eRQ3C@CIST;-zh@53)k~Dwu2iM`X}BadMOH|{TG^kgfnN!+IWpKwm3XOIpci~ z2W4fz>p@!O0&^?b6~_B-&G?TW3;3`4Uv0sqA=n8Uq`d}~A~)f*LMY(wxPf8^z_b@W9Kh-+{veb7L!z5N}L z+kwZDofOc{uY#~S%K<91fthutxJb)E7-+NS&hbA#9>+P(ZLq)qIAm{agoYx+RorhpRk7ddw12d5fdgw^XYt0y4BkTAJWNHYfPw)Q{Ae0Ug zmOWNHlV?+?ZExNtil@BxoSkC=lfj2qlw+c+2ZsXj783wt!Y?gI*Eev(Rfaew{!peG z+FmG1-yI_O;0jlx(oC|SO0K{V%|G<&7oe16H_Hq;1YV@{lyI+V;i!y9!s;42v##SFG;Y|Fzs)qJ&W=v;xO+7>d z8Nx4fkP71g{ATpbu+Hy9CHv>3A(mr?Wsv}=TUHeDVnM=`J-J&oLXWyEwDm4}stf>| zlIKzy&A!mS^s~pjuz;+`PvEH&F+Op?2jIalWrtS+>^ zLOs0!S6Tv`)9(~_F1T0UMX;&?8=%wQzM`X18X@fZr60$JP_veapn|f%TSNlW9Idm02%%CKpq8M#_F=Wq16?GqH$}|QAr+)^-W&k+F#q?g zKg$LII%2w@>*vQq*PMIB#JK@}AlV$nD?HU-5bKJmV?kkhJ0DIF-Vc)5+~a@uW&;xF zZn|U7f=pmb1*m3v-1D~ZuJlU6N+?;Mu%I#}hW^ItzKl%#@xNfkJ^u~<$IeISBb-W9 zyLJ>A4?~t!!vD!OGVohhOfU4Wp+Xo`R0sg$i}p~n9nizPniWUkzHS_a^4N!0DMDXg z6iNd^A7Av@o`Zg-0t%*I$z$2TBSM%C_j}N%IC#jbb?-PU?%M9Q9W@GGT~UuMd)UIf z)rTcZEwm{szH6@XbqwH>q+EXGV+)1MB@i#dTKj)78v?f`fW_7h9TpLU@^<=XDAB~w za2?U_M45LB-^lwR=mEJ<#1*fbDJ(#y&d;xQKxVHs?8NCq!9x6RY^ev|ppEF_j;gbv z-u|E5e*4$D%t+s{hDz|Ec5c$P#)IuZjXVB-USlWt1HgOGuN(gxifekH0!@&JH2DFj zEm-^&i02lY>U-U_0S6(L2vC-3Jo9$*S5<&5)~$0g8V3 zzlKkY!kW>W@tYagE)=_7^$8`YhtKoIn^m}$&Rp-X#2{%wp)Y4!@Q;^{Xkz4l;cna? zP0uGvo1^6*v<&wD1HVmbsrmn8#)2=o`HY$sr2h)_VyJEpbULEiW@1qCrT$`WM#~`l zHQ$g)Jk4e`sH4j-3Zpp%l$!wXhBE3;2w`9ShQ`_`v+&~Ve|O0j#Gg3PKKIEO>D4$E z-213}3n*l?VbolkrSr>0IQ1(a3CA5(Q5x7~WX8x5{!d9gIF=Rv+ zoqxY)QXc@dBk6a}$qRmf;J5rPxDVVu-u-0H8~;3@BD(L?eQ1zkCQEBOt;0(@O-6%j zFM%Hn3Qzfu%gQgnXSc8X@P8;crzwXR10;x7|ppdaik|m z_zcdkP)~Ha)k=A`Wpb~1b4HY4B}~45yyO%MK!>Et_A`9E53jy=;KT@xoJ zc=#vimlh6+4VdJQcy|ncZ5zW39K+C8kPQG+t4%yL+roC9ADt^)y4-ivE1LV0yDA3B z0I2iu)>f_QKbW1&Vm~XEFXmCvR#(`B!0@4)-u&Fe_t_;bfA}~1K6;+tee2ie6{zk z+c{jw&?o)=Xz#R$0j#!Wdn~XBE9zU6Y0ovb?sUh`&xG+lp$V!eX0-gouVm{6%qeXp_%|lW z@XHTPG#H2ef5a1jky^5ydf1xu3aRBcwI$Ale|t4{O4#qc<}BU#@B@wq-c%&g4svF# zCtBGUu$8$|%NO_=bfA184sL}_ez82nPHor7_pW7jz9Fa@zq1>{FB;I&-0LKk=YFI< zO=eSRC#=00Hns)=(rid0e0&Y2W1crg;_miZ4RQ$ByWFZXu00*1zIYn!kB_X|Y5@-< z4~Wdi7`pfk{b(SO@OrYC4Gj9?yUXtBRaQ8ta{^`;ZXjQACRFYP2(>+HFs zA@x?AIvY5E3rM35-1PEvJQ-iFd346@;;(n=^%Ox{tZ64wjm(-@noxh{xc(dDs?p|w zf8~cZFt#WQelj$cW4W8%h=*0SR5Lp^#ELT!xtxrng`Dc$oT^5J z34gg0AB%NNBmrp85EBKgGDmSvW#jddG|=75{ec3v9?d|RBC@O5?>euq?jr+IsQRMw z9ufqBzykiR{5?s@-*SdCL5RDX`_Lfrttx!GDZ*RW*T0t{{`NLffm+-Vg~Ygp&A^T8PNqTB*lj%mG2;EFgyq!8})8eyuwz#L*MKo zy-ur#zH1cmN{2OHB}0}<)5g=)=pVfVEnnyMXz;$q5eE1ZpS1=82o3}SN&xtf-H>X& zL1B?3Cgu_~IuOwD1*w&7`j{geLVWbTCofLOwwDbJ7 zS#iOI_V-+!TYpwK1`3tDryLVLL8HSo<=xfH0?EPpD8-dKfbVH05>bE&zHR@YRv#KD z{>>U!T@aNmF~6C&Mr_>U&fB5N?xvh+^^3p~|J9gwIj-V=IA8&VZUcMk^%=LaTHE<; zr8Qlfd#0A9NJGL3SVcHW8yDaf-FV_nX>jHW<+U8}=Zld-<7P@K4|da-r}0m%PWGhH zC^xf|&g5G4Hc@L13qzwJw5AYa8&dQxE@^*-xy>@UCvNu5p7HoJcwAdXg({B965+^{ zGS4*~i+_LFH)kOvcF$xe^~p3FG>I}e2RA9fV`VvQ+eR7vIqG%$3n+Fh?92D z&$py>U{(o8)Gpo4AplmazWrx8)46bli4idNL|#0?9Wqw>wH!K5Xlq-XR`9YUfPAxw z(L%(_oEPr6(G-LE?KC9(oQN2^rutBlv#rqsuh{O#lkn&`s;J~`Dw03zC8&A=AG+D? z_l@A;YbDdp%nI+LFq*bS)Apfb3q`IW!d_dKu;AQchvm*sHGNl-`&pEMz`u_pb2wUP zJL@ZUXXjK{__fccg(4NLV$Fi8ExCe7UAP#TfxWgZNcTi@TZi|B2*n8V(fvl!o!7Bp z!eG1`(1RTeU1jTK58Gshkpgw4(HPHW{^6a{dz!me>`ohzz($j%;|!)n<^q)IIC#m5 zxu6i^PHUAt`!pZZWG!r>po7_NxBb;zHKszeIbJmi5^F?KeZc`FvqF~}?wGd^SC$`| z>^}6{UDwMKB$xeddXEr^dem@+^WA0ZFo?;p#T!Pc|0?QN(|GZyS~D<$#E&V%qk2&= zn|t(r%&f;zN&9-;Ni&QD78n2RuYwK|wZmC&tv-c|M>m&Z&y0HBm&6R&Q9amnN}V!^w6R{=~~l!D$2PI;n>TJKeP z6WtYFeuV2gXYs`)Cg6I)qrr9W2Z6n4>fA4OmJ*NX!pHY zlbPkSUKwgq$(B1?(oob4cYnf(W6=N%AQX`k3}6hFOb%3xh=oH0+)M85$<|rN!Nz_Q zCmmTGj%j^M!j}kKRrTfNNlV6Ts9286J@4P7j?vV8(>F3r3~(DCHmDJ=E2xOAbs(aC zA;{o&-F4mCOewpqvQ|5qoMQ&JXc1L3e|?;+B9;FpB?b5*0UN+ZiWa1%=gZknZGWy3 z-~Bh{!=VT#Nxb^~{{`j%8UNT^>0f>sfg8S^^GjZMF!yY4A4n}2X?v3@;Q0RS>oiaY zCo4KC69=C*ymVaPfT0eQxHU@ZM6r`Bd0qcJgOb>9!Ne2Wv|7$KE~nRPJZj_e$CPsw zFx|Fit=#nVUe8E1uDh{D0)Pa-06>63jYMgh#?OJA=wX}^BHLhG);2encWyUPx5dkD zCBHHlGaH=xY4ReBK0n(V*WL3xH*9$0k roT@D7znJ|p0Ht>&Lqv%5#_s { elapsed = Date.now() - loadingStarted; - console.log('Loading', elapsed) if (elapsed > 3000 && loading) loading.style.display = 'none'; }, 5000); } diff --git a/modules/extra_networks.py b/modules/extra_networks.py index 3170bed4a..9e886219a 100644 --- a/modules/extra_networks.py +++ b/modules/extra_networks.py @@ -74,7 +74,7 @@ def activate(p, extra_network_data): try: extra_network.activate(p, extra_network_args) except Exception as e: - errors.display(e, f"Error activating extra network {extra_network_name} with arguments {extra_network_args}") + errors.display(e, f"activating extra network {extra_network_name} with arguments {extra_network_args}") for extra_network_name, extra_network in extra_network_registry.items(): args = extra_network_data.get(extra_network_name, None) @@ -84,7 +84,7 @@ def activate(p, extra_network_data): try: extra_network.activate(p, []) except Exception as e: - errors.display(e, f"Error activating extra network {extra_network_name}") + errors.display(e, f"activating extra network {extra_network_name}") def deactivate(p, extra_network_data): @@ -99,7 +99,7 @@ def deactivate(p, extra_network_data): try: extra_network.deactivate(p) except Exception as e: - errors.display(e, f"Error deactivating extra network {extra_network_name}") + errors.display(e, f"deactivating extra network {extra_network_name}") for extra_network_name, extra_network in extra_network_registry.items(): args = extra_network_data.get(extra_network_name, None) @@ -109,7 +109,7 @@ def deactivate(p, extra_network_data): try: extra_network.deactivate(p) except Exception as e: - errors.display(e, f"Error deactivating unmentioned extra network {extra_network_name}") + errors.display(e, f"deactivating unmentioned extra network {extra_network_name}") re_extra_net = re.compile(r"<(\w+):([^>]+)>") diff --git a/modules/generation_parameters_copypaste.py b/modules/generation_parameters_copypaste.py index 3f8b5fbf0..32c12d54b 100644 --- a/modules/generation_parameters_copypaste.py +++ b/modules/generation_parameters_copypaste.py @@ -143,8 +143,8 @@ def connect_paste_params_buttons(): binding.paste_button.click( fn=None, _js=f"switch_to_{binding.tabname}", - inputs=None, - outputs=None, + inputs=[], + outputs=[], ) @@ -343,7 +343,7 @@ def create_override_settings_dict(text_pairs): return res -def connect_paste(button, paste_fields, input_comp, override_settings_component, tabname): # pylint: disable=redefined-outer-name +def connect_paste(button, local_paste_fields, input_comp, override_settings_component, tabname): def paste_func(prompt): if 'Negative prompt' not in prompt and 'Steps' not in prompt: prompt = None @@ -357,7 +357,7 @@ def connect_paste(button, paste_fields, input_comp, override_settings_component, params = parse_generation_parameters(prompt) script_callbacks.infotext_pasted_callback(prompt, params) res = [] - for output, key in paste_fields: + for output, key in local_paste_fields: if callable(key): v = key(params) else: @@ -394,12 +394,12 @@ def connect_paste(button, paste_fields, input_comp, override_settings_component, vals[param_name] = v vals_pairs = [f"{k}: {v}" for k, v in vals.items()] return gr.Dropdown.update(value=vals_pairs, choices=vals_pairs, visible=len(vals_pairs) > 0) - paste_fields = paste_fields + [(override_settings_component, paste_settings)] + local_paste_fields = local_paste_fields + [(override_settings_component, paste_settings)] button.click( fn=paste_func, inputs=[input_comp], - outputs=[x[0] for x in paste_fields], + outputs=[x[0] for x in local_paste_fields], ) button.click( fn=None, diff --git a/modules/hypernetworks/hypernetwork.py b/modules/hypernetworks/hypernetwork.py index 9500c0410..d13b811d5 100644 --- a/modules/hypernetworks/hypernetwork.py +++ b/modules/hypernetworks/hypernetwork.py @@ -1,24 +1,21 @@ -import csv import datetime import glob import html import os -import sys +from collections import deque import inspect - -import modules.textual_inversion.dataset -import torch +from statistics import stdev, mean +from rich import progress import tqdm +import torch +from torch import einsum +from torch.nn.init import normal_, xavier_normal_, xavier_uniform_, kaiming_normal_, kaiming_uniform_, zeros_ from einops import rearrange, repeat from ldm.util import default from modules import devices, processing, sd_models, shared, sd_samplers, hashes, sd_hijack_checkpoint, errors +import modules.textual_inversion.dataset from modules.textual_inversion import textual_inversion, logging from modules.textual_inversion.learn_schedule import LearnRateScheduler -from torch import einsum -from torch.nn.init import normal_, xavier_normal_, xavier_uniform_, kaiming_normal_, kaiming_uniform_, zeros_ - -from collections import defaultdict, deque -from statistics import stdev, mean optimizer_dict = {optim_name : cls_obj for optim_name, cls_obj in inspect.getmembers(torch.optim, inspect.isclass) if optim_name != "Optimizer"} @@ -245,7 +242,8 @@ class Hypernetwork: if self.name is None: self.name = os.path.splitext(os.path.basename(filename))[0] - state_dict = torch.load(filename, map_location='cpu') + with progress.open(filename, 'rb', description=f'Loading hypernetwork: [cyan]{filename}', auto_refresh=True) as f: + state_dict = torch.load(f, map_location='cpu') self.layer_structure = state_dict.get('layer_structure', [1, 2, 1]) self.optional_info = state_dict.get('optional_info', None) @@ -539,7 +537,7 @@ def train_hypernetwork(id_task, hypernetwork_name, learn_rate, batch_size, gradi return hypernetwork, filename scheduler = LearnRateScheduler(learn_rate, steps, initial_step) - + clip_grad = torch.nn.utils.clip_grad_value_ if clip_grad_mode == "value" else torch.nn.utils.clip_grad_norm_ if clip_grad_mode == "norm" else None if clip_grad: clip_grad_sched = LearnRateScheduler(clip_grad_value, steps, initial_step, verbose=False) @@ -595,7 +593,7 @@ def train_hypernetwork(id_task, hypernetwork_name, learn_rate, batch_size, gradi scaler = torch.xpu.amp.GradScaler() else: scaler = torch.cuda.amp.GradScaler() - + batch_size = ds.batch_size gradient_step = ds.gradient_step # n steps = batch_size * gradient_step * n image processed @@ -638,7 +636,7 @@ def train_hypernetwork(id_task, hypernetwork_name, learn_rate, batch_size, gradi if clip_grad: clip_grad_sched.step(hypernetwork.step) - + with devices.autocast(): x = batch.latent_sample.to(devices.device, non_blocking=pin_memory) if use_weight: @@ -659,14 +657,14 @@ def train_hypernetwork(id_task, hypernetwork_name, learn_rate, batch_size, gradi _loss_step += loss.item() scaler.scale(loss).backward() - + # go back until we reach gradient accumulation steps if (j + 1) % gradient_step != 0: continue loss_logging.append(_loss_step) if clip_grad: clip_grad(weights, clip_grad_sched.learn_rate) - + scaler.step(optimizer) scaler.update() hypernetwork.step += 1 @@ -674,9 +672,7 @@ def train_hypernetwork(id_task, hypernetwork_name, learn_rate, batch_size, gradi optimizer.zero_grad(set_to_none=True) loss_step = _loss_step _loss_step = 0 - steps_done = hypernetwork.step + 1 - epoch_num = hypernetwork.step // steps_per_epoch epoch_step = hypernetwork.step % steps_per_epoch diff --git a/modules/processing.py b/modules/processing.py index 6c2877576..efba7f01e 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -492,11 +492,13 @@ def process_images(p: StableDiffusionProcessing) -> Processed: try: # if no checkpoint override or the override checkpoint can't be found, remove override entry and load opts checkpoint - if sd_models.checkpoint_aliases.get(p.override_settings.get('sd_model_checkpoint')) is None: + if p.override_settings.get('sd_model_checkpoint', None) is not None and sd_models.checkpoint_aliases.get(p.override_settings.get('sd_model_checkpoint')) is None: p.override_settings.pop('sd_model_checkpoint', None) sd_models.reload_model_weights() for k, v in p.override_settings.items(): setattr(opts, k, v) + if k == 'sd_model_checkpoint': + sd_models.reload_model_weights() if k == 'sd_vae': sd_vae.reload_vae_weights() diff --git a/modules/scripts.py b/modules/scripts.py index 1f244c66c..ac3c38a65 100644 --- a/modules/scripts.py +++ b/modules/scripts.py @@ -260,6 +260,14 @@ class ScriptRunner: def initialize_scripts(self, is_img2img): from modules import scripts_auto_postprocessing + self.scripts.clear() + self.selectable_scripts.clear() + self.alwayson_scripts.clear() + self.titles.clear() + self.infotext_fields.clear() + self.paste_field_names.clear() + self.script_load_ctr = 0 + self.scripts.clear() self.alwayson_scripts.clear() self.selectable_scripts.clear() @@ -429,7 +437,6 @@ class ScriptRunner: self.scripts[si].args_from = args_from self.scripts[si].args_to = args_to - scripts_txt2img = ScriptRunner() scripts_img2img = ScriptRunner() scripts_postproc = scripts_postprocessing.ScriptPostprocessingRunner() diff --git a/modules/sd_models.py b/modules/sd_models.py index f422b0133..c8790b53e 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -212,18 +212,18 @@ def read_state_dict(checkpoint_file, map_location=None): # pylint: disable=unuse pl_sd = None with progress.open(checkpoint_file, 'rb', description=f'Loading weights: [cyan]{checkpoint_file}', auto_refresh=True) as f: _, extension = os.path.splitext(checkpoint_file) - if 'v1-5-pruned-emaonly.safetensors' in checkpoint_file and not shared.opts.stream_load: - if extension.lower() == ".safetensors": - pl_sd = safetensors.torch.load_file(checkpoint_file, device='cpu') - else: - pl_sd = torch.load(checkpoint_file, map_location='cpu') - else: + if shared.opts.stream_load: if extension.lower() == ".safetensors": buffer = f.read() pl_sd = safetensors.torch.load(buffer) else: buffer = io.BytesIO(f.read()) pl_sd = torch.load(buffer, map_location='cpu') + else: + if extension.lower() == ".safetensors": + pl_sd = safetensors.torch.load_file(checkpoint_file, device='cpu') + else: + pl_sd = torch.load(f, map_location='cpu') sd = get_state_dict_from_checkpoint(pl_sd) del pl_sd except Exception as e: @@ -342,10 +342,9 @@ sd2_clip_weight = 'cond_stage_model.model.transformer.resblocks.0.attn.in_proj_w def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None): - shared.debug(f'Load model: {checkpoint_info}') + shared.debug(f'Load model: {checkpoint_info} {already_loaded_state_dict}') from modules import lowvram, sd_hijack checkpoint_info = checkpoint_info or select_checkpoint() - do_inpainting_hijack() if timer is None: timer = Timer() current_checkpoint_info = None @@ -353,9 +352,10 @@ def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None) current_checkpoint_info = shared.sd_model.sd_checkpoint_info sd_hijack.model_hijack.undo_hijack(shared.sd_model) shared.sd_model = None - gc.collect() - devices.torch_gc() + gc.collect() + devices.torch_gc() shared.debug(f'Model unloaded: {memory_stats()}') + do_inpainting_hijack() if already_loaded_state_dict is not None: state_dict = already_loaded_state_dict else: @@ -380,6 +380,7 @@ def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None) sd_model = instantiate_from_config(sd_config.model) except Exception: sd_model = instantiate_from_config(sd_config.model) + # sd_model = instantiate_from_config(sd_config.model) sd_model.used_config = checkpoint_config timer.record("create") load_model_weights(sd_model, checkpoint_info, state_dict, timer) @@ -403,6 +404,7 @@ def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None) script_callbacks.model_loaded_callback(sd_model) timer.record("callbacks") shared.log.info(f"Model loaded in {timer.summary()}") + gc.collect() shared.debug(f'Model load finished: {memory_stats()}') return sd_model diff --git a/modules/shared.py b/modules/shared.py index b375dc6d4..de12c0787 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -216,7 +216,6 @@ def list_themes(): def refresh_themes(): - import requests try: req = requests.get('https://huggingface.co/datasets/freddyaboulton/gradio-theme-subdomains/resolve/main/subdomains.json', timeout=5) if req.status_code == 200: @@ -409,7 +408,7 @@ options_templates.update(options_section(('ui', "User interface"), { "font": OptionInfo("", "Font for image grids that have text"), "keyedit_precision_attention": OptionInfo(0.1, "Ctrl+up/down precision when editing (attention:1.1)", gr.Slider, {"minimum": 0.01, "maximum": 0.2, "step": 0.001}), "keyedit_precision_extra": OptionInfo(0.05, "Ctrl+up/down precision when editing ", gr.Slider, {"minimum": 0.01, "maximum": 0.2, "step": 0.001}), - "keyedit_delimiters": OptionInfo(".,\/!?%^*;:{}=`~()", "Ctrl+up/down word delimiters"), + "keyedit_delimiters": OptionInfo(".,\/!?%^*;:{}=`~()", "Ctrl+up/down word delimiters"), # pylint: disable=anomalous-backslash-in-string "quicksettings": OptionInfo("sd_model_checkpoint", "Quicksettings list"), "hidden_tabs": OptionInfo([], "Hidden UI tabs", ui_components.DropdownMulti, lambda: {"choices": [x for x in tab_names]}), "ui_reorder": OptionInfo(", ".join(ui_reorder_categories), "txt2img/img2img UI item order"), @@ -715,6 +714,7 @@ def restart_server(restart=True): demo.server.force_exit = True demo.close(verbose=False) demo.server.close() + demo.fns = [] except: pass if restart: diff --git a/modules/ui.py b/modules/ui.py index 1a4316c7e..8d00e7db5 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -631,8 +631,9 @@ def create_ui(): with gr.Tab(label="Resize to") as tab_scale_to: with FormRow(): with gr.Column(elem_id="img2img_column_size", scale=4): - width = gr.Slider(minimum=64, maximum=2048, step=8, label="Width", value=512, elem_id="img2img_width") - height = gr.Slider(minimum=64, maximum=2048, step=8, label="Height", value=512, elem_id="img2img_height") + with FormRow(): + width = gr.Slider(minimum=64, maximum=2048, step=8, label="Width", value=512, elem_id="img2img_width") + height = gr.Slider(minimum=64, maximum=2048, step=8, label="Height", value=512, elem_id="img2img_height") with gr.Column(elem_id="img2img_dimensions_row", scale=1, elem_classes="dimensions-tools"): res_switch_btn = ToolButton(value=switch_values_symbol, elem_id="img2img_res_switch_btn") @@ -664,9 +665,9 @@ def create_ui(): tab_scale_to.select(fn=lambda: 0, inputs=[], outputs=[selected_scale_tab]) tab_scale_by.select(fn=lambda: 1, inputs=[], outputs=[selected_scale_tab]) - with gr.Column(elem_id="img2img_column_batch"): - batch_count = gr.Slider(minimum=1, step=1, label='Batch count', value=1, elem_id="img2img_batch_count") - batch_size = gr.Slider(minimum=1, maximum=8, step=1, label='Batch size', value=1, elem_id="img2img_batch_size") + with FormRow(elem_id="img2img_column_batch"): + batch_count = gr.Slider(minimum=1, step=1, label='Batch count', value=1, elem_id="img2img_batch_count") + batch_size = gr.Slider(minimum=1, maximum=8, step=1, label='Batch size', value=1, elem_id="img2img_batch_size") elif category == "cfg": with FormGroup(): @@ -1627,7 +1628,7 @@ def html_head(): for script in modules.scripts.list_scripts("javascript", ".js"): if script.path == script_js: continue - print(script.path) + shared.log.debug(f'Loading JS script: {script.path}') head += f'\n' for script in modules.scripts.list_scripts("javascript", ".mjs"): head += f'\n' diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py index 1c84e3dc7..d919acbfe 100644 --- a/modules/ui_extensions.py +++ b/modules/ui_extensions.py @@ -20,32 +20,22 @@ def check_access(): def apply_and_restart(disable_list, update_list, disable_all): check_access() - disabled = json.loads(disable_list) assert type(disabled) == list, f"wrong disable_list data for apply_and_restart: {disable_list}" - update = json.loads(update_list) assert type(update) == list, f"wrong update_list data for apply_and_restart: {update_list}" - update = set(update) - for ext in extensions.extensions: if ext.name not in update: continue - try: ext.fetch_and_reset_hard() except Exception as e: errors.display(e, f'extensions apply update: {ext.name}') - shared.opts.disabled_extensions = disabled shared.opts.disable_all_extensions = disable_all shared.opts.save(shared.config_filename) - - # shared.state.interrupt() - # shared.state.need_restart = True - # shared.restart_server() - shared.log.warning('Extension list updated - please restart the server') + shared.restart_server(restart=True) def check_updates(_id_task, disable_list): @@ -313,7 +303,7 @@ def create_ui(): with gr.TabItem("Installed", id="installed"): with gr.Row(elem_id="extensions_installed_top"): - apply = gr.Button(value="Apply (restart required)", variant="primary") + apply = gr.Button(value="Apply & restart", variant="primary") check = gr.Button(value="Check for updates") extensions_disable_all = gr.Radio(label="Disable all extensions", choices=["none", "extra", "all"], value=shared.opts.disable_all_extensions, elem_id="extensions_disable_all") extensions_disabled_list = gr.Text(elem_id="extensions_disabled_list", visible=False).style(container=False) From 5c9894724c36163ff750d7ba012afc91f9895cad Mon Sep 17 00:00:00 2001 From: Disty0 Date: Fri, 5 May 2023 12:26:47 +0300 Subject: [PATCH 062/282] Fix memory monitoring when using IPEX --- modules/memmon.py | 10 ++++++++-- modules/sd_hijack_optimizations.py | 6 ++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/modules/memmon.py b/modules/memmon.py index 66bf0303c..66fd9a8d4 100644 --- a/modules/memmon.py +++ b/modules/memmon.py @@ -21,7 +21,12 @@ class MemUsageMonitor(threading.Thread): self.run_flag = threading.Event() self.data = defaultdict(int) if not torch.cuda.is_available(): - self.disabled = True + #torch.cuda.is_available() reports False when using IPEX. + if shared.cmd_opts.use_ipex: + self.cuda_mem_get_info() + torch.cuda.memory_stats("xpu") + else: + self.disabled = True else: try: if shared.cmd_opts.use_ipex: @@ -35,7 +40,8 @@ class MemUsageMonitor(threading.Thread): def cuda_mem_get_info(self): if shared.cmd_opts.use_ipex: - return [(torch.xpu.get_device_properties("xpu").total_memory - torch.xpu.memory_allocated()), torch.xpu.get_device_properties("xpu").total_memory] + #-128MB for the OS and other. + return [(torch.xpu.get_device_properties("xpu").total_memory - torch.xpu.memory_allocated() - (128*1024*1024)), torch.xpu.get_device_properties("xpu").total_memory] else: index = self.device.index if self.device.index is not None else torch.cuda.current_device() return torch.cuda.mem_get_info(index) diff --git a/modules/sd_hijack_optimizations.py b/modules/sd_hijack_optimizations.py index a79bf6ae0..596162782 100644 --- a/modules/sd_hijack_optimizations.py +++ b/modules/sd_hijack_optimizations.py @@ -26,7 +26,8 @@ def get_available_vram(): stats = torch.xpu.memory_stats("xpu") mem_active = stats['active_bytes.all.current'] mem_reserved = stats['reserved_bytes.all.current'] - mem_free_xpu, _ = [(torch.xpu.get_device_properties("xpu").total_memory - torch.xpu.memory_allocated()), torch.xpu.get_device_properties("xpu").total_memory] + #-128MB for the OS and other. + mem_free_xpu = torch.xpu.get_device_properties("xpu").total_memory - torch.xpu.memory_allocated() - (128*1024*1024) mem_free_torch = mem_reserved - mem_active mem_free_total = mem_free_xpu + mem_free_torch return mem_free_total @@ -187,7 +188,8 @@ def einsum_op_cuda(q, k, v): stats = torch.xpu.memory_stats("xpu") mem_active = stats['active_bytes.all.current'] mem_reserved = stats['reserved_bytes.all.current'] - mem_free_xpu, _ = [(torch.xpu.get_device_properties("xpu").total_memory - torch.xpu.memory_allocated()), torch.xpu.get_device_properties("xpu").total_memory] + #-128MB for the OS and other. + mem_free_xpu = torch.xpu.get_device_properties("xpu").total_memory - torch.xpu.memory_allocated() - (128*1024*1024) mem_free_torch = mem_reserved - mem_active mem_free_total = mem_free_xpu + mem_free_torch # Divide factor of safety as there's copying and fragmentation From fe496f4ebcb8b3d8981d69a1c2459b09cb429723 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 5 May 2023 09:05:59 -0400 Subject: [PATCH 063/282] add train preprocess options --- cli/train/train.py | 1 - installer.py | 11 +++--- modules/img2img.py | 35 ++++++++++--------- modules/sd_models.py | 4 +-- modules/shared.py | 2 +- modules/textual_inversion/preprocess.py | 23 ++++++------ .../textual_inversion/textual_inversion.py | 4 +-- modules/txt2img.py | 15 ++++---- modules/ui.py | 8 +++-- 9 files changed, 56 insertions(+), 47 deletions(-) diff --git a/cli/train/train.py b/cli/train/train.py index b1e1d48fb..bbad21565 100755 --- a/cli/train/train.py +++ b/cli/train/train.py @@ -24,7 +24,6 @@ import latents import options # console handler -from rich import print # pylint: disable=redefined-builtin from rich.pretty import install as pretty_install from rich.traceback import install as traceback_install from rich.console import Console diff --git a/installer.py b/installer.py index f2b4d5b5d..2da153806 100644 --- a/installer.py +++ b/installer.py @@ -20,7 +20,7 @@ class Dot(dict): # dot notation access to dictionary attributes log = logging.getLogger("sd") -args = Dot({ 'debug': False, 'upgrade': False, 'skip_update': False, 'skip_extensions': False, 'skip_requirements': False, 'skip_git': False, 'reset': False, 'use_directml': False, 'use_ipex': False, 'experimental': False, 'test': False }) +args = Dot({ 'debug': False, 'upgrade': False, 'skip_update': False, 'skip_extensions': False, 'skip_requirements': False, 'skip_git': False, 'reset': False, 'use_directml': False, 'use_ipex': False, 'experimental': False, 'test': False, 'tls_selfsign': False }) quick_allowed = True errors = 0 opts = {} @@ -146,9 +146,9 @@ def update(folder): log.debug(f'Setting branch: {folder} / {branch}') git(f'checkout {branch}', folder) if branch is None: - git('pull --autostash --rebase', folder) + git('pull --autostash --rebase --force', folder) else: - git(f'pull origin {branch} --autostash --rebase', folder) + git(f'pull origin {branch} --autostash --rebase --force', folder) # branch = git('branch', folder) @@ -239,7 +239,6 @@ def check_torch(): log.info(f'Torch backend: DirectML ({version})') for i in range(0, torch_directml.device_count()): log.info(f'Torch detected GPU: {torch_directml.device_name(i)}') - log.info(f'DirectML default device: {torch_directml.device_name(torch_directml.default_device())}') except: log.warning("Torch repoorts CUDA not available") except Exception as e: @@ -435,7 +434,7 @@ def check_extensions(): # check version of the main repo and optionally upgrade it -def check_version(offline=False): +def check_version(offline=False): # pylint: disable=unused-argument if not os.path.exists('.git'): log.error('Not a git repository') if not args.ignore: @@ -464,7 +463,7 @@ def check_version(offline=False): try: git('add .') git('stash') - update('.') + update('.') # TODO: can fail # git('git stash pop') ver = git('log -1 --pretty=format:"%h %ad"') log.info(f'Upgraded to version: {ver}') diff --git a/modules/img2img.py b/modules/img2img.py index 58b9449aa..d0b5183f4 100644 --- a/modules/img2img.py +++ b/modules/img2img.py @@ -2,10 +2,9 @@ import os import numpy as np from PIL import Image, ImageOps, ImageFilter, ImageEnhance, ImageChops, UnidentifiedImageError import modules.scripts -from modules import sd_samplers +from modules import sd_samplers, shared from modules.generation_parameters_copypaste import create_override_settings_dict from modules.processing import Processed, StableDiffusionProcessingImg2Img, process_images -from modules.shared import opts, debug, state, listfiles, sd_model, log from modules.ui import plaintext_to_html import modules.processing as processing from modules.memstats import memory_stats @@ -13,23 +12,23 @@ from modules.memstats import memory_stats def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args): processing.fix_seed(p) - images = listfiles(input_dir) + images = shared.listfiles(input_dir) is_inpaint_batch = False if inpaint_mask_dir: - inpaint_masks = listfiles(inpaint_mask_dir) + inpaint_masks = shared.listfiles(inpaint_mask_dir) is_inpaint_batch = len(inpaint_masks) > 0 if is_inpaint_batch: - log.info(f"\nInpaint batch is enabled. {len(inpaint_masks)} masks found.") - log.info(f"Will process {len(images)} images, creating {p.n_iter * p.batch_size} new images for each.") + shared.log.info(f"\nInpaint batch is enabled. {len(inpaint_masks)} masks found.") + shared.log.info(f"Will process {len(images)} images, creating {p.n_iter * p.batch_size} new images for each.") save_normally = output_dir == '' p.do_not_save_grid = True p.do_not_save_samples = not save_normally - state.job_count = len(images) * p.n_iter + shared.state.job_count = len(images) * p.n_iter for i, image in enumerate(images): - state.job = f"{i+1} out of {len(images)}" - if state.skipped: - state.skipped = False - if state.interrupted: + shared.state.job = f"{i+1} out of {len(images)}" + if shared.state.skipped: + shared.state.skipped = False + if shared.state.interrupted: break try: img = Image.open(image) @@ -61,11 +60,15 @@ def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args): if processed_image.mode == 'RGBA': processed_image = processed_image.convert("RGB") processed_image.save(os.path.join(output_dir, filename)) - debug(f'Processed: {len(images)} Memory: {memory_stats()} batch') + shared.debug(f'Processed: {len(images)} Memory: {memory_stats()} batch') def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_styles, init_img, sketch, init_img_with_mask, inpaint_color_sketch, inpaint_color_sketch_orig, init_img_inpaint, init_mask_inpaint, steps: int, sampler_index: int, mask_blur: int, mask_alpha: float, inpainting_fill: int, restore_faces: bool, tiling: bool, n_iter: int, batch_size: int, cfg_scale: float, image_cfg_scale: float, denoising_strength: float, seed: int, subseed: int, subseed_strength: float, seed_resize_from_h: int, seed_resize_from_w: int, seed_enable_extras: bool, selected_scale_tab: int, height: int, width: int, scale_by: float, resize_mode: int, inpaint_full_res: bool, inpaint_full_res_padding: int, inpainting_mask_invert: int, img2img_batch_input_dir: str, img2img_batch_output_dir: str, img2img_batch_inpaint_mask_dir: str, override_settings_texts, *args): # pylint: disable=unused-argument + if shared.sd_model is None: + shared.log.warning('Model not loaded') + return + override_settings = create_override_settings_dict(override_settings_texts) is_batch = mode == 5 @@ -105,9 +108,9 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s assert 0. <= denoising_strength <= 1., 'can only work with strength in [0.0, 1.0]' p = StableDiffusionProcessingImg2Img( - sd_model=sd_model, - outpath_samples=opts.outdir_samples or opts.outdir_img2img_samples, - outpath_grids=opts.outdir_grids or opts.outdir_img2img_grids, + sd_model=shared.sd_model, + outpath_samples=shared.opts.outdir_samples or shared.opts.outdir_img2img_samples, + outpath_grids=shared.opts.outdir_grids or shared.opts.outdir_img2img_grids, prompt=prompt, negative_prompt=negative_prompt, styles=prompt_styles, @@ -151,5 +154,5 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s processed = process_images(p) p.close() generation_info_js = processed.js() - debug(f'Processed: {len(processed.images)} Memory: {memory_stats()} img') + shared.debug(f'Processed: {len(processed.images)} Memory: {memory_stats()} img') return processed.images, generation_info_js, plaintext_to_html(processed.info), plaintext_to_html(processed.comments) diff --git a/modules/sd_models.py b/modules/sd_models.py index c8790b53e..e5f4fb6a2 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -23,6 +23,7 @@ model_path = os.path.abspath(os.path.join(paths.models_path, model_dir)) checkpoints_list = {} checkpoint_aliases = {} checkpoints_loaded = collections.OrderedDict() +skip_next_load = False class CheckpointInfo: @@ -380,7 +381,6 @@ def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None) sd_model = instantiate_from_config(sd_config.model) except Exception: sd_model = instantiate_from_config(sd_config.model) - # sd_model = instantiate_from_config(sd_config.model) sd_model.used_config = checkpoint_config timer.record("create") load_model_weights(sd_model, checkpoint_info, state_dict, timer) @@ -406,9 +406,7 @@ def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None) shared.log.info(f"Model loaded in {timer.summary()}") gc.collect() shared.debug(f'Model load finished: {memory_stats()}') - return sd_model -skip_next_load = False def reload_model_weights(sd_model=None, info=None): global skip_next_load # pylint: disable=global-statement diff --git a/modules/shared.py b/modules/shared.py index de12c0787..66aba96fa 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -360,7 +360,7 @@ options_templates.update(options_section(('face-restoration', "Face restoration" options_templates.update(options_section(('training', "Training"), { "unload_models_when_training": OptionInfo(False, "Move VAE and CLIP to RAM when training if possible"), - "pin_memory": OptionInfo(True, "Turn on pin_memory for DataLoader"), + "pin_memory": OptionInfo(True, "Pin training dataset to memory"), "save_optimizer_state": OptionInfo(False, "Saves resumable optimizer state when training embedding or hypernetwork"), "save_training_settings_to_txt": OptionInfo(True, "Save textual inversion and hypernet settings to a text file whenever training starts"), "dataset_filename_word_regex": OptionInfo("", "Filename word regex"), diff --git a/modules/textual_inversion/preprocess.py b/modules/textual_inversion/preprocess.py index 2b0714df3..41224dd18 100644 --- a/modules/textual_inversion/preprocess.py +++ b/modules/textual_inversion/preprocess.py @@ -1,12 +1,12 @@ import os import math -import tqdm +from tqdm.rich import tqdm from PIL import Image, ImageOps from modules import paths, shared, images, deepbooru from modules.textual_inversion import autocrop -def preprocess(id_task, process_src, process_dst, process_width, process_height, preprocess_txt_action, process_keep_original_size, process_flip, process_split, process_caption, process_caption_deepbooru=False, split_threshold=0.5, overlap_ratio=0.2, process_focal_crop=False, process_focal_crop_face_weight=0.9, process_focal_crop_entropy_weight=0.3, process_focal_crop_edges_weight=0.5, process_focal_crop_debug=False, process_multicrop=None, process_multicrop_mindim=None, process_multicrop_maxdim=None, process_multicrop_minarea=None, process_multicrop_maxarea=None, process_multicrop_objective=None, process_multicrop_threshold=None): # pylint: disable=unused-argument +def preprocess(id_task, process_src, process_dst, process_width, process_height, preprocess_txt_action, process_keep_original_size=False, process_keep_channels=False, process_flip=False, process_split=False, process_caption_only=False, process_caption=False, process_caption_deepbooru=False, split_threshold=0.5, overlap_ratio=0.2, process_focal_crop=False, process_focal_crop_face_weight=0.9, process_focal_crop_entropy_weight=0.3, process_focal_crop_edges_weight=0.5, process_focal_crop_debug=False, process_multicrop=None, process_multicrop_mindim=None, process_multicrop_maxdim=None, process_multicrop_minarea=None, process_multicrop_maxarea=None, process_multicrop_objective=None, process_multicrop_threshold=None): # pylint: disable=unused-argument try: if process_caption: shared.interrogator.load() @@ -14,7 +14,7 @@ def preprocess(id_task, process_src, process_dst, process_width, process_height, if process_caption_deepbooru: deepbooru.model.start() - preprocess_work(process_src, process_dst, process_width, process_height, preprocess_txt_action, process_keep_original_size, process_flip, process_split, process_caption, process_caption_deepbooru, split_threshold, overlap_ratio, process_focal_crop, process_focal_crop_face_weight, process_focal_crop_entropy_weight, process_focal_crop_edges_weight, process_focal_crop_debug, process_multicrop, process_multicrop_mindim, process_multicrop_maxdim, process_multicrop_minarea, process_multicrop_maxarea, process_multicrop_objective, process_multicrop_threshold) + preprocess_work(process_src, process_dst, process_width, process_height, preprocess_txt_action, process_keep_original_size, process_keep_channels, process_flip, process_split, process_caption, process_caption_deepbooru, process_caption_only, split_threshold, overlap_ratio, process_focal_crop, process_focal_crop_face_weight, process_focal_crop_entropy_weight, process_focal_crop_edges_weight, process_focal_crop_debug, process_multicrop, process_multicrop_mindim, process_multicrop_maxdim, process_multicrop_minarea, process_multicrop_maxarea, process_multicrop_objective, process_multicrop_threshold) finally: @@ -34,6 +34,7 @@ class PreprocessParams: dstdir = None subindex = 0 flip = False + process_caption_only = False process_caption = False process_caption_deepbooru = False preprocess_txt_action = None @@ -55,7 +56,8 @@ def save_pic_with_caption(image, index, params: PreprocessParams, existing_capti filename_part = os.path.basename(filename_part) basename = f"{index:05}-{params.subindex}-{filename_part}" - image.save(os.path.join(params.dstdir, f"{basename}.png")) + if not params.process_caption_only: + image.save(os.path.join(params.dstdir, f"{basename}.png")) if params.preprocess_txt_action == 'prepend' and existing_caption: caption = existing_caption + ' ' + caption @@ -75,7 +77,6 @@ def save_pic_with_caption(image, index, params: PreprocessParams, existing_capti def save_pic(image, index, params, existing_caption=None): save_pic_with_caption(image, index, params, existing_caption=existing_caption) - if params.flip: save_pic_with_caption(ImageOps.mirror(image), index, params, existing_caption=existing_caption) @@ -117,7 +118,7 @@ def center_crop(image: Image, w: int, h: int): def multicrop_pic(image: Image, mindim, maxdim, minarea, maxarea, objective, threshold): iw, ih = image.size - err = lambda w, h: 1-(lambda x: x if x < 1 else 1/x)(iw/ih/(w/h)) + err = lambda w, h: 1-(lambda x: x if x < 1 else 1/x)(iw/ih/(w/h)) # pylint: disable=unnecessary-lambda-assignment,unnecessary-direct-lambda-call wh = max(((w, h) for w in range(mindim, maxdim+1, 64) for h in range(mindim, maxdim+1, 64) if minarea <= w * h <= maxarea and err(w, h) <= threshold), key= lambda wh: (wh[0]*wh[1], -err(*wh))[::1 if objective=='Maximize area' else -1], @@ -126,7 +127,7 @@ def multicrop_pic(image: Image, mindim, maxdim, minarea, maxarea, objective, thr return wh and center_crop(image, *wh) -def preprocess_work(process_src, process_dst, process_width, process_height, preprocess_txt_action, process_keep_original_size, process_flip, process_split, process_caption, process_caption_deepbooru=False, split_threshold=0.5, overlap_ratio=0.2, process_focal_crop=False, process_focal_crop_face_weight=0.9, process_focal_crop_entropy_weight=0.3, process_focal_crop_edges_weight=0.5, process_focal_crop_debug=False, process_multicrop=None, process_multicrop_mindim=None, process_multicrop_maxdim=None, process_multicrop_minarea=None, process_multicrop_maxarea=None, process_multicrop_objective=None, process_multicrop_threshold=None): +def preprocess_work(process_src, process_dst, process_width, process_height, preprocess_txt_action, process_keep_original_size, process_keep_channels, process_flip, process_split, process_caption, process_caption_deepbooru, process_caption_only, split_threshold, overlap_ratio, process_focal_crop, process_focal_crop_face_weight, process_focal_crop_entropy_weight, process_focal_crop_edges_weight, process_focal_crop_debug, process_multicrop, process_multicrop_mindim, process_multicrop_maxdim, process_multicrop_minarea, process_multicrop_maxarea, process_multicrop_objective, process_multicrop_threshold): width = process_width height = process_height @@ -148,22 +149,24 @@ def preprocess_work(process_src, process_dst, process_width, process_height, pre params = PreprocessParams() params.dstdir = dst params.flip = process_flip + params.process_caption_only = process_caption_only params.process_caption = process_caption params.process_caption_deepbooru = process_caption_deepbooru params.preprocess_txt_action = preprocess_txt_action - pbar = tqdm.tqdm(files) + pbar = tqdm(files) for index, imagefile in enumerate(pbar): params.subindex = 0 filename = os.path.join(src, imagefile) try: img = Image.open(filename) img = ImageOps.exif_transpose(img) - img = img.convert("RGB") + if not process_keep_channels: + img = img.convert("RGB") except Exception: continue - description = f"Preprocessing [Image {index}/{len(files)}]" + description = f"Preprocessing image {index + 1}/{len(files)}" pbar.set_description(description) shared.state.textinfo = description diff --git a/modules/textual_inversion/textual_inversion.py b/modules/textual_inversion/textual_inversion.py index 72be41bb4..bee86ceac 100644 --- a/modules/textual_inversion/textual_inversion.py +++ b/modules/textual_inversion/textual_inversion.py @@ -3,7 +3,7 @@ import html import csv from collections import namedtuple import torch -import tqdm +from tqdm.rich import tqdm import safetensors.torch import numpy as np from PIL import Image, PngImagePlugin @@ -448,7 +448,7 @@ def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_st is_training_inpainting_model = shared.sd_model.model.conditioning_key in {'hybrid', 'concat'} img_c = None - pbar = tqdm.tqdm(total=steps - initial_step) + pbar = tqdm(total=steps - initial_step) try: sd_hijack_checkpoint.add() diff --git a/modules/txt2img.py b/modules/txt2img.py index 36bf6dfb6..d7533f4b2 100644 --- a/modules/txt2img.py +++ b/modules/txt2img.py @@ -1,18 +1,21 @@ import modules.scripts -from modules import sd_samplers +from modules import sd_samplers, shared from modules.generation_parameters_copypaste import create_override_settings_dict from modules.processing import StableDiffusionProcessingTxt2Img, process_images -from modules.shared import opts, sd_model, debug +# from modules.shared import opts, sd_model, debug from modules.ui import plaintext_to_html from modules.memstats import memory_stats def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, steps: int, sampler_index: int, restore_faces: bool, tiling: bool, n_iter: int, batch_size: int, cfg_scale: float, seed: int, subseed: int, subseed_strength: float, seed_resize_from_h: int, seed_resize_from_w: int, seed_enable_extras: bool, height: int, width: int, enable_hr: bool, denoising_strength: float, hr_scale: float, hr_upscaler: str, hr_second_pass_steps: int, hr_resize_x: int, hr_resize_y: int, override_settings_texts, *args): # pylint: disable=unused-argument + if shared.sd_model is None: + shared.log.warning('Model not loaded') + return override_settings = create_override_settings_dict(override_settings_texts) p = StableDiffusionProcessingTxt2Img( - sd_model=sd_model, - outpath_samples=opts.outdir_samples or opts.outdir_txt2img_samples, - outpath_grids=opts.outdir_grids or opts.outdir_txt2img_grids, + sd_model=shared.sd_model, + outpath_samples=shared.opts.outdir_samples or shared.opts.outdir_txt2img_samples, + outpath_grids=shared.opts.outdir_grids or shared.opts.outdir_txt2img_grids, prompt=prompt, styles=prompt_styles, negative_prompt=negative_prompt, @@ -47,5 +50,5 @@ def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, step processed = process_images(p) p.close() generation_info_js = processed.js() - debug(f'Processed: {len(processed.images)} Memory: {memory_stats()} txt') + shared.debug(f'Processed: {len(processed.images)} Memory: {memory_stats()} txt') return processed.images, generation_info_js, plaintext_to_html(processed.info), plaintext_to_html(processed.comments) diff --git a/modules/ui.py b/modules/ui.py index 8d00e7db5..1be72b29f 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -975,12 +975,14 @@ def create_ui(): with gr.Row(): process_keep_original_size = gr.Checkbox(label='Keep original size', elem_id="train_process_keep_original_size") + process_keep_channels = gr.Checkbox(label='Keep original image channels', elem_id="train_process_keep_channels") process_flip = gr.Checkbox(label='Create flipped copies', elem_id="train_process_flip") process_split = gr.Checkbox(label='Split oversized images', elem_id="train_process_split") process_focal_crop = gr.Checkbox(label='Auto focal point crop', elem_id="train_process_focal_crop") process_multicrop = gr.Checkbox(label='Auto-sized crop', elem_id="train_process_multicrop") - process_caption = gr.Checkbox(label='Use BLIP for caption', elem_id="train_process_caption") - process_caption_deepbooru = gr.Checkbox(label='Use deepbooru for caption', visible=True, elem_id="train_process_caption_deepbooru") + process_caption_only = gr.Checkbox(label='Create captions only', elem_id="train_process_multicrop") + process_caption = gr.Checkbox(label='Create BLIP captions', elem_id="train_process_caption") + process_caption_deepbooru = gr.Checkbox(label='Create Deepbooru captions', visible=True, elem_id="train_process_caption_deepbooru") with gr.Row(visible=False) as process_split_extra_row: process_split_threshold = gr.Slider(label='Split image threshold', value=0.5, minimum=0.0, maximum=1.0, step=0.05, elem_id="train_process_split_threshold") @@ -1142,8 +1144,10 @@ def create_ui(): process_height, preprocess_txt_action, process_keep_original_size, + process_keep_channels, process_flip, process_split, + process_caption_only, process_caption, process_caption_deepbooru, process_split_threshold, From 99dc75c09ba38ade64bb17177f7f73deea5384e6 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 5 May 2023 09:28:44 -0400 Subject: [PATCH 064/282] readd api docs --- .../stable-diffusion-webui-images-browser | 2 +- webui.py | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/extensions-builtin/stable-diffusion-webui-images-browser b/extensions-builtin/stable-diffusion-webui-images-browser index 2f5bbd88e..806902a2c 160000 --- a/extensions-builtin/stable-diffusion-webui-images-browser +++ b/extensions-builtin/stable-diffusion-webui-images-browser @@ -1 +1 @@ -Subproject commit 2f5bbd88e814d446f873ebfa1a752864cfd1cc53 +Subproject commit 806902a2c6d049308b1f8efd9eaf1fc1c64ac018 diff --git a/webui.py b/webui.py index b6dcb2ff6..ff16370c5 100644 --- a/webui.py +++ b/webui.py @@ -169,6 +169,17 @@ def create_api(app): return api +def monkey_patch_docs(): + def setup_with_docs(self): + self.docs_url = "/docs" + self.redoc_url = "/redoc" + self.setup_original() + + from fastapi import FastAPI + FastAPI.setup_original = FastAPI.setup + setattr(FastAPI, "setup", setup_with_docs) + + def async_policy(): _BasePolicy = asyncio.WindowsSelectorEventLoopPolicy if sys.platform == "win32" and hasattr(asyncio, "WindowsSelectorEventLoopPolicy") else asyncio.DefaultEventLoopPolicy @@ -196,6 +207,7 @@ def start_ui(): modules.script_callbacks.before_ui_callback() startup_timer.record("scripts before_ui_callback") shared.demo = modules.ui.create_ui() + monkey_patch_docs() startup_timer.record("ui") if cmd_opts.disable_queue: log.info('Server queues disabled') @@ -227,6 +239,7 @@ def start_ui(): favicon_path='html/logo.ico', ) shared.log.info(f'Local URL: {local_url}') + shared.log.info(f'API Docs: {local_url[:-1]}/docs') # {local_url[:-1]}?view=api if share_url is not None: shared.log.info(f'Share URL: {share_url}') shared.log.debug(f'Gradio registered functions: {len(shared.demo.fns)}') From b71869adfae260f48e89d9302787e6e1850896a7 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 5 May 2023 10:09:25 -0400 Subject: [PATCH 065/282] lora messages --- extensions-builtin/Lora/lora.py | 17 ++++++++++++----- webui.py | 4 +++- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/extensions-builtin/Lora/lora.py b/extensions-builtin/Lora/lora.py index ee4d91974..f80dd69a8 100644 --- a/extensions-builtin/Lora/lora.py +++ b/extensions-builtin/Lora/lora.py @@ -134,6 +134,7 @@ def load_lora(name, filename): keys_failed_to_match = {} is_sd2 = 'model_transformer_resblocks' in shared.sd_model.lora_layer_mapping + warnings = 0 for key_diffusers, weight in sd.items(): lora_key_parts = key_diffusers.split(".", 1) @@ -169,7 +170,9 @@ def load_lora(name, filename): elif type(sd_module) == torch.nn.Conv2d: module = torch.nn.Conv2d(weight.shape[1], weight.shape[0], (weight.shape[2], weight.shape[3]), bias=False) else: - print(f'Lora layer {key_diffusers} matched a layer with unsupported type: {type(sd_module).__name__}') + if warnings == 0: + shared.log.warning(f'Lora layer {key_diffusers} matched a layer with unsupported type: {type(sd_module).__name__}') + warnings += 1 continue with torch.no_grad(): @@ -182,10 +185,14 @@ def load_lora(name, filename): elif lora_key == "lora_down.weight": lora_module.down = module else: - assert False, f'Bad Lora layer name: {key_diffusers} - must end in lora_up.weight, lora_down.weight or alpha' + if warnings == 0: + shared.log.warning(f'Unknown Lora layer: {key_diffusers}') + shared.log.warning('Try using LyCORIS instead') + warnings += 1 if len(keys_failed_to_match) > 0: - print(f"Failed to match keys when loading Lora {filename}: {keys_failed_to_match}") + shared.log.warning(f"Failed to match keys when loading Lora {filename}: {keys_failed_to_match}") + warnings += 1 return lora @@ -218,7 +225,7 @@ def load_loras(names, multipliers=None): continue if lora is None: - print(f"Couldn't find Lora with name {name}") + shared.log.warning(f"Could not find Lora with name {name}") continue lora.multiplier = multipliers[i] if multipliers else 1.0 @@ -312,7 +319,7 @@ def lora_apply_weights(self: Union[torch.nn.Conv2d, torch.nn.Linear, torch.nn.Mu if module is None: continue - print(f'failed to calculate lora weights for layer {lora_layer_name}') + shared.log.warning(f'failed to calculate lora weights for layer {lora_layer_name}') setattr(self, "lora_current_names", wanted_names) diff --git a/webui.py b/webui.py index ff16370c5..311927b13 100644 --- a/webui.py +++ b/webui.py @@ -176,7 +176,9 @@ def monkey_patch_docs(): self.setup_original() from fastapi import FastAPI - FastAPI.setup_original = FastAPI.setup + setup_original = getattr(FastAPI, "setup_original", None) + if setup_original is None: + FastAPI.setup_original = FastAPI.setup setattr(FastAPI, "setup", setup_with_docs) From ceaf757130adb61eaf282a48e60ba8f053f03a21 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 5 May 2023 11:02:35 -0400 Subject: [PATCH 066/282] update caption filename logic --- modules/textual_inversion/preprocess.py | 22 ++++++++++++---------- wiki | 2 +- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/modules/textual_inversion/preprocess.py b/modules/textual_inversion/preprocess.py index 41224dd18..ed93bf979 100644 --- a/modules/textual_inversion/preprocess.py +++ b/modules/textual_inversion/preprocess.py @@ -40,12 +40,10 @@ class PreprocessParams: preprocess_txt_action = None -def save_pic_with_caption(image, index, params: PreprocessParams, existing_caption=None): +def save_pic_with_caption(image, index, params: PreprocessParams, existing_caption=None, existing_caption_filename=None): caption = "" - if params.process_caption: caption += shared.interrogator.generate_caption(image) - if params.process_caption_deepbooru: if len(caption) > 0: caption += ", " @@ -65,20 +63,22 @@ def save_pic_with_caption(image, index, params: PreprocessParams, existing_capti caption = caption + ' ' + existing_caption elif params.preprocess_txt_action == 'copy' and existing_caption: caption = existing_caption - caption = caption.strip() - if len(caption) > 0: - with open(os.path.join(params.dstdir, f"{basename}.txt"), "w", encoding="utf8") as file: + if params.process_caption_only and existing_caption_filename is not None: + fn = existing_caption_filename + else: + fn = os.path.join(params.dstdir, f"{basename}.txt") + with open(fn, "w", encoding="utf8") as file: file.write(caption) params.subindex += 1 -def save_pic(image, index, params, existing_caption=None): - save_pic_with_caption(image, index, params, existing_caption=existing_caption) +def save_pic(image, index, params, existing_caption=None, existing_caption_filename=None): + save_pic_with_caption(image, index, params, existing_caption=existing_caption, existing_caption_filename=existing_caption_filename) if params.flip: - save_pic_with_caption(ImageOps.mirror(image), index, params, existing_caption=existing_caption) + save_pic_with_caption(ImageOps.mirror(image), index, params, existing_caption=existing_caption, existing_caption_filename=existing_caption_filename) def split_pic(image, inverse_xy, width, height, overlap_ratio): @@ -177,6 +177,8 @@ def preprocess_work(process_src, process_dst, process_width, process_height, pre if os.path.exists(existing_caption_filename): with open(existing_caption_filename, 'r', encoding="utf8") as file: existing_caption = file.read() + else: + existing_caption_filename = None if shared.state.interrupted: break @@ -192,7 +194,7 @@ def preprocess_work(process_src, process_dst, process_width, process_height, pre if process_split and ratio < 1.0 and ratio <= split_threshold: for splitted in split_pic(img, inverse_xy, width, height, overlap_ratio): - save_pic(splitted, index, params, existing_caption=existing_caption) + save_pic(splitted, index, params, existing_caption=existing_caption, existing_caption_filename=existing_caption_filename) process_default_resize = False if process_focal_crop and img.height != img.width: diff --git a/wiki b/wiki index 2eee6e3a2..7f17a980b 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 2eee6e3a2ba7a01695dd8c337056b23438e003b8 +Subproject commit 7f17a980b920696963aa79ef45b16ecf68ddec87 From f6898c9aec9c8b40b55de52e1bf1b4b83028897d Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 5 May 2023 13:40:53 -0400 Subject: [PATCH 067/282] update --- extensions-builtin/sd-webui-controlnet | 2 +- wiki | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 5d387abf1..11d33e181 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 5d387abf19d9eedf58dd294ccc373c0e361b2907 +Subproject commit 11d33e181523c509c235d1278e94ce61d2d8d366 diff --git a/wiki b/wiki index 7f17a980b..f7d3a5907 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 7f17a980b920696963aa79ef45b16ecf68ddec87 +Subproject commit f7d3a59074c24904dc284d52cf030d93da9b07c7 From 98082ce95cf112f1d95530e6623e1d9975bc49d1 Mon Sep 17 00:00:00 2001 From: wbh1129 Date: Fri, 5 May 2023 18:20:03 -0500 Subject: [PATCH 068/282] use proper shebangs in cli scripts --- cli/generate.py | 2 +- cli/modules/bench.py | 2 +- cli/modules/grid.py | 2 +- cli/modules/image-watermark.py | 2 +- cli/modules/interrogate-offline.py | 2 +- cli/modules/interrogate.py | 2 +- cli/modules/lora-extract.py | 2 +- cli/modules/lora-latents.py | 2 +- cli/modules/models-diff.py | 2 +- cli/modules/palette-extract.py | 2 +- cli/modules/preview-embeddings.py | 2 +- cli/modules/preview-models.py | 2 +- cli/modules/process.py | 2 +- cli/modules/prompt-ideas.py | 2 +- cli/modules/prompt-promptist.py | 2 +- cli/modules/sdapi.py | 2 +- cli/modules/train-losschart.py | 2 +- cli/modules/train-lossrate.py | 2 +- cli/modules/util.py | 2 +- cli/modules/video-extract.py | 2 +- cli/random/detectmodel.py | 2 +- cli/random/dynamotest.py | 2 +- cli/random/versions.py | 2 +- cli/train-lora.py | 2 +- cli/train-ti.py | 2 +- cli/train/latents.py | 2 +- cli/train/train.py | 2 +- cli/train/util.py | 2 +- cli/xformers.sh | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) mode change 100644 => 100755 cli/train/util.py diff --git a/cli/generate.py b/cli/generate.py index 85860acb3..ce4e0e750 100755 --- a/cli/generate.py +++ b/cli/generate.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python # pylint: disable=no-member """generate batches of images from prompts and upscale them diff --git a/cli/modules/bench.py b/cli/modules/bench.py index 094b73f63..300820ad2 100755 --- a/cli/modules/bench.py +++ b/cli/modules/bench.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python """ sd api txt2img benchmark """ diff --git a/cli/modules/grid.py b/cli/modules/grid.py index 4922409b3..fdf3a51e0 100755 --- a/cli/modules/grid.py +++ b/cli/modules/grid.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python """ Create image grid """ diff --git a/cli/modules/image-watermark.py b/cli/modules/image-watermark.py index 73e891238..4b75fe481 100755 --- a/cli/modules/image-watermark.py +++ b/cli/modules/image-watermark.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python import os import io import pathlib diff --git a/cli/modules/interrogate-offline.py b/cli/modules/interrogate-offline.py index 6d9ae56fa..f3120ae63 100755 --- a/cli/modules/interrogate-offline.py +++ b/cli/modules/interrogate-offline.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python import os import gc diff --git a/cli/modules/interrogate.py b/cli/modules/interrogate.py index a96c8cf42..0442280dd 100755 --- a/cli/modules/interrogate.py +++ b/cli/modules/interrogate.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python """ use clip to interrogate image(s) """ diff --git a/cli/modules/lora-extract.py b/cli/modules/lora-extract.py index 102728308..7f85d37f3 100755 --- a/cli/modules/lora-extract.py +++ b/cli/modules/lora-extract.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python """ Extract approximating LoRA by SVD from two SD models diff --git a/cli/modules/lora-latents.py b/cli/modules/lora-latents.py index d556d596b..4e1027f14 100755 --- a/cli/modules/lora-latents.py +++ b/cli/modules/lora-latents.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python import os import sys diff --git a/cli/modules/models-diff.py b/cli/modules/models-diff.py index f491926e9..fdeb235e6 100755 --- a/cli/modules/models-diff.py +++ b/cli/modules/models-diff.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python # based on import safetensors diff --git a/cli/modules/palette-extract.py b/cli/modules/palette-extract.py index cef0d4e0a..0472009c6 100755 --- a/cli/modules/palette-extract.py +++ b/cli/modules/palette-extract.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python # based on import os diff --git a/cli/modules/preview-embeddings.py b/cli/modules/preview-embeddings.py index 8076d1a61..a64297925 100755 --- a/cli/modules/preview-embeddings.py +++ b/cli/modules/preview-embeddings.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python """ create preview images from embeddings """ diff --git a/cli/modules/preview-models.py b/cli/modules/preview-models.py index 6786d46aa..71b474d8b 100755 --- a/cli/modules/preview-models.py +++ b/cli/modules/preview-models.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python import os import sys import json diff --git a/cli/modules/process.py b/cli/modules/process.py index 67453ae4c..975f9d1d6 100755 --- a/cli/modules/process.py +++ b/cli/modules/process.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python """ process people images - check image resolution diff --git a/cli/modules/prompt-ideas.py b/cli/modules/prompt-ideas.py index ff70123da..18efd8d57 100755 --- a/cli/modules/prompt-ideas.py +++ b/cli/modules/prompt-ideas.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python """ generate prompt ideas model from: diff --git a/cli/modules/prompt-promptist.py b/cli/modules/prompt-promptist.py index 60c5ee680..59fea45d5 100755 --- a/cli/modules/prompt-promptist.py +++ b/cli/modules/prompt-promptist.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python """ use microsoft promptist to beautify prompt - diff --git a/cli/modules/sdapi.py b/cli/modules/sdapi.py index a8930c20b..c2201ef9c 100755 --- a/cli/modules/sdapi.py +++ b/cli/modules/sdapi.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python """ helper methods that creates HTTP session with managed connection pool provides async HTTP get/post methods and several helper methods diff --git a/cli/modules/train-losschart.py b/cli/modules/train-losschart.py index 2d9c7a3f1..74523f637 100755 --- a/cli/modules/train-losschart.py +++ b/cli/modules/train-losschart.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python import io import os diff --git a/cli/modules/train-lossrate.py b/cli/modules/train-lossrate.py index 4a6165ff5..dd6b394dd 100755 --- a/cli/modules/train-lossrate.py +++ b/cli/modules/train-lossrate.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python """ auto-generate learn-rate """ diff --git a/cli/modules/util.py b/cli/modules/util.py index 479b77233..ef185bfa4 100755 --- a/cli/modules/util.py +++ b/cli/modules/util.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python """ generic helper methods """ diff --git a/cli/modules/video-extract.py b/cli/modules/video-extract.py index 4a68c7440..edd0caf31 100755 --- a/cli/modules/video-extract.py +++ b/cli/modules/video-extract.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python """ use ffmpeg for animation processing """ diff --git a/cli/random/detectmodel.py b/cli/random/detectmodel.py index c104fbea5..0d7096123 100755 --- a/cli/random/detectmodel.py +++ b/cli/random/detectmodel.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python """ Detect model type diff --git a/cli/random/dynamotest.py b/cli/random/dynamotest.py index 82b1143c6..6c2fcb2c4 100755 --- a/cli/random/dynamotest.py +++ b/cli/random/dynamotest.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python """ Test Torch Dynamo functionality and backends """ diff --git a/cli/random/versions.py b/cli/random/versions.py index 13e7b0f66..136f7214b 100755 --- a/cli/random/versions.py +++ b/cli/random/versions.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python """ print module versions """ diff --git a/cli/train-lora.py b/cli/train-lora.py index 6f82063a6..0feb3e8fa 100755 --- a/cli/train-lora.py +++ b/cli/train-lora.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python """ Extract approximating LoRA by SVD from two SD models diff --git a/cli/train-ti.py b/cli/train-ti.py index 983b77139..a2848c74f 100755 --- a/cli/train-ti.py +++ b/cli/train-ti.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python # pylint: disable=no-member """ simple implementation of training api: `/sdapi/v1/train` diff --git a/cli/train/latents.py b/cli/train/latents.py index 94249b18a..b6a5787aa 100755 --- a/cli/train/latents.py +++ b/cli/train/latents.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python import os import sys diff --git a/cli/train/train.py b/cli/train/train.py index b1e1d48fb..ff797808e 100755 --- a/cli/train/train.py +++ b/cli/train/train.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python # system imports import os diff --git a/cli/train/util.py b/cli/train/util.py old mode 100644 new mode 100755 index 8c9aeb6c9..944cca106 --- a/cli/train/util.py +++ b/cli/train/util.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python import os import transformers diff --git a/cli/xformers.sh b/cli/xformers.sh index c7073999f..5bd352db9 100755 --- a/cli/xformers.sh +++ b/cli/xformers.sh @@ -1,4 +1,4 @@ -#/bin/env bash +#!/usr/bin/env bash echo "Installing xformers" NVCC_FLAGS="--use_fast_math" From 00553368942ce51d11c621e0254f00960b8ffffd Mon Sep 17 00:00:00 2001 From: wbh1129 Date: Sat, 6 May 2023 06:03:01 -0500 Subject: [PATCH 069/282] ui_extra_networks.py: make description default to "" instead of error --- modules/ui_extra_networks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py index 065f155a4..d88511777 100644 --- a/modules/ui_extra_networks.py +++ b/modules/ui_extra_networks.py @@ -139,7 +139,7 @@ class ExtraNetworksPage: "card_clicked": onclick, "save_card_description": '"' + html.escape(f"""return saveCardDescription(event, {json.dumps(tabname)}, {json.dumps(item["local_preview"])})""") + '"', "save_card_preview": '"' + html.escape(f"""return saveCardPreview(event, {json.dumps(tabname)}, {json.dumps(item["local_preview"])})""") + '"', - "read_card_description": '"' + html.escape(f"""return readCardDescription(event, {json.dumps(tabname)}, {json.dumps(item["local_preview"])}, {json.dumps(item["description"])}, {json.dumps(self.name)}, {json.dumps(item["name"])})""") + '"', + "read_card_description": '"' + html.escape(f"""return readCardDescription(event, {json.dumps(tabname)}, {json.dumps(item["local_preview"])}, {json.dumps(item.get("description", ""))}, {json.dumps(self.name)}, {json.dumps(item["name"])})""") + '"', "search_term": item.get("search_term", ""), "read_card_metadata": '"' + html.escape(f"""return readCardMetadata(event, {json.dumps(self.name)}, {json.dumps(item["name"])})""") + '"', } From 1360c6422a0bb7db550c444b630b43944e4b731f Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 6 May 2023 12:49:44 -0400 Subject: [PATCH 070/282] add fp16 test --- .../multidiffusion-upscaler-for-automatic1111 | 2 +- extensions-builtin/sd-webui-controlnet | 2 +- .../stable-diffusion-webui-images-browser | 2 +- modules/api/api.py | 28 ++++------ modules/api/models.py | 14 ++--- modules/call_queue.py | 13 ++--- modules/devices.py | 14 +++++ modules/dml/hijack/kdiffusion.py | 6 +-- modules/images.py | 52 +++++++++---------- modules/lora | 2 +- modules/postprocessing.py | 26 +++------- modules/processing.py | 4 +- modules/sd_models.py | 18 ++++--- webui.py | 3 +- 14 files changed, 94 insertions(+), 92 deletions(-) diff --git a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 index 0f55e98e2..f54a8fc50 160000 --- a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 +++ b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 @@ -1 +1 @@ -Subproject commit 0f55e98e27235984a31fbd38287ba6584c4884c5 +Subproject commit f54a8fc506600340f7955a7251fce0a8fb90185e diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 11d33e181..817155ea7 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 11d33e181523c509c235d1278e94ce61d2d8d366 +Subproject commit 817155ea7a43a78982202a2456088acd6ffd95d5 diff --git a/extensions-builtin/stable-diffusion-webui-images-browser b/extensions-builtin/stable-diffusion-webui-images-browser index 806902a2c..708bd5860 160000 --- a/extensions-builtin/stable-diffusion-webui-images-browser +++ b/extensions-builtin/stable-diffusion-webui-images-browser @@ -1 +1 @@ -Subproject commit 806902a2c6d049308b1f8efd9eaf1fc1c64ac018 +Subproject commit 708bd5860e2432a0021d3aa66fc8fdbff33b2d1a diff --git a/modules/api/api.py b/modules/api/api.py index b3eb04f05..1405c7a63 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -13,9 +13,6 @@ import piexif import piexif.helper import uvicorn import gradio as gr -# from gradio.processing_utils import decode_base64_to_file # gradio 3.23 -# from gradio_client.utils import decode_base64_to_file # gradio 3.28 - from modules import errors, shared, sd_samplers, deepbooru, sd_hijack, images, scripts, ui, postprocessing from modules.api.models import * # pylint: disable=unused-wildcard-import, wildcard-import from modules.processing import StableDiffusionProcessingTxt2Img, StableDiffusionProcessingImg2Img, process_images @@ -33,7 +30,7 @@ def upscaler_to_index(name: str): try: return [x.name.lower() for x in shared.sd_upscalers].index(name.lower()) except Exception as e: - raise HTTPException(status_code=400, detail=f"Invalid upscaler, needs to be one of these: {' , '.join([x.name for x in sd_upscalers])}") from e + raise HTTPException(status_code=400, detail=f"Invalid upscaler, needs to be one of these: {' , '.join([x.name for x in shared.sd_upscalers])}") from e def script_name_to_index(name, scripts_list): try: @@ -64,24 +61,24 @@ def decode_base64_to_image(encoding): def encode_pil_to_base64(image): with io.BytesIO() as output_bytes: - if opts.samples_format.lower() == 'png': + if shared.opts.samples_format.lower() == 'png': use_metadata = False encoded_metadata = PngImagePlugin.PngInfo() for k, v in image.info.items(): if isinstance(k, str) and isinstance(v, str): encoded_metadata.add_text(k, v) use_metadata = True - image.save(output_bytes, format="PNG", pnginfo=(encoded_metadata if use_metadata else None), quality=opts.jpeg_quality) + image.save(output_bytes, format="PNG", pnginfo=(encoded_metadata if use_metadata else None), quality=shared.opts.jpeg_quality) - elif opts.samples_format.lower() in ("jpg", "jpeg", "webp"): + elif shared.opts.samples_format.lower() in ("jpg", "jpeg", "webp"): parameters = image.info.get('parameters', None) exif_bytes = piexif.dump({ "Exif": { piexif.ExifIFD.UserComment: piexif.helper.UserComment.dump(parameters or "", encoding="unicode") } }) - if opts.samples_format.lower() in ("jpg", "jpeg"): - image.save(output_bytes, format="JPEG", exif = exif_bytes, quality=opts.jpeg_quality) + if shared.opts.samples_format.lower() in ("jpg", "jpeg"): + image.save(output_bytes, format="JPEG", exif = exif_bytes, quality=shared.opts.jpeg_quality) else: - image.save(output_bytes, format="WEBP", exif = exif_bytes, quality=opts.jpeg_quality) + image.save(output_bytes, format="WEBP", exif = exif_bytes, quality=shared.opts.jpeg_quality) else: raise HTTPException(status_code=500, detail="Invalid image format") bytes_data = output_bytes.getvalue() @@ -230,8 +227,8 @@ class Api: with self.queue_lock: p = StableDiffusionProcessingTxt2Img(sd_model=shared.sd_model, **args) p.scripts = script_runner - p.outpath_grids = opts.outdir_grids or opts.outdir_txt2img_grids - p.outpath_samples = opts.outdir_samples or opts.outdir_txt2img_samples + p.outpath_grids = shared.opts.outdir_grids or shared.opts.outdir_txt2img_grids + p.outpath_samples = shared.opts.outdir_samples or shared.opts.outdir_txt2img_samples shared.state.begin() script_args = self.init_script_args(p, txt2imgreq, self.default_script_arg_txt2img, selectable_scripts, selectable_script_idx, script_runner) if selectable_scripts is not None: @@ -278,8 +275,8 @@ class Api: p = StableDiffusionProcessingImg2Img(sd_model=shared.sd_model, **args) p.init_images = [decode_base64_to_image(x) for x in init_images] p.scripts = script_runner - p.outpath_grids = opts.outdir_img2img_grids - p.outpath_samples = opts.outdir_img2img_samples + p.outpath_grids = shared.opts.outdir_img2img_grids + p.outpath_samples = shared.opts.outdir_img2img_samples shared.state.begin() script_args = self.init_script_args(p, img2imgreq, self.default_script_arg_img2img, selectable_scripts, selectable_script_idx, script_runner) if selectable_scripts is not None: @@ -297,12 +294,9 @@ class Api: def extras_single_image_api(self, req: ExtrasSingleImageRequest): reqDict = setUpscalers(req) - reqDict['image'] = decode_base64_to_image(reqDict['image']) - with self.queue_lock: result = postprocessing.run_extras(extras_mode=0, image_folder="", input_dir="", output_dir="", save_output=False, **reqDict) - return ExtrasSingleImageResponse(image=encode_pil_to_base64(result[0][0]), html_info=result[1]) def extras_batch_images_api(self, req: ExtrasBatchImagesRequest): diff --git a/modules/api/models.py b/modules/api/models.py index 21d2c2663..498d8f07c 100644 --- a/modules/api/models.py +++ b/modules/api/models.py @@ -4,7 +4,7 @@ from pydantic import BaseModel, Field, create_model # pylint: disable=no-name-in from typing_extensions import Literal from inflection import underscore from modules.processing import StableDiffusionProcessingTxt2Img, StableDiffusionProcessingImg2Img -from modules.shared import sd_upscalers, opts, parser +import modules.shared as shared API_NOT_ALLOWED = [ "self", @@ -142,8 +142,8 @@ class ExtrasBaseRequest(BaseModel): upscaling_resize_w: int = Field(default=512, title="Target Width", ge=1, description="Target width for the upscaler to hit. Only used when resize_mode=1.") upscaling_resize_h: int = Field(default=512, title="Target Height", ge=1, description="Target height for the upscaler to hit. Only used when resize_mode=1.") upscaling_crop: bool = Field(default=True, title="Crop to fit", description="Should the upscaler crop the image to fit in the chosen size?") - upscaler_1: str = Field(default="None", title="Main upscaler", description=f"The name of the main upscaler to use, it has to be one of this list: {' , '.join([x.name for x in sd_upscalers])}") - upscaler_2: str = Field(default="None", title="Secondary upscaler", description=f"The name of the secondary upscaler to use, it has to be one of this list: {' , '.join([x.name for x in sd_upscalers])}") + upscaler_1: str = Field(default="None", title="Main upscaler", description=f"The name of the main upscaler to use, it has to be one of this list: {' , '.join([x.name for x in shared.sd_upscalers])}") + upscaler_2: str = Field(default="None", title="Secondary upscaler", description=f"The name of the secondary upscaler to use, it has to be one of this list: {' , '.join([x.name for x in shared.sd_upscalers])}") extras_upscaler_2_visibility: float = Field(default=0, title="Secondary upscaler visibility", ge=0, le=1, allow_inf_nan=False, description="Sets the visibility of secondary upscaler, values should be between 0 and 1.") upscale_first: bool = Field(default=False, title="Upscale first", description="Should the upscaler run before restoring faces?") @@ -200,9 +200,9 @@ class PreprocessResponse(BaseModel): info: str = Field(title="Preprocess info", description="Response string from preprocessing task.") fields = {} -for key, metadata in opts.data_labels.items(): - value = opts.data.get(key) - optType = opts.typemap.get(type(metadata.default), type(value)) +for key, metadata in shared.opts.data_labels.items(): + value = shared.opts.data.get(key) + optType = shared.opts.typemap.get(type(metadata.default), type(value)) if metadata is not None: fields.update({key: (Optional[optType], Field( @@ -213,7 +213,7 @@ for key, metadata in opts.data_labels.items(): OptionsModel = create_model("Options", **fields) flags = {} -_options = vars(parser)['_option_string_actions'] +_options = vars(shared.parser)['_option_string_actions'] for key in _options: if _options[key].dest != 'help': flag = _options[key] diff --git a/modules/call_queue.py b/modules/call_queue.py index f8c4a9ce7..2ea136a19 100644 --- a/modules/call_queue.py +++ b/modules/call_queue.py @@ -22,26 +22,21 @@ def wrap_queued_call(func): def wrap_gradio_gpu_call(func, extra_outputs=None): def f(*args, **kwargs): - # if the first argument is a string that says "task(...)", it is treated as a job id if len(args) > 0 and type(args[0]) == str and args[0][0:5] == "task(" and args[0][-1] == ")": id_task = args[0] progress.add_task_to_queue(id_task) else: id_task = None - with queue_lock: shared.state.begin() progress.start_task(id_task) - try: res = func(*args, **kwargs) progress.record_results(id_task, res) finally: progress.finish_task(id_task) - shared.state.end() - return res return wrap_gradio_call(f, extra_outputs=extra_outputs, add_stats=True) @@ -56,7 +51,13 @@ def wrap_gradio_call(func, extra_outputs=None, add_stats=False): if shared.cmd_opts.profile: pr = cProfile.Profile() pr.enable() - res = list(func(*args, **kwargs)) + res = func(*args, **kwargs) + if res is None: + msg = "No result returned from function" + shared.log.warning(msg) + res = [None, '', '', f"
{html.escape(msg)}
"] + else: + res = list(res) if shared.cmd_opts.profile: pr.disable() s = io.StringIO() diff --git a/modules/devices.py b/modules/devices.py index 40dc6548d..7f66f0d54 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -72,6 +72,18 @@ def torch_gc(): torch.cuda.ipc_collect() +def test_fp16(): + try: + x = torch.tensor([[1.5,.0,.0,.0]]).to(device).half() + layerNorm = torch.nn.LayerNorm(4, eps=0.00001, elementwise_affine=True, dtype=torch.float16, device=device) + _y = layerNorm(x) + except: + shared.log.warning('Torch FP16 test failed: Forcing FP32 operations') + shared.opts.cuda_dtype = 'FP32' + shared.opts.no_half = True + shared.opts.no_half_vae = True + + def set_cuda_params(): if torch.cuda.is_available(): try: @@ -89,6 +101,7 @@ def set_cuda_params(): pass global dtype, dtype_vae, dtype_unet, unet_needs_upcast # pylint: disable=global-statement # set dtype + test_fp16() if shared.opts.cuda_dtype == 'FP16': dtype = torch.float16 dtype_vae = torch.float16 @@ -105,6 +118,7 @@ def set_cuda_params(): dtype_vae = torch.float32 unet_needs_upcast = shared.opts.upcast_sampling + args = cmd_args.parser.parse_args() if args.use_ipex: cpu = torch.device("xpu") #Use XPU instead of CPU. %20 Perf improvement on weak CPUs. diff --git a/modules/dml/hijack/kdiffusion.py b/modules/dml/hijack/kdiffusion.py index 2eced885f..78bc9f2b5 100644 --- a/modules/dml/hijack/kdiffusion.py +++ b/modules/dml/hijack/kdiffusion.py @@ -1,8 +1,8 @@ import torch from tqdm.auto import tqdm - -from modules.shared import device from k_diffusion import sampling +from modules.shared import device + def dpm_solver_adaptive(self, x, t_start, t_end, order=3, rtol=0.05, atol=0.0078, h_init=0.05, pcoeff=0., icoeff=1., dcoeff=0., accept_safety=0.81, eta=0., s_noise=1., noise_sampler=None): noise_sampler = sampling.default_noise_sampler(x) if noise_sampler is None else noise_sampler @@ -86,4 +86,4 @@ def sample_dpm_adaptive(model, x, sigma_min, sigma_max, extra_args=None, callbac sampling.DPMSolver.dpm_solver_adaptive = dpm_solver_adaptive sampling.sample_dpm_fast = sample_dpm_fast -sampling.sample_dpm_adaptive = sample_dpm_adaptive \ No newline at end of file +sampling.sample_dpm_adaptive = sample_dpm_adaptive diff --git a/modules/images.py b/modules/images.py index f23232225..c73c1fd13 100644 --- a/modules/images.py +++ b/modules/images.py @@ -473,7 +473,7 @@ def get_next_sequence_number(path, basename): return result + 1 -def save_image(image, path, basename, seed=None, prompt=None, extension='png', info=None, short_filename=False, no_prompt=False, grid=False, pnginfo_section_name='parameters', p=None, existing_info=None, forced_filename=None, suffix="", save_to_dirs=None): +def save_image(image, path, basename, seed=None, prompt=None, extension='jpg', info=None, short_filename=False, no_prompt=False, grid=False, pnginfo_section_name='parameters', p=None, existing_info=None, forced_filename=None, suffix="", save_to_dirs=None): """Save an image. Args: @@ -510,16 +510,12 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i if path is None: # set default path to avoid errors when functions are triggered manually or via api and param is not set path = opts.outdir_save - if save_to_dirs is None: save_to_dirs = (grid and opts.grid_save_to_dirs) or (not grid and opts.save_to_dirs and not no_prompt) - if save_to_dirs: dirname = namegen.apply(opts.directories_filename_pattern or "[prompt_words]").lstrip(' ').rstrip('\\ /') path = os.path.join(path, dirname) - os.makedirs(path, exist_ok=True) - if forced_filename is None: if short_filename or seed is None: file_decoration = "" @@ -527,14 +523,10 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i file_decoration = opts.samples_filename_pattern or "[seed]" else: file_decoration = opts.samples_filename_pattern or "[seed]-[prompt_spaces]" - add_number = opts.save_images_add_number or file_decoration == '' - if file_decoration != "" and add_number: file_decoration = "-" + file_decoration - file_decoration = namegen.apply(file_decoration) + suffix - if add_number: basecount = get_next_sequence_number(path, basename) fullfn = None @@ -547,68 +539,71 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i fullfn = os.path.join(path, f"{file_decoration}.{extension}") else: fullfn = os.path.join(path, f"{forced_filename}.{extension}") - pnginfo = existing_info or {} if info is not None: pnginfo[pnginfo_section_name] = info - params = script_callbacks.ImageSaveParams(image, p, fullfn, pnginfo) script_callbacks.before_image_saved_callback(params) image = params.image fullfn = params.filename - exifinfo_data = params.pnginfo.get('UserComment', '') if len(exifinfo_data) > 0: exifinfo_data = exifinfo_data + ', ' + params.pnginfo.get(pnginfo_section_name, '') else: exifinfo_data = params.pnginfo.get(pnginfo_section_name, '') - def _atomically_save_image(image_to_save, filename_without_extension, extension): + def atomically_save_image(image_to_save, filename_without_extension, extension): # save image with .tmp extension to avoid race condition when another process detects new image in the directory temp_file_path = filename_without_extension + ".tmp" image_format = Image.registered_extensions()[extension] - if extension.lower() == '.png': + if image_format == 'PNG': pnginfo_data = PngImagePlugin.PngInfo() if opts.enable_pnginfo: for k, v in params.pnginfo.items(): pnginfo_data.add_text(k, str(v)) image_to_save.save(temp_file_path, format=image_format, quality=opts.jpeg_quality, pnginfo=pnginfo_data) - elif extension.lower() in (".jpg", ".jpeg", ".webp"): + elif image_format == 'JPEG': if image_to_save.mode == 'RGBA': + shared.log.warning('Saving RGBA image as JPEG: Alpha channel will be lost') image_to_save = image_to_save.convert("RGB") elif image_to_save.mode == 'I;16': - image_to_save = image_to_save.point(lambda p: p * 0.0038910505836576).convert("RGB" if extension.lower() == ".webp" else "L") + image_to_save = image_to_save.point(lambda p: p * 0.0038910505836576).convert("L") + image_to_save.save(temp_file_path, format=image_format, quality=opts.jpeg_quality) + if opts.enable_pnginfo: + exif_bytes = piexif.dump({ "Exif": { piexif.ExifIFD.UserComment: piexif.helper.UserComment.dump(exifinfo_data or "", encoding="unicode") } }) + piexif.insert(exif_bytes, temp_file_path) + elif image_format == 'WEBP': + if image_to_save.mode == 'I;16': + image_to_save = image_to_save.point(lambda p: p * 0.0038910505836576).convert("RGB") image_to_save.save(temp_file_path, format=image_format, quality=opts.jpeg_quality, lossless=opts.webp_lossless) if opts.enable_pnginfo: exif_bytes = piexif.dump({ "Exif": { piexif.ExifIFD.UserComment: piexif.helper.UserComment.dump(exifinfo_data or "", encoding="unicode") } }) piexif.insert(exif_bytes, temp_file_path) else: + shared.log.warning(f'Unrecognized image format: {extension} attempting save as {image_format}') image_to_save.save(temp_file_path, format=image_format, quality=opts.jpeg_quality) + os.replace(temp_file_path, filename_without_extension + extension) # atomically rename the file with correct extension - # atomically rename the file with correct extension - os.replace(temp_file_path, filename_without_extension + extension) - - fullfn_without_extension, extension = os.path.splitext(params.filename) + filename, extension = os.path.splitext(params.filename) if hasattr(os, 'statvfs'): max_name_len = os.statvfs(path).f_namemax - fullfn_without_extension = fullfn_without_extension[:max_name_len - max(4, len(extension))] - params.filename = fullfn_without_extension + extension + filename = filename[:max_name_len - max(4, len(extension))] + params.filename = filename + extension fullfn = params.filename - _atomically_save_image(image, fullfn_without_extension, extension) + atomically_save_image(image, filename, extension) image.already_saved_as = fullfn - if opts.save_txt and len(exifinfo_data) > 0: - txt_fullfn = f"{fullfn_without_extension}.txt" - with open(txt_fullfn, "w", encoding="utf8") as file: + filename_txt = f"{filename}.txt" + with open(filename_txt, "w", encoding="utf8") as file: file.write(exifinfo_data + "\n") else: txt_fullfn = None script_callbacks.image_saved_callback(params) - return fullfn, txt_fullfn + def safe_decode_string(s: bytes): remove_prefix = lambda text, prefix: text[len(prefix):] if text.startswith(prefix) else text # pylint: disable=unnecessary-lambda-assignment for encoding in ['utf-8', 'utf-16', 'ascii', 'latin_1', 'cp1252', 'cp437']: # try different encodings @@ -629,6 +624,8 @@ def safe_decode_string(s: bytes): def read_info_from_image(image): items = image.info or {} geninfo = items.pop('parameters', None) + if geninfo is not None and len(geninfo) > 0: + items['UserComment'] = geninfo if "exif" in items: exif = piexif.load(items["exif"]) @@ -662,6 +659,7 @@ Negative prompt: {json_info["uc"]} Steps: {json_info["steps"]}, Sampler: {sampler}, CFG scale: {json_info["scale"]}, Seed: {json_info["seed"]}, Size: {image.width}x{image.height}, Clip skip: 2, ENSD: 31337""" except Exception as e: errors.display(e, 'novelai image parser') + return geninfo, items diff --git a/modules/lora b/modules/lora index ad5f318d0..e6ad3cbc6 160000 --- a/modules/lora +++ b/modules/lora @@ -1 +1 @@ -Subproject commit ad5f318d066c52e5b27306b399bc87e41f2eef2b +Subproject commit e6ad3cbc66130fdc3bf9ecd1e0272969b1d613f7 diff --git a/modules/postprocessing.py b/modules/postprocessing.py index 4e0ee9489..d975f50f8 100644 --- a/modules/postprocessing.py +++ b/modules/postprocessing.py @@ -10,28 +10,27 @@ from modules.shared import opts def run_postprocessing(extras_mode, image, image_folder: List[tempfile.NamedTemporaryFile], input_dir, output_dir, show_extras_results, *args, save_output: bool = True): devices.torch_gc() - shared.state.begin() shared.state.job = 'extras' - image_data = [] image_names = [] + image_ext = [] outputs = [] - if extras_mode == 1: for img in image_folder: if isinstance(img, Image.Image): image = img fn = '' + ext = None else: image = Image.open(os.path.abspath(img.name)) - fn = os.path.splitext(img.orig_name)[0] + fn, ext = os.path.splitext(img.orig_name) image_data.append(image) image_names.append(fn) + image_ext.append(ext) elif extras_mode == 2: assert not shared.cmd_opts.hide_ui_dir_config, '--hide-ui-dir-config option must be disabled' assert input_dir, 'input directory not selected' - image_list = shared.listfiles(input_dir) for filename in image_list: try: @@ -40,47 +39,38 @@ def run_postprocessing(extras_mode, image, image_folder: List[tempfile.NamedTemp continue image_data.append(image) image_names.append(filename) + image_ext.append(None) else: image_data.append(image) image_names.append(None) - + image_ext.append(None) if extras_mode == 2 and output_dir != '': outpath = output_dir else: outpath = opts.outdir_samples or opts.outdir_extras_samples - infotext = '' - - for image, name in zip(image_data, image_names): + for image, name, ext in zip(image_data, image_names, image_ext): if image is None: continue shared.state.textinfo = name - pp = scripts_postprocessing.PostprocessedImage(image.convert("RGB")) - scripts.scripts_postproc.run(pp, args) - if opts.use_original_name_batch and name is not None: basename = os.path.splitext(os.path.basename(name))[0] else: basename = '' - infotext = ", ".join([k if k == v else f'{k}: {generation_parameters_copypaste.quote(v)}' for k, v in pp.info.items() if v is not None]) - if opts.enable_pnginfo: _geninfo, items = images.read_info_from_image(image) for k, v in items.items(): pp.image.info[k] = v pp.image.info["postprocessing"] = infotext - if save_output: - images.save_image(pp.image, path=outpath, basename=basename, seed=None, prompt=None, extension=opts.samples_format, info=infotext, short_filename=True, no_prompt=True, grid=False, pnginfo_section_name="extras", existing_info=pp.image.info, forced_filename=None) - + images.save_image(pp.image, path=outpath, basename=basename, seed=None, prompt=None, extension=ext or opts.samples_format, info=infotext, short_filename=True, no_prompt=True, grid=False, pnginfo_section_name="extras", existing_info=pp.image.info, forced_filename=None) if extras_mode != 2 or show_extras_results: outputs.append(pp.image) devices.torch_gc() - return outputs, ui_common.plaintext_to_html(infotext), '' diff --git a/modules/processing.py b/modules/processing.py index efba7f01e..0d1b52ae9 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -17,7 +17,7 @@ from blendmodes.blend import blendLayers, BlendType import modules.sd_hijack from modules import devices, prompt_parser, masking, sd_samplers, lowvram, generation_parameters_copypaste, script_callbacks, extra_networks, sd_vae_approx, scripts # pylint: disable=unused-import from modules.sd_hijack import model_hijack -from modules.shared import opts, cmd_opts, state, log # pylint: disable=unused-import +from modules.shared import opts, cmd_opts, state, log import modules.shared as shared import modules.paths as paths import modules.face_restoration @@ -611,8 +611,6 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: with torch.no_grad(), p.sd_model.ema_scope(): with devices.autocast(): p.init(p.all_prompts, p.all_seeds, p.all_subseeds) - - # for OSX, loading the model during sampling changes the generated picture, so it is loaded here if shared.opts.live_previews_enable and opts.show_progress_type == "Approx NN": sd_vae_approx.model() diff --git a/modules/sd_models.py b/modules/sd_models.py index e5f4fb6a2..78e1e222d 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -101,10 +101,13 @@ def list_models(): checkpoints_list.clear() checkpoint_aliases.clear() model_list = modelloader.load_models(model_path=model_path, model_url=None, command_path=shared.opts.ckpt_dir, ext_filter=[".ckpt", ".safetensors"], download_name=None, ext_blacklist=[".vae.ckpt", ".vae.safetensors"]) - if shared.cmd_opts.ckpt is not None and os.path.exists(shared.cmd_opts.ckpt): - checkpoint_info = CheckpointInfo(shared.cmd_opts.ckpt) - checkpoint_info.register() - shared.opts.data['sd_model_checkpoint'] = checkpoint_info.title + if shared.cmd_opts.ckpt is not None: + if not os.path.exists(shared.cmd_opts.ckpt): + shared.log.warning(f"Requested checkpoint not found: {shared.cmd_opts.ckpt}") + else: + checkpoint_info = CheckpointInfo(shared.cmd_opts.ckpt) + checkpoint_info.register() + shared.opts.data['sd_model_checkpoint'] = checkpoint_info.title elif shared.cmd_opts.ckpt != shared.default_sd_model_file and shared.cmd_opts.ckpt is not None: shared.log.warning(f"Checkpoint not found: {shared.cmd_opts.ckpt}") for filename in sorted(model_list, key=str.lower): @@ -157,7 +160,8 @@ def select_checkpoint(): exit(1) checkpoint_info = next(iter(checkpoints_list.values())) if model_checkpoint is not None: - shared.log.warning(f"Checkpoint {model_checkpoint} not found; loading fallback {checkpoint_info.title}") + shared.log.warning(f"Default checkpoint not found: {model_checkpoint}") + shared.log.warning(f"Loading fallback checkpoint: {checkpoint_info.title}") return checkpoint_info @@ -346,6 +350,8 @@ def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None) shared.debug(f'Load model: {checkpoint_info} {already_loaded_state_dict}') from modules import lowvram, sd_hijack checkpoint_info = checkpoint_info or select_checkpoint() + if checkpoint_info is None: + return if timer is None: timer = Timer() current_checkpoint_info = None @@ -389,7 +395,7 @@ def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None) if shared.cmd_opts.lowvram or shared.cmd_opts.medvram: lowvram.setup_for_low_vram(sd_model, shared.cmd_opts.medvram) else: - sd_model.to(shared.device) + sd_model.to(devices.device) timer.record("move") shared.debug(f'Model weights moved: {memory_stats()}') sd_hijack.model_hijack.hijack(sd_model) diff --git a/webui.py b/webui.py index 311927b13..1decd4ef7 100644 --- a/webui.py +++ b/webui.py @@ -157,7 +157,8 @@ def load_model(): if shared.sd_model is None: log.error("No stable diffusion model loaded") exit(1) - shared.opts.data["sd_model_checkpoint"] = shared.sd_model.sd_checkpoint_info.title + else: + shared.opts.data["sd_model_checkpoint"] = shared.sd_model.sd_checkpoint_info.title shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights())) shared.state.end() startup_timer.record("checkpoint") From 41182009cbc53f3176406e06dc78b683989c2157 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 6 May 2023 14:35:33 -0400 Subject: [PATCH 071/282] switch some cmdopts to opts --- extensions-builtin/sd-webui-controlnet | 2 +- modules/devices.py | 15 +++++++++------ modules/img2img.py | 4 ++-- modules/interrogate.py | 4 ++-- modules/processing.py | 2 +- modules/realesrgan_model.py | 2 +- modules/sd_models.py | 26 +++++++++++++------------- modules/shared.py | 5 ----- modules/txt2img.py | 2 +- modules/upscaler.py | 2 +- 10 files changed, 31 insertions(+), 33 deletions(-) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 817155ea7..6be213fef 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 817155ea7a43a78982202a2456088acd6ffd95d5 +Subproject commit 6be213feff25cbbb17f31479391f5644008e7bba diff --git a/modules/devices.py b/modules/devices.py index 7f66f0d54..840f0de33 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -77,11 +77,13 @@ def test_fp16(): x = torch.tensor([[1.5,.0,.0,.0]]).to(device).half() layerNorm = torch.nn.LayerNorm(4, eps=0.00001, elementwise_affine=True, dtype=torch.float16, device=device) _y = layerNorm(x) + return True except: shared.log.warning('Torch FP16 test failed: Forcing FP32 operations') shared.opts.cuda_dtype = 'FP32' shared.opts.no_half = True shared.opts.no_half_vae = True + return False def set_cuda_params(): @@ -101,22 +103,23 @@ def set_cuda_params(): pass global dtype, dtype_vae, dtype_unet, unet_needs_upcast # pylint: disable=global-statement # set dtype - test_fp16() - if shared.opts.cuda_dtype == 'FP16': + ok = test_fp16() + if shared.opts.cuda_dtype == 'FP16' and ok: dtype = torch.float16 dtype_vae = torch.float16 dtype_unet = torch.float16 - if shared.opts.cuda_dtype == 'BP16': + if shared.opts.cuda_dtype == 'BP16' and ok: dtype = torch.bfloat16 dtype_vae = torch.bfloat16 dtype_unet = torch.bfloat16 - if shared.opts.cuda_dtype == 'FP32' or shared.opts.no_half: + if shared.opts.cuda_dtype == 'FP32' or shared.opts.no_half or not ok: dtype = torch.float32 dtype_vae = torch.float32 dtype_unet = torch.float32 if shared.opts.no_half_vae: # set dtype again as no-half-vae options take priority dtype_vae = torch.float32 unet_needs_upcast = shared.opts.upcast_sampling + shared.log.debug(f'Setting CUDA parameters: dtype={dtype} vae={dtype_vae} unet={dtype_unet}') args = cmd_args.parser.parse_args() @@ -182,11 +185,11 @@ def test_for_nans(x, where): return if where == "unet": message = "A tensor with all NaNs was produced in Unet." - if not shared.cmd_opts.no_half: + if not shared.opts.no_half: message += " This could be either because there's not enough precision to represent the picture, or because your video card does not support half type. Try setting the \"Upcast cross attention layer to float32\" option in Settings > Stable Diffusion or using the --no-half commandline argument to fix this." elif where == "vae": message = "A tensor with all NaNs was produced in VAE." - if not shared.cmd_opts.no_half and not shared.cmd_opts.no_half_vae: + if not shared.opts.no_half and not shared.opts.no_half_vae: message += " This could be because there's not enough precision to represent the picture. Try adding --no-half-vae commandline argument to fix this." else: message = "A tensor with all NaNs was produced." diff --git a/modules/img2img.py b/modules/img2img.py index d0b5183f4..893f7cabb 100644 --- a/modules/img2img.py +++ b/modules/img2img.py @@ -60,7 +60,7 @@ def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args): if processed_image.mode == 'RGBA': processed_image = processed_image.convert("RGB") processed_image.save(os.path.join(output_dir, filename)) - shared.debug(f'Processed: {len(images)} Memory: {memory_stats()} batch') + shared.log.debug(f'Processed: {len(images)} Memory: {memory_stats()} batch') def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_styles, init_img, sketch, init_img_with_mask, inpaint_color_sketch, inpaint_color_sketch_orig, init_img_inpaint, init_mask_inpaint, steps: int, sampler_index: int, mask_blur: int, mask_alpha: float, inpainting_fill: int, restore_faces: bool, tiling: bool, n_iter: int, batch_size: int, cfg_scale: float, image_cfg_scale: float, denoising_strength: float, seed: int, subseed: int, subseed_strength: float, seed_resize_from_h: int, seed_resize_from_w: int, seed_enable_extras: bool, selected_scale_tab: int, height: int, width: int, scale_by: float, resize_mode: int, inpaint_full_res: bool, inpaint_full_res_padding: int, inpainting_mask_invert: int, img2img_batch_input_dir: str, img2img_batch_output_dir: str, img2img_batch_inpaint_mask_dir: str, override_settings_texts, *args): # pylint: disable=unused-argument @@ -154,5 +154,5 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s processed = process_images(p) p.close() generation_info_js = processed.js() - shared.debug(f'Processed: {len(processed.images)} Memory: {memory_stats()} img') + shared.log.debug(f'Processed: {len(processed.images)} Memory: {memory_stats()} img') return processed.images, generation_info_js, plaintext_to_html(processed.info), plaintext_to_html(processed.comments) diff --git a/modules/interrogate.py b/modules/interrogate.py index 38956a8aa..91c00e129 100644 --- a/modules/interrogate.py +++ b/modules/interrogate.py @@ -118,14 +118,14 @@ class InterrogateModels: def load(self): if self.blip_model is None: self.blip_model = self.load_blip_model() - if not shared.cmd_opts.no_half and not self.running_on_cpu: + if not shared.opts.no_half and not self.running_on_cpu: self.blip_model = self.blip_model.half() self.blip_model = self.blip_model.to(devices.device_interrogate) if self.clip_model is None: self.clip_model, self.clip_preprocess = self.load_clip_model() - if not shared.cmd_opts.no_half and not self.running_on_cpu: + if not shared.opts.no_half and not self.running_on_cpu: self.clip_model = self.clip_model.half() self.clip_model = self.clip_model.to(devices.device_interrogate) diff --git a/modules/processing.py b/modules/processing.py index 0d1b52ae9..13124bbfa 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -680,7 +680,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: for x in x_samples_ddim: devices.test_for_nans(x, "vae") except devices.NansException as e: - if not shared.cmd_opts.no_half and not shared.cmd_opts.no_half_vae and shared.cmd_opts.rollback_vae: + if not shared.opts.no_half and not shared.opts.no_half_vae and shared.cmd_opts.rollback_vae: log.warning('Tensor with all NaNs was produced in VAE') devices.dtype_vae = torch.bfloat16 vae_file, vae_source = sd_vae.resolve_vae(p.sd_model.sd_model_checkpoint) diff --git a/modules/realesrgan_model.py b/modules/realesrgan_model.py index 5b6109eac..75dccf1ac 100644 --- a/modules/realesrgan_model.py +++ b/modules/realesrgan_model.py @@ -57,7 +57,7 @@ class UpscalerRealESRGAN(Upscaler): scale=info.scale, model_path=info.local_data_path, model=info.model(), - half=not cmd_opts.no_half and not opts.upcast_sampling, + half=not opts.no_half and not opts.upcast_sampling, tile=opts.ESRGAN_tile, tile_pad=opts.ESRGAN_tile_overlap, device=device, diff --git a/modules/sd_models.py b/modules/sd_models.py index 78e1e222d..b58df9b90 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -262,11 +262,11 @@ def load_model_weights(model: torch.nn.Module, checkpoint_info: CheckpointInfo, if shared.opts.opt_channelslast: model.to(memory_format=torch.channels_last) timer.record("channels") - if not shared.cmd_opts.no_half: + if not shared.opts.no_half: vae = model.first_stage_model depth_model = getattr(model, 'depth_model', None) # with --no-half-vae, remove VAE from model when doing half() to prevent its weights from being converted to float16 - if shared.cmd_opts.no_half_vae: + if shared.opts.no_half_vae: model.first_stage_model = None # with --upcast-sampling, don't convert the depth model weights to float16 if shared.opts.upcast_sampling and depth_model: @@ -275,7 +275,6 @@ def load_model_weights(model: torch.nn.Module, checkpoint_info: CheckpointInfo, model.first_stage_model = vae if depth_model: model.depth_model = depth_model - devices.set_cuda_params() devices.dtype_unet = model.model.diffusion_model.dtype model.first_stage_model.to(devices.dtype_vae) # clean up cache if limit is reached @@ -330,7 +329,7 @@ def enable_midas_autodownload(): def repair_config(sd_config): if not "use_ema" in sd_config.model.params: sd_config.model.params.use_ema = False - if shared.cmd_opts.no_half: + if shared.opts.no_half: sd_config.model.params.unet_config.params.use_fp16 = False elif shared.opts.upcast_sampling: sd_config.model.params.unet_config.params.use_fp16 = True @@ -347,7 +346,7 @@ sd2_clip_weight = 'cond_stage_model.model.transformer.resblocks.0.attn.in_proj_w def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None): - shared.debug(f'Load model: {checkpoint_info} {already_loaded_state_dict}') + shared.log.debug(f'Load model: info={checkpoint_info is not None} dict={already_loaded_state_dict is not None}') from modules import lowvram, sd_hijack checkpoint_info = checkpoint_info or select_checkpoint() if checkpoint_info is None: @@ -361,8 +360,9 @@ def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None) shared.sd_model = None gc.collect() devices.torch_gc() - shared.debug(f'Model unloaded: {memory_stats()}') + shared.log.debug(f'Model unloaded: {memory_stats()}') do_inpainting_hijack() + devices.set_cuda_params() if already_loaded_state_dict is not None: state_dict = already_loaded_state_dict else: @@ -374,12 +374,12 @@ def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None) shared.log.info(f"Restoring previous checkpoint: {current_checkpoint_info.filename}") load_model(current_checkpoint_info, None) return - shared.debug(f'Model dict loaded: {memory_stats()}') + shared.log.debug(f'Model dict loaded: {memory_stats()}') clip_is_included_into_sd = sd1_clip_weight in state_dict or sd2_clip_weight in state_dict sd_config = OmegaConf.load(checkpoint_config) repair_config(sd_config) timer.record("config") - shared.debug(f'Model config loaded: {memory_stats()}') + shared.log.debug(f'Model config loaded: {memory_stats()}') shared.log.info(f"Creating model from config: {checkpoint_config}") sd_model = None try: @@ -391,13 +391,13 @@ def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None) timer.record("create") load_model_weights(sd_model, checkpoint_info, state_dict, timer) timer.record("load") - shared.debug(f'Model weights loaded: {memory_stats()}') + shared.log.debug(f'Model weights loaded: {memory_stats()}') if shared.cmd_opts.lowvram or shared.cmd_opts.medvram: lowvram.setup_for_low_vram(sd_model, shared.cmd_opts.medvram) else: sd_model.to(devices.device) timer.record("move") - shared.debug(f'Model weights moved: {memory_stats()}') + shared.log.debug(f'Model weights moved: {memory_stats()}') sd_hijack.model_hijack.hijack(sd_model) timer.record("hijack") sd_model.eval() @@ -411,16 +411,16 @@ def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None) timer.record("callbacks") shared.log.info(f"Model loaded in {timer.summary()}") gc.collect() - shared.debug(f'Model load finished: {memory_stats()}') + shared.log.debug(f'Model load finished: {memory_stats()}') def reload_model_weights(sd_model=None, info=None): global skip_next_load # pylint: disable=global-statement if skip_next_load: - shared.debug('Reload model weights skip') + shared.log.debug('Reload model weights skip') skip_next_load = False return - shared.debug(f'Reload model weights: {sd_model} {info}') + shared.log.debug(f'Reload model weights: {sd_model} {info}') from modules import lowvram, sd_hijack checkpoint_info = info or select_checkpoint() if not sd_model: diff --git a/modules/shared.py b/modules/shared.py index 66aba96fa..0875dda66 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -166,11 +166,6 @@ interrogator = modules.interrogate.InterrogateModels("interrogate") face_restorers = [] -def debug(message): - if cmd_opts.debug: - log.debug(message) - - class OptionInfo: def __init__(self, default=None, label="", component=None, component_args=None, onchange=None, section=None, refresh=None): self.default = default diff --git a/modules/txt2img.py b/modules/txt2img.py index d7533f4b2..d16a0f011 100644 --- a/modules/txt2img.py +++ b/modules/txt2img.py @@ -50,5 +50,5 @@ def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, step processed = process_images(p) p.close() generation_info_js = processed.js() - shared.debug(f'Processed: {len(processed.images)} Memory: {memory_stats()} txt') + shared.log.debug(f'Processed: {len(processed.images)} Memory: {memory_stats()} txt') return processed.images, generation_info_js, plaintext_to_html(processed.info), plaintext_to_html(processed.comments) diff --git a/modules/upscaler.py b/modules/upscaler.py index 560ca6167..a71c22024 100644 --- a/modules/upscaler.py +++ b/modules/upscaler.py @@ -30,7 +30,7 @@ class Upscaler: self.img = None self.output = None self.scale = 1 - self.half = not shared.cmd_opts.no_half + self.half = not shared.opts.no_half self.pre_pad = 0 self.mod_scale = None From 2af0e0c8a18ae11caaf17c199e22bc8032cb491a Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 7 May 2023 08:28:03 -0400 Subject: [PATCH 072/282] change temp files to image files --- TODO.md | 17 +++++++----- extensions-builtin/sd-webui-controlnet | 2 +- .../stable-diffusion-webui-images-browser | 2 +- modules/images.py | 27 ++++++++----------- modules/postprocessing.py | 9 +++---- modules/processing.py | 6 ++--- modules/shared.py | 1 - 7 files changed, 29 insertions(+), 35 deletions(-) diff --git a/TODO.md b/TODO.md index 474717811..b1b4f4a5c 100644 --- a/TODO.md +++ b/TODO.md @@ -4,24 +4,27 @@ Stuff to be fixed... -- Move Restart Server from WebUI to Launch and reload modules -- Mdularize `cli` scripts ## Features Stuff to be added... - Update `README.md` -- Add Gradio theme maker -- Create new GitHub hooks/actions for CI/CD +- Update `Wiki` +- Add `Gradio` theme maker +- Create new `GitHub` hooks/actions for CI/CD - Redo Extensions tab: -- Stream-load models as option for slow storage -- Auto-test `torch.layer_norm` for FP16 -- Monitor file changes by misbehaving extensions +- Monitor file changes for misbehaving extensions - Kitchen theme: - Lightbox improvements - Check duplicate extensions - Reload browser on server restart +- Gradio 3.28.4 when ready +- Remove origin wiki +- Import core repos +- Improve core `Stability-AI` code: +- Improve core `k-Diffusion` code +- Update and mdularize `cli` scripts ## Investigate diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 6be213fef..58d17e087 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 6be213feff25cbbb17f31479391f5644008e7bba +Subproject commit 58d17e087a871d9d482b72a381d996dfbd1d344a diff --git a/extensions-builtin/stable-diffusion-webui-images-browser b/extensions-builtin/stable-diffusion-webui-images-browser index 708bd5860..080942e34 160000 --- a/extensions-builtin/stable-diffusion-webui-images-browser +++ b/extensions-builtin/stable-diffusion-webui-images-browser @@ -1 +1 @@ -Subproject commit 708bd5860e2432a0021d3aa66fc8fdbff33b2d1a +Subproject commit 080942e3460160aae220c2df8526cd54e7bc64a2 diff --git a/modules/images.py b/modules/images.py index c73c1fd13..b4b0c22b4 100644 --- a/modules/images.py +++ b/modules/images.py @@ -552,37 +552,32 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='jpg', i else: exifinfo_data = params.pnginfo.get(pnginfo_section_name, '') - def atomically_save_image(image_to_save, filename_without_extension, extension): + def atomically_save_image(image_to_save: Image, filename_without_extension: str, extension: str): # save image with .tmp extension to avoid race condition when another process detects new image in the directory - temp_file_path = filename_without_extension + ".tmp" + fn = filename_without_extension + extension image_format = Image.registered_extensions()[extension] + log.debug(f'Saving image: {image_format} {fn}') if image_format == 'PNG': pnginfo_data = PngImagePlugin.PngInfo() - if opts.enable_pnginfo: - for k, v in params.pnginfo.items(): - pnginfo_data.add_text(k, str(v)) - image_to_save.save(temp_file_path, format=image_format, quality=opts.jpeg_quality, pnginfo=pnginfo_data) + for k, v in params.pnginfo.items(): + pnginfo_data.add_text(k, str(v)) + image_to_save.save(fn, format=image_format, quality=opts.jpeg_quality, pnginfo=pnginfo_data) elif image_format == 'JPEG': if image_to_save.mode == 'RGBA': shared.log.warning('Saving RGBA image as JPEG: Alpha channel will be lost') image_to_save = image_to_save.convert("RGB") elif image_to_save.mode == 'I;16': image_to_save = image_to_save.point(lambda p: p * 0.0038910505836576).convert("L") - image_to_save.save(temp_file_path, format=image_format, quality=opts.jpeg_quality) - if opts.enable_pnginfo: - exif_bytes = piexif.dump({ "Exif": { piexif.ExifIFD.UserComment: piexif.helper.UserComment.dump(exifinfo_data or "", encoding="unicode") } }) - piexif.insert(exif_bytes, temp_file_path) + exif_bytes = piexif.dump({ "Exif": { piexif.ExifIFD.UserComment: piexif.helper.UserComment.dump(exifinfo_data or "", encoding="unicode") } }) + image_to_save.save(fn, format=image_format, quality=opts.jpeg_quality, exif=exif_bytes) elif image_format == 'WEBP': if image_to_save.mode == 'I;16': image_to_save = image_to_save.point(lambda p: p * 0.0038910505836576).convert("RGB") - image_to_save.save(temp_file_path, format=image_format, quality=opts.jpeg_quality, lossless=opts.webp_lossless) - if opts.enable_pnginfo: - exif_bytes = piexif.dump({ "Exif": { piexif.ExifIFD.UserComment: piexif.helper.UserComment.dump(exifinfo_data or "", encoding="unicode") } }) - piexif.insert(exif_bytes, temp_file_path) + exif_bytes = piexif.dump({ "Exif": { piexif.ExifIFD.UserComment: piexif.helper.UserComment.dump(exifinfo_data or "", encoding="unicode") } }) + image_to_save.save(fn, format=image_format, quality=opts.jpeg_quality, lossless=opts.webp_lossless, exif=exif_bytes) else: shared.log.warning(f'Unrecognized image format: {extension} attempting save as {image_format}') - image_to_save.save(temp_file_path, format=image_format, quality=opts.jpeg_quality) - os.replace(temp_file_path, filename_without_extension + extension) # atomically rename the file with correct extension + image_to_save.save(fn, format=image_format, quality=opts.jpeg_quality) filename, extension = os.path.splitext(params.filename) if hasattr(os, 'statvfs'): diff --git a/modules/postprocessing.py b/modules/postprocessing.py index d975f50f8..a7c41e35c 100644 --- a/modules/postprocessing.py +++ b/modules/postprocessing.py @@ -60,11 +60,10 @@ def run_postprocessing(extras_mode, image, image_folder: List[tempfile.NamedTemp else: basename = '' infotext = ", ".join([k if k == v else f'{k}: {generation_parameters_copypaste.quote(v)}' for k, v in pp.info.items() if v is not None]) - if opts.enable_pnginfo: - _geninfo, items = images.read_info_from_image(image) - for k, v in items.items(): - pp.image.info[k] = v - pp.image.info["postprocessing"] = infotext + _geninfo, items = images.read_info_from_image(image) + for k, v in items.items(): + pp.image.info[k] = v + pp.image.info["postprocessing"] = infotext if save_output: images.save_image(pp.image, path=outpath, basename=basename, seed=None, prompt=None, extension=ext or opts.samples_format, info=infotext, short_filename=True, no_prompt=True, grid=False, pnginfo_section_name="extras", existing_info=pp.image.info, forced_filename=None) if extras_mode != 2 or show_extras_results: diff --git a/modules/processing.py b/modules/processing.py index 13124bbfa..c37d71ccb 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -735,8 +735,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: images.save_image(image, p.outpath_samples, "", seeds[i], prompts[i], opts.samples_format, info=infotext(n, i), p=p) text = infotext(n, i) infotexts.append(text) - if opts.enable_pnginfo: - image.info["parameters"] = text + image.info["parameters"] = text output_images.append(image) if hasattr(p, 'mask_for_overlay') and p.mask_for_overlay and any([opts.save_mask, opts.save_mask_composite, opts.return_mask, opts.return_mask_composite]): image_mask = p.mask_for_overlay.convert('RGB') @@ -761,8 +760,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: if opts.return_grid: text = infotext() infotexts.insert(0, text) - if opts.enable_pnginfo: - grid.info["parameters"] = text + grid.info["parameters"] = text output_images.insert(0, grid) index_of_first_image = 1 if opts.grid_save: diff --git a/modules/shared.py b/modules/shared.py index 0875dda66..a1144f29c 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -284,7 +284,6 @@ options_templates.update(options_section(('saving-images', "Image options"), { "grid_only_if_multiple": OptionInfo(True, "Do not save grids consisting of one picture"), "grid_prevent_empty_spots": OptionInfo(True, "Prevent empty spots in grid (when set to autodetect)"), "n_rows": OptionInfo(-1, "Grid row count; use -1 for autodetect and 0 for it to be same as batch size", gr.Slider, {"minimum": -1, "maximum": 16, "step": 1}), - "enable_pnginfo": OptionInfo(True, "Save text information about generation parameters as chunks to png files"), "save_txt": OptionInfo(False, "Create a text file next to every image with generation parameters"), "save_images_before_face_restoration": OptionInfo(True, "Save a copy of image before doing face restoration"), "save_images_before_highres_fix": OptionInfo(True, "Save a copy of image before applying highres fix"), From 0210830296d7b162d22984bcd853001ec34f7c53 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 8 May 2023 09:27:13 -0400 Subject: [PATCH 073/282] update noise multiplier --- extensions-builtin/multidiffusion-upscaler-for-automatic1111 | 2 +- extensions-builtin/sd-extension-steps-animation | 2 +- extensions-builtin/sd-webui-controlnet | 2 +- extensions-builtin/stable-diffusion-webui-images-browser | 2 +- modules/lora | 2 +- modules/shared.py | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 index f54a8fc50..97fcc2ce5 160000 --- a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 +++ b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 @@ -1 +1 @@ -Subproject commit f54a8fc506600340f7955a7251fce0a8fb90185e +Subproject commit 97fcc2ce5da0805edc00c490c88663884b54e38e diff --git a/extensions-builtin/sd-extension-steps-animation b/extensions-builtin/sd-extension-steps-animation index 90663eb74..79de908d1 160000 --- a/extensions-builtin/sd-extension-steps-animation +++ b/extensions-builtin/sd-extension-steps-animation @@ -1 +1 @@ -Subproject commit 90663eb7450c3487b693cf20e76ec4d7edd78cd5 +Subproject commit 79de908d19a3e3128e7defd023b30e1a9d065e3e diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 58d17e087..c9c8ca6ee 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 58d17e087a871d9d482b72a381d996dfbd1d344a +Subproject commit c9c8ca6eee86e0fa4dec9f5e62a5f34e38ae1707 diff --git a/extensions-builtin/stable-diffusion-webui-images-browser b/extensions-builtin/stable-diffusion-webui-images-browser index 080942e34..05d88c780 160000 --- a/extensions-builtin/stable-diffusion-webui-images-browser +++ b/extensions-builtin/stable-diffusion-webui-images-browser @@ -1 +1 @@ -Subproject commit 080942e3460160aae220c2df8526cd54e7bc64a2 +Subproject commit 05d88c7809587c45fd97d136c717af1f21d06eda diff --git a/modules/lora b/modules/lora index e6ad3cbc6..3b1af3f1a 160000 --- a/modules/lora +++ b/modules/lora @@ -1 +1 @@ -Subproject commit e6ad3cbc66130fdc3bf9ecd1e0272969b1d613f7 +Subproject commit 3b1af3f1a63b858af8c12662cbae70654229e327 diff --git a/modules/shared.py b/modules/shared.py index a1144f29c..884fb9411 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -235,7 +235,7 @@ options_templates.update(options_section(('sd', "Stable Diffusion"), { "stream_load": OptionInfo(False, "When loading models attempt stream loading optimized for slow or network storage"), "model_reuse_dict": OptionInfo(False, "When loading models attempt to reuse previous model dictionary"), "inpainting_mask_weight": OptionInfo(1.0, "Inpainting conditioning mask strength", gr.Slider, {"minimum": 0.0, "maximum": 1.0, "step": 0.01}), - "initial_noise_multiplier": OptionInfo(1.0, "Noise multiplier for img2img", gr.Slider, {"minimum": 0.5, "maximum": 1.5, "step": 0.01}), + "initial_noise_multiplier": OptionInfo(1.0, "Noise multiplier for img2img", gr.Slider, {"minimum": 0.1, "maximum": 1.5, "step": 0.01}), "img2img_color_correction": OptionInfo(False, "Apply color correction to img2img results to match original colors"), "img2img_fix_steps": OptionInfo(False, "For image processing do exactly the amount of steps as specified"), "img2img_background_color": OptionInfo("#ffffff", "With img2img fill image's transparent parts with this color", ui_components.FormColorPicker, {}), @@ -316,7 +316,7 @@ options_templates.update(options_section(('saving-paths', "Image Paths"), { "outdir_init_images": OptionInfo("outputs/init-images", "Directory for saving init images when using img2img", component_args=hide_dirs), })) -options_templates.update(options_section(('cuda', "CUDA Settings"), { +options_templates.update(options_section(('cuda', "Compute Settings"), { "memmon_poll_rate": OptionInfo(2, "VRAM usage polls per second during generation", gr.Slider, {"minimum": 0, "maximum": 40, "step": 1}), "precision": OptionInfo("Autocast", "Precision type", gr.Radio, lambda: {"choices": ["Autocast", "Full"]}), "cuda_dtype": OptionInfo("FP32" if sys.platform == "darwin" else "FP16", "Device precision type", gr.Radio, lambda: {"choices": ["FP32", "FP16", "BF16"]}), From 68b9b440151dd50a611b760f62b88de7aa400bee Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 8 May 2023 09:27:48 -0400 Subject: [PATCH 074/282] update wiki --- wiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki b/wiki index f7d3a5907..de3e442f4 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit f7d3a59074c24904dc284d52cf030d93da9b07c7 +Subproject commit de3e442f4b8d49de2daa6a74fc955bef20e35cec From 4d9fab49848700de2814939228c842b2e0add24d Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 8 May 2023 11:56:59 -0400 Subject: [PATCH 075/282] fix txt_fullfn --- .gitignore | 3 + TODO.md | 2 +- .../stable-diffusion-webui-images-browser | 2 +- javascript/.eslintrc.json | 20 + javascript/aspectRatioOverlay.js | 169 +++--- javascript/contextMenus.js | 254 +++++---- javascript/dragdrop.js | 126 ++--- javascript/edit-attention.js | 201 ++++--- javascript/extensions.js | 3 +- javascript/extraNetworks.js | 314 +++++------ javascript/generationParams.js | 44 +- javascript/hints.js | 221 ++++---- javascript/hires_fix.js | 38 +- javascript/imageMaskFix.js | 64 +-- javascript/imageParams.js | 34 +- javascript/imageviewer.js | 339 ++++++----- javascript/localization.js | 0 javascript/notification.js | 47 +- javascript/package.json | 13 + javascript/script.js | 117 ++-- javascript/ui.js | 526 +++++++++--------- modules/images.py | 4 +- modules/scripts.py | 11 +- modules/scripts_auto_postprocessing.py | 4 +- modules/ui_extensions.py | 1 - wiki | 2 +- 26 files changed, 1291 insertions(+), 1268 deletions(-) create mode 100644 javascript/.eslintrc.json delete mode 100644 javascript/localization.js create mode 100644 javascript/package.json diff --git a/.gitignore b/.gitignore index b1a2ad517..3382bf80d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,9 @@ __pycache__ /webui-user.bat /webui-user.sh /javascript/themes.json +node_modules +pnpm-lock.yaml +package-lock.json venv # all models and temp files diff --git a/TODO.md b/TODO.md index b1b4f4a5c..74cd7447d 100644 --- a/TODO.md +++ b/TODO.md @@ -31,7 +31,7 @@ Stuff to be added... Stuff to be investigated... - Torch Compile -- `Torch-DirectML` +- TXT2IMG: - `TensorRT` - [Temporal Weighing](https://github.com/comfyanonymous/ComfyUI/discussions/473) diff --git a/extensions-builtin/stable-diffusion-webui-images-browser b/extensions-builtin/stable-diffusion-webui-images-browser index 05d88c780..e535ea6ae 160000 --- a/extensions-builtin/stable-diffusion-webui-images-browser +++ b/extensions-builtin/stable-diffusion-webui-images-browser @@ -1 +1 @@ -Subproject commit 05d88c7809587c45fd97d136c717af1f21d06eda +Subproject commit e535ea6aea2356a13da3e0452b92b3d68861f539 diff --git a/javascript/.eslintrc.json b/javascript/.eslintrc.json new file mode 100644 index 000000000..91408c7de --- /dev/null +++ b/javascript/.eslintrc.json @@ -0,0 +1,20 @@ +{ + "globals": {}, + "env": { + "browser": true, + "commonjs": false, + "node": false, + "jquery": false, + "es2020": true + }, + "parserOptions": { "ecmaVersion": 2020 }, + "plugins": [], + "extends": ["eslint:recommended", "airbnb-base"], + "rules": { + "max-len": [1, 220, 3], + "camelcase":"off", + "no-unused-vars":"off", + "no-plusplus":"off", + "no-param-reassign":"off" + } +} diff --git a/javascript/aspectRatioOverlay.js b/javascript/aspectRatioOverlay.js index a8278cca2..faec76d54 100644 --- a/javascript/aspectRatioOverlay.js +++ b/javascript/aspectRatioOverlay.js @@ -1,116 +1,107 @@ - let currentWidth = null; let currentHeight = null; -let arFrameTimeout = setTimeout(function(){},0); +let arFrameTimeout = setTimeout(() => {}, 0); -function dimensionChange(e, is_width, is_height){ +function dimensionChange(e, is_width, is_height) { + if (is_width) { + currentWidth = e.target.value * 1.0; + } + if (is_height) { + currentHeight = e.target.value * 1.0; + } - if(is_width){ - currentWidth = e.target.value*1.0 - } - if(is_height){ - currentHeight = e.target.value*1.0 - } + const inImg2img = gradioApp().querySelector('#tab_img2img').style.display == 'block'; - var inImg2img = gradioApp().querySelector("#tab_img2img").style.display == "block"; + if (!inImg2img) { + return; + } - if(!inImg2img){ - return; - } + let targetElement = null; - var targetElement = null; + const tabIndex = get_tab_index('mode_img2img'); + if (tabIndex == 0) { // img2img + targetElement = gradioApp().querySelector('#img2img_image div[data-testid=image] img'); + } else if (tabIndex == 1) { // Sketch + targetElement = gradioApp().querySelector('#img2img_sketch div[data-testid=image] img'); + } else if (tabIndex == 2) { // Inpaint + targetElement = gradioApp().querySelector('#img2maskimg div[data-testid=image] img'); + } else if (tabIndex == 3) { // Inpaint sketch + targetElement = gradioApp().querySelector('#inpaint_sketch div[data-testid=image] img'); + } - var tabIndex = get_tab_index('mode_img2img') - if(tabIndex == 0){ // img2img - targetElement = gradioApp().querySelector('#img2img_image div[data-testid=image] img'); - } else if(tabIndex == 1){ //Sketch - targetElement = gradioApp().querySelector('#img2img_sketch div[data-testid=image] img'); - } else if(tabIndex == 2){ // Inpaint - targetElement = gradioApp().querySelector('#img2maskimg div[data-testid=image] img'); - } else if(tabIndex == 3){ // Inpaint sketch - targetElement = gradioApp().querySelector('#inpaint_sketch div[data-testid=image] img'); - } + if (targetElement) { + let arPreviewRect = gradioApp().querySelector('#imageARPreview'); + if (!arPreviewRect) { + arPreviewRect = document.createElement('div'); + arPreviewRect.id = 'imageARPreview'; + gradioApp().appendChild(arPreviewRect); + } + const viewportOffset = targetElement.getBoundingClientRect(); - if(targetElement){ + viewportscale = Math.min(targetElement.clientWidth / targetElement.naturalWidth, targetElement.clientHeight / targetElement.naturalHeight); - var arPreviewRect = gradioApp().querySelector('#imageARPreview'); - if(!arPreviewRect){ - arPreviewRect = document.createElement('div') - arPreviewRect.id = "imageARPreview"; - gradioApp().appendChild(arPreviewRect) - } + scaledx = targetElement.naturalWidth * viewportscale; + scaledy = targetElement.naturalHeight * viewportscale; + cleintRectTop = (viewportOffset.top + window.scrollY); + cleintRectLeft = (viewportOffset.left + window.scrollX); + cleintRectCentreY = cleintRectTop + (targetElement.clientHeight / 2); + cleintRectCentreX = cleintRectLeft + (targetElement.clientWidth / 2); + viewRectTop = cleintRectCentreY - (scaledy / 2); + viewRectLeft = cleintRectCentreX - (scaledx / 2); + arRectWidth = scaledx; + arRectHeight = scaledy; - var viewportOffset = targetElement.getBoundingClientRect(); + arscale = Math.min(arRectWidth / currentWidth, arRectHeight / currentHeight); + arscaledx = currentWidth * arscale; + arscaledy = currentHeight * arscale; - viewportscale = Math.min( targetElement.clientWidth/targetElement.naturalWidth, targetElement.clientHeight/targetElement.naturalHeight ) + arRectTop = cleintRectCentreY - (arscaledy / 2); + arRectLeft = cleintRectCentreX - (arscaledx / 2); + arRectWidth = arscaledx; + arRectHeight = arscaledy; - scaledx = targetElement.naturalWidth*viewportscale - scaledy = targetElement.naturalHeight*viewportscale - - cleintRectTop = (viewportOffset.top+window.scrollY) - cleintRectLeft = (viewportOffset.left+window.scrollX) - cleintRectCentreY = cleintRectTop + (targetElement.clientHeight/2) - cleintRectCentreX = cleintRectLeft + (targetElement.clientWidth/2) - - viewRectTop = cleintRectCentreY-(scaledy/2) - viewRectLeft = cleintRectCentreX-(scaledx/2) - arRectWidth = scaledx - arRectHeight = scaledy - - arscale = Math.min( arRectWidth/currentWidth, arRectHeight/currentHeight ) - arscaledx = currentWidth*arscale - arscaledy = currentHeight*arscale - - arRectTop = cleintRectCentreY-(arscaledy/2) - arRectLeft = cleintRectCentreX-(arscaledx/2) - arRectWidth = arscaledx - arRectHeight = arscaledy - - arPreviewRect.style.top = arRectTop+'px'; - arPreviewRect.style.left = arRectLeft+'px'; - arPreviewRect.style.width = arRectWidth+'px'; - arPreviewRect.style.height = arRectHeight+'px'; + arPreviewRect.style.top = `${arRectTop}px`; + arPreviewRect.style.left = `${arRectLeft}px`; + arPreviewRect.style.width = `${arRectWidth}px`; + arPreviewRect.style.height = `${arRectHeight}px`; clearTimeout(arFrameTimeout); - arFrameTimeout = setTimeout(function(){ + arFrameTimeout = setTimeout(() => { arPreviewRect.style.display = 'none'; - },2000); + }, 2000); arPreviewRect.style.display = 'block'; - - } - + } } +onUiUpdate(() => { + const arPreviewRect = gradioApp().querySelector('#imageARPreview'); + if (arPreviewRect) { + arPreviewRect.style.display = 'none'; + } + const tabImg2img = gradioApp().querySelector('#tab_img2img'); + if (tabImg2img) { + const inImg2img = tabImg2img.style.display == 'block'; + if (inImg2img) { + const inputs = gradioApp().querySelectorAll('input'); + inputs.forEach((e) => { + const is_width = e.parentElement.id == 'img2img_width'; + const is_height = e.parentElement.id == 'img2img_height'; -onUiUpdate(function(){ - var arPreviewRect = gradioApp().querySelector('#imageARPreview'); - if(arPreviewRect){ - arPreviewRect.style.display = 'none'; - } - var tabImg2img = gradioApp().querySelector("#tab_img2img"); - if (tabImg2img) { - var inImg2img = tabImg2img.style.display == "block"; - if(inImg2img){ - let inputs = gradioApp().querySelectorAll('input'); - inputs.forEach(function(e){ - var is_width = e.parentElement.id == "img2img_width" - var is_height = e.parentElement.id == "img2img_height" - - if((is_width || is_height) && !e.classList.contains('scrollwatch')){ - e.addEventListener('input', function(e){dimensionChange(e, is_width, is_height)} ) - e.classList.add('scrollwatch') - } - if(is_width){ - currentWidth = e.value*1.0 - } - if(is_height){ - currentHeight = e.value*1.0 - } - }) + if ((is_width || is_height) && !e.classList.contains('scrollwatch')) { + e.addEventListener('input', (e) => { dimensionChange(e, is_width, is_height); }); + e.classList.add('scrollwatch'); } + if (is_width) { + currentWidth = e.value * 1.0; + } + if (is_height) { + currentHeight = e.value * 1.0; + } + }); } + } }); diff --git a/javascript/contextMenus.js b/javascript/contextMenus.js index 517bacac8..39d880165 100644 --- a/javascript/contextMenus.js +++ b/javascript/contextMenus.js @@ -1,178 +1,176 @@ +contextMenuInit = function () { + let eventListenerApplied = false; + const menuSpecs = new Map(); -contextMenuInit = function(){ - let eventListenerApplied=false; - let menuSpecs = new Map(); - - const uid = function(){ + const uid = function () { return Date.now().toString(36) + Math.random().toString(36).substr(2); - } + }; - function showContextMenu(event,element,menuEntries){ - let posx = event.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; - let posy = event.clientY + document.body.scrollTop + document.documentElement.scrollTop; + function showContextMenu(event, element, menuEntries) { + const posx = event.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; + const posy = event.clientY + document.body.scrollTop + document.documentElement.scrollTop; - let oldMenu = gradioApp().querySelector('#context-menu') - if(oldMenu){ - oldMenu.remove() + const oldMenu = gradioApp().querySelector('#context-menu'); + if (oldMenu) { + oldMenu.remove(); } - let tabButton = uiCurrentTab - let baseStyle = window.getComputedStyle(tabButton) + const tabButton = uiCurrentTab; + const baseStyle = window.getComputedStyle(tabButton); - const contextMenu = document.createElement('nav') - contextMenu.id = "context-menu" - contextMenu.style.background = baseStyle.background - contextMenu.style.color = baseStyle.color - contextMenu.style.fontFamily = baseStyle.fontFamily - contextMenu.style.top = posy+'px' - contextMenu.style.left = posx+'px' + const contextMenu = document.createElement('nav'); + contextMenu.id = 'context-menu'; + contextMenu.style.background = baseStyle.background; + contextMenu.style.color = baseStyle.color; + contextMenu.style.fontFamily = baseStyle.fontFamily; + contextMenu.style.top = `${posy}px`; + contextMenu.style.left = `${posx}px`; - - - const contextMenuList = document.createElement('ul') + const contextMenuList = document.createElement('ul'); contextMenuList.className = 'context-menu-items'; contextMenu.append(contextMenuList); - menuEntries.forEach(function(entry){ - let contextMenuEntry = document.createElement('a') - contextMenuEntry.innerHTML = entry['name'] - contextMenuEntry.addEventListener("click", function(e) { - entry['func'](); - }) + menuEntries.forEach((entry) => { + const contextMenuEntry = document.createElement('a'); + contextMenuEntry.innerHTML = entry.name; + contextMenuEntry.addEventListener('click', (e) => { + entry.func(); + }); contextMenuList.append(contextMenuEntry); + }); - }) + gradioApp().appendChild(contextMenu); - gradioApp().appendChild(contextMenu) + const menuWidth = contextMenu.offsetWidth + 4; + const menuHeight = contextMenu.offsetHeight + 4; - let menuWidth = contextMenu.offsetWidth + 4; - let menuHeight = contextMenu.offsetHeight + 4; + const windowWidth = window.innerWidth; + const windowHeight = window.innerHeight; - let windowWidth = window.innerWidth; - let windowHeight = window.innerHeight; - - if ( (windowWidth - posx) < menuWidth ) { - contextMenu.style.left = windowWidth - menuWidth + "px"; + if ((windowWidth - posx) < menuWidth) { + contextMenu.style.left = `${windowWidth - menuWidth}px`; } - if ( (windowHeight - posy) < menuHeight ) { - contextMenu.style.top = windowHeight - menuHeight + "px"; + if ((windowHeight - posy) < menuHeight) { + contextMenu.style.top = `${windowHeight - menuHeight}px`; } - } - function appendContextMenuOption(targetElementSelector,entryName,entryFunction){ + function appendContextMenuOption(targetElementSelector, entryName, entryFunction) { + currentItems = menuSpecs.get(targetElementSelector); - currentItems = menuSpecs.get(targetElementSelector) - - if(!currentItems){ - currentItems = [] - menuSpecs.set(targetElementSelector,currentItems); + if (!currentItems) { + currentItems = []; + menuSpecs.set(targetElementSelector, currentItems); } - let newItem = {'id':targetElementSelector+'_'+uid(), - 'name':entryName, - 'func':entryFunction, - 'isNew':true} + const newItem = { + id: `${targetElementSelector}_${uid()}`, + name: entryName, + func: entryFunction, + isNew: true, + }; - currentItems.push(newItem) - return newItem['id'] + currentItems.push(newItem); + return newItem.id; } - function removeContextMenuOption(uid){ - menuSpecs.forEach(function(v,k) { - let index = -1 - v.forEach(function(e,ei){if(e['id']==uid){index=ei}}) - if(index>=0){ + function removeContextMenuOption(uid) { + menuSpecs.forEach((v, k) => { + let index = -1; + v.forEach((e, ei) => { if (e.id == uid) { index = ei; } }); + if (index >= 0) { v.splice(index, 1); } - }) + }); } - function addContextMenuEventListener(){ - if(eventListenerApplied){ + function addContextMenuEventListener() { + if (eventListenerApplied) { return; } - gradioApp().addEventListener("click", function(e) { - let source = e.composedPath()[0] - if(source.id && source.id.indexOf('check_progress')>-1){ - return + gradioApp().addEventListener('click', (e) => { + const source = e.composedPath()[0]; + if (source.id && source.id.indexOf('check_progress') > -1) { + return; } - let oldMenu = gradioApp().querySelector('#context-menu') - if(oldMenu){ - oldMenu.remove() + const oldMenu = gradioApp().querySelector('#context-menu'); + if (oldMenu) { + oldMenu.remove(); } }); - gradioApp().addEventListener("contextmenu", function(e) { - let oldMenu = gradioApp().querySelector('#context-menu') - if(oldMenu){ - oldMenu.remove() + gradioApp().addEventListener('contextmenu', (e) => { + const oldMenu = gradioApp().querySelector('#context-menu'); + if (oldMenu) { + oldMenu.remove(); } - menuSpecs.forEach(function(v,k) { - if(e.composedPath()[0].matches(k)){ - showContextMenu(e,e.composedPath()[0],v) - e.preventDefault() - return + menuSpecs.forEach((v, k) => { + if (e.composedPath()[0].matches(k)) { + showContextMenu(e, e.composedPath()[0], v); + e.preventDefault(); } - }) + }); }); - eventListenerApplied=true - + eventListenerApplied = true; } - return [appendContextMenuOption, removeContextMenuOption, addContextMenuEventListener] -} + return [appendContextMenuOption, removeContextMenuOption, addContextMenuEventListener]; +}; initResponse = contextMenuInit(); -appendContextMenuOption = initResponse[0]; -removeContextMenuOption = initResponse[1]; +appendContextMenuOption = initResponse[0]; +removeContextMenuOption = initResponse[1]; addContextMenuEventListener = initResponse[2]; -(function(){ - //Start example Context Menu Items - let generateOnRepeat = function(genbuttonid,interruptbuttonid){ - let genbutton = gradioApp().querySelector(genbuttonid); - const busy = document.getElementById('progressbar')?.style.display == "block" - if(!busy){ +(function () { + // Start example Context Menu Items + const generateOnRepeat = function (genbuttonid, interruptbuttonid) { + const genbutton = gradioApp().querySelector(genbuttonid); + const busy = document.getElementById('progressbar')?.style.display == 'block'; + if (!busy) { genbutton.click(); } - clearInterval(window.generateOnRepeatInterval) - window.generateOnRepeatInterval = setInterval(function(){ - const busy = document.getElementById('progressbar')?.style.display == "block" - if(!busy){ - genbutton.click(); - } + clearInterval(window.generateOnRepeatInterval); + window.generateOnRepeatInterval = setInterval( + () => { + const busy = document.getElementById('progressbar')?.style.display == 'block'; + if (!busy) { + genbutton.click(); + } + }, + 500, + ); + }; + + appendContextMenuOption('#txt2img_generate', 'Generate forever', () => { + generateOnRepeat('#txt2img_generate', '#txt2img_interrupt'); + }); + appendContextMenuOption('#img2img_generate', 'Generate forever', () => { + generateOnRepeat('#img2img_generate', '#img2img_interrupt'); + }); + + const cancelGenerateForever = function () { + clearInterval(window.generateOnRepeatInterval); + }; + + appendContextMenuOption('#txt2img_interrupt', 'Cancel generate forever', cancelGenerateForever); + appendContextMenuOption('#txt2img_generate', 'Cancel generate forever', cancelGenerateForever); + appendContextMenuOption('#img2img_interrupt', 'Cancel generate forever', cancelGenerateForever); + appendContextMenuOption('#img2img_generate', 'Cancel generate forever', cancelGenerateForever); + + appendContextMenuOption( + '#roll', + 'Roll three', + () => { + const rollbutton = get_uiCurrentTabContent().querySelector('#roll'); + setTimeout(() => { rollbutton.click(); }, 100); + setTimeout(() => { rollbutton.click(); }, 200); + setTimeout(() => { rollbutton.click(); }, 300); }, - 500) - } + ); +}()); +// End example Context Menu Items - appendContextMenuOption('#txt2img_generate','Generate forever',function(){ - generateOnRepeat('#txt2img_generate','#txt2img_interrupt'); - }) - appendContextMenuOption('#img2img_generate','Generate forever',function(){ - generateOnRepeat('#img2img_generate','#img2img_interrupt'); - }) - - let cancelGenerateForever = function(){ - clearInterval(window.generateOnRepeatInterval) - } - - appendContextMenuOption('#txt2img_interrupt','Cancel generate forever',cancelGenerateForever) - appendContextMenuOption('#txt2img_generate', 'Cancel generate forever',cancelGenerateForever) - appendContextMenuOption('#img2img_interrupt','Cancel generate forever',cancelGenerateForever) - appendContextMenuOption('#img2img_generate', 'Cancel generate forever',cancelGenerateForever) - - appendContextMenuOption('#roll','Roll three', - function(){ - let rollbutton = get_uiCurrentTabContent().querySelector('#roll'); - setTimeout(function(){rollbutton.click()},100) - setTimeout(function(){rollbutton.click()},200) - setTimeout(function(){rollbutton.click()},300) - } - ) -})(); -//End example Context Menu Items - -onUiUpdate(function(){ - addContextMenuEventListener() +onUiUpdate(() => { + addContextMenuEventListener(); }); diff --git a/javascript/dragdrop.js b/javascript/dragdrop.js index 9015e4bd5..27fa4341d 100644 --- a/javascript/dragdrop.js +++ b/javascript/dragdrop.js @@ -1,75 +1,75 @@ // allows drag-dropping files into gradio image elements, and also pasting images from clipboard -function isValidImageList( files ) { - return files && files?.length === 1 && ['image/png', 'image/gif', 'image/jpeg'].includes(files[0].type); +function isValidImageList(files) { + return files && files?.length === 1 && ['image/png', 'image/gif', 'image/jpeg'].includes(files[0].type); } -function dropReplaceImage( imgWrap, files ) { - if (!isValidImageList(files)) return; - const tmpFile = files[0]; - imgWrap.querySelector('.modify-upload button + button, .touch-none + div button + button')?.click(); - const callback = () => { - const fileInput = imgWrap.querySelector('input[type="file"]'); - if (fileInput) { - if (files.length === 0) { - files = new DataTransfer(); - files.items.add(tmpFile); - fileInput.files = files.files; - } else { - fileInput.files = files; - } - fileInput.dispatchEvent(new Event('change')); - } - }; - - if (imgWrap.closest('#pnginfo_image')) { - // special treatment for PNG Info tab, wait for fetch request to finish - const oldFetch = window.fetch; - window.fetch = async (input, options) => { - const response = await oldFetch(input, options); - if ( 'api/predict/' === input ) { - const content = await response.text(); - window.fetch = oldFetch; - window.requestAnimationFrame( () => callback() ); - return new Response(content, { - status: response.status, - statusText: response.statusText, - headers: response.headers - }) - } - return response; - }; - } else { - window.requestAnimationFrame(() => callback()); +function dropReplaceImage(imgWrap, files) { + if (!isValidImageList(files)) return; + const tmpFile = files[0]; + imgWrap.querySelector('.modify-upload button + button, .touch-none + div button + button')?.click(); + const callback = () => { + const fileInput = imgWrap.querySelector('input[type="file"]'); + if (fileInput) { + if (files.length === 0) { + files = new DataTransfer(); + files.items.add(tmpFile); + fileInput.files = files.files; + } else { + fileInput.files = files; + } + fileInput.dispatchEvent(new Event('change')); } + }; + + if (imgWrap.closest('#pnginfo_image')) { + // special treatment for PNG Info tab, wait for fetch request to finish + const oldFetch = window.fetch; + window.fetch = async (input, options) => { + const response = await oldFetch(input, options); + if (input === 'api/predict/') { + const content = await response.text(); + window.fetch = oldFetch; + window.requestAnimationFrame(() => callback()); + return new Response(content, { + status: response.status, + statusText: response.statusText, + headers: response.headers, + }); + } + return response; + }; + } else { + window.requestAnimationFrame(() => callback()); + } } -window.document.addEventListener('dragover', e => { - const target = e.composedPath()[0]; - const imgWrap = target.closest('[data-testid="image"]'); - if ( !imgWrap && target.placeholder && target.placeholder.indexOf("Prompt") == -1) return; - e.stopPropagation(); - e.preventDefault(); - e.dataTransfer.dropEffect = 'copy'; +window.document.addEventListener('dragover', (e) => { + const target = e.composedPath()[0]; + const imgWrap = target.closest('[data-testid="image"]'); + if (!imgWrap && target.placeholder && target.placeholder.indexOf('Prompt') == -1) return; + e.stopPropagation(); + e.preventDefault(); + e.dataTransfer.dropEffect = 'copy'; }); -window.document.addEventListener('drop', e => { - const target = e.composedPath()[0]; - if (!target.placeholder) return; - if (target.placeholder.indexOf("Prompt") == -1) return; - const imgWrap = target.closest('[data-testid="image"]'); - if (!imgWrap) return; - e.stopPropagation(); - e.preventDefault(); - const files = e.dataTransfer.files; - dropReplaceImage(imgWrap, files); +window.document.addEventListener('drop', (e) => { + const target = e.composedPath()[0]; + if (!target.placeholder) return; + if (target.placeholder.indexOf('Prompt') == -1) return; + const imgWrap = target.closest('[data-testid="image"]'); + if (!imgWrap) return; + e.stopPropagation(); + e.preventDefault(); + const { files } = e.dataTransfer; + dropReplaceImage(imgWrap, files); }); -window.addEventListener('paste', e => { - const files = e.clipboardData.files; - if ( ! isValidImageList( files ) ) return; - const visibleImageFields = [...gradioApp().querySelectorAll('[data-testid="image"]')].filter(el => uiElementIsVisible(el)); - if ( ! visibleImageFields.length ) return; - const firstFreeImageField = visibleImageFields.filter(el => el.querySelector('input[type=file]'))?.[0]; - dropReplaceImage(firstFreeImageField ? firstFreeImageField : visibleImageFields[visibleImageFields.length - 1], files); +window.addEventListener('paste', (e) => { + const { files } = e.clipboardData; + if (!isValidImageList(files)) return; + const visibleImageFields = [...gradioApp().querySelectorAll('[data-testid="image"]')].filter((el) => uiElementIsVisible(el)); + if (!visibleImageFields.length) return; + const firstFreeImageField = visibleImageFields.filter((el) => el.querySelector('input[type=file]'))?.[0]; + dropReplaceImage(firstFreeImageField || visibleImageFields[visibleImageFields.length - 1], files); }); diff --git a/javascript/edit-attention.js b/javascript/edit-attention.js index 588c7b773..87ec52617 100644 --- a/javascript/edit-attention.js +++ b/javascript/edit-attention.js @@ -1,120 +1,119 @@ -function keyupEditAttention(event){ - let target = event.originalTarget || event.composedPath()[0]; - if (! target.matches("[id*='_toprow'] [id*='_prompt'] textarea")) return; - if (! (event.metaKey || event.ctrlKey)) return; +function keyupEditAttention(event) { + const target = event.originalTarget || event.composedPath()[0]; + if (!target.matches("[id*='_toprow'] [id*='_prompt'] textarea")) return; + if (!(event.metaKey || event.ctrlKey)) return; - let isPlus = event.key == "ArrowUp" - let isMinus = event.key == "ArrowDown" - if (!isPlus && !isMinus) return; + const isPlus = event.key == 'ArrowUp'; + const isMinus = event.key == 'ArrowDown'; + if (!isPlus && !isMinus) return; - let selectionStart = target.selectionStart; - let selectionEnd = target.selectionEnd; - let text = target.value; + let { selectionStart } = target; + let { selectionEnd } = target; + let text = target.value; - function selectCurrentParenthesisBlock(OPEN, CLOSE){ - if (selectionStart !== selectionEnd) return false; + function selectCurrentParenthesisBlock(OPEN, CLOSE) { + if (selectionStart !== selectionEnd) return false; - // Find opening parenthesis around current cursor - const before = text.substring(0, selectionStart); - let beforeParen = before.lastIndexOf(OPEN); - if (beforeParen == -1) return false; - let beforeParenClose = before.lastIndexOf(CLOSE); - while (beforeParenClose !== -1 && beforeParenClose > beforeParen) { - beforeParen = before.lastIndexOf(OPEN, beforeParen - 1); - beforeParenClose = before.lastIndexOf(CLOSE, beforeParenClose - 1); - } - - // Find closing parenthesis around current cursor - const after = text.substring(selectionStart); - let afterParen = after.indexOf(CLOSE); - if (afterParen == -1) return false; - let afterParenOpen = after.indexOf(OPEN); - while (afterParenOpen !== -1 && afterParen > afterParenOpen) { - afterParen = after.indexOf(CLOSE, afterParen + 1); - afterParenOpen = after.indexOf(OPEN, afterParenOpen + 1); - } - if (beforeParen === -1 || afterParen === -1) return false; - - // Set the selection to the text between the parenthesis - const parenContent = text.substring(beforeParen + 1, selectionStart + afterParen); - const lastColon = parenContent.lastIndexOf(":"); - selectionStart = beforeParen + 1; - selectionEnd = selectionStart + lastColon; - target.setSelectionRange(selectionStart, selectionEnd); - return true; - } - - function selectCurrentWord(){ - if (selectionStart !== selectionEnd) return false; - const delimiters = opts.keyedit_delimiters + " \r\n\t"; - - // seek backward until to find beggining - while (!delimiters.includes(text[selectionStart - 1]) && selectionStart > 0) { - selectionStart--; - } - - // seek forward to find end - while (!delimiters.includes(text[selectionEnd]) && selectionEnd < text.length) { - selectionEnd++; - } - - target.setSelectionRange(selectionStart, selectionEnd); - return true; + // Find opening parenthesis around current cursor + const before = text.substring(0, selectionStart); + let beforeParen = before.lastIndexOf(OPEN); + if (beforeParen == -1) return false; + let beforeParenClose = before.lastIndexOf(CLOSE); + while (beforeParenClose !== -1 && beforeParenClose > beforeParen) { + beforeParen = before.lastIndexOf(OPEN, beforeParen - 1); + beforeParenClose = before.lastIndexOf(CLOSE, beforeParenClose - 1); } - // If the user hasn't selected anything, let's select their current parenthesis block or word - if (!selectCurrentParenthesisBlock('<', '>') && !selectCurrentParenthesisBlock('(', ')')) { - selectCurrentWord(); + // Find closing parenthesis around current cursor + const after = text.substring(selectionStart); + let afterParen = after.indexOf(CLOSE); + if (afterParen == -1) return false; + let afterParenOpen = after.indexOf(OPEN); + while (afterParenOpen !== -1 && afterParen > afterParenOpen) { + afterParen = after.indexOf(CLOSE, afterParen + 1); + afterParenOpen = after.indexOf(OPEN, afterParenOpen + 1); + } + if (beforeParen === -1 || afterParen === -1) return false; + + // Set the selection to the text between the parenthesis + const parenContent = text.substring(beforeParen + 1, selectionStart + afterParen); + const lastColon = parenContent.lastIndexOf(':'); + selectionStart = beforeParen + 1; + selectionEnd = selectionStart + lastColon; + target.setSelectionRange(selectionStart, selectionEnd); + return true; + } + + function selectCurrentWord() { + if (selectionStart !== selectionEnd) return false; + const delimiters = `${opts.keyedit_delimiters} \r\n\t`; + + // seek backward until to find beggining + while (!delimiters.includes(text[selectionStart - 1]) && selectionStart > 0) { + selectionStart--; } - event.preventDefault(); - - closeCharacter = ')' - delta = opts.keyedit_precision_attention - - if (selectionStart > 0 && text[selectionStart - 1] == '<'){ - closeCharacter = '>' - delta = opts.keyedit_precision_extra - } else if (selectionStart == 0 || text[selectionStart - 1] != "(") { - - // do not include spaces at the end - while(selectionEnd > selectionStart && text[selectionEnd-1] == ' '){ - selectionEnd -= 1; - } - if(selectionStart == selectionEnd){ - return - } - - text = text.slice(0, selectionStart) + "(" + text.slice(selectionStart, selectionEnd) + ":1.0)" + text.slice(selectionEnd); - - selectionStart += 1; - selectionEnd += 1; + // seek forward to find end + while (!delimiters.includes(text[selectionEnd]) && selectionEnd < text.length) { + selectionEnd++; } - end = text.slice(selectionEnd + 1).indexOf(closeCharacter) + 1; - weight = parseFloat(text.slice(selectionEnd + 1, selectionEnd + 1 + end)); - if (isNaN(weight)) return; + target.setSelectionRange(selectionStart, selectionEnd); + return true; + } - weight += isPlus ? delta : -delta; - weight = parseFloat(weight.toPrecision(12)); - if(String(weight).length == 1) weight += ".0" + // If the user hasn't selected anything, let's select their current parenthesis block or word + if (!selectCurrentParenthesisBlock('<', '>') && !selectCurrentParenthesisBlock('(', ')')) { + selectCurrentWord(); + } - if (closeCharacter == ')' && weight == 1) { - text = text.slice(0, selectionStart - 1) + text.slice(selectionStart, selectionEnd) + text.slice(selectionEnd + 5); - selectionStart--; - selectionEnd--; - } else { - text = text.slice(0, selectionEnd + 1) + weight + text.slice(selectionEnd + 1 + end - 1); + event.preventDefault(); + + closeCharacter = ')'; + delta = opts.keyedit_precision_attention; + + if (selectionStart > 0 && text[selectionStart - 1] == '<') { + closeCharacter = '>'; + delta = opts.keyedit_precision_extra; + } else if (selectionStart == 0 || text[selectionStart - 1] != '(') { + // do not include spaces at the end + while (selectionEnd > selectionStart && text[selectionEnd - 1] == ' ') { + selectionEnd -= 1; + } + if (selectionStart == selectionEnd) { + return; } - target.focus(); - target.value = text; - target.selectionStart = selectionStart; - target.selectionEnd = selectionEnd; + text = `${text.slice(0, selectionStart)}(${text.slice(selectionStart, selectionEnd)}:1.0)${text.slice(selectionEnd)}`; - updateInput(target) + selectionStart += 1; + selectionEnd += 1; + } + + end = text.slice(selectionEnd + 1).indexOf(closeCharacter) + 1; + weight = parseFloat(text.slice(selectionEnd + 1, selectionEnd + 1 + end)); + if (isNaN(weight)) return; + + weight += isPlus ? delta : -delta; + weight = parseFloat(weight.toPrecision(12)); + if (String(weight).length == 1) weight += '.0'; + + if (closeCharacter == ')' && weight == 1) { + text = text.slice(0, selectionStart - 1) + text.slice(selectionStart, selectionEnd) + text.slice(selectionEnd + 5); + selectionStart--; + selectionEnd--; + } else { + text = text.slice(0, selectionEnd + 1) + weight + text.slice(selectionEnd + 1 + end - 1); + } + + target.focus(); + target.value = text; + target.selectionStart = selectionStart; + target.selectionEnd = selectionEnd; + + updateInput(target); } addEventListener('keydown', (event) => { - keyupEditAttention(event); + keyupEditAttention(event); }); diff --git a/javascript/extensions.js b/javascript/extensions.js index e64a0c795..2bcaa50fc 100644 --- a/javascript/extensions.js +++ b/javascript/extensions.js @@ -1,5 +1,4 @@ - -function extensions_apply(_, _, disable_all){ +function extensions_apply(_a, _b, disable_all){ var disable = [] var update = [] gradioApp().querySelectorAll('#extensions input[type="checkbox"]').forEach(function(x){ diff --git a/javascript/extraNetworks.js b/javascript/extraNetworks.js index bff379beb..9b2a610f7 100644 --- a/javascript/extraNetworks.js +++ b/javascript/extraNetworks.js @@ -1,170 +1,170 @@ -function setupExtraNetworksForTab(tabname){ - gradioApp().querySelector('#'+tabname+'_extra_tabs').classList.add('extra-networks') - var tabs = gradioApp().querySelector('#'+tabname+'_extra_tabs > div') - var search = gradioApp().querySelector('#'+tabname+'_extra_search textarea') - var refresh = gradioApp().getElementById(tabname+'_extra_refresh') - var descriptInput = gradioApp().getElementById(tabname+ '_description_input') - var close = gradioApp().getElementById(tabname+'_extra_close') - search.classList.add('search') - tabs.appendChild(search) - tabs.appendChild(refresh) - tabs.appendChild(close) - tabs.appendChild(descriptInput) - search.addEventListener("input", function(evt){ - searchTerm = search.value.toLowerCase() - gradioApp().querySelectorAll('#'+tabname+'_extra_tabs div.card').forEach(function(elem){ - text = elem.querySelector('.name').textContent.toLowerCase() + " " + elem.querySelector('.search_term').textContent.toLowerCase() - elem.style.display = text.indexOf(searchTerm) == -1 ? "none" : "" - }) +function setupExtraNetworksForTab(tabname) { + gradioApp().querySelector(`#${tabname}_extra_tabs`).classList.add('extra-networks'); + const tabs = gradioApp().querySelector(`#${tabname}_extra_tabs > div`); + const search = gradioApp().querySelector(`#${tabname}_extra_search textarea`); + const refresh = gradioApp().getElementById(`${tabname}_extra_refresh`); + const descriptInput = gradioApp().getElementById(`${tabname}_description_input`); + const close = gradioApp().getElementById(`${tabname}_extra_close`); + search.classList.add('search'); + tabs.appendChild(search); + tabs.appendChild(refresh); + tabs.appendChild(close); + tabs.appendChild(descriptInput); + search.addEventListener('input', (evt) => { + searchTerm = search.value.toLowerCase(); + gradioApp().querySelectorAll(`#${tabname}_extra_tabs div.card`).forEach((elem) => { + text = `${elem.querySelector('.name').textContent.toLowerCase()} ${elem.querySelector('.search_term').textContent.toLowerCase()}`; + elem.style.display = text.indexOf(searchTerm) == -1 ? 'none' : ''; }); + }); } -var activePromptTextarea = {}; +const activePromptTextarea = {}; -function setupExtraNetworks(){ - setupExtraNetworksForTab('txt2img') - setupExtraNetworksForTab('img2img') - function registerPrompt(tabname, id){ - var textarea = gradioApp().querySelector("#" + id + " > label > textarea"); - if ( !activePromptTextarea[tabname]) activePromptTextarea[tabname] = textarea - textarea.addEventListener("focus", function(){ - activePromptTextarea[tabname] = textarea; - }); +function setupExtraNetworks() { + setupExtraNetworksForTab('txt2img'); + setupExtraNetworksForTab('img2img'); + function registerPrompt(tabname, id) { + const textarea = gradioApp().querySelector(`#${id} > label > textarea`); + if (!activePromptTextarea[tabname]) activePromptTextarea[tabname] = textarea; + textarea.addEventListener('focus', () => { + activePromptTextarea[tabname] = textarea; + }); + } + registerPrompt('txt2img', 'txt2img_prompt'); + registerPrompt('txt2img', 'txt2img_neg_prompt'); + registerPrompt('img2img', 'img2img_prompt'); + registerPrompt('img2img', 'img2img_neg_prompt'); +} + +onUiLoaded(setupExtraNetworks); +const re_extranet = /<([^:]+:[^:]+):[\d\.]+>/; +const re_extranet_g = /\s+<([^:]+:[^:]+):[\d\.]+>/g; + +function tryToRemoveExtraNetworkFromPrompt(textarea, text) { + let m = text.match(re_extranet); + if (!m) return false; + const partToSearch = m[1]; + let replaced = false; + const newTextareaText = textarea.value.replaceAll(re_extranet_g, (found, index) => { + m = found.match(re_extranet); + if (m[1] == partToSearch) { + replaced = true; + return ''; } - registerPrompt('txt2img', 'txt2img_prompt') - registerPrompt('txt2img', 'txt2img_neg_prompt') - registerPrompt('img2img', 'img2img_prompt') - registerPrompt('img2img', 'img2img_neg_prompt') + return found; + }); + if (replaced) { + textarea.value = newTextareaText; + return true; + } + return false; } -onUiLoaded(setupExtraNetworks) -var re_extranet = /<([^:]+:[^:]+):[\d\.]+>/; -var re_extranet_g = /\s+<([^:]+:[^:]+):[\d\.]+>/g; +function cardClicked(tabname, textToAdd, allowNegativePrompt) { + const textarea = allowNegativePrompt ? activePromptTextarea[tabname] : gradioApp().querySelector(`#${tabname}_prompt > label > textarea`); + if (!tryToRemoveExtraNetworkFromPrompt(textarea, textToAdd)) textarea.value = textarea.value + opts.extra_networks_add_text_separator + textToAdd; + updateInput(textarea); +} -function tryToRemoveExtraNetworkFromPrompt(textarea, text){ - var m = text.match(re_extranet) - if(! m) return false - var partToSearch = m[1] - var replaced = false - var newTextareaText = textarea.value.replaceAll(re_extranet_g, function(found, index){ - m = found.match(re_extranet); - if(m[1] == partToSearch){ - replaced = true; - return "" - } - return found; - }) - if(replaced){ - textarea.value = newTextareaText - return true; +function saveCardPreview(event, tabname, filename) { + const textarea = gradioApp().querySelector(`#${tabname}_preview_filename > label > textarea`); + const button = gradioApp().getElementById(`${tabname}_save_preview`); + textarea.value = filename; + updateInput(textarea); + button.click(); + event.stopPropagation(); + event.preventDefault(); +} + +function saveCardDescription(event, tabname, filename, descript) { + const textarea = gradioApp().querySelector(`#${tabname}_description_filename > label > textarea`); + const button = gradioApp().getElementById(`${tabname}_save_description`); + const description = gradioApp().getElementById(`${tabname}_description_input`); + textarea.value = filename; + description.value = descript; + updateInput(textarea); + button.click(); + event.stopPropagation(); + event.preventDefault(); +} + +function readCardDescription(event, tabname, filename, descript, extraPage, cardName) { + const textarea = gradioApp().querySelector(`#${tabname}_description_filename > label > textarea`); + const description_textarea = gradioApp().querySelector(`#${tabname}_description_input > label > textarea`); + const button = gradioApp().getElementById(`${tabname}_read_description`); + textarea.value = filename; + description_textarea.value = descript; + updateInput(textarea); + updateInput(description_textarea); + button.click(); + event.stopPropagation(); + event.preventDefault(); +} + +function extraNetworksSearchButton(tabs_id, event) { + searchTextarea = gradioApp().querySelector(`#${tabs_id} > div > textarea`); + button = event.target; + text = button.classList.contains('search-all') ? '' : button.textContent.trim(); + searchTextarea.value = text; + updateInput(searchTextarea); +} + +let globalPopup = null; +let globalPopupInner = null; +function popup(contents) { + if (!globalPopup) { + globalPopup = document.createElement('div'); + globalPopup.onclick = function () { globalPopup.style.display = 'none'; }; + globalPopup.classList.add('global-popup'); + const close = document.createElement('div'); + close.classList.add('global-popup-close'); + close.onclick = function () { globalPopup.style.display = 'none'; }; + close.title = 'Close'; + globalPopup.appendChild(close); + globalPopupInner = document.createElement('div'); + globalPopupInner.onclick = function (event) { event.stopPropagation(); return false; }; + globalPopupInner.classList.add('global-popup-inner'); + globalPopup.appendChild(globalPopupInner); + gradioApp().appendChild(globalPopup); + } + globalPopupInner.innerHTML = ''; + globalPopupInner.appendChild(contents); + globalPopup.style.display = 'flex'; +} + +function readCardMetadata(event, extraPage, cardName) { + requestGet('./sd_extra_networks/metadata', { page: extraPage, item: cardName }, (data) => { + if (data && data.metadata) { + elem = document.createElement('pre'); + elem.classList.add('popup-metadata'); + elem.textContent = data.metadata; + popup(elem); } - return false + }, () => {}); + event.stopPropagation(); + event.preventDefault(); } -function cardClicked(tabname, textToAdd, allowNegativePrompt){ - var textarea = allowNegativePrompt ? activePromptTextarea[tabname] : gradioApp().querySelector("#" + tabname + "_prompt > label > textarea") - if (!tryToRemoveExtraNetworkFromPrompt(textarea, textToAdd)) textarea.value = textarea.value + opts.extra_networks_add_text_separator + textToAdd - updateInput(textarea) -} - -function saveCardPreview(event, tabname, filename){ - var textarea = gradioApp().querySelector("#" + tabname + '_preview_filename > label > textarea') - var button = gradioApp().getElementById(tabname + '_save_preview') - textarea.value = filename - updateInput(textarea) - button.click() - event.stopPropagation() - event.preventDefault() -} - -function saveCardDescription(event, tabname, filename, descript){ - var textarea = gradioApp().querySelector("#" + tabname + '_description_filename > label > textarea') - var button = gradioApp().getElementById(tabname + '_save_description') - var description = gradioApp().getElementById(tabname+ '_description_input') - textarea.value = filename - description.value=descript - updateInput(textarea) - button.click() - event.stopPropagation() - event.preventDefault() -} - -function readCardDescription(event, tabname, filename, descript, extraPage, cardName){ - var textarea = gradioApp().querySelector("#" + tabname + '_description_filename > label > textarea') - var description_textarea = gradioApp().querySelector("#" + tabname+ '_description_input > label > textarea') - var button = gradioApp().getElementById(tabname + '_read_description') - textarea.value = filename - description_textarea.value = descript - updateInput(textarea) - updateInput(description_textarea) - button.click() - event.stopPropagation() - event.preventDefault() -} - -function extraNetworksSearchButton(tabs_id, event){ - searchTextarea = gradioApp().querySelector("#" + tabs_id + ' > div > textarea') - button = event.target - text = button.classList.contains("search-all") ? "" : button.textContent.trim() - searchTextarea.value = text - updateInput(searchTextarea) -} - -var globalPopup = null; -var globalPopupInner = null; -function popup(contents){ - if(! globalPopup){ - globalPopup = document.createElement('div') - globalPopup.onclick = function(){ globalPopup.style.display = "none"; }; - globalPopup.classList.add('global-popup'); - var close = document.createElement('div') - close.classList.add('global-popup-close'); - close.onclick = function(){ globalPopup.style.display = "none"; }; - close.title = "Close"; - globalPopup.appendChild(close) - globalPopupInner = document.createElement('div') - globalPopupInner.onclick = function(event){ event.stopPropagation(); return false; }; - globalPopupInner.classList.add('global-popup-inner'); - globalPopup.appendChild(globalPopupInner) - gradioApp().appendChild(globalPopup); +function requestGet(url, data, handler, errorHandler) { + const xhr = new XMLHttpRequest(); + const args = Object.keys(data).map((k) => `${encodeURIComponent(k)}=${encodeURIComponent(data[k])}`).join('&'); + xhr.open('GET', `${url}?${args}`, true); + xhr.onreadystatechange = function () { + if (xhr.readyState === 4) { + if (xhr.status === 200) { + try { + const js = JSON.parse(xhr.responseText); + handler(js); + } catch (error) { + console.error(error); + errorHandler(); + } + } else { + errorHandler(); + } } - globalPopupInner.innerHTML = ''; - globalPopupInner.appendChild(contents); - globalPopup.style.display = "flex"; -} - -function readCardMetadata(event, extraPage, cardName){ - requestGet("./sd_extra_networks/metadata", {"page": extraPage, "item": cardName}, function(data){ - if (data && data.metadata){ - elem = document.createElement('pre') - elem.classList.add('popup-metadata'); - elem.textContent = data.metadata; - popup(elem); - } - }, () => {}) - event.stopPropagation() - event.preventDefault() -} - -function requestGet(url, data, handler, errorHandler){ - var xhr = new XMLHttpRequest(); - var args = Object.keys(data).map(function(k){ return encodeURIComponent(k) + '=' + encodeURIComponent(data[k]) }).join('&') - xhr.open("GET", url + "?" + args, true); - xhr.onreadystatechange = function () { - if (xhr.readyState === 4) { - if (xhr.status === 200) { - try { - var js = JSON.parse(xhr.responseText); - handler(js) - } catch (error) { - console.error(error); - errorHandler() - } - } else{ - errorHandler() - } - } - }; - var js = JSON.stringify(data); - xhr.send(js); + }; + const js = JSON.stringify(data); + xhr.send(js); } diff --git a/javascript/generationParams.js b/javascript/generationParams.js index 5d4f996bf..b98418406 100644 --- a/javascript/generationParams.js +++ b/javascript/generationParams.js @@ -1,30 +1,30 @@ // attaches listeners to the txt2img and img2img galleries to update displayed generation param text when the image changes -let txt2img_gallery, img2img_gallery, modal = undefined; -onUiUpdate(function(){ - if (!txt2img_gallery) txt2img_gallery = attachGalleryListeners("txt2img") - if (!img2img_gallery) img2img_gallery = attachGalleryListeners("img2img") - if (!modal) { - modal = gradioApp().getElementById('lightboxModal') - modalObserver.observe(modal, { attributes : true, attributeFilter : ['style'] }); - } +let txt2img_gallery; let img2img_gallery; let + modal; +onUiUpdate(() => { + if (!txt2img_gallery) txt2img_gallery = attachGalleryListeners('txt2img'); + if (!img2img_gallery) img2img_gallery = attachGalleryListeners('img2img'); + if (!modal) { + modal = gradioApp().getElementById('lightboxModal'); + modalObserver.observe(modal, { attributes: true, attributeFilter: ['style'] }); + } }); -let modalObserver = new MutationObserver(function(mutations) { - mutations.forEach((mutationRecord) => { - let selectedTab = gradioApp().querySelector('#tabs div button.selected')?.innerText - if (!selectedTab) selectedTab = gradioApp().querySelector('#tabs div button')?.innerText - if (mutationRecord.target.style.display === 'none' && (selectedTab === 'txt2img' || selectedTab === 'img2img')) - gradioApp().getElementById(selectedTab+"_generation_info_button")?.click() - }); +let modalObserver = new MutationObserver((mutations) => { + mutations.forEach((mutationRecord) => { + let selectedTab = gradioApp().querySelector('#tabs div button.selected')?.innerText; + if (!selectedTab) selectedTab = gradioApp().querySelector('#tabs div button')?.innerText; + if (mutationRecord.target.style.display === 'none' && (selectedTab === 'txt2img' || selectedTab === 'img2img')) { gradioApp().getElementById(`${selectedTab}_generation_info_button`)?.click(); } + }); }); function attachGalleryListeners(tab_name) { - gallery = gradioApp().querySelector('#'+tab_name+'_gallery') - gallery?.addEventListener('click', () => gradioApp().getElementById(tab_name+"_generation_info_button").click()); - gallery?.addEventListener('keydown', (e) => { - if (e.keyCode == 37 || e.keyCode == 39) // left or right arrow - gradioApp().getElementById(tab_name+"_generation_info_button").click() - }); - return gallery; + gallery = gradioApp().querySelector(`#${tab_name}_gallery`); + gallery?.addEventListener('click', () => gradioApp().getElementById(`${tab_name}_generation_info_button`).click()); + gallery?.addEventListener('keydown', (e) => { + if (e.keyCode == 37 || e.keyCode == 39) // left or right arrow + { gradioApp().getElementById(`${tab_name}_generation_info_button`).click(); } + }); + return gallery; } diff --git a/javascript/hints.js b/javascript/hints.js index f48a0eb69..61da3e357 100644 --- a/javascript/hints.js +++ b/javascript/hints.js @@ -1,147 +1,146 @@ // mouseover tooltips for various UI elements titles = { - "Sampling steps": "How many times to improve the generated image iteratively; higher values take longer; very low values can produce bad results", - "Sampling method": "Which algorithm to use to produce the image", - "GFPGAN": "Restore low quality faces using GFPGAN neural network", - "Euler a": "Euler Ancestral - very creative, each can get a completely different picture depending on step count, setting steps higher than 30-40 does not help", - "DDIM": "Denoising Diffusion Implicit Models - best at inpainting", - "UniPC": "Unified Predictor-Corrector Framework for Fast Sampling of Diffusion Models", - "DPM adaptive": "Ignores step count - uses a number of steps determined by the CFG and resolution", + 'Sampling steps': 'How many times to improve the generated image iteratively; higher values take longer; very low values can produce bad results', + 'Sampling method': 'Which algorithm to use to produce the image', + GFPGAN: 'Restore low quality faces using GFPGAN neural network', + 'Euler a': 'Euler Ancestral - very creative, each can get a completely different picture depending on step count, setting steps higher than 30-40 does not help', + DDIM: 'Denoising Diffusion Implicit Models - best at inpainting', + UniPC: 'Unified Predictor-Corrector Framework for Fast Sampling of Diffusion Models', + 'DPM adaptive': 'Ignores step count - uses a number of steps determined by the CFG and resolution', - "Batch count": "How many batches of images to create (has no impact on generation performance or VRAM usage)", - "Batch size": "How many image to create in a single batch (increases generation performance at cost of higher VRAM usage)", - "CFG Scale": "Classifier Free Guidance Scale - how strongly the image should conform to prompt - lower values produce more creative results", - "Seed": "A value that determines the output of random number generator - if you create an image with same parameters and seed as another image, you'll get the same result", - "\u{1f3b2}\ufe0f": "Set seed to -1, which will cause a new random number to be used every time", - "\u267b\ufe0f": "Reuse seed from last generation, mostly useful if it was randomed", - "\u2199\ufe0f": "Read generation parameters from prompt or last generation if prompt is empty into user interface.", - "\u{1f4c2}": "Open images output directory", - "\u{1f4be}": "Save style", - "\u{1f5d1}\ufe0f": "Clear prompt", - "\u{1f4cb}": "Apply selected styles to current prompt", - "\u{1f4d2}": "Paste available values into the field", - "\u{1f3b4}": "Show/hide extra networks", + 'Batch count': 'How many batches of images to create (has no impact on generation performance or VRAM usage)', + 'Batch size': 'How many image to create in a single batch (increases generation performance at cost of higher VRAM usage)', + 'CFG Scale': 'Classifier Free Guidance Scale - how strongly the image should conform to prompt - lower values produce more creative results', + Seed: "A value that determines the output of random number generator - if you create an image with same parameters and seed as another image, you'll get the same result", + '\u{1f3b2}\ufe0f': 'Set seed to -1, which will cause a new random number to be used every time', + '\u267b\ufe0f': 'Reuse seed from last generation, mostly useful if it was randomed', + '\u2199\ufe0f': 'Read generation parameters from prompt or last generation if prompt is empty into user interface.', + '\u{1f4c2}': 'Open images output directory', + '\u{1f4be}': 'Save style', + '\u{1f5d1}\ufe0f': 'Clear prompt', + '\u{1f4cb}': 'Apply selected styles to current prompt', + '\u{1f4d2}': 'Paste available values into the field', + '\u{1f3b4}': 'Show/hide extra networks', - "Inpaint a part of image": "Draw a mask over an image, and the script will regenerate the masked area with content according to prompt", - "SD upscale": "Upscale image normally, split result into tiles, improve each tile using img2img, merge whole image back", + 'Inpaint a part of image': 'Draw a mask over an image, and the script will regenerate the masked area with content according to prompt', + 'SD upscale': 'Upscale image normally, split result into tiles, improve each tile using img2img, merge whole image back', - "Just resize": "Resize image to target resolution. Unless height and width match, you will get incorrect aspect ratio.", - "Crop and resize": "Resize the image so that entirety of target resolution is filled with the image. Crop parts that stick out.", - "Resize and fill": "Resize the image so that entirety of image is inside target resolution. Fill empty space with image's colors.", + 'Just resize': 'Resize image to target resolution. Unless height and width match, you will get incorrect aspect ratio.', + 'Crop and resize': 'Resize the image so that entirety of target resolution is filled with the image. Crop parts that stick out.', + 'Resize and fill': "Resize the image so that entirety of image is inside target resolution. Fill empty space with image's colors.", - "Mask blur": "How much to blur the mask before processing, in pixels.", - "Masked content": "What to put inside the masked area before processing it with Stable Diffusion.", - "fill": "fill it with colors of the image", - "original": "keep whatever was there originally", - "latent noise": "fill it with latent space noise", - "latent nothing": "fill it with latent space zeroes", - "Inpaint at full resolution": "Upscale masked region to target resolution, do inpainting, downscale back and paste into original image", + 'Mask blur': 'How much to blur the mask before processing, in pixels.', + 'Masked content': 'What to put inside the masked area before processing it with Stable Diffusion.', + fill: 'fill it with colors of the image', + original: 'keep whatever was there originally', + 'latent noise': 'fill it with latent space noise', + 'latent nothing': 'fill it with latent space zeroes', + 'Inpaint at full resolution': 'Upscale masked region to target resolution, do inpainting, downscale back and paste into original image', - "Denoising strength": "Determines how little respect the algorithm should have for image's content. At 0, nothing will change, and at 1 you'll get an unrelated image. With values below 1.0, processing will take less steps than the Sampling Steps slider specifies.", - - "Skip": "Stop processing current image and continue processing.", - "Interrupt": "Stop processing images and return any results accumulated so far.", - "Save": "Write image to a directory (default - log/images) and generation parameters into csv file.", + 'Denoising strength': "Determines how little respect the algorithm should have for image's content. At 0, nothing will change, and at 1 you'll get an unrelated image. With values below 1.0, processing will take less steps than the Sampling Steps slider specifies.", - "X values": "Separate values for X axis using commas.", - "Y values": "Separate values for Y axis using commas.", + Skip: 'Stop processing current image and continue processing.', + Interrupt: 'Stop processing images and return any results accumulated so far.', + Save: 'Write image to a directory (default - log/images) and generation parameters into csv file.', - "None": "Do not do anything special", - "Prompt matrix": "Separate prompts into parts using vertical pipe character (|) and the script will create a picture for every combination of them (except for the first part, which will be present in all combinations)", - "X/Y/Z plot": "Create grid(s) where images will have different parameters. Use inputs below to specify which parameters will be shared by columns and rows", - "Custom code": "Run Python code. Advanced user only. Must run program with --allow-code for this to work", + 'X values': 'Separate values for X axis using commas.', + 'Y values': 'Separate values for Y axis using commas.', - "Prompt S/R": "Separate a list of words with commas, and the first word will be used as a keyword: script will search for this word in the prompt, and replace it with others", - "Prompt order": "Separate a list of words with commas, and the script will make a variation of prompt with those words for their every possible order", + None: 'Do not do anything special', + 'Prompt matrix': 'Separate prompts into parts using vertical pipe character (|) and the script will create a picture for every combination of them (except for the first part, which will be present in all combinations)', + 'X/Y/Z plot': 'Create grid(s) where images will have different parameters. Use inputs below to specify which parameters will be shared by columns and rows', + 'Custom code': 'Run Python code. Advanced user only. Must run program with --allow-code for this to work', - "Tiling": "Produce an image that can be tiled.", - "Tile overlap": "For SD upscale, how much overlap in pixels should there be between tiles. Tiles overlap so that when they are merged back into one picture, there is no clearly visible seam.", + 'Prompt S/R': 'Separate a list of words with commas, and the first word will be used as a keyword: script will search for this word in the prompt, and replace it with others', + 'Prompt order': 'Separate a list of words with commas, and the script will make a variation of prompt with those words for their every possible order', - "Variation seed": "Seed of a different picture to be mixed into the generation.", - "Variation strength": "How strong of a variation to produce. At 0, there will be no effect. At 1, you will get the complete picture with variation seed (except for ancestral samplers, where you will just get something).", - "Resize seed from height": "Make an attempt to produce a picture similar to what would have been produced with same seed at specified resolution", - "Resize seed from width": "Make an attempt to produce a picture similar to what would have been produced with same seed at specified resolution", + Tiling: 'Produce an image that can be tiled.', + 'Tile overlap': 'For SD upscale, how much overlap in pixels should there be between tiles. Tiles overlap so that when they are merged back into one picture, there is no clearly visible seam.', - "Interrogate": "Reconstruct prompt from existing image and put it into the prompt field.", + 'Variation seed': 'Seed of a different picture to be mixed into the generation.', + 'Variation strength': 'How strong of a variation to produce. At 0, there will be no effect. At 1, you will get the complete picture with variation seed (except for ancestral samplers, where you will just get something).', + 'Resize seed from height': 'Make an attempt to produce a picture similar to what would have been produced with same seed at specified resolution', + 'Resize seed from width': 'Make an attempt to produce a picture similar to what would have been produced with same seed at specified resolution', - "Images filename pattern": "Use following tags to define how filenames for images are chosen: [steps], [cfg], [prompt_hash], [prompt], [prompt_no_styles], [prompt_spaces], [width], [height], [styles], [sampler], [seed], [model_hash], [model_name], [prompt_words], [date], [datetime], [datetime], [datetime
""" - sort_ordering = { - "default": (True, lambda x: x.get('sort_string', '')), - "updated": (True, lambda x: x.get('updated', '2000-01-01T00:00')), - "created": (False, lambda x: x.get('created', '2000-01-01T00:00')), - "name": (False, lambda x: x.get('name', '').lower()), - "enabled": (False, lambda x: x.get('sort_enabled', '').lower()), - "size": (True, lambda x: x.get('size', 0)), - "stars": (True, lambda x: x.get('stars', 0)), - "commits": (True, lambda x: x.get('commits', 0)), - "issues": (True, lambda x: x.get('issues', 0)), - } for ext in extensions_list: extension = [extension for extension in extensions.extensions if extension.git_name == ext['name'] or extension.name == ext['name']] if len(extension) > 0: @@ -279,8 +281,6 @@ def refresh_extensions_list_from_data(search_text, sort_column): ext['enabled'] = extension[0].enabled if len(extension) > 0 else '' ext['remote'] = extension[0].remote if len(extension) > 0 else None ext['path'] = extension[0].path if len(extension) > 0 else '' - ext['sort_string'] = f"{'1' if ext['is_builtin'] else '0'}{'1' if ext['installed'] else '0'}{ext.get('updated', '2000-01-01T00:00')}" - ext['sort_enabled'] = f"{'1' if ext['enabled'] else '0'}{'1' if ext['is_builtin'] else '0'}{'1' if ext['installed'] else '0'}{ext.get('updated', '2000-01-01T00:00')}" sort_reverse, sort_function = sort_ordering[sort_column] def dt(x: str): @@ -308,6 +308,10 @@ def refresh_extensions_list_from_data(search_text, sort_column): remote = ext.get("remote", None) commit_date = ext.get("commit_date", 1577836800) or 1577836800 update_available = (remote is not None) & (installed) & (datetime.utcfromtimestamp(commit_date + 60 * 60) < datetime.fromisoformat(ext.get('updated', '2000-01-01T00:00:00.000Z')[:-1])) + ext['sort_string'] = f"{'1' if ext['is_builtin'] else '0'}{'1' if ext['installed'] else '0'}{ext.get('updated', '2000-01-01T00:00')}" + ext['sort_user'] = f"{'0' if ext['is_builtin'] else '1'}{'1' if ext['installed'] else '0'}{ext.get('name', '')}" + ext['sort_enabled'] = f"{'1' if ext['enabled'] else '0'}{'1' if ext['is_builtin'] else '0'}{'1' if ext['installed'] else '0'}{ext.get('updated', '2000-01-01T00:00')}" + ext['sort_update'] = f"{'1' if update_available else '0'}{'1' if ext['installed'] else '0'}{ext.get('updated', '2000-01-01T00:00')}" tags = ext.get("tags", []) tags_string = ' '.join(tags) tags = tags + ["installed"] if installed else tags @@ -364,7 +368,10 @@ def create_ui(): search_text = gr.Text(label="Search") info = gr.HTML('Note: After any operation such as install/uninstall or enable/disable, please restart the server') with gr.Column(scale=1): - sort_column = gr.Dropdown(value="default", label="Sort by", choices=["default", "updated", "created", "name", "size", "stars", "commits", "issues"], multiselect=False) + print('HERE1', sort_ordering) + print('HERE2', list(sort_ordering.keys())) + print('HERE2', sort_ordering.items()) + sort_column = gr.Dropdown(value="default", label="Sort by", choices=list(sort_ordering.keys()), multiselect=False) with gr.Column(scale=1): refresh_extensions_button = gr.Button(value="Refresh extension list", variant="primary") check = gr.Button(value="Update installed extensions", variant="primary") From ff4f94fc2a835665b7f69d23a003c19618a19c1d Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 16 May 2023 18:05:29 -0400 Subject: [PATCH 146/282] fixes --- javascript/aspectRatioOverlay.js | 62 +++++++++++--------------------- javascript/contextMenus.js | 12 ++----- javascript/edit-attention.js | 57 +++++++++++------------------ javascript/extensions.js | 6 ++-- javascript/ui.js | 2 +- modules/prompt_parser.py | 3 +- modules/ui_extensions.py | 3 -- 7 files changed, 50 insertions(+), 95 deletions(-) diff --git a/javascript/aspectRatioOverlay.js b/javascript/aspectRatioOverlay.js index 055d5bd7f..20984f6a4 100644 --- a/javascript/aspectRatioOverlay.js +++ b/javascript/aspectRatioOverlay.js @@ -3,31 +3,16 @@ let currentHeight = null; let arFrameTimeout = setTimeout(() => {}, 0); function dimensionChange(e, is_width, is_height) { - if (is_width) { - currentWidth = e.target.value * 1.0; - } - if (is_height) { - currentHeight = e.target.value * 1.0; - } - + if (is_width) currentWidth = e.target.value * 1.0; + if (is_height) currentHeight = e.target.value * 1.0; const inImg2img = gradioApp().querySelector('#tab_img2img').style.display === 'block'; - - if (!inImg2img) { - return; - } - + if (!inImg2img) return; let targetElement = null; - const tabIndex = get_tab_index('mode_img2img'); - if (tabIndex === 0) { // img2img - targetElement = gradioApp().querySelector('#img2img_image div[data-testid=image] img'); - } else if (tabIndex === 1) { // Sketch - targetElement = gradioApp().querySelector('#img2img_sketch div[data-testid=image] img'); - } else if (tabIndex === 2) { // Inpaint - targetElement = gradioApp().querySelector('#img2maskimg div[data-testid=image] img'); - } else if (tabIndex === 3) { // Inpaint sketch - targetElement = gradioApp().querySelector('#inpaint_sketch div[data-testid=image] img'); - } + if (tabIndex === 0) targetElement = gradioApp().querySelector('#img2img_image div[data-testid=image] img'); // img2img + else if (tabIndex === 1) targetElement = gradioApp().querySelector('#img2img_sketch div[data-testid=image] img'); // Sketch + else if (tabIndex === 2) targetElement = gradioApp().querySelector('#img2maskimg div[data-testid=image] img'); // Inpaint + else if (tabIndex === 3) targetElement = gradioApp().querySelector('#inpaint_sketch div[data-testid=image] img'); // Inpaint sketch if (targetElement) { let arPreviewRect = gradioApp().querySelector('#imageARPreview'); @@ -39,29 +24,24 @@ function dimensionChange(e, is_width, is_height) { const viewportOffset = targetElement.getBoundingClientRect(); - viewportscale = Math.min(targetElement.clientWidth / targetElement.naturalWidth, targetElement.clientHeight / targetElement.naturalHeight); + const viewportscale = Math.min(targetElement.clientWidth / targetElement.naturalWidth, targetElement.clientHeight / targetElement.naturalHeight); - scaledx = targetElement.naturalWidth * viewportscale; - scaledy = targetElement.naturalHeight * viewportscale; + const scaledx = targetElement.naturalWidth * viewportscale; + const scaledy = targetElement.naturalHeight * viewportscale; - cleintRectTop = (viewportOffset.top + window.scrollY); - cleintRectLeft = (viewportOffset.left + window.scrollX); - cleintRectCentreY = cleintRectTop + (targetElement.clientHeight / 2); - cleintRectCentreX = cleintRectLeft + (targetElement.clientWidth / 2); + const cleintRectTop = (viewportOffset.top + window.scrollY); + const cleintRectLeft = (viewportOffset.left + window.scrollX); + const cleintRectCentreY = cleintRectTop + (targetElement.clientHeight / 2); + const cleintRectCentreX = cleintRectLeft + (targetElement.clientWidth / 2); - viewRectTop = cleintRectCentreY - (scaledy / 2); - viewRectLeft = cleintRectCentreX - (scaledx / 2); - arRectWidth = scaledx; - arRectHeight = scaledy; + const arscale = Math.min(scaledx / currentWidth, scaledy / currentHeight); + const arscaledx = currentWidth * arscale; + const arscaledy = currentHeight * arscale; - arscale = Math.min(arRectWidth / currentWidth, arRectHeight / currentHeight); - arscaledx = currentWidth * arscale; - arscaledy = currentHeight * arscale; - - arRectTop = cleintRectCentreY - (arscaledy / 2); - arRectLeft = cleintRectCentreX - (arscaledx / 2); - arRectWidth = arscaledx; - arRectHeight = arscaledy; + const arRectTop = cleintRectCentreY - (arscaledy / 2); + const arRectLeft = cleintRectCentreX - (arscaledx / 2); + const arRectWidth = arscaledx; + const arRectHeight = arscaledy; arPreviewRect.style.top = `${arRectTop}px`; arPreviewRect.style.left = `${arRectLeft}px`; diff --git a/javascript/contextMenus.js b/javascript/contextMenus.js index 2296ba297..1c8d840f1 100644 --- a/javascript/contextMenus.js +++ b/javascript/contextMenus.js @@ -3,7 +3,7 @@ contextMenuInit = function () { const menuSpecs = new Map(); const uid = function () { - return Date.now().toString(36) + Math.random().toString(36).substr(2); + return Date.now().toString(36) + Math.random().toString(36).substring(2); }; function showContextMenu(event, element, menuEntries) { @@ -85,15 +85,9 @@ contextMenuInit = function () { } function addContextMenuEventListener() { - if (eventListenerApplied) { - return; - } + if (eventListenerApplied) return; gradioApp().addEventListener('click', (e) => { - const source = e.composedPath()[0]; - if (source.id && source.id.indexOf('check_progress') > -1) { - return; - } - + if (!e.isTrusted) return; const oldMenu = gradioApp().querySelector('#context-menu'); if (oldMenu) { oldMenu.remove(); diff --git a/javascript/edit-attention.js b/javascript/edit-attention.js index 594baae67..f9cac92fa 100644 --- a/javascript/edit-attention.js +++ b/javascript/edit-attention.js @@ -2,11 +2,9 @@ function keyupEditAttention(event) { const target = event.originalTarget || event.composedPath()[0]; if (!target.matches("[id*='_toprow'] [id*='_prompt'] textarea")) return; if (!(event.metaKey || event.ctrlKey)) return; - const isPlus = event.key === 'ArrowUp'; const isMinus = event.key === 'ArrowDown'; if (!isPlus && !isMinus) return; - let { selectionStart } = target; let { selectionEnd } = target; let text = target.value; @@ -15,7 +13,7 @@ function keyupEditAttention(event) { if (selectionStart !== selectionEnd) return false; // Find opening parenthesis around current cursor - const before = text.substring(0, selectionStart); + const before = text.substringing(0, selectionStart); let beforeParen = before.lastIndexOf(OPEN); if (beforeParen === -1) return false; let beforeParenClose = before.lastIndexOf(CLOSE); @@ -25,7 +23,7 @@ function keyupEditAttention(event) { } // Find closing parenthesis around current cursor - const after = text.substring(selectionStart); + const after = text.substringing(selectionStart); let afterParen = after.indexOf(CLOSE); if (afterParen === -1) return false; let afterParenOpen = after.indexOf(OPEN); @@ -36,7 +34,7 @@ function keyupEditAttention(event) { if (beforeParen === -1 || afterParen === -1) return false; // Set the selection to the text between the parenthesis - const parenContent = text.substring(beforeParen + 1, selectionStart + afterParen); + const parenContent = text.substringing(beforeParen + 1, selectionStart + afterParen); const lastColon = parenContent.lastIndexOf(':'); selectionStart = beforeParen + 1; selectionEnd = selectionStart + lastColon; @@ -47,63 +45,50 @@ function keyupEditAttention(event) { function selectCurrentWord() { if (selectionStart !== selectionEnd) return false; const delimiters = `${opts.keyedit_delimiters} \r\n\t`; - // seek backward until to find beggining - while (!delimiters.includes(text[selectionStart - 1]) && selectionStart > 0) { - selectionStart--; - } - + while (!delimiters.includes(text[selectionStart - 1]) && selectionStart > 0) selectionStart--; // seek forward to find end - while (!delimiters.includes(text[selectionEnd]) && selectionEnd < text.length) { - selectionEnd++; - } - + while (!delimiters.includes(text[selectionEnd]) && selectionEnd < text.length) selectionEnd++; target.setSelectionRange(selectionStart, selectionEnd); return true; } // If the user hasn't selected anything, let's select their current parenthesis block or word - if (!selectCurrentParenthesisBlock('<', '>') && !selectCurrentParenthesisBlock('(', ')')) { - selectCurrentWord(); - } - + if (!selectCurrentParenthesisBlock('<', '>') && !selectCurrentParenthesisBlock('(', ')')) selectCurrentWord(); event.preventDefault(); - closeCharacter = ')'; - delta = opts.keyedit_precision_attention; + let closeCharacter = ')'; + let delta = opts.keyedit_precision_attention; if (selectionStart > 0 && text[selectionStart - 1] === '<') { closeCharacter = '>'; delta = opts.keyedit_precision_extra; - } else if (selectionStart === 0 || text[selectionStart - 1] != '(') { - // do not include spaces at the end - while (selectionEnd > selectionStart && text[selectionEnd - 1] === ' ') { - selectionEnd -= 1; - } - if (selectionStart === selectionEnd) { - return; - } - + } else if (selectionStart === 0 || text[selectionStart - 1] !== '(') { + while (selectionEnd > selectionStart && text[selectionEnd - 1] === ' ') selectionEnd -= 1; + if (selectionStart === selectionEnd) return; text = `${text.slice(0, selectionStart)}(${text.slice(selectionStart, selectionEnd)}:1.0)${text.slice(selectionEnd)}`; - selectionStart += 1; selectionEnd += 1; } - end = text.slice(selectionEnd + 1).indexOf(closeCharacter) + 1; - weight = parseFloat(text.slice(selectionEnd + 1, selectionEnd + 1 + end)); - if (isNaN(weight)) return; + const end = text.slice(selectionEnd + 1).indexOf(closeCharacter) + 1; + let weight = parseFloat(text.slice(selectionEnd + 1, selectionEnd + 1 + end)); + if (Number.isNaN(weight)) return; weight += isPlus ? delta : -delta; weight = parseFloat(weight.toPrecision(12)); if (String(weight).length === 1) weight += '.0'; - if (closeCharacter === ')' && weight === 1) { + console.log('HERE', closeCharacter, weight); + if (closeCharacter == ')' && weight == 1) { + console.log('HERE2'); text = text.slice(0, selectionStart - 1) + text.slice(selectionStart, selectionEnd) + text.slice(selectionEnd + 5); selectionStart--; selectionEnd--; + console.log('HERE2', text); } else { text = text.slice(0, selectionEnd + 1) + weight + text.slice(selectionEnd + 1 + end - 1); + console.log('HERE3', text); } target.focus(); @@ -114,6 +99,4 @@ function keyupEditAttention(event) { updateInput(target); } -addEventListener('keydown', (event) => { - keyupEditAttention(event); -}); +addEventListener('keydown', (event) => keyupEditAttention(event)); diff --git a/javascript/extensions.js b/javascript/extensions.js index d6d937fd6..9f5348a93 100644 --- a/javascript/extensions.js +++ b/javascript/extensions.js @@ -3,8 +3,8 @@ function extensions_apply(extensions_disabled_list, extensions_update_list, disa const disable = []; const update = []; gradioApp().querySelectorAll('#extensions input[type="checkbox"]').forEach((x) => { - if (x.name.startsWith('enable_') && !x.checked) disable.push(x.name.substr(7)); - if (x.name.startsWith('update_') && x.checked) update.push(x.name.substr(7)); + if (x.name.startsWith('enable_') && !x.checked) disable.push(x.name.substring(7)); + if (x.name.startsWith('update_') && x.checked) update.push(x.name.substring(7)); }); restart_reload(); return [JSON.stringify(disable), JSON.stringify(update), disable_all]; @@ -14,7 +14,7 @@ function extensions_check(info, extensions_disabled_list, search_text, sort_colu console.log('Extensions check:', info, extensions_disabled_list); const disable = []; gradioApp().querySelectorAll('#extensions input[type="checkbox"]').forEach((x) => { - if (x.name.startsWith('enable_') && !x.checked) disable.push(x.name.substr(7)); + if (x.name.startsWith('enable_') && !x.checked) disable.push(x.name.substring(7)); }); // gradioApp().querySelectorAll('#extensions .extension_status').forEach((x) => { // x.innerHTML = 'Loading...'; diff --git a/javascript/ui.js b/javascript/ui.js index 9e1b8a52b..1a0aa6c19 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -247,7 +247,7 @@ onUiUpdate(() => { onOptionsChanged(() => { const elem = gradioApp().getElementById('sd_checkpoint_hash'); const sd_checkpoint_hash = opts.sd_checkpoint_hash || ''; - const shorthash = sd_checkpoint_hash.substr(0, 10); + const shorthash = sd_checkpoint_hash.substring(0, 10); if (elem && elem.textContent !== shorthash) { elem.textContent = shorthash; diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py index f6aae881c..d7e817f13 100644 --- a/modules/prompt_parser.py +++ b/modules/prompt_parser.py @@ -323,7 +323,8 @@ if __name__ == "__main__": # import os # import sys # sys.path.append(os.path.join(os.path.dirname(__file__), '..')) - input_text = "(upzero) (upone:1.1), ((uptwo:1.2)), [downzero], [downone:0.9], [[downtwo:0.8]], this is a test" + # input_text = "(upzero) (upone:1.1), ((uptwo:1.2)), [downzero], [downone:0.9], [[downtwo:0.8]], this is a test" + input_text = 'a (white (lion:1.4)), cat [mouse] [tiger:0.8], (high) in a jungle' output_list = parse_prompt_attention(input_text) print('INPUT', input_text) print('OUTPUT', output_list) diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py index 23db404da..9cb78a4df 100644 --- a/modules/ui_extensions.py +++ b/modules/ui_extensions.py @@ -368,9 +368,6 @@ def create_ui(): search_text = gr.Text(label="Search") info = gr.HTML('Note: After any operation such as install/uninstall or enable/disable, please restart the server') with gr.Column(scale=1): - print('HERE1', sort_ordering) - print('HERE2', list(sort_ordering.keys())) - print('HERE2', sort_ordering.items()) sort_column = gr.Dropdown(value="default", label="Sort by", choices=list(sort_ordering.keys()), multiselect=False) with gr.Column(scale=1): refresh_extensions_button = gr.Button(value="Refresh extension list", variant="primary") From 0dbca33cacd7cf1fb2a27bf0723dd0be0a156453 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 16 May 2023 21:19:03 -0400 Subject: [PATCH 147/282] fix js --- javascript/edit-attention.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/javascript/edit-attention.js b/javascript/edit-attention.js index f9cac92fa..059685fc0 100644 --- a/javascript/edit-attention.js +++ b/javascript/edit-attention.js @@ -13,7 +13,7 @@ function keyupEditAttention(event) { if (selectionStart !== selectionEnd) return false; // Find opening parenthesis around current cursor - const before = text.substringing(0, selectionStart); + const before = text.substring(0, selectionStart); let beforeParen = before.lastIndexOf(OPEN); if (beforeParen === -1) return false; let beforeParenClose = before.lastIndexOf(CLOSE); @@ -23,7 +23,7 @@ function keyupEditAttention(event) { } // Find closing parenthesis around current cursor - const after = text.substringing(selectionStart); + const after = text.substring(selectionStart); let afterParen = after.indexOf(CLOSE); if (afterParen === -1) return false; let afterParenOpen = after.indexOf(OPEN); @@ -34,7 +34,7 @@ function keyupEditAttention(event) { if (beforeParen === -1 || afterParen === -1) return false; // Set the selection to the text between the parenthesis - const parenContent = text.substringing(beforeParen + 1, selectionStart + afterParen); + const parenContent = text.substring(beforeParen + 1, selectionStart + afterParen); const lastColon = parenContent.lastIndexOf(':'); selectionStart = beforeParen + 1; selectionEnd = selectionStart + lastColon; From 5250ba4be34519194629ed74acb8c5333e311156 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 16 May 2023 21:20:36 -0400 Subject: [PATCH 148/282] force no-half with directml --- modules/devices.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/devices.py b/modules/devices.py index bba06b4d4..de0bd6fd5 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -114,8 +114,9 @@ def set_cuda_params(): pass global dtype, dtype_vae, dtype_unet, unet_needs_upcast # pylint: disable=global-statement ok = test_fp16() - # if shared.cmd_opts.use_directml: # TODO - # shared.opts.no_half = True + if shared.cmd_opts.use_directml: # TODO + shared.opts.no_half = True + shared.opts.no_half_vae = True if ok and shared.opts.cuda_dtype == 'FP32': shared.log.info('CUDA FP16 test passed but desired mode is set to FP32') if shared.opts.cuda_dtype == 'FP16' and ok: From f6f1a73b39e4cae6468de4cb90d99481370fe99d Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 17 May 2023 06:15:18 -0400 Subject: [PATCH 149/282] minor fixes --- extensions-builtin/a1111-sd-webui-lycoris | 2 +- installer.py | 4 +++- javascript/black-orange.css | 4 +++- launch.py | 2 +- modules/cmd_args.py | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/extensions-builtin/a1111-sd-webui-lycoris b/extensions-builtin/a1111-sd-webui-lycoris index 1f3e452c3..b0d24ca64 160000 --- a/extensions-builtin/a1111-sd-webui-lycoris +++ b/extensions-builtin/a1111-sd-webui-lycoris @@ -1 +1 @@ -Subproject commit 1f3e452c314e7b1dd903f723d3c552702519f4a3 +Subproject commit b0d24ca645b6a5cb9752169691a1c6385c6fe6ae diff --git a/installer.py b/installer.py index 65dd59b96..6f6ea7035 100644 --- a/installer.py +++ b/installer.py @@ -236,7 +236,9 @@ def check_torch(): xformers_package = os.environ.get('XFORMERS_PACKAGE', 'none') else: machine = platform.machine() - if allow_directml and ('arm' not in machine and 'aarch' not in machine and args.use_directml): + if sys.platform == 'darwin': + torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.0.0 torchvision==0.15.1') + elif allow_directml and args.use_directml and ('arm' not in machine and 'aarch' not in machine): log.info('Using DirectML Backend') torch_command = os.environ.get('TORCH_COMMAND', 'torch-directml') xformers_package = os.environ.get('XFORMERS_PACKAGE', 'none') diff --git a/javascript/black-orange.css b/javascript/black-orange.css index a24a86b3f..034a352a5 100644 --- a/javascript/black-orange.css +++ b/javascript/black-orange.css @@ -81,7 +81,9 @@ svg.feather.feather-image, .feather .feather-image { display: none } #quicksettings .gr-button-tool { font-size: 1.6rem; box-shadow: none; margin-left: -20px; margin-top: -2px; height: 2.4em; } #quicksettings > div, #quicksettings > fieldset { min-width: 24em; max-width: 26em; line-height: 2em; } #refresh_sd_model_checkpoint { height: 48px; margin-left: -14px; background: #333333; box-shadow: none; } -#refresh_txt2img_styles, #refresh_img2img_styles, #open_folder_txt2img, #open_folder_img2img, #open_folder_extras, #footer, #style_pos_col, #style_neg_col, #roll_col, #extras_upscaler_2, #extras_upscaler_2_visibility, #txt2img_seed_resize_from_w, #txt2img_seed_resize_from_h { display: none; } +#open_folder_extras, #footer, #style_pos_col, #style_neg_col, #roll_col, #extras_upscaler_2, #extras_upscaler_2_visibility, #txt2img_seed_resize_from_w, #txt2img_seed_resize_from_h { display: none; } +#refresh_txt2img_styles, #refresh_img2img_styles { height: 40px; } +#open_folder_txt2img, #open_folder_img2img { } #save-animation { border-radius: 0 !important; margin-bottom: 16px; background-color: #111111; } #script_list { padding: 4px; margin-top: 20px; margin-bottom: 20px; } #settings > div.flex-wrap { width: 15em; } diff --git a/launch.py b/launch.py index b9081a939..4a38f9eeb 100644 --- a/launch.py +++ b/launch.py @@ -11,8 +11,8 @@ sys.argv += shlex.split(commandline_args) import installer installer.add_args() installer.ensure_base_requirements() -installer.extensions_preload(force=False) installer.parse_args() +installer.extensions_preload(force=False) import modules.cmd_args args, _ = modules.cmd_args.parser.parse_known_args() diff --git a/modules/cmd_args.py b/modules/cmd_args.py index 8b5441bba..e4a209dce 100644 --- a/modules/cmd_args.py +++ b/modules/cmd_args.py @@ -86,7 +86,8 @@ def compatibility_args(opts, args): group.add_argument("--sub-quad-chunk-threshold", help=argparse.SUPPRESS, default=opts.sub_quad_chunk_threshold) group.add_argument("--lora-dir", help=argparse.SUPPRESS, default=opts.lora_dir) group.add_argument("--lyco-dir", help=argparse.SUPPRESS, default=opts.lyco_dir) - group.add_argument("--enable-console-prompts", help=argparse.SUPPRESS, default=False) + group.add_argument("--enable-console-prompts", help=argparse.SUPPRESS, action='store_true', default=False) + group.add_argument("--safe", help=argparse.SUPPRESS, action='store_true', default=False) # removed opts are added here with fixed values for compatibility reasons opts.use_old_emphasis_implementation = False From 6936804474243b345f765942062110f6bdd5cc37 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 17 May 2023 07:07:51 -0400 Subject: [PATCH 150/282] add compatiblity prompt parser --- TODO.md | 2 ++ modules/prompt_parser.py | 38 +++++++++++++++++++++++++++++++++----- modules/shared.py | 1 + 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/TODO.md b/TODO.md index 566a10f0c..f60e0cb12 100644 --- a/TODO.md +++ b/TODO.md @@ -67,3 +67,5 @@ Tech that can be integrated as part of the core workflow... - add `--safe` mode which skips loading user extensions please try to use it before opening new issue +- add option in settings: **Prompt attention parser** + to allow for backward compatibility with a1111 (broken) parser diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py index d7e817f13..e73baa943 100644 --- a/modules/prompt_parser.py +++ b/modules/prompt_parser.py @@ -4,7 +4,7 @@ from collections import namedtuple from typing import List import lark import torch -from installer import log +from modules.shared import log, opts # a prompt like this: "fantasy landscape with a [mountain:lake:0.25] and [an oak:a christmas tree:0.75][ in foreground::0.6][ in background:0.25] [shoddy:masterful:0.5]" # will be represented with prompt_schedule like this (assuming steps=100): @@ -34,13 +34,29 @@ plain: /([^\\\[\]():|]|\\.)+/ re_clean = re.compile(r"^\W+", re.S) re_whitespace = re.compile(r"\s+", re.S) re_break = re.compile(r"\s*\bBREAK\b\s*", re.S) -re_attention = re.compile(r""" +re_attention_v2 = re.compile(r""" \(|\[|\\\(|\\\[|\\|\\\\| :([+-]?[.\d]+)| \)|\]|\\\)|\\\]| [^\(\)\[\]:]+| : """, re.X) +re_attention_v1 = re.compile(r""" +\\\(| +\\\)| +\\\[| +\\]| +\\\\| +\\| +\(| +\[| +:([+-]?[.\d]+)\)| +\)| +]| +[^\\()\[\]:]+| +: +""", re.X) + def get_learned_conditioning_prompt_schedules(prompts, steps): @@ -272,9 +288,20 @@ def parse_prompt_attention(text): res = [] round_brackets = [] square_brackets = [] + if opts.prompt_attention == 'Fixed attention': + return [[text, 1.0]] + elif opts.prompt_attention == 'Original parser': + re_attention = re_attention_v1 + whitespace = '' + else: + re_attention = re_attention_v2 + text = text.replace('\\n', ' ') + whitespace = ' ' + def multiply_range(start_position, multiplier): for p in range(start_position, len(res)): res[p][1] *= multiplier + for m in re_attention.finditer(text): text = m.group(0) weight = m.group(1) @@ -295,8 +322,9 @@ def parse_prompt_attention(text): else: parts = re.split(re_break, text) for i, part in enumerate(parts): - part = re_clean.sub("", part) - part = re_whitespace.sub(" ", part).strip() + if opts.prompt_attention == 'Full parser': + part = re_clean.sub("", part) + part = re_whitespace.sub(" ", part).strip() if len(part) == 0: continue if i > 0: @@ -312,7 +340,7 @@ def parse_prompt_attention(text): i = 0 while i + 1 < len(res): if res[i][1] == res[i + 1][1]: - res[i][0] += res[i + 1][0] + res[i][0] += whitespace + res[i + 1][0] res.pop(i + 1) else: i += 1 diff --git a/modules/shared.py b/modules/shared.py index afb3488a0..0a22729fe 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -254,6 +254,7 @@ options_templates.update(options_section(('sd', "Stable Diffusion"), { "sub_quad_kv_chunk_size": OptionInfo(512, "Sub-quadratic cross-attentionkv chunk size for the sub-quadratic cross-attention layer optimization to use", gr.Slider, {"minimum": 0, "maximum": 8192, "step": 8}), "sub_quad_chunk_threshold": OptionInfo(80, "Sub-quadratic cross-attention percentage of VRAM chunking threshold", gr.Slider, {"minimum": 0, "maximum": 100, "step": 1}), "always_batch_cond_uncond": OptionInfo(False, "Disables cond/uncond batching that is enabled to save memory with --medvram or --lowvram"), + "prompt_attention": OptionInfo("Full parser", "Prompt attention parser", gr.Radio, lambda: {"choices": ["Fixed attention", "Original parser", "Full parser"] }), })) options_templates.update(options_section(('system-paths', "System Paths"), { From 6c271dcfc6942afb2db936377457dd24ac41f03b Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 17 May 2023 07:16:11 -0400 Subject: [PATCH 151/282] update default samplers --- modules/sd_samplers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sd_samplers.py b/modules/sd_samplers.py index e03af74d2..84ae96576 100644 --- a/modules/sd_samplers.py +++ b/modules/sd_samplers.py @@ -6,7 +6,7 @@ all_samplers = [ *sd_samplers_compvis.samplers_data_compvis, ] all_samplers_map = {x.name: x for x in all_samplers} -samplers = [] +samplers = ['PLMS', 'UniPC'] # set default to keep some extensions happy samplers_for_img2img = [] samplers_map = {} From 616553220b5992ac5f0e2222afd176c578bfc079 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 17 May 2023 07:42:41 -0400 Subject: [PATCH 152/282] debug print params list --- modules/extras.py | 48 +++------------------------------------------- modules/img2img.py | 2 +- modules/txt2img.py | 2 +- test.py | 14 -------------- 4 files changed, 5 insertions(+), 61 deletions(-) delete mode 100644 test.py diff --git a/modules/extras.py b/modules/extras.py index 04f921a32..1db100dec 100644 --- a/modules/extras.py +++ b/modules/extras.py @@ -12,6 +12,9 @@ import safetensors.torch from modules import shared, images, sd_models, sd_vae, sd_models_config +checkpoint_dict_skip_on_merge = ["cond_stage_model.transformer.text_model.embeddings.position_ids"] + + def run_pnginfo(image): if image is None: return '', '', '' @@ -31,7 +34,6 @@ def create_config(ckpt_result, config_source, a, b, c): def config(x): res = sd_models_config.find_checkpoint_config_near_filename(x) if x else None return res if res != shared.sd_default_config else None - if config_source == 0: cfg = config(a) or config(b) or config(c) elif config_source == 1: @@ -48,9 +50,6 @@ def create_config(ckpt_result, config_source, a, b, c): shutil.copyfile(cfg, checkpoint_filename) -checkpoint_dict_skip_on_merge = ["cond_stage_model.transformer.text_model.embeddings.position_ids"] - - def to_half(tensor, enable): if enable and tensor.dtype == torch.float: return tensor.half() @@ -80,7 +79,6 @@ def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_ b = secondary_model_info.model_name Ma = round(1 - multiplier, 2) Mb = round(multiplier, 2) - return f"{Ma}({a}) + {Mb}({b})" def filename_add_difference(): @@ -88,7 +86,6 @@ def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_ b = secondary_model_info.model_name c = tertiary_model_info.model_name M = round(multiplier, 2) - return f"{a} + {M}({b} - {c})" def filename_nothing(): @@ -101,71 +98,53 @@ def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_ } filename_generator, theta_func1, theta_func2 = theta_funcs[interp_method] shared.state.job_count = (1 if theta_func1 else 0) + (1 if theta_func2 else 0) - if not primary_model_name: return fail("Failed: Merging requires a primary model.") - primary_model_info = sd_models.checkpoints_list[primary_model_name] - if theta_func2 and not secondary_model_name: return fail("Failed: Merging requires a secondary model.") - secondary_model_info = sd_models.checkpoints_list[secondary_model_name] if theta_func2 else None - if theta_func1 and not tertiary_model_name: return fail(f"Failed: Interpolation method ({interp_method}) requires a tertiary model.") - tertiary_model_info = sd_models.checkpoints_list[tertiary_model_name] if theta_func1 else None - result_is_inpainting_model = False result_is_instruct_pix2pix_model = False - if theta_func2: shared.state.textinfo = "Loading B" shared.log.info(f"Loading {secondary_model_info.filename}...") theta_1 = sd_models.read_state_dict(secondary_model_info.filename) else: theta_1 = None - if theta_func1: shared.state.textinfo = "Loading C" shared.log.info(f"Loading {tertiary_model_info.filename}...") theta_2 = sd_models.read_state_dict(tertiary_model_info.filename) - shared.state.textinfo = 'Merging B and C' shared.state.sampling_steps = len(theta_1.keys()) for key in tqdm.tqdm(theta_1.keys()): if key in checkpoint_dict_skip_on_merge: continue - if 'model' in key: if key in theta_2: t2 = theta_2.get(key, torch.zeros_like(theta_1[key])) theta_1[key] = theta_func1(theta_1[key], t2) else: theta_1[key] = torch.zeros_like(theta_1[key]) - shared.state.sampling_step += 1 del theta_2 - shared.state.nextjob() - shared.state.textinfo = f"Loading {primary_model_info.filename}..." shared.log.info(f"Loading {primary_model_info.filename}...") theta_0 = sd_models.read_state_dict(primary_model_info.filename) - shared.log.info("Merging...") shared.state.textinfo = 'Merging A and B' shared.state.sampling_steps = len(theta_0.keys()) for key in tqdm.tqdm(theta_0.keys()): if theta_1 and 'model' in key and key in theta_1: - if key in checkpoint_dict_skip_on_merge: continue - a = theta_0[key] b = theta_1[key] - # this enables merging an inpainting model (A) with another one (B); # where normal model would have 4 channels, for latenst space, inpainting model would # have another 4 channels for unmasked picture's latent space, plus one channel for mask, for a total of 9 @@ -174,7 +153,6 @@ def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_ raise RuntimeError("When merging inpainting model with a normal one, A must be the inpainting model.") if a.shape[1] == 4 and b.shape[1] == 8: raise RuntimeError("When merging instruct-pix2pix model with a normal one, A must be the instruct-pix2pix model.") - if a.shape[1] == 8 and b.shape[1] == 4:#If we have an Instruct-Pix2Pix model... theta_0[key][:, 0:4, :, :] = theta_func2(a[:, 0:4, :, :], b, multiplier)#Merge only the vectors the models have in common. Otherwise we get an error due to dimension mismatch. result_is_instruct_pix2pix_model = True @@ -184,50 +162,36 @@ def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_ result_is_inpainting_model = True else: theta_0[key] = theta_func2(a, b, multiplier) - theta_0[key] = to_half(theta_0[key], save_as_half) - shared.state.sampling_step += 1 - del theta_1 - bake_in_vae_filename = sd_vae.vae_dict.get(bake_in_vae, None) if bake_in_vae_filename is not None: shared.log.info(f"Baking in VAE from {bake_in_vae_filename}") shared.state.textinfo = 'Baking in VAE' vae_dict = sd_vae.load_vae_dict(bake_in_vae_filename) - for key in vae_dict.keys(): theta_0_key = 'first_stage_model.' + key if theta_0_key in theta_0: theta_0[theta_0_key] = to_half(vae_dict[key], save_as_half) - del vae_dict - if save_as_half and not theta_func2: for key in theta_0.keys(): theta_0[key] = to_half(theta_0[key], save_as_half) - if discard_weights: regex = re.compile(discard_weights) for key in list(theta_0): if re.search(regex, key): theta_0.pop(key, None) - ckpt_dir = shared.opts.ckpt_dir or sd_models.model_path - filename = filename_generator() if custom_name == '' else custom_name filename += ".inpainting" if result_is_inpainting_model else "" filename += ".instruct-pix2pix" if result_is_instruct_pix2pix_model else "" filename += "." + checkpoint_format - output_modelname = os.path.join(ckpt_dir, filename) - shared.state.nextjob() shared.state.textinfo = "Saving" - metadata = {"format": "pt", "sd_merge_models": {}, "sd_merge_recipe": None} - if save_metadata: merge_recipe = { "type": "webui", # indicate this model was merged with webui's built-in merger @@ -253,7 +217,6 @@ def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_ "legacy_hash": checkpoint_info.hash, "sd_merge_recipe": checkpoint_info.metadata.get("sd_merge_recipe", None) } - metadata["sd_merge_models"].update(checkpoint_info.metadata.get("sd_merge_models", {})) add_model_metadata(primary_model_info) @@ -261,7 +224,6 @@ def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_ add_model_metadata(secondary_model_info) if tertiary_model_info: add_model_metadata(tertiary_model_info) - metadata["sd_merge_models"] = json.dumps(metadata["sd_merge_models"]) _, extension = os.path.splitext(output_modelname) @@ -269,16 +231,12 @@ def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_ safetensors.torch.save_file(theta_0, output_modelname, metadata=metadata) else: torch.save(theta_0, output_modelname) - sd_models.list_models() created_model = next((ckpt for ckpt in sd_models.checkpoints_list.values() if ckpt.name == filename), None) if created_model: created_model.calculate_shorthash() - create_config(output_modelname, config_source, primary_model_info, secondary_model_info, tertiary_model_info) - shared.log.info(f"Checkpoint saved to {output_modelname}.") shared.state.textinfo = "Checkpoint saved" shared.state.end() - return [*[gr.Dropdown.update(choices=sd_models.checkpoint_tiles()) for _ in range(4)], "Checkpoint saved to " + output_modelname] diff --git a/modules/img2img.py b/modules/img2img.py index be197282c..34c0dd168 100644 --- a/modules/img2img.py +++ b/modules/img2img.py @@ -69,7 +69,7 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s if shared.sd_model is None: shared.log.warning('Model not loaded') return - shared.log.debug(f'img2img: {id_task}|{mode}|{prompt}|{negative_prompt}|{prompt_styles}|{init_img}|{sketch}|{init_img_with_mask}|{inpaint_color_sketch}|{inpaint_color_sketch_orig}|{init_img_inpaint}|{init_mask_inpaint}|{steps}|{sampler_index}|{mask_blur}|{mask_alpha}|{inpainting_fill}|{restore_faces}|{tiling}|{n_iter}|{batch_size}|{cfg_scale}|{image_cfg_scale}|{denoising_strength}|{seed}|{subseed}|{subseed_strength}|{seed_resize_from_h}|{seed_resize_from_w}|{seed_enable_extras}|{selected_scale_tab}|{height}|{width}|{scale_by}|{resize_mode}|{inpaint_full_res}|{inpaint_full_res_padding}|{inpainting_mask_invert}|{img2img_batch_input_dir}|{img2img_batch_output_dir}|{img2img_batch_inpaint_mask_dir}|{override_settings_texts}') + shared.log.debug(f'img2img: id_task={id_task}|mode={mode}|prompt={prompt}|negative_prompt={negative_prompt}|prompt_styles={prompt_styles}|init_img={init_img}|sketch={sketch}|init_img_with_mask={init_img_with_mask}|inpaint_color_sketch={inpaint_color_sketch}|inpaint_color_sketch_orig={inpaint_color_sketch_orig}|init_img_inpaint={init_img_inpaint}|init_mask_inpaint={init_mask_inpaint}|steps={steps}|sampler_index={sampler_index}|mask_blur={mask_blur}|mask_alpha={mask_alpha}|inpainting_fill={inpainting_fill}|restore_faces={restore_faces}|tiling={tiling}|n_iter={n_iter}|batch_size={batch_size}|cfg_scale={cfg_scale}|image_cfg_scale={image_cfg_scale}|denoising_strength={denoising_strength}|seed={seed}|subseed{subseed}|subseed_strength={subseed_strength}|seed_resize_from_h={seed_resize_from_h}|seed_resize_from_w={seed_resize_from_w}|seed_enable_extras={seed_enable_extras}|selected_scale_tab={selected_scale_tab}|height={height}|width={width}|scale_by={scale_by}|resize_mode={resize_mode}|inpaint_full_res={inpaint_full_res}|inpaint_full_res_padding={inpaint_full_res_padding}|inpainting_mask_invert={inpainting_mask_invert}|img2img_batch_input_dir={img2img_batch_input_dir}|img2img_batch_output_dir={img2img_batch_output_dir}|img2img_batch_inpaint_mask_dir={img2img_batch_inpaint_mask_dir}|override_settings_texts={override_settings_texts}') if sampler_index is None: shared.log.warning('Selected sampler is not enabled') diff --git a/modules/txt2img.py b/modules/txt2img.py index f18b133d5..2ee6f4667 100644 --- a/modules/txt2img.py +++ b/modules/txt2img.py @@ -12,7 +12,7 @@ def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, step if shared.sd_model is None: shared.log.warning('Model not loaded') return - shared.log.debug(f'txt2img: {id_task}|{prompt}|{negative_prompt}|{prompt_styles}|{steps}|{sampler_index}|{restore_faces}|{tiling}|{n_iter}|{batch_size}|{cfg_scale}|{seed}|{subseed}|{subseed_strength}|{seed_resize_from_h}|{seed_resize_from_w}|{seed_enable_extras}|{height}|{width}|{enable_hr}|{denoising_strength}|{hr_scale}|{hr_upscaler}|{hr_second_pass_steps}|{hr_resize_x}|{hr_resize_y}|{override_settings_texts}') + shared.log.debug(f'txt2img: id_task={id_task}|prompt={prompt}|negative_prompt={negative_prompt}|prompt_styles={prompt_styles}|steps={steps}|sampler_index={sampler_index}|restore_faces={restore_faces}|tiling={tiling}|n_iter={n_iter}|batch_size={batch_size}|cfg_scale={cfg_scale}|seed={seed}|subseed={subseed}|subseed_strength={subseed_strength}|seed_resize_from_h={seed_resize_from_h}|seed_resize_from_w={seed_resize_from_w}|seed_enable_extras={seed_enable_extras}|height={height}|width={width}|enable_hr={enable_hr}|denoising_strength={denoising_strength}|hr_scale={hr_scale}|hr_upscaler={hr_upscaler}|hr_second_pass_steps={hr_second_pass_steps}|hr_resize_x={hr_resize_x}|hr_resize_y={hr_resize_y}|override_settings_texts={override_settings_texts}') if sampler_index is None: shared.log.warning('Selected sampler is not enabled') sampler_index = 0 diff --git a/test.py b/test.py deleted file mode 100644 index cd30cba8c..000000000 --- a/test.py +++ /dev/null @@ -1,14 +0,0 @@ -import re - -re_attention = re.compile(r""" -\(|\[|\\\(|\\\[|\\|\\\\| -:([+-]?[.\d]+)| -\)|\]|\\\)|\\\]| -[^\(\)\[\]:]+| -: -""", re.X) - -texts = ["car:2.0", "(car:1.1)", "((car:1.2))", "[car:0.9]", "[[car:0.8]]"] -for text in texts: - for m in re_attention.finditer(text): - print(text, '0:', m.group(0), '1:', m.group(1)) From 1ef3c69804605091f9822795ba2b31fb7f827a2f Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 17 May 2023 08:29:04 -0400 Subject: [PATCH 153/282] add compel parser --- TODO.md | 7 ------- modules/prompt_parser.py | 18 +++++++++++++++--- modules/shared.py | 2 +- requirements.txt | 1 + 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/TODO.md b/TODO.md index f60e0cb12..f9da5b122 100644 --- a/TODO.md +++ b/TODO.md @@ -14,26 +14,19 @@ Stuff to be added... - Add `Gradio` theme maker - Create new `GitHub` hooks/actions for CI/CD - Monitor file changes for misbehaving extensions -- Kitchen theme: -- Lightbox improvements -- Check duplicate extensions - Reload browser on server restart -- Gradio 3.28.4 when ready - Remove origin wiki - Import core repos - Import rembg - Improve core `Stability-AI` code: - Improve core `k-Diffusion` code -- Update and mdularize `cli` scripts ## Investigate Stuff to be investigated... -- Torch Compile - TXT2IMG: - `TensorRT` -- [Temporal Weighing](https://github.com/comfyanonymous/ComfyUI/discussions/473) ## Merge PRs diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py index e73baa943..730a7174c 100644 --- a/modules/prompt_parser.py +++ b/modules/prompt_parser.py @@ -4,6 +4,7 @@ from collections import namedtuple from typing import List import lark import torch +from compel import Compel from modules.shared import log, opts # a prompt like this: "fantasy landscape with a [mountain:lake:0.25] and [an oak:a christmas tree:0.75][ in foreground::0.6][ in background:0.25] [shoddy:masterful:0.5]" @@ -289,8 +290,19 @@ def parse_prompt_attention(text): round_brackets = [] square_brackets = [] if opts.prompt_attention == 'Fixed attention': - return [[text, 1.0]] - elif opts.prompt_attention == 'Original parser': + res = [[text, 1.0]] + log.debug(f'Prompt parse-attention: {opts.prompt_attention} {res}') + return res + elif opts.prompt_attention == 'Compel parser': + conjunction = Compel.parse_prompt_string(text) + if conjunction is None or conjunction.prompts is None or conjunction.prompts is None or len(conjunction.prompts[0].children) == 0: + return [["", 1.0]] + res = [] + for frag in conjunction.prompts[0].children: + res.append([frag.text, frag.weight]) + log.debug(f'Prompt parse-attention: {opts.prompt_attention} {res}') + return res + elif opts.prompt_attention == 'A1111 parser': re_attention = re_attention_v1 whitespace = '' else: @@ -344,7 +356,7 @@ def parse_prompt_attention(text): res.pop(i + 1) else: i += 1 - log.debug(f'Prompt parse-attention: {res}') + log.debug(f'Prompt parse-attention: {opts.prompt_attention} {res}') return res if __name__ == "__main__": diff --git a/modules/shared.py b/modules/shared.py index 0a22729fe..832f9b43c 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -254,7 +254,7 @@ options_templates.update(options_section(('sd', "Stable Diffusion"), { "sub_quad_kv_chunk_size": OptionInfo(512, "Sub-quadratic cross-attentionkv chunk size for the sub-quadratic cross-attention layer optimization to use", gr.Slider, {"minimum": 0, "maximum": 8192, "step": 8}), "sub_quad_chunk_threshold": OptionInfo(80, "Sub-quadratic cross-attention percentage of VRAM chunking threshold", gr.Slider, {"minimum": 0, "maximum": 100, "step": 1}), "always_batch_cond_uncond": OptionInfo(False, "Disables cond/uncond batching that is enabled to save memory with --medvram or --lowvram"), - "prompt_attention": OptionInfo("Full parser", "Prompt attention parser", gr.Radio, lambda: {"choices": ["Fixed attention", "Original parser", "Full parser"] }), + "prompt_attention": OptionInfo("Full parser", "Prompt attention parser", gr.Radio, lambda: {"choices": ["Full parser", "Compel parser", "A1111 parser", "Fixed attention"] }), })) options_templates.update(options_section(('system-paths', "System Paths"), { diff --git a/requirements.txt b/requirements.txt index 20a11c774..b064b4587 100644 --- a/requirements.txt +++ b/requirements.txt @@ -45,6 +45,7 @@ voluptuous yapf scikit-image basicsr +compel requests==2.30.0 tqdm==4.65.0 accelerate==0.18.0 From 554f26296e0045db78f86e97ffee60805c93fc9a Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 17 May 2023 08:46:57 -0400 Subject: [PATCH 154/282] update initial samplers --- modules/sd_samplers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/sd_samplers.py b/modules/sd_samplers.py index 84ae96576..bc82371c8 100644 --- a/modules/sd_samplers.py +++ b/modules/sd_samplers.py @@ -6,8 +6,8 @@ all_samplers = [ *sd_samplers_compvis.samplers_data_compvis, ] all_samplers_map = {x.name: x for x in all_samplers} -samplers = ['PLMS', 'UniPC'] # set default to keep some extensions happy -samplers_for_img2img = [] +samplers = all_samplers +samplers_for_img2img = all_samplers samplers_map = {} From 0ccda9bc8b1c59ace99a5b09d7022f7912da196a Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 17 May 2023 14:15:38 -0400 Subject: [PATCH 155/282] jumbo patch --- TODO.md | 21 +- .../Lora/scripts/lora_script.py | 1 - .../Lora/ui_extra_networks_lora.py | 3 +- installer.py | 15 +- javascript/.eslintrc.json | 3 +- javascript/aspectRatioOverlay.js | 25 +- javascript/contextMenus.js | 64 +-- javascript/hires_fix.js | 16 +- javascript/imageMaskFix.js | 10 +- javascript/imageParams.js | 4 +- javascript/imageviewer.js | 16 +- javascript/progressbar.js | 212 +++++----- javascript/style.css | 22 +- launch.py | 5 +- modules/cmd_args.py | 1 + modules/devices.py | 4 +- modules/esrgan_model.py | 11 +- modules/esrgan_model_arch.py | 18 +- modules/extra_networks_hypernet.py | 3 +- modules/generation_parameters_copypaste.py | 9 +- modules/hashes.py | 4 +- modules/hypernetworks/hypernetwork.py | 2 +- modules/images.py | 7 +- modules/img2img.py | 3 +- modules/interrogate.py | 4 +- modules/mac_specific.py | 9 +- modules/middleware.py | 2 + modules/modelloader.py | 53 +-- modules/models/diffusion/ddpm_edit.py | 4 +- modules/models/diffusion/uni_pc/uni_pc.py | 4 +- modules/paths.py | 2 +- modules/processing.py | 47 +-- modules/realesrgan_model.py | 10 +- modules/safe.py | 2 +- modules/scripts.py | 5 +- modules/sd_hijack.py | 3 +- modules/sd_hijack_clip_old.py | 3 +- modules/sd_hijack_optimizations.py | 3 + modules/sd_hijack_unet.py | 2 +- modules/sd_models.py | 55 ++- modules/sd_models_config.py | 2 +- modules/sd_samplers_kdiffusion.py | 2 +- modules/sd_vae.py | 2 +- modules/shared.py | 24 +- modules/textual_inversion/autocrop.py | 382 +++++++++--------- modules/textual_inversion/dataset.py | 25 +- modules/textual_inversion/logging.py | 2 +- modules/textual_inversion/preprocess.py | 6 +- .../textual_inversion/textual_inversion.py | 6 +- modules/ui.py | 73 ++-- modules/ui_extra_networks.py | 32 +- modules/ui_tempdir.py | 2 +- scripts/custom_code.py | 2 +- scripts/loopback.py | 2 +- scripts/xyz_grid.py | 4 +- webui.py | 45 ++- 56 files changed, 686 insertions(+), 612 deletions(-) diff --git a/TODO.md b/TODO.md index f9da5b122..239cdc080 100644 --- a/TODO.md +++ b/TODO.md @@ -25,8 +25,6 @@ Stuff to be added... Stuff to be investigated... -- TXT2IMG: -- `TensorRT` ## Merge PRs @@ -51,6 +49,7 @@ Tech that can be integrated as part of the core workflow... - [Custom diffusion](https://github.com/guaneec/custom-diffusion-webui), [Custom diffusion](https://www.cs.cmu.edu/~custom-diffusion/) - [Dream artist](https://github.com/7eu7d7/DreamArtist-sd-webui-extension) - [QuickEmbedding](https://github.com/ethansmith2000/QuickEmbedding) +- `TensorRT` ## Random @@ -58,7 +57,19 @@ Tech that can be integrated as part of the core workflow... ### Pending Code Updates -- add `--safe` mode which skips loading user extensions +This is a massive one due to huge number of changes, but hopefully it will fo ok... + +- new **prompt parsers** + select in UI -> Settings -> Stable Diffusion + - **Full**: my new implementation + - **A1111**: for backward compatibility + - **Compel**: as used in ComfyUI and InvokeAI (a.k.a *Temporal Weighting*) + - **Fixed**: for really old backward compatibility +- added `--safe` command line flag mode which skips loading user extensions please try to use it before opening new issue -- add option in settings: **Prompt attention parser** - to allow for backward compatibility with a1111 (broken) parser +- reintroduce `--api-only` mode to start server without ui +- monitor **extensions** install/startup and + log if they modify any packages/requirements + this is a *deep-experimental* python hack, but i think its worth it as extensions modifying requirements is one of most common causes of issues +- port *all* upstream code from [A1111](https://github.com/AUTOMATIC1111/stable-diffusion-webui) + up to today - commit hash `89f9faa` diff --git a/extensions-builtin/Lora/scripts/lora_script.py b/extensions-builtin/Lora/scripts/lora_script.py index 060bda059..7b485d97d 100644 --- a/extensions-builtin/Lora/scripts/lora_script.py +++ b/extensions-builtin/Lora/scripts/lora_script.py @@ -20,7 +20,6 @@ def before_ui(): ui_extra_networks.register_page(ui_extra_networks_lora.ExtraNetworksPageLora()) extra_networks.register_extra_network(extra_networks_lora.ExtraNetworkLora()) - if not hasattr(torch.nn, 'Linear_forward_before_lora'): torch.nn.Linear_forward_before_lora = torch.nn.Linear.forward diff --git a/extensions-builtin/Lora/ui_extra_networks_lora.py b/extensions-builtin/Lora/ui_extra_networks_lora.py index 2050e3faa..6553a7ebf 100644 --- a/extensions-builtin/Lora/ui_extra_networks_lora.py +++ b/extensions-builtin/Lora/ui_extra_networks_lora.py @@ -14,7 +14,7 @@ class ExtraNetworksPageLora(ui_extra_networks.ExtraNetworksPage): def list_items(self): for name, lora_on_disk in lora.available_loras.items(): - path, ext = os.path.splitext(lora_on_disk.filename) + path, _ext = os.path.splitext(lora_on_disk.filename) if shared.opts.lora_preferred_name == "Filename" or lora_on_disk.alias.lower() in lora.forbidden_lora_aliases: alias = name @@ -34,4 +34,3 @@ class ExtraNetworksPageLora(ui_extra_networks.ExtraNetworksPage): def allowed_directories_for_previews(self): return [shared.cmd_opts.lora_dir] - diff --git a/installer.py b/installer.py index 6f6ea7035..4c5f0ed65 100644 --- a/installer.py +++ b/installer.py @@ -43,7 +43,7 @@ args = Dot({ 'version': False, 'ignore': False, }) - +git_commit = "unknown" # setup console and file logging def setup_logging(clean=False): @@ -369,6 +369,10 @@ def list_extensions(folder): # run installer for each installed and enabled extension and optionally update them def install_extensions(): + import pkg_resources + pkg_resources._initialize_master_working_set() # pylint: disable=protected-access + pkgs = [f'{p.project_name}=={p._version}' for p in pkg_resources.working_set] # pylint: disable=protected-access,not-an-iterable + log.debug(f'Installed packages: {len(pkgs)}') from modules.paths_internal import extensions_builtin_dir, extensions_dir extensions_duplicates = [] extensions_enabled = [] @@ -390,6 +394,12 @@ def install_extensions(): log.error(f'Error updating extension: {os.path.join(folder, ext)}') if not args.skip_extensions: run_extension_installer(os.path.join(folder, ext)) + pkg_resources._initialize_master_working_set() # pylint: disable=protected-access + updated = [f'{p.project_name}=={p._version}' for p in pkg_resources.working_set] # pylint: disable=protected-access,not-an-iterable + diff = [x for x in updated if x not in pkgs] + pkgs = updated + if len(diff) > 0: + log.info(f'Extension installed packages: {ext} {diff}') log.info(f'Extensions enabled: {extensions_enabled}') if len(extensions_duplicates) > 0: log.warning(f'Extensions duplicates: {extensions_duplicates}') @@ -500,6 +510,8 @@ def check_version(offline=False, reset=True): # pylint: disable=unused-argument if args.version: return commit = git('rev-parse HEAD') + global git_commit # pylint: disable=global-statement + git_commit = commit[:7] try: import requests except ImportError: @@ -583,6 +595,7 @@ def add_args(): group.add_argument('--debug', default = False, action='store_true', help = "Run installer with debug logging, default: %(default)s") group.add_argument('--reset', default = False, action='store_true', help = "Reset main repository to latest version, default: %(default)s") group.add_argument('--upgrade', default = False, action='store_true', help = "Upgrade main repository to latest version, default: %(default)s") + group.add_argument('--api-only', default = False, action='store_true', help = "Run in API only mode without starting UI") group.add_argument("--use-ipex", default = False, action='store_true', help="Use Intel OneAPI XPU backend, default: %(default)s") group.add_argument('--use-directml', default = False, action='store_true', help = "Use DirectML if no compatible GPU is detected, default: %(default)s") group.add_argument("--use-cuda", default=False, action='store_true', help="Force use nVidia CUDA backend, default: %(default)s") diff --git a/javascript/.eslintrc.json b/javascript/.eslintrc.json index e0ce80061..5fcb88998 100644 --- a/javascript/.eslintrc.json +++ b/javascript/.eslintrc.json @@ -16,6 +16,7 @@ "no-unused-vars":"off", "no-plusplus":"off", "no-param-reassign":"off", - "no-restricted-syntax":"off" + "no-restricted-syntax":"off", + "no-mixed-operators":"off" } } diff --git a/javascript/aspectRatioOverlay.js b/javascript/aspectRatioOverlay.js index 20984f6a4..1159cb697 100644 --- a/javascript/aspectRatioOverlay.js +++ b/javascript/aspectRatioOverlay.js @@ -1,3 +1,5 @@ +/* global gradioApp, onUiUpdate, get_tab_index */ + let currentWidth = null; let currentHeight = null; let arFrameTimeout = setTimeout(() => {}, 0); @@ -9,7 +11,7 @@ function dimensionChange(e, is_width, is_height) { if (!inImg2img) return; let targetElement = null; const tabIndex = get_tab_index('mode_img2img'); - if (tabIndex === 0) targetElement = gradioApp().querySelector('#img2img_image div[data-testid=image] img'); // img2img + if (tabIndex === 0) targetElement = gradioApp().querySelector('#img2img_image div[data-testid=image] img'); // img2img else if (tabIndex === 1) targetElement = gradioApp().querySelector('#img2img_sketch div[data-testid=image] img'); // Sketch else if (tabIndex === 2) targetElement = gradioApp().querySelector('#img2maskimg div[data-testid=image] img'); // Inpaint else if (tabIndex === 3) targetElement = gradioApp().querySelector('#inpaint_sketch div[data-testid=image] img'); // Inpaint sketch @@ -23,26 +25,20 @@ function dimensionChange(e, is_width, is_height) { } const viewportOffset = targetElement.getBoundingClientRect(); - const viewportscale = Math.min(targetElement.clientWidth / targetElement.naturalWidth, targetElement.clientHeight / targetElement.naturalHeight); - const scaledx = targetElement.naturalWidth * viewportscale; const scaledy = targetElement.naturalHeight * viewportscale; - const cleintRectTop = (viewportOffset.top + window.scrollY); const cleintRectLeft = (viewportOffset.left + window.scrollX); const cleintRectCentreY = cleintRectTop + (targetElement.clientHeight / 2); const cleintRectCentreX = cleintRectLeft + (targetElement.clientWidth / 2); - const arscale = Math.min(scaledx / currentWidth, scaledy / currentHeight); const arscaledx = currentWidth * arscale; const arscaledy = currentHeight * arscale; - const arRectTop = cleintRectCentreY - (arscaledy / 2); const arRectLeft = cleintRectCentreX - (arscaledx / 2); const arRectWidth = arscaledx; const arRectHeight = arscaledy; - arPreviewRect.style.top = `${arRectTop}px`; arPreviewRect.style.left = `${arRectLeft}px`; arPreviewRect.style.width = `${arRectWidth}px`; @@ -58,9 +54,7 @@ function dimensionChange(e, is_width, is_height) { onUiUpdate(() => { const arPreviewRect = gradioApp().querySelector('#imageARPreview'); - if (arPreviewRect) { - arPreviewRect.style.display = 'none'; - } + if (arPreviewRect) arPreviewRect.style.display = 'none'; const tabImg2img = gradioApp().querySelector('#tab_img2img'); if (tabImg2img) { const inImg2img = tabImg2img.style.display === 'block'; @@ -69,17 +63,12 @@ onUiUpdate(() => { inputs.forEach((e) => { const is_width = e.parentElement.id === 'img2img_width'; const is_height = e.parentElement.id === 'img2img_height'; - if ((is_width || is_height) && !e.classList.contains('scrollwatch')) { - e.addEventListener('input', (e) => { dimensionChange(e, is_width, is_height); }); + e.addEventListener('input', (evt) => { dimensionChange(evt, is_width, is_height); }); e.classList.add('scrollwatch'); } - if (is_width) { - currentWidth = e.value * 1.0; - } - if (is_height) { - currentHeight = e.value * 1.0; - } + if (is_width) currentWidth = e.value * 1.0; + if (is_height) currentHeight = e.value * 1.0; }); } } diff --git a/javascript/contextMenus.js b/javascript/contextMenus.js index 1c8d840f1..880ff3172 100644 --- a/javascript/contextMenus.js +++ b/javascript/contextMenus.js @@ -1,23 +1,18 @@ -contextMenuInit = function () { +/* global gradioApp, uiCurrentTab, onUiUpdate, get_uiCurrentTabContent */ + +const contextMenuInit = () => { let eventListenerApplied = false; const menuSpecs = new Map(); - const uid = function () { - return Date.now().toString(36) + Math.random().toString(36).substring(2); - }; + const uid = () => Date.now().toString(36) + Math.random().toString(36).substring(2); function showContextMenu(event, element, menuEntries) { const posx = event.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; const posy = event.clientY + document.body.scrollTop + document.documentElement.scrollTop; - const oldMenu = gradioApp().querySelector('#context-menu'); - if (oldMenu) { - oldMenu.remove(); - } - + if (oldMenu) oldMenu.remove(); const tabButton = uiCurrentTab; const baseStyle = window.getComputedStyle(tabButton); - const contextMenu = document.createElement('nav'); contextMenu.id = 'context-menu'; contextMenu.style.background = baseStyle.background; @@ -25,40 +20,26 @@ contextMenuInit = function () { contextMenu.style.fontFamily = baseStyle.fontFamily; contextMenu.style.top = `${posy}px`; contextMenu.style.left = `${posx}px`; - const contextMenuList = document.createElement('ul'); contextMenuList.className = 'context-menu-items'; contextMenu.append(contextMenuList); - menuEntries.forEach((entry) => { const contextMenuEntry = document.createElement('a'); contextMenuEntry.innerHTML = entry.name; - contextMenuEntry.addEventListener('click', (e) => { - entry.func(); - }); + contextMenuEntry.addEventListener('click', (e) => entry.func()); contextMenuList.append(contextMenuEntry); }); - gradioApp().appendChild(contextMenu); - const menuWidth = contextMenu.offsetWidth + 4; const menuHeight = contextMenu.offsetHeight + 4; - const windowWidth = window.innerWidth; const windowHeight = window.innerHeight; - - if ((windowWidth - posx) < menuWidth) { - contextMenu.style.left = `${windowWidth - menuWidth}px`; - } - - if ((windowHeight - posy) < menuHeight) { - contextMenu.style.top = `${windowHeight - menuHeight}px`; - } + if ((windowWidth - posx) < menuWidth) contextMenu.style.left = `${windowWidth - menuWidth}px`; + if ((windowHeight - posy) < menuHeight) contextMenu.style.top = `${windowHeight - menuHeight}px`; } function appendContextMenuOption(targetElementSelector, entryName, entryFunction) { - currentItems = menuSpecs.get(targetElementSelector); - + let currentItems = menuSpecs.get(targetElementSelector); if (!currentItems) { currentItems = []; menuSpecs.set(targetElementSelector, currentItems); @@ -69,7 +50,6 @@ contextMenuInit = function () { func: entryFunction, isNew: true, }; - currentItems.push(newItem); return newItem.id; } @@ -89,15 +69,11 @@ contextMenuInit = function () { gradioApp().addEventListener('click', (e) => { if (!e.isTrusted) return; const oldMenu = gradioApp().querySelector('#context-menu'); - if (oldMenu) { - oldMenu.remove(); - } + if (oldMenu) oldMenu.remove(); }); gradioApp().addEventListener('contextmenu', (e) => { const oldMenu = gradioApp().querySelector('#context-menu'); - if (oldMenu) { - oldMenu.remove(); - } + if (oldMenu) oldMenu.remove(); menuSpecs.forEach((v, k) => { if (e.composedPath()[0].matches(k)) { showContextMenu(e, e.composedPath()[0], v); @@ -107,14 +83,13 @@ contextMenuInit = function () { }); eventListenerApplied = true; } - return [appendContextMenuOption, removeContextMenuOption, addContextMenuEventListener]; }; -initResponse = contextMenuInit(); -appendContextMenuOption = initResponse[0]; -removeContextMenuOption = initResponse[1]; -addContextMenuEventListener = initResponse[2]; +const initResponse = contextMenuInit(); +const appendContextMenuOption = initResponse[0]; +const removeContextMenuOption = initResponse[1]; +const addContextMenuEventListener = initResponse[2]; (function () { // Start example Context Menu Items @@ -128,9 +103,7 @@ addContextMenuEventListener = initResponse[2]; window.generateOnRepeatInterval = setInterval( () => { const busy = document.getElementById('progressbar')?.style.display === 'block'; - if (!busy) { - genbutton.click(); - } + if (!busy) genbutton.click(); }, 500, ); @@ -151,7 +124,6 @@ addContextMenuEventListener = initResponse[2]; appendContextMenuOption('#txt2img_generate', 'Cancel generate forever', cancelGenerateForever); appendContextMenuOption('#img2img_interrupt', 'Cancel generate forever', cancelGenerateForever); appendContextMenuOption('#img2img_generate', 'Cancel generate forever', cancelGenerateForever); - appendContextMenuOption( '#roll', 'Roll three', @@ -165,6 +137,4 @@ addContextMenuEventListener = initResponse[2]; }()); // End example Context Menu Items -onUiUpdate(() => { - addContextMenuEventListener(); -}); +onUiUpdate(() => addContextMenuEventListener()); diff --git a/javascript/hires_fix.js b/javascript/hires_fix.js index 1ed690c4f..b71f4ddbb 100644 --- a/javascript/hires_fix.js +++ b/javascript/hires_fix.js @@ -1,16 +1,14 @@ -function setInactive(elem, inactive) { - if (inactive) elem.classList.add('inactive'); - else elem.classList.remove('inactive'); -} - +/* global gradioApp, opts */ function onCalcResolutionHires(enable, width, height, hr_scale, hr_resize_x, hr_resize_y) { + function setInactive(elem, inactive) { + elem.classList.toggle('inactive', !!inactive); + } const hrUpscaleBy = gradioApp().getElementById('txt2img_hr_scale'); const hrResizeX = gradioApp().getElementById('txt2img_hr_resize_x'); const hrResizeY = gradioApp().getElementById('txt2img_hr_resize_y'); gradioApp().getElementById('txt2img_hires_fix_row2').style.display = opts.use_old_hires_fix_width_height ? 'none' : ''; setInactive(hrUpscaleBy, opts.use_old_hires_fix_width_height || hr_resize_x > 0 || hr_resize_y > 0); - setInactive(hrResizeX, opts.use_old_hires_fix_width_height || hr_resize_x === 0); - setInactive(hrResizeY, opts.use_old_hires_fix_width_height || hr_resize_y === 0); - // return [enable, width, height, hr_scale, hr_resize_x, hr_resize_y]; - setTimeout(() => [enable, width, height, hr_scale, hr_resize_x, hr_resize_y], 100); + setInactive(hrResizeX, opts.use_old_hires_fix_width_height || hr_resize_x == 0); + setInactive(hrResizeY, opts.use_old_hires_fix_width_height || hr_resize_y == 0); + return [enable, width, height, hr_scale, hr_resize_x, hr_resize_y]; } diff --git a/javascript/imageMaskFix.js b/javascript/imageMaskFix.js index ec64feaa6..0cbb08822 100644 --- a/javascript/imageMaskFix.js +++ b/javascript/imageMaskFix.js @@ -1,3 +1,4 @@ +/* global gradioApp, onUiUpdate */ /** * temporary fix for https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/668 * @see https://github.com/gradio-app/gradio/issues/1721 @@ -5,7 +6,6 @@ function imageMaskResize() { const canvases = gradioApp().querySelectorAll('#img2maskimg .touch-none canvas'); if (!canvases.length) { - canvases_fixed = false; window.removeEventListener('resize', imageMaskResize); return; } @@ -14,7 +14,7 @@ function imageMaskResize() { const previewImage = wrapper.previousElementSibling; if (!previewImage.complete) { - previewImage.addEventListener('load', () => imageMaskResize()); + previewImage.addEventListener('load', imageMaskResize); return; } @@ -23,7 +23,6 @@ function imageMaskResize() { const nw = previewImage.naturalWidth; const nh = previewImage.naturalHeight; const portrait = nh > nw; - const factor = portrait; const wW = Math.min(w, portrait ? h / nh * nw : w / nw * nw); const wH = Math.min(h, portrait ? h / nh * nh : w / nw * nh); @@ -34,12 +33,13 @@ function imageMaskResize() { wrapper.style.top = '0px'; canvases.forEach((c) => { - c.style.width = c.style.height = ''; + c.style.width = ''; + c.style.height = ''; c.style.maxWidth = '100%'; c.style.maxHeight = '100%'; c.style.objectFit = 'contain'; }); } +onUiUpdate(imageMaskResize); window.addEventListener('resize', imageMaskResize); -onUiUpdate(() => imageMaskResize()); diff --git a/javascript/imageParams.js b/javascript/imageParams.js index 2530d585a..89bfe58a1 100644 --- a/javascript/imageParams.js +++ b/javascript/imageParams.js @@ -1,12 +1,10 @@ +/* global gradioApp, get_tab_index */ window.onload = (function () { window.addEventListener('drop', (e) => { const target = e.composedPath()[0]; if (!target.placeholder) return; - const idx = selected_gallery_index(); if (target.placeholder.indexOf('Prompt') == -1) return; - const prompt_target = get_tab_index('tabs') == 1 ? 'img2img_prompt_image' : 'txt2img_prompt_image'; - e.stopPropagation(); e.preventDefault(); const imgParent = gradioApp().getElementById(prompt_target); diff --git a/javascript/imageviewer.js b/javascript/imageviewer.js index 45c786ee5..cfad41ff5 100644 --- a/javascript/imageviewer.js +++ b/javascript/imageviewer.js @@ -1,3 +1,4 @@ +/* global gradioApp, onUiUpdate */ // A full size 'lightbox' preview modal shown when left clicking on gallery previews function closeModal() { gradioApp().getElementById('lightboxModal').style.display = 'none'; @@ -96,6 +97,11 @@ function modalKeyHandler(event) { } } +function modalZoomSet(modalImage, enable) { + localStorage.setItem('modalZoom', enable ? 'yes' : 'no'); + if (modalImage) modalImage.classList.toggle('modalImageFullscreen', !!enable); +} + function setupImageForLightbox(e) { if (e.dataset.modded) return; e.dataset.modded = true; @@ -106,21 +112,15 @@ function setupImageForLightbox(e) { const event = isFirefox ? 'mousedown' : 'click'; e.addEventListener(event, (evt) => { if (evt.button != 0) return; - initialZoom = (localStorage.getItem('modalZoom') || true) == 'yes'; + const initialZoom = (localStorage.getItem('modalZoom') || true) == 'yes'; modalZoomSet(gradioApp().getElementById('modalImage'), initialZoom); evt.preventDefault(); showModal(evt); }, true); } -function modalZoomSet(modalImage, enable) { - if (enable) modalImage.classList.add('modalImageFullscreen'); - else modalImage.classList.remove('modalImageFullscreen'); - localStorage.setItem('modalZoom', enable ? 'yes' : 'no'); -} - function modalZoomToggle(event) { - modalImage = gradioApp().getElementById('modalImage'); + const modalImage = gradioApp().getElementById('modalImage'); modalZoomSet(modalImage, !modalImage.classList.contains('modalImageFullscreen')); event.stopPropagation(); } diff --git a/javascript/progressbar.js b/javascript/progressbar.js index 09c7539cf..c1a2b5b36 100644 --- a/javascript/progressbar.js +++ b/javascript/progressbar.js @@ -1,133 +1,133 @@ +/* global opts */ function rememberGallerySelection(id_gallery) {} function getGallerySelectedIndex(id_gallery) {} function request(url, data, handler, errorHandler) { - var xhr = new XMLHttpRequest(); - var url = url; - xhr.open("POST", url, true); - xhr.setRequestHeader("Content-Type", "application/json"); - xhr.onreadystatechange = function () { - if (xhr.readyState === 4) { - if (xhr.status === 200) { - try { - var js = JSON.parse(xhr.responseText); - handler(js) - } catch (error) { - console.error(error); - errorHandler() - } - } else{ - errorHandler() - } + const xhr = new XMLHttpRequest(); + xhr.open('POST', url, true); + xhr.setRequestHeader('Content-Type', 'application/json'); + xhr.onreadystatechange = function () { + if (xhr.readyState === 4) { + if (xhr.status === 200) { + try { + const js = JSON.parse(xhr.responseText); + handler(js); + } catch (error) { + console.error(error); + errorHandler(); } - }; - var js = JSON.stringify(data); - xhr.send(js); + } else { + errorHandler(); + } + } + }; + const js = JSON.stringify(data); + xhr.send(js); } function pad2(x) { - return x<10 ? '0'+x : x + return x < 10 ? `0${x}` : x; } function formatTime(secs) { - if(secs > 3600) return pad2(Math.floor(secs/60/60)) + ":" + pad2(Math.floor(secs/60)%60) + ":" + pad2(Math.floor(secs)%60) - else if(secs > 60) return pad2(Math.floor(secs/60)) + ":" + pad2(Math.floor(secs)%60) - else return Math.floor(secs) + "s" + if (secs > 3600) return `${pad2(Math.floor(secs / 60 / 60))}:${pad2(Math.floor(secs / 60) % 60)}:${pad2(Math.floor(secs) % 60)}`; + if (secs > 60) return `${pad2(Math.floor(secs / 60))}:${pad2(Math.floor(secs) % 60)}`; + return `${Math.floor(secs)}s`; } function setTitle(progress) { - var title = 'SD.Next' - if (progress) title += ' ' + progress.split(' ')[0].trim(); - if (document.title != title) document.title = title; + let title = 'SD.Next'; + if (progress) title += ` ${progress.split(' ')[0].trim()}`; + if (document.title != title) document.title = title; } function randomId() { - return "task(" + Math.random().toString(36).slice(2, 7) + Math.random().toString(36).slice(2, 7) + Math.random().toString(36).slice(2, 7)+")" + return `task(${Math.random().toString(36).slice(2, 7)}${Math.random().toString(36).slice(2, 7)}${Math.random().toString(36).slice(2, 7)})`; } // starts sending progress requests to "/internal/progress" uri, creating progressbar above progressbarContainer element and // preview inside gallery element. Cleans up all created stuff when the task is over and calls atEnd. // calls onProgress every time there is a progress update function requestProgress(id_task, progressbarContainer, gallery, atEnd = null, onProgress = null, once = false) { - var hasStarted = false - var dateStart = new Date() - var prevProgress = null - var parentProgressbar = progressbarContainer.parentNode - var parentGallery = gallery ? gallery.parentNode : null - var divProgress = document.createElement('div') - divProgress.className='progressDiv' - divProgress.id = 'progressbar' - divProgress.style.display = opts.show_progressbar ? "block" : "none" - var divInner = document.createElement('div') - divInner.className='progress' - divProgress.appendChild(divInner) - parentProgressbar.insertBefore(divProgress, progressbarContainer) - localStorage.setItem('task', id_task); - console.debug('task active:', id_task) - if (parentGallery) { - var livePreview = document.createElement('div') - livePreview.className='livePreview' - parentGallery.insertBefore(livePreview, gallery) - } + let hasStarted = false; + const dateStart = new Date(); + const prevProgress = null; + const parentProgressbar = progressbarContainer.parentNode; + const parentGallery = gallery ? gallery.parentNode : null; + const divProgress = document.createElement('div'); + divProgress.className = 'progressDiv'; + divProgress.id = 'progressbar'; + divProgress.style.display = opts.show_progressbar ? 'block' : 'none'; + const divInner = document.createElement('div'); + divInner.className = 'progress'; + divProgress.appendChild(divInner); + parentProgressbar.insertBefore(divProgress, progressbarContainer); + localStorage.setItem('task', id_task); + console.debug('task active:', id_task); + if (parentGallery) { + const livePreview = document.createElement('div'); + livePreview.className = 'livePreview'; + parentGallery.insertBefore(livePreview, gallery); + } - var removeProgressBar = function() { - console.debug('task end: ', id_task) - localStorage.removeItem('task'); - setTitle("") - if (divProgress) parentProgressbar.removeChild(divProgress) - if (parentGallery) parentGallery.removeChild(livePreview) - if (atEnd) atEnd() - } + const removeProgressBar = function () { + console.debug('task end: ', id_task); + localStorage.removeItem('task'); + setTitle(''); + if (divProgress) parentProgressbar.removeChild(divProgress); + if (parentGallery) parentGallery.removeChild(livePreview); + if (atEnd) atEnd(); + }; - var fun = function(id_task, id_live_preview){ - request("./internal/progress", {"id_task": id_task, "id_live_preview": id_live_preview}, function(res){ - var elapsedFromStart = (new Date() - dateStart) / 1000 - if (res.completed) { - removeProgressBar() - return - } - var rect = progressbarContainer.getBoundingClientRect() - if (rect.width) divProgress.style.width = rect.width + "px"; - progressText = "" - divInner.style.width = ((res.progress || 0) * 100.0) + '%' - divInner.style.background = res.progress ? "" : "transparent" - if (res.progress > 0) progressText = ((res.progress || 0) * 100.0).toFixed(0) + '%' - if (res.eta) progressText += " ETA: " + formatTime(res.eta) - setTitle(progressText) - if (res.textinfo && res.textinfo.indexOf("\n") == -1) progressText = res.textinfo + " " + progressText - divInner.textContent = progressText - hasStarted |= res.active - if (!res.active && (hasStarted || once)) { - removeProgressBar() - return - } - if (res.completed) { - removeProgressBar() - return - } - if (elapsedFromStart > 30 && !res.queued && res.progress == prevProgress) { - removeProgressBar() - return - } - if (res.live_preview && gallery) { - var rect = gallery.getBoundingClientRect() - if(rect.width){ - livePreview.style.width = rect.width + "px" - livePreview.style.height = rect.height + "px" - } - var img = new Image(); - img.onload = function() { - livePreview.appendChild(img) - if (livePreview.childElementCount > 2) livePreview.removeChild(livePreview.firstElementChild) - } - img.src = res.live_preview; - } - if (onProgress) onProgress(res) - setTimeout(() => fun(id_task, res.id_live_preview), opts.live_preview_refresh_period || 250) - }, function() { - removeProgressBar() - }) - } - fun(id_task, 0) + const fun = function (id_task, id_live_preview) { + request('./internal/progress', { id_task, id_live_preview }, (res) => { + const elapsedFromStart = (new Date() - dateStart) / 1000; + if (res.completed) { + removeProgressBar(); + return; + } + var rect = progressbarContainer.getBoundingClientRect(); + if (rect.width) divProgress.style.width = `${rect.width}px`; + progressText = ''; + divInner.style.width = `${(res.progress || 0) * 100.0}%`; + divInner.style.background = res.progress ? '' : 'transparent'; + if (res.progress > 0) progressText = `${((res.progress || 0) * 100.0).toFixed(0)}%`; + if (res.eta) progressText += ` ETA: ${formatTime(res.eta)}`; + setTitle(progressText); + if (res.textinfo && res.textinfo.indexOf('\n') == -1) progressText = `${res.textinfo} ${progressText}`; + divInner.textContent = progressText; + hasStarted |= res.active; + if (!res.active && (hasStarted || once)) { + removeProgressBar(); + return; + } + if (res.completed) { + removeProgressBar(); + return; + } + if (elapsedFromStart > 30 && !res.queued && res.progress == prevProgress) { + removeProgressBar(); + return; + } + if (res.live_preview && gallery) { + var rect = gallery.getBoundingClientRect(); + if (rect.width) { + livePreview.style.width = `${rect.width}px`; + livePreview.style.height = `${rect.height}px`; + } + const img = new Image(); + img.onload = function () { + livePreview.appendChild(img); + if (livePreview.childElementCount > 2) livePreview.removeChild(livePreview.firstElementChild); + }; + img.src = res.live_preview; + } + if (onProgress) onProgress(res); + setTimeout(() => fun(id_task, res.id_live_preview), opts.live_preview_refresh_period || 250); + }, () => { + removeProgressBar(); + }); + }; + fun(id_task, 0); } diff --git a/javascript/style.css b/javascript/style.css index 6254de8cb..76d8fc467 100644 --- a/javascript/style.css +++ b/javascript/style.css @@ -108,7 +108,12 @@ button.custom-button{ } } -#txt2img_gallery img, #img2img_gallery img{ +a{ + font-weight: bold; + cursor: pointer; +} + +#txt2img_gallery img, #img2img_gallery img, #extras_gallery img{ object-fit: scale-down; } #txt2img_actions_column, #img2img_actions_column { @@ -406,6 +411,21 @@ div#extras_scale_to_tab div.form{ #lightboxModal > img.modalImageFullscreen{ object-fit: contain; height: 100%; + width: 100%; + min-height: 0; +} + +table.settings-value-table{ + background: white; + border-collapse: collapse; + margin: 1em; + border: 4px solid white; +} + +table.settings-value-table td{ + padding: 0.4em; + border: 1px solid #ccc; + max-width: 36em; } .modalPrev, diff --git a/launch.py b/launch.py index 4a38f9eeb..404fba472 100644 --- a/launch.py +++ b/launch.py @@ -118,7 +118,10 @@ def start_server(immediate=True, server=None): installer.log.info("Test only") server.wants_restart = False else: - server = server.webui() + if args.api_only: + server = server.api_only() + else: + server = server.webui() installer.log.info(f'Memory {get_memory_stats()}') return server diff --git a/modules/cmd_args.py b/modules/cmd_args.py index e4a209dce..1bcd089e4 100644 --- a/modules/cmd_args.py +++ b/modules/cmd_args.py @@ -43,6 +43,7 @@ group.add_argument("--use-ipex", default = False, action='store_true', help="Use group.add_argument('--use-directml', default = False, action='store_true', help = "Use DirectML if no compatible GPU is detected, default: %(default)s") group.add_argument("--use-cuda", default=False, action='store_true', help="Force use nVidia CUDA backend, default: %(default)s") group.add_argument("--use-rocm", default=False, action='store_true', help="Force use AMD ROCm backend, default: %(default)s") +group.add_argument('--subpath', type=str, help='Customize the URL subpath for usage with reverse proxy') # removed args are added here as hidden in fixed format for compatbility reasons group.add_argument("-f", action='store_true', help=argparse.SUPPRESS) # allows running as root; implemented outside of webui diff --git a/modules/devices.py b/modules/devices.py index de0bd6fd5..0acd61871 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -60,8 +60,8 @@ def get_device_for(task): return get_optimal_device() -def torch_gc(): - if shared.opts.disable_gc: +def torch_gc(force=False): + if shared.opts.disable_gc and not force: return gc.collect() if shared.cmd_opts.use_ipex: diff --git a/modules/esrgan_model.py b/modules/esrgan_model.py index bb4c6619b..f2565ca47 100644 --- a/modules/esrgan_model.py +++ b/modules/esrgan_model.py @@ -156,13 +156,16 @@ class UpscalerESRGAN(Upscaler): def load_model(self, path: str): if "http" in path: - filename = load_file_from_url(url=self.model_url, model_dir=self.model_path, - file_name="%s.pth" % self.model_name, - progress=True) + filename = load_file_from_url( + url=self.model_url, + model_dir=self.model_path, + file_name=f"{self.model_name}.pth", + progress=True, + ) else: filename = path if not os.path.exists(filename) or filename is None: - print("Unable to load %s from %s" % (self.model_path, filename)) + print(f"Unable to load {self.model_path} from {filename}") return None state_dict = torch.load(filename, map_location='cpu' if devices.device_esrgan.type == 'mps' else None) diff --git a/modules/esrgan_model_arch.py b/modules/esrgan_model_arch.py index 411d98d38..af7660ec9 100644 --- a/modules/esrgan_model_arch.py +++ b/modules/esrgan_model_arch.py @@ -36,7 +36,7 @@ class RRDBNet(nn.Module): elif upsample_mode == 'pixelshuffle': upsample_block = pixelshuffle_block else: - raise NotImplementedError('upsample mode [{:s}] is not found'.format(upsample_mode)) + raise NotImplementedError(f'upsample mode [{upsample_mode}] is not found') if upscale == 3: upsampler = upsample_block(nf, nf, 3, act_type=act_type, convtype=convtype) else: @@ -169,7 +169,7 @@ class GaussianNoise(nn.Module): scale = self.sigma * x.detach() if self.is_relative_detach else self.sigma * x sampled_noise = self.noise.repeat(*x.size()).normal_() * scale x = x + sampled_noise - return x + return x def conv1x1(in_planes, out_planes, stride=1): return nn.Conv2d(in_planes, out_planes, kernel_size=1, stride=stride, bias=False) @@ -259,10 +259,10 @@ class Upsample(nn.Module): def extra_repr(self): if self.scale_factor is not None: - info = 'scale_factor=' + str(self.scale_factor) + info = f'scale_factor={self.scale_factor}' else: - info = 'size=' + str(self.size) - info += ', mode=' + self.mode + info = f'size={self.size}' + info += f', mode={self.mode}' return info @@ -348,7 +348,7 @@ def act(act_type, inplace=True, neg_slope=0.2, n_prelu=1, beta=1.0): elif act_type == 'sigmoid': # [0, 1] range output layer = nn.Sigmoid() else: - raise NotImplementedError('activation layer [{:s}] is not found'.format(act_type)) + raise NotImplementedError(f'activation layer [{act_type}] is not found') return layer @@ -370,7 +370,7 @@ def norm(norm_type, nc): elif norm_type == 'none': def norm_layer(x): return Identity() else: - raise NotImplementedError('normalization layer [{:s}] is not found'.format(norm_type)) + raise NotImplementedError(f'normalization layer [{norm_type}] is not found') return layer @@ -386,7 +386,7 @@ def pad(pad_type, padding): elif pad_type == 'zero': layer = nn.ZeroPad2d(padding) else: - raise NotImplementedError('padding layer [{:s}] is not implemented'.format(pad_type)) + raise NotImplementedError(f'padding layer [{pad_type}] is not implemented') return layer @@ -431,7 +431,7 @@ def conv_block(in_nc, out_nc, kernel_size, stride=1, dilation=1, groups=1, bias= pad_type='zero', norm_type=None, act_type='relu', mode='CNA', convtype='Conv2D', spectral_norm=False): """ Conv layer with padding, normalization, activation """ - assert mode in ['CNA', 'NAC', 'CNAC'], 'Wrong conv mode [{:s}]'.format(mode) + assert mode in ['CNA', 'NAC', 'CNAC'], f'Wrong conv mode [{mode}]' padding = get_valid_padding(kernel_size, dilation) p = pad(pad_type, padding) if pad_type and pad_type != 'zero' else None padding = padding if pad_type == 'zero' else 0 diff --git a/modules/extra_networks_hypernet.py b/modules/extra_networks_hypernet.py index c5c150455..aa2a14efd 100644 --- a/modules/extra_networks_hypernet.py +++ b/modules/extra_networks_hypernet.py @@ -10,7 +10,8 @@ class ExtraNetworkHypernet(extra_networks.ExtraNetwork): additional = shared.opts.sd_hypernetwork if additional != "None" and additional in shared.hypernetworks and len([x for x in params_list if x.items[0] == additional]) == 0: - p.all_prompts = [x + f"" for x in p.all_prompts] + hypernet_prompt_text = f"" + p.all_prompts = [f"{prompt}{hypernet_prompt_text}" for prompt in p.all_prompts] params_list.append(extra_networks.ExtraNetworkParams(items=[additional, shared.opts.extra_networks_default_multiplier])) names = [] diff --git a/modules/generation_parameters_copypaste.py b/modules/generation_parameters_copypaste.py index 8e6eedcaa..2d6c64951 100644 --- a/modules/generation_parameters_copypaste.py +++ b/modules/generation_parameters_copypaste.py @@ -51,6 +51,7 @@ def image_from_url_text(filedata): filename = filedata["name"] is_in_right_dir = ui_tempdir.check_tmp_file(shared.demo, filename) if is_in_right_dir: + filename = filename.rsplit('?', 1)[0] image = Image.open(filename) geninfo, _items = images.read_info_from_image(image) image.info['parameters'] = geninfo @@ -134,6 +135,7 @@ def connect_paste_params_buttons(): _js=jsfunc, inputs=[binding.source_image_component], outputs=[destination_image_component, destination_width_component, destination_height_component] if destination_width_component else [destination_image_component], + show_progress=False, ) if binding.source_text_component is not None and fields is not None: connect_paste(binding.paste_button, fields, binding.source_text_component, override_settings_component, binding.tabname) @@ -149,6 +151,7 @@ def connect_paste_params_buttons(): _js=f"switch_to_{binding.tabname}", inputs=[], outputs=[], + show_progress=False, ) @@ -257,8 +260,8 @@ Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 965400086, Size: 512x512, Model v = v[1:-1] if v[0] == '"' and v[-1] == '"' else v m = re_imagesize.match(v) if m is not None: - res[k+"-1"] = m.group(1) - res[k+"-2"] = m.group(2) + res[f"{k}-1"] = m.group(1) + res[f"{k}-2"] = m.group(2) else: res[k] = v # Missing CLIP skip means it was set to 1 (the default) @@ -404,10 +407,12 @@ def connect_paste(button, local_paste_fields, input_comp, override_settings_comp fn=paste_func, inputs=[input_comp], outputs=[x[0] for x in local_paste_fields], + show_progress=False, ) button.click( fn=None, _js=f"recalculate_prompts_{tabname}", inputs=[], outputs=[], + show_progress=False, ) diff --git a/modules/hashes.py b/modules/hashes.py index b8f00f74f..2a7c7aed3 100644 --- a/modules/hashes.py +++ b/modules/hashes.py @@ -11,7 +11,7 @@ cache_data = None def dump_cache(): - with filelock.FileLock(cache_filename+".lock"): + with filelock.FileLock(f"{cache_filename}.lock"): with open(cache_filename, "w", encoding="utf8") as file: json.dump(cache_data, file, indent=4) @@ -19,7 +19,7 @@ def dump_cache(): def cache(subsection): global cache_data # pylint: disable=global-statement if cache_data is None: - with filelock.FileLock(cache_filename+".lock"): + with filelock.FileLock(f"{cache_filename}.lock"): if not os.path.isfile(cache_filename): cache_data = {} else: diff --git a/modules/hypernetworks/hypernetwork.py b/modules/hypernetworks/hypernetwork.py index d13b811d5..b05ee2db9 100644 --- a/modules/hypernetworks/hypernetwork.py +++ b/modules/hypernetworks/hypernetwork.py @@ -235,7 +235,7 @@ class Hypernetwork: if shared.opts.save_optimizer_state and self.optimizer_state_dict: optimizer_saved_dict['hash'] = self.shorthash() optimizer_saved_dict['optimizer_state_dict'] = self.optimizer_state_dict - torch.save(optimizer_saved_dict, filename + '.optim') + torch.save(optimizer_saved_dict, f"{filename}.optim") def load(self, filename): self.filename = filename diff --git a/modules/images.py b/modules/images.py index b407ef9cf..8f782bcdd 100644 --- a/modules/images.py +++ b/modules/images.py @@ -308,6 +308,7 @@ class FilenameGenerator: 'generation_number': lambda self: NOTHING_AND_SKIP_PREVIOUS_TEXT if self.p.n_iter == 1 and self.p.batch_size == 1 else self.p.iteration * self.p.batch_size + self.p.batch_index + 1, 'hasprompt': lambda self, *args: self.hasprompt(*args), # accepts formats:[hasprompt..] 'clip_skip': lambda self: shared.opts.data["CLIP_stop_at_last_layers"], + 'denoising': lambda self: self.p.denoising_strength if self.p and self.p.denoising_strength else NOTHING_AND_SKIP_PREVIOUS_TEXT, } default_time_format = '%Y%m%d%H%M%S' @@ -401,7 +402,7 @@ def get_next_sequence_number(path, basename): """ result = -1 if basename != '': - basename = basename + "-" + basename = f"{basename}-" prefix_length = len(basename) for p in os.listdir(path): if p.startswith(basename): @@ -448,7 +449,7 @@ def atomically_save_image(): # additional metadata saved in files if shared.opts.save_txt and len(exifinfo_data) > 0: with open(txt_fullfn, "w", encoding="utf8") as file: - file.write(exifinfo_data + "\n") + file.write(f"{exifinfo_data}\n") with open(os.path.join(paths.data_path, "params.txt"), "w", encoding="utf8") as file: file.write(exifinfo_data) if shared.opts.save_log_fn != '' and len(exifinfo_data) > 0: @@ -524,7 +525,7 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='jpg', i file_decoration = shared.opts.samples_filename_pattern or "[seed]-[prompt_spaces]" add_number = shared.opts.save_images_add_number or file_decoration == '' if file_decoration != "" and add_number: - file_decoration = "-" + file_decoration + file_decoration = f"-{file_decoration}" file_decoration = namegen.apply(file_decoration) + suffix if add_number: basecount = get_next_sequence_number(path, basename) diff --git a/modules/img2img.py b/modules/img2img.py index 34c0dd168..6fbdaa332 100644 --- a/modules/img2img.py +++ b/modules/img2img.py @@ -33,7 +33,8 @@ def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args): break try: img = Image.open(image) - except UnidentifiedImageError: + except UnidentifiedImageError as e: + shared.log.error(f"Image error: {e}") continue # Use the EXIF orientation of photos taken by smartphones. img = ImageOps.exif_transpose(img) diff --git a/modules/interrogate.py b/modules/interrogate.py index 91c00e129..0a9613b4b 100644 --- a/modules/interrogate.py +++ b/modules/interrogate.py @@ -26,7 +26,7 @@ def category_types(): def download_default_clip_interrogate_categories(content_dir): shared.log.info("Downloading CLIP categories...") - tmpdir = content_dir + "_tmp" + tmpdir = f"{content_dir}_tmp" cat_types = ["artists", "flavors", "mediums", "movements"] try: @@ -211,7 +211,7 @@ class InterrogateModels: if shared.opts.interrogate_return_ranks: res += f", ({match}:{score/100:.3f})" else: - res += ", " + match + res += f", {match}" except Exception as e: errors.display(e, 'interrogate') diff --git a/modules/mac_specific.py b/modules/mac_specific.py index 9e3d13243..c4e26784b 100644 --- a/modules/mac_specific.py +++ b/modules/mac_specific.py @@ -53,6 +53,11 @@ if has_mps: CondFunc('torch.cumsum', cumsum_fix_func, None) CondFunc('torch.Tensor.cumsum', cumsum_fix_func, None) CondFunc('torch.narrow', lambda orig_func, *args, **kwargs: orig_func(*args, **kwargs).clone(), None) - if version.parse(torch.__version__) == version.parse("2.0"): + # MPS workaround for https://github.com/pytorch/pytorch/issues/96113 - CondFunc('torch.nn.functional.layer_norm', lambda orig_func, x, normalized_shape, weight, bias, eps, **kwargs: orig_func(x.float(), normalized_shape, weight.float() if weight is not None else None, bias.float() if bias is not None else bias, eps).to(x.dtype), lambda *args, **kwargs: len(args) == 6) + CondFunc('torch.nn.functional.layer_norm', lambda orig_func, x, normalized_shape, weight, bias, eps, **kwargs: orig_func(x.float(), normalized_shape, weight.float() if weight is not None else None, bias.float() if bias is not None else bias, eps).to(x.dtype), lambda _, input, *args, **kwargs: len(args) == 4 and input.device.type == 'mps') + + # MPS workaround for https://github.com/pytorch/pytorch/issues/92311 + if platform.processor() == 'i386': + for funcName in ['torch.argmax', 'torch.Tensor.argmax']: + CondFunc(funcName, lambda _, input, *args, **kwargs: torch.max(input.float() if input.dtype == torch.int64 else input, *args, **kwargs)[1], lambda _, input, *args, **kwargs: input.device.type == 'mps') diff --git a/modules/middleware.py b/modules/middleware.py index 7e29a2c91..1ea34340e 100644 --- a/modules/middleware.py +++ b/modules/middleware.py @@ -1,3 +1,4 @@ +import ssl import time import datetime import logging @@ -17,6 +18,7 @@ errors.install() def setup_middleware(app: FastAPI, cmd_opts): log.info('Initializing middleware') + ssl._create_default_https_context = ssl._create_unverified_context # pylint: disable=protected-access uvicorn_logger=logging.getLogger("uvicorn.error") uvicorn_logger.disabled = True from fastapi.middleware.cors import CORSMiddleware diff --git a/modules/modelloader.py b/modules/modelloader.py index dce51549c..831de6631 100644 --- a/modules/modelloader.py +++ b/modules/modelloader.py @@ -22,9 +22,6 @@ def load_models(model_path: str, model_url: str = None, command_path: str = None """ output = [] - if ext_filter is None: - ext_filter = [] - try: places = [] @@ -39,22 +36,14 @@ def load_models(model_path: str, model_url: str = None, command_path: str = None places.append(model_path) for place in places: - if os.path.exists(place): - for file in glob.iglob(os.path.join(place, '**/**'), recursive=True): - full_path = file - if os.path.isdir(full_path): - continue - if os.path.islink(full_path) and not os.path.exists(full_path): - print(f"Skipping broken symlink: {full_path}") - continue - if ext_blacklist is not None and any([full_path.endswith(x) for x in ext_blacklist]): - continue - if len(ext_filter) != 0: - _model_name, extension = os.path.splitext(file) - if extension not in ext_filter: - continue - if file not in output: - output.append(full_path) + for full_path in shared.walk_files(place, allowed_extensions=ext_filter): + if os.path.islink(full_path) and not os.path.exists(full_path): + print(f"Skipping broken symlink: {full_path}") + continue + if ext_blacklist is not None and any([full_path.endswith(x) for x in ext_blacklist]): + continue + if full_path not in output: + output.append(full_path) if model_url is not None and len(output) == 0: if download_name is not None: @@ -131,20 +120,6 @@ def move_files(src_path: str, dest_path: str, ext_filter: str = None): pass -builtin_upscaler_classes = [] -forbidden_upscaler_classes = set() - - -def list_builtin_upscalers(): - load_upscalers() - builtin_upscaler_classes.clear() - builtin_upscaler_classes.extend(Upscaler.__subclasses__()) - -def forbid_loaded_nonbuiltin_upscalers(): - for cls in Upscaler.__subclasses__(): - if cls not in builtin_upscaler_classes: - forbidden_upscaler_classes.add(cls) - def load_upscalers(): # We can only do this 'magic' method to dynamically load upscalers if they are referenced, @@ -161,10 +136,16 @@ def load_upscalers(): datas = [] commandline_options = vars(shared.cmd_opts) - for cls in Upscaler.__subclasses__(): - if cls in forbidden_upscaler_classes: - continue + # some of upscaler classes will not go away after reloading their modules, and we'll end + # up with two copies of those classes. The newest copy will always be the last in the list, + # so we go from end to beginning and ignore duplicates + used_classes = {} + for cls in reversed(Upscaler.__subclasses__()): + classname = str(cls) + if classname not in used_classes: + used_classes[classname] = cls + for cls in reversed(used_classes.values()): name = cls.__name__ cmd_name = f"{name.lower().replace('upscaler', '')}_models_path" scaler = cls(commandline_options.get(cmd_name, None)) diff --git a/modules/models/diffusion/ddpm_edit.py b/modules/models/diffusion/ddpm_edit.py index f3d49c44c..f880bc3c7 100644 --- a/modules/models/diffusion/ddpm_edit.py +++ b/modules/models/diffusion/ddpm_edit.py @@ -223,7 +223,7 @@ class DDPM(pl.LightningModule): for k in keys: for ik in ignore_keys: if k.startswith(ik): - print("Deleting key {} from state_dict.".format(k)) + print(f"Deleting key {k} from state_dict.") del sd[k] missing, unexpected = self.load_state_dict(sd, strict=False) if not only_model else self.model.load_state_dict( sd, strict=False) @@ -386,7 +386,7 @@ class DDPM(pl.LightningModule): _, loss_dict_no_ema = self.shared_step(batch) with self.ema_scope(): _, loss_dict_ema = self.shared_step(batch) - loss_dict_ema = {key + '_ema': loss_dict_ema[key] for key in loss_dict_ema} + loss_dict_ema = {f"{key}_ema": loss_dict_ema[key] for key in loss_dict_ema} self.log_dict(loss_dict_no_ema, prog_bar=False, logger=True, on_step=False, on_epoch=True) self.log_dict(loss_dict_ema, prog_bar=False, logger=True, on_step=False, on_epoch=True) diff --git a/modules/models/diffusion/uni_pc/uni_pc.py b/modules/models/diffusion/uni_pc/uni_pc.py index fc78bd42d..4df51e587 100644 --- a/modules/models/diffusion/uni_pc/uni_pc.py +++ b/modules/models/diffusion/uni_pc/uni_pc.py @@ -95,7 +95,7 @@ class NoiseScheduleVP: """ if schedule not in ['discrete', 'linear', 'cosine']: - raise ValueError("Unsupported noise schedule {}. The schedule needs to be 'discrete' or 'linear' or 'cosine'".format(schedule)) + raise ValueError(f"Unsupported noise schedule {schedule}. The schedule needs to be 'discrete' or 'linear' or 'cosine'") self.schedule = schedule if schedule == 'discrete': @@ -382,7 +382,7 @@ def get_time_steps(noise_schedule, skip_type, t_T, t_0, N, device): t = torch.linspace(t_T**(1. / t_order), t_0**(1. / t_order), N + 1).pow(t_order).to(device) return t else: - raise ValueError("Unsupported skip_type {}, need to be 'logSNR' or 'time_uniform' or 'time_quadratic'".format(skip_type)) + raise ValueError(f"Unsupported skip_type {skip_type}, need to be 'logSNR' or 'time_uniform' or 'time_quadratic'") class UniPC: def __init__( diff --git a/modules/paths.py b/modules/paths.py index 0bda3a780..ca84d6c93 100644 --- a/modules/paths.py +++ b/modules/paths.py @@ -23,7 +23,7 @@ for possible_sd_path in possible_sd_paths: sd_path = os.path.abspath(possible_sd_path) break -assert sd_path is not None, "Couldn't find Stable Diffusion in any of: " + str(possible_sd_paths) +assert sd_path is not None, f"Couldn't find Stable Diffusion in any of: {possible_sd_paths}" path_dirs = [ (sd_path, 'ldm', 'Stable Diffusion', []), diff --git a/modules/processing.py b/modules/processing.py index 9931f6d78..fdeb5cd75 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -14,6 +14,7 @@ from ldm.data.util import AddMiDaS from ldm.models.diffusion.ddpm import LatentDepth2ImageDiffusion from einops import repeat, rearrange from blendmodes.blend import blendLayers, BlendType +from installer import git_commit import modules.sd_hijack from modules import devices, prompt_parser, masking, sd_samplers, lowvram, generation_parameters_copypaste, script_callbacks, extra_networks, sd_vae_approx, scripts # pylint: disable=unused-import from modules.sd_hijack import model_hijack @@ -40,56 +41,41 @@ def setup_color_correction(image): def apply_color_correction(correction, original_image): logging.info("Applying color correction.") image = Image.fromarray(cv2.cvtColor(exposure.match_histograms( - cv2.cvtColor( - np.asarray(original_image), - cv2.COLOR_RGB2LAB - ), + cv2.cvtColor(np.asarray(original_image), cv2.COLOR_RGB2LAB), correction, channel_axis=2 ), cv2.COLOR_LAB2RGB).astype("uint8")) - image = blendLayers(image, original_image, BlendType.LUMINOSITY) - return image def apply_overlay(image, paste_loc, index, overlays): if overlays is None or index >= len(overlays): return image - overlay = overlays[index] - if paste_loc is not None: x, y, w, h = paste_loc base_image = Image.new('RGBA', (overlay.width, overlay.height)) image = images.resize_image(1, image, w, h) base_image.paste(image, (x, y)) image = base_image - image = image.convert('RGBA') image.alpha_composite(overlay) image = image.convert('RGB') - return image def txt2img_image_conditioning(sd_model, x, width, height): if sd_model.model.conditioning_key in {'hybrid', 'concat'}: # Inpainting models - # The "masked-image" in this case will just be all zeros since the entire image is masked. image_conditioning = torch.zeros(x.shape[0], 3, height, width, device=x.device) image_conditioning = sd_model.get_first_stage_encoding(sd_model.encode_first_stage(image_conditioning)) - # Add the fake full 1s mask to the first dimension. image_conditioning = torch.nn.functional.pad(image_conditioning, (0, 0, 0, 0, 1, 0), value=1.0) image_conditioning = image_conditioning.to(x.dtype) - return image_conditioning - elif sd_model.model.conditioning_key == "crossattn-adm": # UnCLIP models - return x.new_zeros(x.shape[0], 2*sd_model.noise_augmentor.time_embed.dim, dtype=x.dtype, device=x.device) - else: # Dummy zero conditioning if we're not using inpainting or unclip models. # Still takes up a bit of memory, but no encoder call. @@ -165,7 +151,6 @@ class StableDiffusionProcessing: def txt2img_image_conditioning(self, x, width=None, height=None): self.is_using_inpainting_conditioning = self.sd_model.model.conditioning_key in {'hybrid', 'concat'} - return txt2img_image_conditioning(self.sd_model, x, width or self.width, height or self.height) def depth2img_image_conditioning(self, source_image): @@ -174,7 +159,6 @@ class StableDiffusionProcessing: transformed = transformer({"jpg": rearrange(source_image[0], "c h w -> h w c")}) midas_in = torch.from_numpy(transformed["midas_in"][None, ...]).to(device=shared.device) midas_in = repeat(midas_in, "1 ... -> n ...", n=self.batch_size) - conditioning_image = self.sd_model.get_first_stage_encoding(self.sd_model.encode_first_stage(source_image)) conditioning = torch.nn.functional.interpolate( self.sd_model.depth_model(midas_in), @@ -182,14 +166,12 @@ class StableDiffusionProcessing: mode="bicubic", align_corners=False, ) - (depth_min, depth_max) = torch.aminmax(conditioning) conditioning = 2. * (conditioning - depth_min) / (depth_max - depth_min) - 1. return conditioning def edit_image_conditioning(self, source_image): conditioning_image = self.sd_model.encode_first_stage(source_image).mode() - return conditioning_image def unclip_image_conditioning(self, source_image): @@ -202,7 +184,6 @@ class StableDiffusionProcessing: def inpainting_image_conditioning(self, source_image, latent_image, image_mask=None): self.is_using_inpainting_conditioning = True - # Handle the different mask inputs if image_mask is not None: if torch.is_tensor(image_mask): @@ -216,7 +197,6 @@ class StableDiffusionProcessing: conditioning_mask = torch.round(conditioning_mask) else: conditioning_mask = source_image.new_ones(1, 1, *source_image.shape[-2:]) - # Create another latent image, this time with a masked version of the original input. # Smoothly interpolate between the masked and unmasked latent conditioning image using a parameter. conditioning_mask = conditioning_mask.to(device=source_image.device, dtype=source_image.dtype) @@ -225,35 +205,27 @@ class StableDiffusionProcessing: source_image * (1.0 - conditioning_mask), getattr(self, "inpainting_mask_weight", shared.opts.inpainting_mask_weight) ) - # Encode the new masked image using first stage of network. conditioning_image = self.sd_model.get_first_stage_encoding(self.sd_model.encode_first_stage(conditioning_image)) - # Create the concatenated conditioning tensor to be fed to `c_concat` conditioning_mask = torch.nn.functional.interpolate(conditioning_mask, size=latent_image.shape[-2:]) conditioning_mask = conditioning_mask.expand(conditioning_image.shape[0], -1, -1, -1) image_conditioning = torch.cat([conditioning_mask, conditioning_image], dim=1) image_conditioning = image_conditioning.to(shared.device).type(self.sd_model.dtype) - return image_conditioning def img2img_image_conditioning(self, source_image, latent_image, image_mask=None): source_image = devices.cond_cast_float(source_image) - # HACK: Using introspection as the Depth2Image model doesn't appear to uniquely # identify itself with a field common to all models. The conditioning_key is also hybrid. if isinstance(self.sd_model, LatentDepth2ImageDiffusion): return self.depth2img_image_conditioning(source_image) - if self.sd_model.cond_stage_key == "edit": return self.edit_image_conditioning(source_image) - if self.sampler.conditioning_key in {'hybrid', 'concat'}: return self.inpainting_image_conditioning(source_image, latent_image, image_mask=image_mask) - if self.sampler.conditioning_key == "crossattn-adm": return self.unclip_image_conditioning(source_image) - # Dummy zero conditioning if we're not using inpainting or depth model. return latent_image.new_zeros(latent_image.shape[0], 5, 1, 1) @@ -344,7 +316,6 @@ class Processed: "clip_skip": self.clip_skip, "is_using_inpainting_conditioning": self.is_using_inpainting_conditioning, } - return json.dumps(obj) def infotext(self, p: StableDiffusionProcessing, index): @@ -468,6 +439,7 @@ def create_infotext(p: StableDiffusionProcessing, all_prompts, all_seeds, all_su "Clip skip": p.clip_skip, "ENSD": None if opts.eta_noise_seed_delta == 0 else opts.eta_noise_seed_delta, "Init image hash": getattr(p, 'init_img_hash', None), + "Version": git_commit, "Token merging ratio": None if not (opts.token_merging or cmd_opts.token_merging) or opts.token_merging_hr_only else opts.token_merging_ratio, "Token merging ratio hr": None if not (opts.token_merging or cmd_opts.token_merging) else opts.token_merging_ratio_hr, "Token merging random": None if opts.token_merging_random is False else opts.token_merging_random, @@ -479,7 +451,7 @@ def create_infotext(p: StableDiffusionProcessing, all_prompts, all_seeds, all_su } generation_params.update(p.extra_generation_params) generation_params_text = ", ".join([k if k == v else f'{k}: {generation_parameters_copypaste.quote(v)}' for k, v in generation_params.items() if v is not None]) - negative_prompt_text = "\nNegative prompt: " + p.all_negative_prompts[index] if p.all_negative_prompts[index] else "" + negative_prompt_text = f"\nNegative prompt: {p.all_negative_prompts[index]}" if p.all_negative_prompts[index] else "" return f"{all_prompts[index]}{negative_prompt_text}\n{generation_params_text}".strip() @@ -726,7 +698,16 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: if not p.disable_extra_networks and extra_network_data: extra_networks.deactivate(p, extra_network_data) devices.torch_gc() - res = Processed(p, output_images, p.all_seeds[0], infotext(), comments="".join(["\n\n" + x for x in comments]), subseed=p.all_subseeds[0], index_of_first_image=index_of_first_image, infotexts=infotexts) + res = Processed( + p, + images_list=output_images, + seed=p.all_seeds[0], + info=infotext(), + comments="".join(f"\n\n{comment}" for comment in comments), + subseed=p.all_subseeds[0], + index_of_first_image=index_of_first_image, + infotexts=infotexts, + ) if p.scripts is not None: p.scripts.postprocess(p, res) return res diff --git a/modules/realesrgan_model.py b/modules/realesrgan_model.py index 75dccf1ac..db05e8b1a 100644 --- a/modules/realesrgan_model.py +++ b/modules/realesrgan_model.py @@ -1,12 +1,10 @@ import os import sys - import numpy as np from PIL import Image from basicsr.utils.download_util import load_file_from_url - from modules.upscaler import Upscaler, UpscalerData -from modules.shared import cmd_opts, opts, device +from modules.shared import opts, device from modules import modelloader import modules.errors as errors @@ -27,9 +25,9 @@ class UpscalerRealESRGAN(Upscaler): for scaler in scalers: if scaler.local_data_path.startswith("http"): filename = modelloader.friendly_name(scaler.local_data_path) - local = next(iter([local_model for local_model in local_model_paths if local_model.endswith(filename + '.pth')]), None) - if local: - scaler.local_data_path = local + local_model_candidates = [local_model for local_model in local_model_paths if local_model.endswith(f"{filename}.pth")] + if local_model_candidates: + scaler.local_data_path = local_model_candidates[0] if scaler.name in opts.realesrgan_enabled_models: self.scalers.append(scaler) diff --git a/modules/safe.py b/modules/safe.py index 483b85a90..4cc5a10f5 100644 --- a/modules/safe.py +++ b/modules/safe.py @@ -38,7 +38,7 @@ class RestrictedUnpickler(pickle.Unpickler): return getattr(collections, name) if module == 'torch._utils' and name in ['_rebuild_tensor_v2', '_rebuild_parameter', '_rebuild_device_tensor_from_numpy']: return getattr(torch._utils, name) # pylint: disable=protected-access - if module == 'torch' and name in ['FloatStorage', 'HalfStorage', 'IntStorage', 'LongStorage', 'DoubleStorage', 'ByteStorage', 'float32']: + if module == 'torch' and name in ['FloatStorage', 'HalfStorage', 'IntStorage', 'LongStorage', 'DoubleStorage', 'ByteStorage', 'float32', 'BFloat16Storage']: return getattr(torch, name) if module == 'torch.nn.modules.container' and name in ['ParameterDict']: return getattr(torch.nn.modules.container, name) diff --git a/modules/scripts.py b/modules/scripts.py index 3c168d2d5..ef173ed5c 100644 --- a/modules/scripts.py +++ b/modules/scripts.py @@ -142,7 +142,8 @@ class Script: def elem_id(self, item_id): """helper function to generate id for a HTML element, constructs final id out of script name, tab and user-supplied item_id""" need_tabname = self.show(True) == self.show(False) - tabname = ('img2img' if self.is_img2img else 'txt2txt') + "_" if need_tabname else "" + tabkind = 'img2img' if self.is_img2img else 'txt2txt' + tabname = f"{tabkind}_" if need_tabname else "" title = re.sub(r'[^a-z_0-9]', '', re.sub(r'\s', '_', self.title().lower())) return f'script_{tabname}{title}_{item_id}' @@ -481,7 +482,7 @@ def add_classes_to_gradio_component(comp): elem_classes = comp.elem_classes if elem_classes is None: elem_classes = [] - comp.elem_classes = ["gradio-" + comp.get_block_name(), *(elem_classes)] + comp.elem_classes = [f"gradio-{comp.get_block_name()}", *(comp.elem_classes or [])] if getattr(comp, 'multiselect', False): comp.elem_classes.append('multiselect') diff --git a/modules/sd_hijack.py b/modules/sd_hijack.py index 2a5f26662..a783ea51a 100644 --- a/modules/sd_hijack.py +++ b/modules/sd_hijack.py @@ -237,8 +237,9 @@ class StableDiffusionModelHijack: self.comments = [] def get_prompt_lengths(self, text): + if self.clip is None: + return 0, 0 _, token_count = self.clip.process_texts([text]) - return token_count, self.clip.get_target_prompt_token_count(token_count) diff --git a/modules/sd_hijack_clip_old.py b/modules/sd_hijack_clip_old.py index 6d9fbbe6c..a3476e956 100644 --- a/modules/sd_hijack_clip_old.py +++ b/modules/sd_hijack_clip_old.py @@ -75,7 +75,8 @@ def forward_old(self: sd_hijack_clip.FrozenCLIPEmbedderWithCustomWordsBase, text self.hijack.comments += hijack_comments if len(used_custom_terms) > 0: - self.hijack.comments.append("Used embeddings: " + ", ".join([f'{word} [{checksum}]' for word, checksum in used_custom_terms])) + embedding_names = ", ".join(f"{word} [{checksum}]" for word, checksum in used_custom_terms) + self.hijack.comments.append(f"Used embeddings: {embedding_names}") self.hijack.fixes = hijack_fixes return self.process_tokens(remade_batch_tokens, batch_multipliers) diff --git a/modules/sd_hijack_optimizations.py b/modules/sd_hijack_optimizations.py index 596162782..e8c8ce763 100644 --- a/modules/sd_hijack_optimizations.py +++ b/modules/sd_hijack_optimizations.py @@ -275,6 +275,9 @@ def sub_quad_attention_forward(self, x, context=None, mask=None): k = k.unflatten(-1, (h, -1)).transpose(1,2).flatten(end_dim=1) v = v.unflatten(-1, (h, -1)).transpose(1,2).flatten(end_dim=1) + if q.device.type == 'mps': + q, k, v = q.contiguous(), k.contiguous(), v.contiguous() + dtype = q.dtype if shared.opts.upcast_attn: q, k = q.float(), k.float() diff --git a/modules/sd_hijack_unet.py b/modules/sd_hijack_unet.py index 7ff553ae3..252e8e5fc 100644 --- a/modules/sd_hijack_unet.py +++ b/modules/sd_hijack_unet.py @@ -19,7 +19,7 @@ class TorchHijackForUnet: if hasattr(torch, item): return getattr(torch, item) - raise AttributeError("'{}' object has no attribute '{}'".format(type(self).__name__, item)) + raise AttributeError(f"'{type(self).__name__}' object has no attribute '{item}'") def cat(self, tensors, *args, **kwargs): if len(tensors) == 2: diff --git a/modules/sd_models.py b/modules/sd_models.py index 107e771e7..2db6ee587 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -2,6 +2,7 @@ import collections import os.path import re import io +import threading from os import mkdir from urllib import request from rich import progress # pylint: disable=redefined-builtin @@ -41,7 +42,7 @@ class CheckpointInfo: self.name_for_extra = os.path.splitext(os.path.basename(filename))[0] self.model_name = os.path.splitext(name.replace("/", "_").replace("\\", "_"))[0] self.hash = model_hash(filename) - self.sha256 = hashes.sha256_from_cache(self.filename, "checkpoint/" + name) + self.sha256 = hashes.sha256_from_cache(self.filename, f"checkpoint/{name}") self.shorthash = self.sha256[0:10] if self.sha256 else None self.title = name if self.shorthash is None else f'{name} [{self.shorthash}]' self.ids = [self.hash, self.model_name, self.title, name, f'{name} [{self.hash}]'] + ([self.shorthash, self.sha256, f'{self.name} [{self.shorthash}]'] if self.shorthash else []) @@ -59,7 +60,7 @@ class CheckpointInfo: checkpoint_aliases[i] = self def calculate_shorthash(self): - self.sha256 = hashes.sha256(self.filename, "checkpoint/" + self.name) + self.sha256 = hashes.sha256(self.filename, f"checkpoint/{self.name}") if self.sha256 is None: return self.shorthash = self.sha256[0:10] @@ -349,6 +350,29 @@ sd1_clip_weight = 'cond_stage_model.transformer.text_model.embeddings.token_embe sd2_clip_weight = 'cond_stage_model.model.transformer.resblocks.0.attn.in_proj_weight' +class SdModelData: + def __init__(self): + self.sd_model = None + self.lock = threading.Lock() + + def get_sd_model(self): + if self.sd_model is None: + with self.lock: + try: + load_model() + except Exception as e: + shared.log.error("Failed to load stable diffusion model") + errors.display(e, "loading stable diffusion model") + self.sd_model = None + return self.sd_model + + def set_sd_model(self, v): + self.sd_model = v + + +model_data = SdModelData() + + def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None): shared.log.debug(f'Load model: info={checkpoint_info is not None} dict={already_loaded_state_dict is not None}') from modules import lowvram, sd_hijack @@ -358,9 +382,11 @@ def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None) if timer is None: timer = Timer() current_checkpoint_info = None - if shared.sd_model: - current_checkpoint_info = shared.sd_model.sd_checkpoint_info + if model_data.sd_model is not None: + sd_hijack.model_hijack.undo_hijack(model_data.sd_model) + current_checkpoint_info = model_data.sd_model.sd_checkpoint_info unload_model_weights() + model_data.sd_model = None do_inpainting_hijack() devices.set_cuda_params() if already_loaded_state_dict is not None: @@ -405,14 +431,14 @@ def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None) if shared.cmd_opts.use_ipex: sd_model = torch.xpu.optimize(sd_model, dtype=devices.dtype) shared.log.info("Applied IPEX Optimize") - shared.sd_model = sd_model + model_data.sd_model = sd_model sd_hijack.model_hijack.embedding_db.load_textual_inversion_embeddings(force_reload=True) # Reload embeddings after model load as they may or may not fit the model timer.record("embeddings") script_callbacks.model_loaded_callback(sd_model) timer.record("callbacks") shared.log.info(f"Model loaded in {timer.summary()}") current_checkpoint_info = None - devices.torch_gc() + devices.torch_gc(force=True) shared.log.info(f'Model load finished: {memory_stats()}') @@ -426,7 +452,7 @@ def reload_model_weights(sd_model=None, info=None): from modules import lowvram, sd_hijack checkpoint_info = info or select_checkpoint() if not sd_model: - sd_model = shared.sd_model + sd_model = model_data.sd_model if sd_model is None: # previous model load failed current_checkpoint_info = None else: @@ -443,7 +469,6 @@ def reload_model_weights(sd_model=None, info=None): else: unload_model_weights() sd_model = None - shared.sd_model = None timer = Timer() state_dict = get_checkpoint_state_dict(checkpoint_info, timer) checkpoint_config = sd_models_config.find_checkpoint_config(state_dict, checkpoint_info) @@ -452,7 +477,7 @@ def reload_model_weights(sd_model=None, info=None): del sd_model checkpoints_loaded.clear() load_model(checkpoint_info, already_loaded_state_dict=state_dict, timer=timer) - return shared.sd_model + return model_data.sd_model try: load_model_weights(sd_model, checkpoint_info, state_dict, timer) except Exception: @@ -471,14 +496,12 @@ def reload_model_weights(sd_model=None, info=None): def unload_model_weights(sd_model=None, _info=None): from modules import sd_hijack - if shared.sd_model: - # shared.sd_model.cond_stage_model.to(devices.cpu) - # shared.sd_model.first_stage_model.to(devices.cpu) - shared.sd_model.to(devices.cpu) - sd_hijack.model_hijack.undo_hijack(shared.sd_model) - shared.sd_model = None + if model_data.sd_model: + model_data.sd_model.to(devices.cpu) + sd_hijack.model_hijack.undo_hijack(model_data.sd_model) + model_data.sd_model = None sd_model = None - devices.torch_gc() + devices.torch_gc(force=True) shared.log.debug(f'Model weights unloaded: {memory_stats()}') return sd_model diff --git a/modules/sd_models_config.py b/modules/sd_models_config.py index a9c515b14..819bebd34 100644 --- a/modules/sd_models_config.py +++ b/modules/sd_models_config.py @@ -109,7 +109,7 @@ def find_checkpoint_config_near_filename(info): if info is None: return None - config = os.path.splitext(info.filename)[0] + ".yaml" + config = f"{os.path.splitext(info.filename)[0]}.yaml" if os.path.exists(config): return config diff --git a/modules/sd_samplers_kdiffusion.py b/modules/sd_samplers_kdiffusion.py index 8b4bf0652..e83850da2 100644 --- a/modules/sd_samplers_kdiffusion.py +++ b/modules/sd_samplers_kdiffusion.py @@ -206,7 +206,7 @@ class TorchHijack: if hasattr(torch, item): return getattr(torch, item) - raise AttributeError("'{}' object has no attribute '{}'".format(type(self).__name__, item)) + raise AttributeError(f"'{type(self).__name__}' object has no attribute '{item}'") def randn_like(self, x): if self.sampler_noises: diff --git a/modules/sd_vae.py b/modules/sd_vae.py index 27bfb070d..6b8a9c6f8 100644 --- a/modules/sd_vae.py +++ b/modules/sd_vae.py @@ -82,7 +82,7 @@ def refresh_vae_list(): def find_vae_near_checkpoint(checkpoint_file): checkpoint_path = os.path.splitext(checkpoint_file)[0] - for vae_location in [checkpoint_path + ".vae.pt", checkpoint_path + ".vae.ckpt", checkpoint_path + ".vae.safetensors"]: + for vae_location in [f"{checkpoint_path}.vae.pt", f"{checkpoint_path}.vae.ckpt", f"{checkpoint_path}.vae.safetensors"]: if os.path.isfile(vae_location): return vae_location diff --git a/modules/shared.py b/modules/shared.py index 832f9b43c..62e12cbf1 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -7,6 +7,7 @@ import urllib.request import gradio as gr import tqdm import requests +from ldm.models.diffusion.ddpm import LatentDiffusion from modules import errors, ui_components, shared_items, cmd_args 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 # pylint: disable=W0611 import modules.interrogate @@ -27,7 +28,6 @@ cmd_opts, _ = parser.parse_known_args() hide_dirs = {"visible": not cmd_opts.hide_ui_dir_config} is_device_dml = False xformers_available = False -sd_model = None clip_model = None interrogator = modules.interrogate.InterrogateModels("interrogate") sd_upscalers = [] @@ -411,7 +411,7 @@ options_templates.update(options_section(('ui', "User interface"), { "keyedit_precision_attention": OptionInfo(0.1, "Ctrl+up/down precision when editing (attention:1.1)", gr.Slider, {"minimum": 0.01, "maximum": 0.2, "step": 0.001}), "keyedit_precision_extra": OptionInfo(0.05, "Ctrl+up/down precision when editing ", gr.Slider, {"minimum": 0.01, "maximum": 0.2, "step": 0.001}), "keyedit_delimiters": OptionInfo(".,\/!?%^*;:{}=`~()", "Ctrl+up/down word delimiters"), # pylint: disable=anomalous-backslash-in-string - "quicksettings": OptionInfo("sd_model_checkpoint", "Quicksettings list"), + "quicksettings_list": OptionInfo(["sd_model_checkpoint"], "Quicksettings list", ui_components.DropdownMulti, lambda: {"choices": list(opts.data_labels.keys())}), "hidden_tabs": OptionInfo([], "Hidden UI tabs", ui_components.DropdownMulti, lambda: {"choices": [x for x in tab_names]}), "ui_tab_reorder": OptionInfo("From Text, From Image, Process Image", "UI tabs order"), "ui_scripts_reorder": OptionInfo("Enable Dynamic Thresholding, ControlNet", "UI scripts order"), @@ -550,6 +550,8 @@ class Options: def load(self, filename): with open(filename, "r", encoding="utf8") as file: self.data = json.load(file) + if self.data.get('quicksettings') is not None and self.data.get('quicksettings_list') is None: + self.data['quicksettings_list'] = [i.strip() for i in self.data.get('quicksettings').split(',')] bad_settings = 0 for k, v in self.data.items(): info = self.data_labels.get(k, None) @@ -750,3 +752,21 @@ def html(filename): with open(path, encoding="utf8") as file: return file.read() return "" + +class Shared(sys.modules[__name__].__class__): + # this class is here to provide sd_model field as a property, so that it can be created and loaded on demand rather than at program startup. + sd_model_val = None + + @property + def sd_model(self): + import modules.sd_models # pylint: disable=W0621 + # return modules.sd_models.model_data.sd_model + return modules.sd_models.model_data.get_sd_model() + + @sd_model.setter + def sd_model(self, value): + import modules.sd_models # pylint: disable=W0621 + modules.sd_models.model_data.set_sd_model(value) + +sd_model: LatentDiffusion = None # this var is here just for IDE's type checking; it cannot be accessed because the class field above will be accessed instead +sys.modules[__name__].__class__ = Shared diff --git a/modules/textual_inversion/autocrop.py b/modules/textual_inversion/autocrop.py index 68e1103c5..7097ecd36 100644 --- a/modules/textual_inversion/autocrop.py +++ b/modules/textual_inversion/autocrop.py @@ -1,10 +1,8 @@ +import os import cv2 import requests -import os -from collections import defaultdict -from math import log, sqrt import numpy as np -from PIL import Image, ImageDraw +from PIL import ImageDraw GREEN = "#0F0" BLUE = "#00F" @@ -12,63 +10,63 @@ RED = "#F00" def crop_image(im, settings): - """ Intelligently crop an image to the subject matter """ + """ Intelligently crop an image to the subject matter """ - scale_by = 1 - if is_landscape(im.width, im.height): - scale_by = settings.crop_height / im.height - elif is_portrait(im.width, im.height): - scale_by = settings.crop_width / im.width - elif is_square(im.width, im.height): - if is_square(settings.crop_width, settings.crop_height): - scale_by = settings.crop_width / im.width - elif is_landscape(settings.crop_width, settings.crop_height): - scale_by = settings.crop_width / im.width - elif is_portrait(settings.crop_width, settings.crop_height): - scale_by = settings.crop_height / im.height + scale_by = 1 + if is_landscape(im.width, im.height): + scale_by = settings.crop_height / im.height + elif is_portrait(im.width, im.height): + scale_by = settings.crop_width / im.width + elif is_square(im.width, im.height): + if is_square(settings.crop_width, settings.crop_height): + scale_by = settings.crop_width / im.width + elif is_landscape(settings.crop_width, settings.crop_height): + scale_by = settings.crop_width / im.width + elif is_portrait(settings.crop_width, settings.crop_height): + scale_by = settings.crop_height / im.height - im = im.resize((int(im.width * scale_by), int(im.height * scale_by))) - im_debug = im.copy() + im = im.resize((int(im.width * scale_by), int(im.height * scale_by))) + im_debug = im.copy() - focus = focal_point(im_debug, settings) + focus = focal_point(im_debug, settings) - # take the focal point and turn it into crop coordinates that try to center over the focal - # point but then get adjusted back into the frame - y_half = int(settings.crop_height / 2) - x_half = int(settings.crop_width / 2) + # take the focal point and turn it into crop coordinates that try to center over the focal + # point but then get adjusted back into the frame + y_half = int(settings.crop_height / 2) + x_half = int(settings.crop_width / 2) - x1 = focus.x - x_half - if x1 < 0: - x1 = 0 - elif x1 + settings.crop_width > im.width: - x1 = im.width - settings.crop_width + x1 = focus.x - x_half + if x1 < 0: + x1 = 0 + elif x1 + settings.crop_width > im.width: + x1 = im.width - settings.crop_width - y1 = focus.y - y_half - if y1 < 0: - y1 = 0 - elif y1 + settings.crop_height > im.height: - y1 = im.height - settings.crop_height + y1 = focus.y - y_half + if y1 < 0: + y1 = 0 + elif y1 + settings.crop_height > im.height: + y1 = im.height - settings.crop_height - x2 = x1 + settings.crop_width - y2 = y1 + settings.crop_height + x2 = x1 + settings.crop_width + y2 = y1 + settings.crop_height - crop = [x1, y1, x2, y2] + crop = [x1, y1, x2, y2] - results = [] + results = [] - results.append(im.crop(tuple(crop))) + results.append(im.crop(tuple(crop))) - if settings.annotate_image: - d = ImageDraw.Draw(im_debug) - rect = list(crop) - rect[2] -= 1 - rect[3] -= 1 - d.rectangle(rect, outline=GREEN) - results.append(im_debug) - if settings.destop_view_image: - im_debug.show() + if settings.annotate_image: + d = ImageDraw.Draw(im_debug) + rect = list(crop) + rect[2] -= 1 + rect[3] -= 1 + d.rectangle(rect, outline=GREEN) + results.append(im_debug) + if settings.destop_view_image: + im_debug.show() - return results + return results def focal_point(im, settings): corner_points = image_corner_points(im, settings) if settings.corner_points_weight > 0 else [] @@ -79,118 +77,118 @@ def focal_point(im, settings): weight_pref_total = 0 if len(corner_points) > 0: - weight_pref_total += settings.corner_points_weight + weight_pref_total += settings.corner_points_weight if len(entropy_points) > 0: - weight_pref_total += settings.entropy_points_weight + weight_pref_total += settings.entropy_points_weight if len(face_points) > 0: - weight_pref_total += settings.face_points_weight + weight_pref_total += settings.face_points_weight corner_centroid = None if len(corner_points) > 0: - corner_centroid = centroid(corner_points) - corner_centroid.weight = settings.corner_points_weight / weight_pref_total - pois.append(corner_centroid) + corner_centroid = centroid(corner_points) + corner_centroid.weight = settings.corner_points_weight / weight_pref_total + pois.append(corner_centroid) entropy_centroid = None if len(entropy_points) > 0: - entropy_centroid = centroid(entropy_points) - entropy_centroid.weight = settings.entropy_points_weight / weight_pref_total - pois.append(entropy_centroid) + entropy_centroid = centroid(entropy_points) + entropy_centroid.weight = settings.entropy_points_weight / weight_pref_total + pois.append(entropy_centroid) face_centroid = None if len(face_points) > 0: - face_centroid = centroid(face_points) - face_centroid.weight = settings.face_points_weight / weight_pref_total - pois.append(face_centroid) + face_centroid = centroid(face_points) + face_centroid.weight = settings.face_points_weight / weight_pref_total + pois.append(face_centroid) average_point = poi_average(pois, settings) if settings.annotate_image: - d = ImageDraw.Draw(im) - max_size = min(im.width, im.height) * 0.07 - if corner_centroid is not None: - color = BLUE - box = corner_centroid.bounding(max_size * corner_centroid.weight) - d.text((box[0], box[1]-15), "Edge: %.02f" % corner_centroid.weight, fill=color) - d.ellipse(box, outline=color) - if len(corner_points) > 1: - for f in corner_points: - d.rectangle(f.bounding(4), outline=color) - if entropy_centroid is not None: - color = "#ff0" - box = entropy_centroid.bounding(max_size * entropy_centroid.weight) - d.text((box[0], box[1]-15), "Entropy: %.02f" % entropy_centroid.weight, fill=color) - d.ellipse(box, outline=color) - if len(entropy_points) > 1: - for f in entropy_points: - d.rectangle(f.bounding(4), outline=color) - if face_centroid is not None: - color = RED - box = face_centroid.bounding(max_size * face_centroid.weight) - d.text((box[0], box[1]-15), "Face: %.02f" % face_centroid.weight, fill=color) - d.ellipse(box, outline=color) - if len(face_points) > 1: - for f in face_points: - d.rectangle(f.bounding(4), outline=color) + d = ImageDraw.Draw(im) + max_size = min(im.width, im.height) * 0.07 + if corner_centroid is not None: + color = BLUE + box = corner_centroid.bounding(max_size * corner_centroid.weight) + d.text((box[0], box[1]-15), f"Edge: {corner_centroid.weight:.02f}", fill=color) + d.ellipse(box, outline=color) + if len(corner_points) > 1: + for f in corner_points: + d.rectangle(f.bounding(4), outline=color) + if entropy_centroid is not None: + color = "#ff0" + box = entropy_centroid.bounding(max_size * entropy_centroid.weight) + d.text((box[0], box[1]-15), f"Entropy: {entropy_centroid.weight:.02f}", fill=color) + d.ellipse(box, outline=color) + if len(entropy_points) > 1: + for f in entropy_points: + d.rectangle(f.bounding(4), outline=color) + if face_centroid is not None: + color = RED + box = face_centroid.bounding(max_size * face_centroid.weight) + d.text((box[0], box[1]-15), f"Face: {face_centroid.weight:.02f}", fill=color) + d.ellipse(box, outline=color) + if len(face_points) > 1: + for f in face_points: + d.rectangle(f.bounding(4), outline=color) + + d.ellipse(average_point.bounding(max_size), outline=GREEN) - d.ellipse(average_point.bounding(max_size), outline=GREEN) - return average_point def image_face_points(im, settings): if settings.dnn_model_path is not None: - detector = cv2.FaceDetectorYN.create( - settings.dnn_model_path, - "", - (im.width, im.height), - 0.9, # score threshold - 0.3, # nms threshold - 5000 # keep top k before nms - ) - faces = detector.detect(np.array(im)) - results = [] - if faces[1] is not None: - for face in faces[1]: - x = face[0] - y = face[1] - w = face[2] - h = face[3] - results.append( - PointOfInterest( - int(x + (w * 0.5)), # face focus left/right is center - int(y + (h * 0.33)), # face focus up/down is close to the top of the head - size = w, - weight = 1/len(faces[1]) - ) - ) - return results + detector = cv2.FaceDetectorYN.create( + settings.dnn_model_path, + "", + (im.width, im.height), + 0.9, # score threshold + 0.3, # nms threshold + 5000 # keep top k before nms + ) + faces = detector.detect(np.array(im)) + results = [] + if faces[1] is not None: + for face in faces[1]: + x = face[0] + y = face[1] + w = face[2] + h = face[3] + results.append( + PointOfInterest( + int(x + (w * 0.5)), # face focus left/right is center + int(y + (h * 0.33)), # face focus up/down is close to the top of the head + size = w, + weight = 1/len(faces[1]) + ) + ) + return results else: - np_im = np.array(im) - gray = cv2.cvtColor(np_im, cv2.COLOR_BGR2GRAY) + np_im = np.array(im) + gray = cv2.cvtColor(np_im, cv2.COLOR_BGR2GRAY) - tries = [ - [ f'{cv2.data.haarcascades}haarcascade_eye.xml', 0.01 ], - [ f'{cv2.data.haarcascades}haarcascade_frontalface_default.xml', 0.05 ], - [ f'{cv2.data.haarcascades}haarcascade_profileface.xml', 0.05 ], - [ f'{cv2.data.haarcascades}haarcascade_frontalface_alt.xml', 0.05 ], - [ f'{cv2.data.haarcascades}haarcascade_frontalface_alt2.xml', 0.05 ], - [ f'{cv2.data.haarcascades}haarcascade_frontalface_alt_tree.xml', 0.05 ], - [ f'{cv2.data.haarcascades}haarcascade_eye_tree_eyeglasses.xml', 0.05 ], - [ f'{cv2.data.haarcascades}haarcascade_upperbody.xml', 0.05 ] - ] - for t in tries: - classifier = cv2.CascadeClassifier(t[0]) - minsize = int(min(im.width, im.height) * t[1]) # at least N percent of the smallest side - try: - faces = classifier.detectMultiScale(gray, scaleFactor=1.1, - minNeighbors=7, minSize=(minsize, minsize), flags=cv2.CASCADE_SCALE_IMAGE) - except: - continue + tries = [ + [ f'{cv2.data.haarcascades}haarcascade_eye.xml', 0.01 ], + [ f'{cv2.data.haarcascades}haarcascade_frontalface_default.xml', 0.05 ], + [ f'{cv2.data.haarcascades}haarcascade_profileface.xml', 0.05 ], + [ f'{cv2.data.haarcascades}haarcascade_frontalface_alt.xml', 0.05 ], + [ f'{cv2.data.haarcascades}haarcascade_frontalface_alt2.xml', 0.05 ], + [ f'{cv2.data.haarcascades}haarcascade_frontalface_alt_tree.xml', 0.05 ], + [ f'{cv2.data.haarcascades}haarcascade_eye_tree_eyeglasses.xml', 0.05 ], + [ f'{cv2.data.haarcascades}haarcascade_upperbody.xml', 0.05 ] + ] + for t in tries: + classifier = cv2.CascadeClassifier(t[0]) + minsize = int(min(im.width, im.height) * t[1]) # at least N percent of the smallest side + try: + faces = classifier.detectMultiScale(gray, scaleFactor=1.1, + minNeighbors=7, minSize=(minsize, minsize), flags=cv2.CASCADE_SCALE_IMAGE) + except: + continue - if len(faces) > 0: - rects = [[f[0], f[1], f[0] + f[2], f[1] + f[3]] for f in faces] - return [PointOfInterest((r[0] +r[2]) // 2, (r[1] + r[3]) // 2, size=abs(r[0]-r[2]), weight=1/len(rects)) for r in rects] + if len(faces) > 0: + rects = [[f[0], f[1], f[0] + f[2], f[1] + f[3]] for f in faces] + return [PointOfInterest((r[0] +r[2]) // 2, (r[1] + r[3]) // 2, size=abs(r[0]-r[2]), weight=1/len(rects)) for r in rects] return [] @@ -204,11 +202,11 @@ def image_corner_points(im, settings): np_im = np.array(grayscale) points = cv2.goodFeaturesToTrack( - np_im, - maxCorners=100, - qualityLevel=0.04, - minDistance=min(grayscale.width, grayscale.height)*0.06, - useHarrisDetector=False, + np_im, + maxCorners=100, + qualityLevel=0.04, + minDistance=min(grayscale.width, grayscale.height)*0.06, + useHarrisDetector=False, ) if points is None: @@ -216,8 +214,8 @@ def image_corner_points(im, settings): focal_points = [] for point in points: - x, y = point.ravel() - focal_points.append(PointOfInterest(x, y, size=4, weight=1/len(points))) + x, y = point.ravel() + focal_points.append(PointOfInterest(x, y, size=4, weight=1/len(points))) return focal_points @@ -226,13 +224,13 @@ def image_entropy_points(im, settings): landscape = im.height < im.width portrait = im.height > im.width if landscape: - move_idx = [0, 2] - move_max = im.size[0] + move_idx = [0, 2] + move_max = im.size[0] elif portrait: - move_idx = [1, 3] - move_max = im.size[1] + move_idx = [1, 3] + move_max = im.size[1] else: - return [] + return [] e_max = 0 crop_current = [0, 0, settings.crop_width, settings.crop_height] @@ -241,9 +239,9 @@ def image_entropy_points(im, settings): crop = im.crop(tuple(crop_current)) e = image_entropy(crop) - if (e > e_max): - e_max = e - crop_best = list(crop_current) + if e > e_max: + e_max = e + crop_best = list(crop_current) crop_current[move_idx[0]] += 4 crop_current[move_idx[1]] += 4 @@ -263,9 +261,9 @@ def image_entropy(im): return -np.log2(hist / hist.sum()).sum() def centroid(pois): - x = [poi.x for poi in pois] - y = [poi.y for poi in pois] - return PointOfInterest(sum(x)/len(pois), sum(y)/len(pois)) + x = [poi.x for poi in pois] + y = [poi.y for poi in pois] + return PointOfInterest(sum(x)/len(pois), sum(y)/len(pois)) def poi_average(pois, settings): @@ -283,59 +281,59 @@ def poi_average(pois, settings): def is_landscape(w, h): - return w > h + return w > h def is_portrait(w, h): - return h > w + return h > w def is_square(w, h): - return w == h + return w == h def download_and_cache_models(dirname): - download_url = 'https://github.com/opencv/opencv_zoo/blob/91fb0290f50896f38a0ab1e558b74b16bc009428/models/face_detection_yunet/face_detection_yunet_2022mar.onnx?raw=true' - model_file_name = 'face_detection_yunet.onnx' + download_url = 'https://github.com/opencv/opencv_zoo/blob/91fb0290f50896f38a0ab1e558b74b16bc009428/models/face_detection_yunet/face_detection_yunet_2022mar.onnx?raw=true' + model_file_name = 'face_detection_yunet.onnx' - if not os.path.exists(dirname): - os.makedirs(dirname) + if not os.path.exists(dirname): + os.makedirs(dirname) - cache_file = os.path.join(dirname, model_file_name) - if not os.path.exists(cache_file): - print(f"downloading face detection model from '{download_url}' to '{cache_file}'") - response = requests.get(download_url) - with open(cache_file, "wb") as f: - f.write(response.content) + cache_file = os.path.join(dirname, model_file_name) + if not os.path.exists(cache_file): + print(f"downloading face detection model from '{download_url}' to '{cache_file}'") + response = requests.get(download_url, timeout=60*60*2) + with open(cache_file, "wb") as f: + f.write(response.content) - if os.path.exists(cache_file): - return cache_file - return None + if os.path.exists(cache_file): + return cache_file + return None class PointOfInterest: - def __init__(self, x, y, weight=1.0, size=10): - self.x = x - self.y = y - self.weight = weight - self.size = size + def __init__(self, x, y, weight=1.0, size=10): + self.x = x + self.y = y + self.weight = weight + self.size = size - def bounding(self, size): - return [ - self.x - size//2, - self.y - size//2, - self.x + size//2, - self.y + size//2 - ] + def bounding(self, size): + return [ + self.x - size//2, + self.y - size//2, + self.x + size//2, + self.y + size//2 + ] class Settings: - def __init__(self, crop_width=512, crop_height=512, corner_points_weight=0.5, entropy_points_weight=0.5, face_points_weight=0.5, annotate_image=False, dnn_model_path=None): - self.crop_width = crop_width - self.crop_height = crop_height - self.corner_points_weight = corner_points_weight - self.entropy_points_weight = entropy_points_weight - self.face_points_weight = face_points_weight - self.annotate_image = annotate_image - self.destop_view_image = False - self.dnn_model_path = dnn_model_path + def __init__(self, crop_width=512, crop_height=512, corner_points_weight=0.5, entropy_points_weight=0.5, face_points_weight=0.5, annotate_image=False, dnn_model_path=None): + self.crop_width = crop_width + self.crop_height = crop_height + self.corner_points_weight = corner_points_weight + self.entropy_points_weight = entropy_points_weight + self.face_points_weight = face_points_weight + self.annotate_image = annotate_image + self.destop_view_image = False + self.dnn_model_path = dnn_model_path diff --git a/modules/textual_inversion/dataset.py b/modules/textual_inversion/dataset.py index af9fbcf28..f53a73b89 100644 --- a/modules/textual_inversion/dataset.py +++ b/modules/textual_inversion/dataset.py @@ -1,19 +1,16 @@ import os +import re +import random +from collections import defaultdict import numpy as np import PIL import torch from PIL import Image from torch.utils.data import Dataset, DataLoader, Sampler from torchvision import transforms -from collections import defaultdict -from random import shuffle, choices - -import random import tqdm -from modules import devices, shared -import re - from ldm.modules.distributions.distributions import DiagonalGaussianDistribution +from modules import devices, shared re_numbers_at_start = re.compile(r"^[-\d]+\s*") @@ -72,7 +69,7 @@ class PersonalizedBase(Dataset): except Exception: continue - text_filename = os.path.splitext(path)[0] + ".txt" + text_filename = f"{os.path.splitext(path)[0]}.txt" filename = os.path.basename(path) if os.path.exists(text_filename): @@ -118,7 +115,7 @@ class PersonalizedBase(Dataset): weight = torch.ones(latent_sample.shape) else: weight = None - + if latent_sampling_method == "random": entry = DatasetEntry(filename=path, filename_text=filename_text, latent_dist=latent_dist, weight=weight) else: @@ -193,16 +190,16 @@ class GroupedBatchSampler(Sampler): b = self.batch_size for g in self.groups: - shuffle(g) + random.shuffle(g) batches = [] for g in self.groups: batches.extend(g[i*b:(i+1)*b] for i in range(len(g) // b)) for _ in range(self.n_rand_batches): - rand_group = choices(self.groups, self.probs)[0] - batches.append(choices(rand_group, k=b)) + rand_group = random.choices(self.groups, self.probs)[0] + batches.append(random.choices(rand_group, k=b)) - shuffle(batches) + random.shuffle(batches) yield from batches @@ -243,4 +240,4 @@ class BatchLoaderRandom(BatchLoader): return self def collate_wrapper_random(batch): - return BatchLoaderRandom(batch) \ No newline at end of file + return BatchLoaderRandom(batch) diff --git a/modules/textual_inversion/logging.py b/modules/textual_inversion/logging.py index b8440f656..a79696e3f 100644 --- a/modules/textual_inversion/logging.py +++ b/modules/textual_inversion/logging.py @@ -16,7 +16,7 @@ def save_settings_to_file(log_directory, all_params): if all_params.get('preview_from_txt2img'): keys = keys | saved_params_previews params.update({k: v for k, v in all_params.items() if k in keys}) - filename = f"{params['embedding_name']}-{now.strftime('%Y-%m-%d_%H-%M-%S')}.json" + filename = f"settings-{now.strftime('%Y-%m-%d_%H-%M-%S')}.json" with open(os.path.join(log_directory, filename), "w", encoding='utf-8') as file: print(f'Training settings file: {os.path.join(log_directory, filename)}') json.dump(params, file, indent=2) diff --git a/modules/textual_inversion/preprocess.py b/modules/textual_inversion/preprocess.py index ed93bf979..5d6f885b9 100644 --- a/modules/textual_inversion/preprocess.py +++ b/modules/textual_inversion/preprocess.py @@ -58,9 +58,9 @@ def save_pic_with_caption(image, index, params: PreprocessParams, existing_capti image.save(os.path.join(params.dstdir, f"{basename}.png")) if params.preprocess_txt_action == 'prepend' and existing_caption: - caption = existing_caption + ' ' + caption + caption = f"{existing_caption} {caption}" elif params.preprocess_txt_action == 'append' and existing_caption: - caption = caption + ' ' + existing_caption + caption = f"{caption} {existing_caption}" elif params.preprocess_txt_action == 'copy' and existing_caption: caption = existing_caption caption = caption.strip() @@ -173,7 +173,7 @@ def preprocess_work(process_src, process_dst, process_width, process_height, pre params.src = filename existing_caption = None - existing_caption_filename = os.path.splitext(filename)[0] + '.txt' + existing_caption_filename = f"{os.path.splitext(filename)[0]}.txt" if os.path.exists(existing_caption_filename): with open(existing_caption_filename, 'r', encoding="utf8") as file: existing_caption = file.read() diff --git a/modules/textual_inversion/textual_inversion.py b/modules/textual_inversion/textual_inversion.py index bee86ceac..9693730ab 100644 --- a/modules/textual_inversion/textual_inversion.py +++ b/modules/textual_inversion/textual_inversion.py @@ -60,7 +60,7 @@ class Embedding: 'hash': self.checksum(), 'optimizer_state_dict': self.optimizer_state_dict, } - torch.save(optimizer_saved_dict, filename + '.optim') + torch.save(optimizer_saved_dict, f"{filename}.optim") def checksum(self): if self.cached_checksum is not None: @@ -419,8 +419,8 @@ def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_st optimizer = torch.optim.AdamW([embedding.vec], lr=scheduler.learn_rate, weight_decay=0.0) if shared.opts.save_optimizer_state: optimizer_state_dict = None - if os.path.exists(filename + '.optim'): - optimizer_saved_dict = torch.load(filename + '.optim', map_location='cpu') + if os.path.exists(f"{filename}.optim"): + optimizer_saved_dict = torch.load(f"{filename}.optim", map_location='cpu') if embedding.checksum() == optimizer_saved_dict.get('hash', None): optimizer_state_dict = optimizer_saved_dict.get('optimizer_state_dict', None) if optimizer_state_dict is not None: diff --git a/modules/ui.py b/modules/ui.py index fd0ea31b3..cc0de9e6e 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -76,7 +76,7 @@ def visit(x, func, path=""): for c in x.children: visit(c, func, path) elif x.label is not None: - func(path + "/" + str(x.label), x) + func(f"{path}/{x.label}", x) def add_style(name: str, prompt: str, negative_prompt: str): @@ -127,7 +127,7 @@ def process_interrogate(interrogation_function, mode, ii_input_dir, ii_output_di img = Image.open(image) filename = os.path.basename(image) left, _ = os.path.splitext(filename) - print(interrogation_function(img), file=open(os.path.join(ii_output_dir, left + ".txt"), 'a', encoding='utf-8')) + print(interrogation_function(img), file=open(os.path.join(ii_output_dir, f"{left}.txt"), 'a', encoding='utf-8')) return [gr.update(), None] @@ -147,21 +147,21 @@ def change_clip_skip(val): def create_seed_inputs(target_interface): - with FormRow(elem_id=target_interface + '_seed_row', variant="compact"): - seed = gr.Number(label='Seed', value=-1, elem_id=target_interface + '_seed') + with FormRow(elem_id=f"{target_interface}_seed_row", variant="compact"): + seed = gr.Number(label='Seed', value=-1, elem_id=f"{target_interface}_seed") seed.style(container=False) - random_seed = ToolButton(random_symbol, elem_id=target_interface + '_random_seed', label='Random seed') - reuse_seed = ToolButton(reuse_symbol, elem_id=target_interface + '_reuse_seed', label='Reuse seed') - seed_checkbox = gr.Checkbox(label='Extra', elem_id=target_interface + '_subseed_show', value=False, visible=False) # Ghost checkbox, so it still gets sent. For compatibility with extensions that call txt2img or img2img manually - with FormRow(visible=True, elem_id=target_interface + '_subseed_row'): - subseed = gr.Number(label='Variation seed', value=-1, elem_id=target_interface + '_subseed') + random_seed = ToolButton(random_symbol, elem_id=f"{target_interface}_random_seed", label='Random seed') + reuse_seed = ToolButton(reuse_symbol, elem_id=f"{target_interface}_reuse_seed", label='Reuse seed') + seed_checkbox = gr.Checkbox(label='Extra', elem_id=f"{target_interface}_subseed_show", value=False) # Ghost checkbox for compatibility + with FormRow(visible=True, elem_id=f"{target_interface}_subseed_row"): + subseed = gr.Number(label='Variation seed', value=-1, elem_id=f"{target_interface}_subseed") subseed.style(container=False) - random_subseed = ToolButton(random_symbol, elem_id=target_interface + '_random_subseed') - reuse_subseed = ToolButton(reuse_symbol, elem_id=target_interface + '_reuse_subseed') - subseed_strength = gr.Slider(label='Strength', value=0.0, minimum=0, maximum=1, step=0.01, elem_id=target_interface + '_subseed_strength') + random_subseed = ToolButton(random_symbol, elem_id=f"{target_interface}_random_subseed") + reuse_subseed = ToolButton(reuse_symbol, elem_id=f"{target_interface}_reuse_subseed") + subseed_strength = gr.Slider(label='Variation strength', value=0.0, minimum=0, maximum=1, step=0.01, elem_id=f"{target_interface}_subseed_strength") with FormRow(visible=False): - seed_resize_from_w = gr.Slider(minimum=0, maximum=2048, step=8, label="Resize seed from width", value=0, elem_id=target_interface + '_seed_resize_from_w') - seed_resize_from_h = gr.Slider(minimum=0, maximum=2048, step=8, label="Resize seed from height", value=0, elem_id=target_interface + '_seed_resize_from_h') + seed_resize_from_w = gr.Slider(minimum=0, maximum=2048, step=8, label="Resize seed from width", value=0, elem_id=f"{target_interface}_seed_resize_from_w") + seed_resize_from_h = gr.Slider(minimum=0, maximum=2048, step=8, label="Resize seed from height", value=0, elem_id=f"{target_interface}_seed_resize_from_h") random_seed.click(fn=lambda: [-1, -1], show_progress=False, inputs=[], outputs=[seed, subseed]) random_subseed.click(fn=lambda: -1, show_progress=False, inputs=[], outputs=[subseed]) return seed, reuse_seed, subseed, reuse_subseed, subseed_strength, seed_resize_from_h, seed_resize_from_w, seed_checkbox @@ -615,7 +615,7 @@ def create_ui(): ) button.click( fn=lambda: None, - _js="switch_to_"+name.replace(" ", "_"), + _js=f"switch_to_{name.replace(' ', '_')}", inputs=[], outputs=[], ) @@ -679,7 +679,7 @@ def create_ui(): with FormGroup(): with FormRow(): cfg_scale = gr.Slider(minimum=1.0, maximum=30.0, step=0.5, label='CFG Scale', value=6.0, elem_id="img2img_cfg_scale") - image_cfg_scale = gr.Slider(minimum=0, maximum=3.0, step=0.05, label='Image CFG Scale', value=1.5, elem_id="img2img_image_cfg_scale", visible=modules.shared.sd_model and modules.shared.sd_model.cond_stage_key == "edit") + image_cfg_scale = gr.Slider(minimum=0, maximum=3.0, step=0.05, label='Image CFG Scale', value=1.5, elem_id="img2img_image_cfg_scale", visible=False) denoising_strength = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label='Denoising strength', value=0.75, elem_id="img2img_denoising_strength") clip_skip = gr.Slider(label='CLIP Skip', value=modules.shared.opts.CLIP_stop_at_last_layers, minimum=1, maximum=4, step=1, elem_id='img2img_clip_skip', interactive=True) clip_skip.change(fn=change_clip_skip, show_progress=False, inputs=clip_skip) @@ -1271,16 +1271,16 @@ def create_ui(): elif t == bool: comp = gr.Checkbox else: - raise ValueError(f'bad options item type: {str(t)} for key {key}') - elem_id = "setting_"+key + raise ValueError(f'bad options item type: {t} for key {key}') + elem_id = f"setting_{key}" if info.refresh is not None: if is_quicksettings: res = comp(label=info.label, value=fun(), elem_id=elem_id, **(args or {})) - create_refresh_button(res, info.refresh, info.component_args, "refresh_" + key) + create_refresh_button(res, info.refresh, info.component_args, f"refresh_{key}") else: with FormRow(): res = comp(label=info.label, value=fun(), elem_id=elem_id, **(args or {})) - create_refresh_button(res, info.refresh, info.component_args, "refresh_" + key) + create_refresh_button(res, info.refresh, info.component_args, f"refresh_{key}") else: res = comp(label=info.label, value=fun(), elem_id=elem_id, **(args or {})) return res @@ -1331,7 +1331,7 @@ def create_ui(): result = gr.HTML(elem_id="settings_result") - quicksettings_names = [x.strip() for x in opts.quicksettings.split(",")] + quicksettings_names = opts.quicksettings_list quicksettings_names = {x: i for i, x in enumerate(quicksettings_names) if x != 'quicksettings'} quicksettings_list = [] previous_section = None @@ -1366,7 +1366,7 @@ def create_ui(): request_notifications = gr.Button(value='Request browser notifications', elem_id="request_notifications", visible=False) _show_all_pages = gr.Button(value="Show all pages", variant='primary', elem_id="settings_show_all_pages") - with gr.TabItem("Licenses", id="licenses"): + with gr.TabItem("Licenses", id="licenses", elem_id="settings_tab_licenses"): gr.HTML(modules.shared.html("licenses.html"), elem_id="licenses") def unload_sd_weights(): @@ -1443,7 +1443,7 @@ def create_ui(): for interface, label, ifid in interfaces: if label in modules.shared.opts.hidden_tabs: continue - with gr.TabItem(label, id=ifid, elem_id='tab_' + ifid): + with gr.TabItem(label, id=ifid, elem_id=f"tab_{ifid}"): interface.render() if opts.notification_audio_enable and os.path.exists(os.path.join(script_path, opts.notification_audio_path)): @@ -1471,11 +1471,9 @@ def create_ui(): show_progress=info.refresh is not None, ) - text_settings.change( - fn=lambda: gr.update(visible=modules.shared.sd_model and modules.shared.sd_model.cond_stage_key == "edit"), - inputs=[], - outputs=[image_cfg_scale], - ) + update_image_cfg_scale_visibility = lambda: gr.update(visible=modules.shared.sd_model and modules.shared.sd_model.cond_stage_key == "edit") # pylint: disable=unnecessary-lambda-assignment + text_settings.change(fn=update_image_cfg_scale_visibility, inputs=[], outputs=[image_cfg_scale]) + demo.load(fn=update_image_cfg_scale_visibility, inputs=[], outputs=[image_cfg_scale]) button_set_checkpoint = gr.Button('Change checkpoint', elem_id='change_checkpoint', visible=False) button_set_checkpoint.click( @@ -1549,10 +1547,10 @@ def create_ui(): def loadsave(path, x): def apply_field(obj, field, condition=None, init_field=None): - key = path + "/" + field + key = f"{path}/{field}" if getattr(obj, 'custom_script_source', None) is not None: - key = 'customscript/' + obj.custom_script_source + '/' + key + key = f"customscript/{obj.custom_script_source}/{key}" if getattr(obj, 'do_not_save_to_config', False): return @@ -1699,5 +1697,20 @@ def reload_javascript(): gradio.routes.templates.TemplateResponse = template_response +def setup_ui_api(app): + from pydantic import BaseModel, Field # pylint: disable=no-name-in-module + from typing import List + + class QuicksettingsHint(BaseModel): + name: str = Field(title="Name of the quicksettings field") + label: str = Field(title="Label of the quicksettings field") + + def quicksettings_hint(): + return [QuicksettingsHint(name=k, label=v.label) for k, v in opts.data_labels.items()] + + app.add_api_route("/internal/quicksettings-hint", quicksettings_hint, methods=["GET"], response_model=List[QuicksettingsHint]) + app.add_api_route("/internal/ping", lambda: {}, methods=["GET"]) + + if not hasattr(modules.shared, 'GradioTemplateResponseOriginal'): modules.shared.GradioTemplateResponseOriginal = gradio.routes.templates.TemplateResponse diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py index 3aeea5783..c044b23d0 100644 --- a/modules/ui_extra_networks.py +++ b/modules/ui_extra_networks.py @@ -1,6 +1,5 @@ import json import html -import glob import os.path import urllib.parse from pathlib import Path @@ -63,7 +62,9 @@ class ExtraNetworksPage: pass def link_preview(self, filename): - return "./sd_extra_networks/thumb?filename=" + urllib.parse.quote(filename.replace('\\', '/')) + "&mtime=" + str(os.path.getmtime(filename)) + quoted_filename = urllib.parse.quote(filename.replace('\\', '/')) + mtime = os.path.getmtime(filename) + return f"./sd_extra_networks/thumb?filename={quoted_filename}&mtime={mtime}" def search_terms_from_path(self, filename, possible_directories=None): abspath = os.path.abspath(filename) @@ -78,17 +79,20 @@ class ExtraNetworksPage: items_html = '' self.metadata = {} subdirs = {} - for parentdir in [os.path.abspath(x) for x in self.allowed_directories_for_previews()]: - for x in glob.glob(os.path.join(parentdir, '**/*'), recursive=True): - if not os.path.isdir(x): - continue - subdir = os.path.abspath(x)[len(parentdir):].replace("\\", "/") - while subdir.startswith("/"): - subdir = subdir[1:] - is_empty = len(os.listdir(x)) == 0 - if not is_empty and not subdir.endswith("/"): - subdir = subdir + "/" - subdirs[subdir] = 1 + allowed_folders = [os.path.abspath(x) for x in self.allowed_directories_for_previews()] + for parentdir in [*set(allowed_folders)]: + for root, dirs, _files in os.walk(parentdir): + for dirname in dirs: + x = os.path.join(root, dirname) + if not os.path.isdir(x): + continue + subdir = os.path.abspath(x)[len(parentdir):].replace("\\", "/") + while subdir.startswith("/"): + subdir = subdir[1:] + is_empty = len(os.listdir(x)) == 0 + if not is_empty and not subdir.endswith("/"): + subdir = subdir + "/" + subdirs[subdir] = 1 if subdirs: subdirs = {"": 1, **subdirs} subdirs_html = "".join([f""" @@ -181,7 +185,7 @@ def intialize(): class ExtraNetworksUi: def __init__(self): self.pages = None - self.stored_extra_pages = None + self.stored_extra_pages = [] self.button_save_preview = None self.preview_target_filename = None self.button_save_description = None diff --git a/modules/ui_tempdir.py b/modules/ui_tempdir.py index 7e5849ba5..db6e20e79 100644 --- a/modules/ui_tempdir.py +++ b/modules/ui_tempdir.py @@ -39,7 +39,7 @@ def save_pil_to_file(pil_image, dir=None): # pylint: disable=redefined-builtin already_saved_as = getattr(pil_image, 'already_saved_as', None) if already_saved_as and os.path.isfile(already_saved_as): register_tmp_file(shared.demo, already_saved_as) - file_obj = Savedfile(already_saved_as) + file_obj = Savedfile(f'{already_saved_as}?{os.path.getmtime(already_saved_as)}') return file_obj if shared.opts.temp_dir != "": dir = shared.opts.temp_dir diff --git a/scripts/custom_code.py b/scripts/custom_code.py index 2dd036f2d..56b0db222 100644 --- a/scripts/custom_code.py +++ b/scripts/custom_code.py @@ -77,7 +77,7 @@ return process_images(p) module.display = display indent = " " * indent_level - indented = code.replace('\n', '\n' + indent) + indented = code.replace('\n', f"\n{indent}") body = f"""def __webuitemp__(): {indent}{indented} __webuitemp__()""" diff --git a/scripts/loopback.py b/scripts/loopback.py index 5ce5e8271..96ec03a03 100644 --- a/scripts/loopback.py +++ b/scripts/loopback.py @@ -84,7 +84,7 @@ class Script(scripts.Script): p.color_corrections = initial_color_corrections if append_interrogation != "None": - p.prompt = original_prompt + ", " if original_prompt != "" else "" + p.prompt = f"{original_prompt}, " if original_prompt else "" if append_interrogation == "CLIP": p.prompt += shared.interrogator.interrogate(p.init_images[0]) elif append_interrogation == "DeepBooru": diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py index 64ccab852..b456b3cb2 100644 --- a/scripts/xyz_grid.py +++ b/scripts/xyz_grid.py @@ -227,7 +227,7 @@ axis_options = [ AxisOptionTxt2Img("Hires upscaler", str, apply_field("hr_upscaler"), choices=lambda: [*shared.latent_upscale_modes, *[x.name for x in shared.sd_upscalers]]), AxisOptionTxt2Img("Fallback latent upscaler sampler", str, apply_fallback, fmt=format_value, confirm=confirm_samplers, choices=lambda: [x.name for x in sd_samplers.samplers]), AxisOptionImg2Img("Cond. Image Mask Weight", float, apply_field("inpainting_mask_weight")), - AxisOption("VAE", str, apply_vae, cost=0.7, choices=lambda: list(sd_vae.vae_dict)), + AxisOption("VAE", str, apply_vae, cost=0.7, choices=lambda: ['None'] + list(sd_vae.vae_dict)), AxisOption("Styles", str, apply_styles, choices=lambda: list(shared.prompt_styles.styles)), AxisOption("UniPC Order", int, apply_uni_pc_order, cost=0.5), AxisOption("Face restore", str, apply_face_restore, fmt=format_value), @@ -446,7 +446,7 @@ class Script(scripts.Script): z_type.change(fn=select_axis, inputs=[z_type,z_values_dropdown], outputs=[fill_z_button,z_values,z_values_dropdown]) def get_dropdown_update_from_params(axis,params): - val_key = axis + " Values" + val_key = f"{axis} Values" vals = params.get(val_key,"") valslist = [x.strip() for x in chain.from_iterable(csv.reader(StringIO(vals))) if x] return gr.update(value = valslist) diff --git a/webui.py b/webui.py index bbd6cfff5..f941375d8 100644 --- a/webui.py +++ b/webui.py @@ -5,6 +5,7 @@ import signal import asyncio import logging import warnings +from threading import Thread from modules import timer, errors startup_timer = timer.Timer() @@ -27,6 +28,7 @@ warnings.filterwarnings(action="ignore", category=UserWarning, module="torchvisi startup_timer.record("torch") from modules import import_hook # pylint: disable=W0611,C0411,C0412 +from fastapi import FastAPI # pylint: disable=W0611,C0411 import gradio # pylint: disable=W0611,C0411 startup_timer.record("gradio") errors.install([gradio]) @@ -148,6 +150,8 @@ def initialize(): def load_model(): shared.state.begin() shared.state.job = 'load model' + + """ try: modules.sd_models.load_model() modules.sd_models.skip_next_load = True @@ -155,17 +159,22 @@ def load_model(): errors.display(e, "loading stable diffusion model") log.error("Stable diffusion model failed to load") exit(1) + """ + Thread(target=lambda: shared.sd_model).start() + if shared.sd_model is None: log.warning("No stable diffusion model loaded") # exit(1) else: shared.opts.data["sd_model_checkpoint"] = shared.sd_model.sd_checkpoint_info.title - shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights())) + shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights()), call=False) + shared.state.end() startup_timer.record("checkpoint") def create_api(app): + log.debug('Creating API') from modules.api.api import Api api = Api(app, queue_lock) return api @@ -177,7 +186,6 @@ def monkey_patch_docs(): self.redoc_url = "/redoc" self.setup_original() - from fastapi import FastAPI setup_original = getattr(FastAPI, "setup_original", None) if setup_original is None: FastAPI.setup_original = FastAPI.setup @@ -199,8 +207,8 @@ def async_policy(): asyncio.set_event_loop_policy(AnyThreadEventLoopPolicy()) -def start_ui(): - log.debug('Entering StartUI') +def start_common(): + log.debug('Entering start sequence') logging.disable(logging.NOTSET if cmd_opts.debug else logging.DEBUG) create_paths(opts) async_policy() @@ -208,6 +216,10 @@ def start_ui(): if shared.opts.clean_temp_dir_at_start: ui_tempdir.cleanup_tmpdr() startup_timer.record("cleanup") + + +def start_ui(): + log.debug('Creating UI') modules.script_callbacks.before_ui_callback() startup_timer.record("scripts before_ui_callback") shared.demo = modules.ui.create_ui() @@ -250,6 +262,12 @@ def start_ui(): shared.demo.server.wants_restart = False setup_middleware(app, cmd_opts) + if cmd_opts.subpath: + redirector = FastAPI() + redirector.get("/") + _mounted_app = gradio.mount_gradio_app(redirector, shared.demo, path=f"/{cmd_opts.subpath}") + shared.log.info('Redirector mounted: /{cmd_opts.subpath}') + cmd_opts.autolaunch = False startup_timer.record("start") @@ -262,12 +280,27 @@ def start_ui(): def webui(): - log.debug('Entering WebUI') + start_common() start_ui() load_model() log.info(f"Startup time: {startup_timer.summary()}") return shared.demo.server +def api_only(): + start_common() + app = FastAPI() + setup_middleware(app, cmd_opts) + api = create_api(app) + api.wants_restart = False + modules.script_callbacks.app_started_callback(None, app) + log.info(f"Startup time: {startup_timer.summary()}") + api.launch(server_name="0.0.0.0" if cmd_opts.listen else "127.0.0.1", port=cmd_opts.port if cmd_opts.port else 7861) + return api + + if __name__ == "__main__": - webui() + if cmd_opts.api_only: + api_only() + else: + webui() From b979d448ed4bc647d7c8688a71288e42fc6c2a66 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 17 May 2023 14:41:13 -0400 Subject: [PATCH 156/282] update --- TODO.md | 17 ----------------- modules/textual_inversion/preprocess.py | 4 +++- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/TODO.md b/TODO.md index 239cdc080..1b7df62f5 100644 --- a/TODO.md +++ b/TODO.md @@ -56,20 +56,3 @@ Tech that can be integrated as part of the core workflow... - Bunch of stuff: ### Pending Code Updates - -This is a massive one due to huge number of changes, but hopefully it will fo ok... - -- new **prompt parsers** - select in UI -> Settings -> Stable Diffusion - - **Full**: my new implementation - - **A1111**: for backward compatibility - - **Compel**: as used in ComfyUI and InvokeAI (a.k.a *Temporal Weighting*) - - **Fixed**: for really old backward compatibility -- added `--safe` command line flag mode which skips loading user extensions - please try to use it before opening new issue -- reintroduce `--api-only` mode to start server without ui -- monitor **extensions** install/startup and - log if they modify any packages/requirements - this is a *deep-experimental* python hack, but i think its worth it as extensions modifying requirements is one of most common causes of issues -- port *all* upstream code from [A1111](https://github.com/AUTOMATIC1111/stable-diffusion-webui) - up to today - commit hash `89f9faa` diff --git a/modules/textual_inversion/preprocess.py b/modules/textual_inversion/preprocess.py index 5d6f885b9..7c20b7f10 100644 --- a/modules/textual_inversion/preprocess.py +++ b/modules/textual_inversion/preprocess.py @@ -65,7 +65,9 @@ def save_pic_with_caption(image, index, params: PreprocessParams, existing_capti caption = existing_caption caption = caption.strip() if len(caption) > 0: - if params.process_caption_only and existing_caption_filename is not None: + if params.process_caption_only: + fn = os.path.join(params.dstdir, f"{filename_part}.txt") + elif existing_caption_filename is not None: fn = existing_caption_filename else: fn = os.path.join(params.dstdir, f"{basename}.txt") From 85dafa06106c79dfccf1841998a0e4b20212f427 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 17 May 2023 15:28:44 -0400 Subject: [PATCH 157/282] fix live preview --- extensions-builtin/stable-diffusion-webui-rembg | 2 +- javascript/progressbar.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions-builtin/stable-diffusion-webui-rembg b/extensions-builtin/stable-diffusion-webui-rembg index 64821f047..657ae9f54 160000 --- a/extensions-builtin/stable-diffusion-webui-rembg +++ b/extensions-builtin/stable-diffusion-webui-rembg @@ -1 +1 @@ -Subproject commit 64821f04767b04b92ac157f3c02f28d269dba5d8 +Subproject commit 657ae9f5486019a94dbe11d3560b28cccf35a0fd diff --git a/javascript/progressbar.js b/javascript/progressbar.js index c1a2b5b36..108f36ea0 100644 --- a/javascript/progressbar.js +++ b/javascript/progressbar.js @@ -64,9 +64,9 @@ function requestProgress(id_task, progressbarContainer, gallery, atEnd = null, o divProgress.appendChild(divInner); parentProgressbar.insertBefore(divProgress, progressbarContainer); localStorage.setItem('task', id_task); - console.debug('task active:', id_task); + let livePreview; if (parentGallery) { - const livePreview = document.createElement('div'); + livePreview = document.createElement('div'); livePreview.className = 'livePreview'; parentGallery.insertBefore(livePreview, gallery); } From 1dffd114fcd048877f14bc8344510163bb5f9755 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 17 May 2023 15:38:12 -0400 Subject: [PATCH 158/282] fix vae loading --- modules/sd_vae.py | 29 +---------------------------- webui.py | 6 +++--- 2 files changed, 4 insertions(+), 31 deletions(-) diff --git a/modules/sd_vae.py b/modules/sd_vae.py index 6b8a9c6f8..7bd294c6d 100644 --- a/modules/sd_vae.py +++ b/modules/sd_vae.py @@ -50,7 +50,6 @@ def refresh_vae_list(): global vae_path # pylint: disable=global-statement vae_path = shared.opts.vae_dir vae_dict.clear() - vae_paths = [ os.path.join(sd_models.model_path, '**/*.vae.ckpt'), os.path.join(sd_models.model_path, '**/*.vae.pt'), @@ -74,10 +73,10 @@ def refresh_vae_list(): candidates = [] for path in vae_paths: candidates += glob.iglob(path, recursive=True) - for filepath in candidates: name = get_filename(filepath) vae_dict[name] = filepath + shared.log.info(f"Available VAEs: {vae_path} {len(vae_dict)}") def find_vae_near_checkpoint(checkpoint_file): @@ -92,28 +91,21 @@ def find_vae_near_checkpoint(checkpoint_file): def resolve_vae(checkpoint_file): if shared.cmd_opts.vae is not None: return shared.cmd_opts.vae, 'forced' - is_automatic = shared.opts.sd_vae in {"Automatic", "auto"} # "auto" for people with old config - vae_near_checkpoint = find_vae_near_checkpoint(checkpoint_file) if vae_near_checkpoint is not None and (shared.opts.sd_vae_as_default): return vae_near_checkpoint, 'near checkpoint' - if is_automatic: for named_vae_location in [os.path.join(vae_path, os.path.splitext(os.path.basename(checkpoint_file))[0] + ".vae.pt"), os.path.join(vae_path, os.path.splitext(os.path.basename(checkpoint_file))[0] + ".vae.ckpt"), os.path.join(vae_path, os.path.splitext(os.path.basename(checkpoint_file))[0] + ".vae.safetensors")]: if os.path.isfile(named_vae_location): return named_vae_location, 'in VAE dir' - if shared.opts.sd_vae == "None": return None, None - vae_from_options = vae_dict.get(shared.opts.sd_vae, None) if vae_from_options is not None: return vae_from_options, 'specified in settings' - if not is_automatic: shared.log.warning(f"VAE not found: {shared.opts.sd_vae}") - return None, None @@ -125,10 +117,7 @@ def load_vae_dict(filename): def load_vae(model, vae_file=None, vae_source="from unknown source"): global loaded_vae_file # pylint: disable=global-statement - # save_settings = False - cache_enabled = shared.opts.sd_vae_checkpoint_cache > 0 - if vae_file: if cache_enabled and vae_file in checkpoints_loaded: # use vae checkpoint cache @@ -138,28 +127,22 @@ def load_vae(model, vae_file=None, vae_source="from unknown source"): else: assert os.path.isfile(vae_file), f"VAE {vae_source} doesn't exist: {vae_file}" store_base_vae(model) - vae_dict_1 = load_vae_dict(vae_file) _load_vae_dict(model, vae_dict_1) - if cache_enabled: # cache newly loaded vae checkpoints_loaded[vae_file] = vae_dict_1.copy() - # clean up cache if limit is reached if cache_enabled: while len(checkpoints_loaded) > shared.opts.sd_vae_checkpoint_cache + 1: # we need to count the current model checkpoints_loaded.popitem(last=False) # LRU - # If vae used is not in dict, update it # It will be removed on refresh though vae_opt = get_filename(vae_file) if vae_opt not in vae_dict: vae_dict[vae_opt] = vae_file - elif loaded_vae_file: restore_base_vae(model) - loaded_vae_file = vae_file @@ -179,38 +162,28 @@ unspecified = object() def reload_vae_weights(sd_model=None, vae_file=unspecified): from modules import lowvram, sd_hijack - if not sd_model: sd_model = shared.sd_model - global checkpoint_info # pylint: disable=global-statement checkpoint_info = sd_model.sd_checkpoint_info checkpoint_file = checkpoint_info.filename - if vae_file == unspecified: vae_file, vae_source = resolve_vae(checkpoint_file) else: vae_source = "from function argument" - if loaded_vae_file == vae_file: return - if shared.cmd_opts.lowvram or shared.cmd_opts.medvram: lowvram.send_everything_to_cpu() else: sd_model.to(devices.cpu) - sd_hijack.model_hijack.undo_hijack(sd_model) if shared.cmd_opts.rollback_vae and devices.dtype_vae == torch.bfloat16: devices.dtype_vae = torch.float16 - load_vae(sd_model, vae_file, vae_source) - sd_hijack.model_hijack.hijack(sd_model) script_callbacks.model_loaded_callback(sd_model) - if not shared.cmd_opts.lowvram and not shared.cmd_opts.medvram: sd_model.to(devices.device) - shared.log.info("VAE weights loaded.") return sd_model diff --git a/webui.py b/webui.py index f941375d8..144d33cd2 100644 --- a/webui.py +++ b/webui.py @@ -88,6 +88,9 @@ def initialize(): log.debug('Entering Initialize') check_rollback_vae() + modules.sd_vae.refresh_vae_list() + startup_timer.record("vae") + extensions.list_extensions() startup_timer.record("extensions") @@ -107,9 +110,6 @@ def initialize(): modelloader.load_upscalers() startup_timer.record("upscalers") - modules.sd_vae.refresh_vae_list() - startup_timer.record("vae") - shared.opts.onchange("sd_vae", wrap_queued_call(lambda: modules.sd_vae.reload_vae_weights()), call=False) # shared.opts.onchange("sd_vae_as_default", wrap_queued_call(lambda: modules.sd_vae.reload_vae_weights()), call=False) shared.opts.onchange("temp_dir", ui_tempdir.on_tmpdir_changed) From 4d67ee67ed43857a907e7696a08aac0634016a23 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 18 May 2023 07:09:38 -0400 Subject: [PATCH 159/282] minor fixes --- extensions-builtin/sd-extension-system-info | 2 +- extensions-builtin/sd-webui-controlnet | 2 +- modules/images.py | 6 +++++- modules/img2img.py | 2 +- modules/txt2img.py | 2 +- modules/ui_extensions.py | 2 +- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/extensions-builtin/sd-extension-system-info b/extensions-builtin/sd-extension-system-info index 21d204a50..79243697a 160000 --- a/extensions-builtin/sd-extension-system-info +++ b/extensions-builtin/sd-extension-system-info @@ -1 +1 @@ -Subproject commit 21d204a502ddf90e5191802d4673e8df5b1ab4ef +Subproject commit 79243697a23602ff4f9e441aa35fcfdc33bf0872 diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index d831043cb..d7a02838b 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit d831043cb81e97724ccf9f071da391d479440a77 +Subproject commit d7a02838b03cdbcf1a0c84059aa2656f5245c383 diff --git a/modules/images.py b/modules/images.py index 8f782bcdd..369418cda 100644 --- a/modules/images.py +++ b/modules/images.py @@ -420,7 +420,8 @@ def atomically_save_image(): image, filename, extension, params, exifinfo_data, txt_fullfn = save_queue.get() mp = round(image.width * image.height / 1000000) if mp > shared.opts.img_max_size_mp: - shared.log.warning(f'Image size: {image.size} excedes {shared.opts.img_max_size_mp} MPixels') + shared.log.warning(f'Maximum image size exceded: size={image.size} maximum={shared.opts.img_max_size_mp} MPixels') + return fn = filename + extension image_format = Image.registered_extensions()[extension] shared.log.debug(f'Saving image: {image_format} {fn} {image.size}') @@ -431,6 +432,9 @@ def atomically_save_image(): pnginfo_data.add_text(k, str(v)) image.save(fn, format=image_format, quality=shared.opts.jpeg_quality, pnginfo=pnginfo_data) elif image_format == 'JPEG': + if image.height > 65500 or image.width > 65500: + shared.log.warning(f'Maximum image size exceded: size={image.size} maximum=65550 pixels') + return if image.mode == 'RGBA': shared.log.warning('Saving RGBA image as JPEG: Alpha channel will be lost') image = image.convert("RGB") diff --git a/modules/img2img.py b/modules/img2img.py index 6fbdaa332..c5aa93804 100644 --- a/modules/img2img.py +++ b/modules/img2img.py @@ -70,7 +70,7 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s if shared.sd_model is None: shared.log.warning('Model not loaded') return - shared.log.debug(f'img2img: id_task={id_task}|mode={mode}|prompt={prompt}|negative_prompt={negative_prompt}|prompt_styles={prompt_styles}|init_img={init_img}|sketch={sketch}|init_img_with_mask={init_img_with_mask}|inpaint_color_sketch={inpaint_color_sketch}|inpaint_color_sketch_orig={inpaint_color_sketch_orig}|init_img_inpaint={init_img_inpaint}|init_mask_inpaint={init_mask_inpaint}|steps={steps}|sampler_index={sampler_index}|mask_blur={mask_blur}|mask_alpha={mask_alpha}|inpainting_fill={inpainting_fill}|restore_faces={restore_faces}|tiling={tiling}|n_iter={n_iter}|batch_size={batch_size}|cfg_scale={cfg_scale}|image_cfg_scale={image_cfg_scale}|denoising_strength={denoising_strength}|seed={seed}|subseed{subseed}|subseed_strength={subseed_strength}|seed_resize_from_h={seed_resize_from_h}|seed_resize_from_w={seed_resize_from_w}|seed_enable_extras={seed_enable_extras}|selected_scale_tab={selected_scale_tab}|height={height}|width={width}|scale_by={scale_by}|resize_mode={resize_mode}|inpaint_full_res={inpaint_full_res}|inpaint_full_res_padding={inpaint_full_res_padding}|inpainting_mask_invert={inpainting_mask_invert}|img2img_batch_input_dir={img2img_batch_input_dir}|img2img_batch_output_dir={img2img_batch_output_dir}|img2img_batch_inpaint_mask_dir={img2img_batch_inpaint_mask_dir}|override_settings_texts={override_settings_texts}') + shared.log.debug(f'img2img: id_task={id_task}|mode={mode}|prompt={prompt}|negative_prompt={negative_prompt}|prompt_styles={prompt_styles}|init_img={init_img}|sketch={sketch}|init_img_with_mask={init_img_with_mask}|inpaint_color_sketch={inpaint_color_sketch}|inpaint_color_sketch_orig={inpaint_color_sketch_orig}|init_img_inpaint={init_img_inpaint}|init_mask_inpaint={init_mask_inpaint}|steps={steps}|sampler_index={sampler_index}|mask_blur={mask_blur}|mask_alpha={mask_alpha}|inpainting_fill={inpainting_fill}|restore_faces={restore_faces}|tiling={tiling}|n_iter={n_iter}|batch_size={batch_size}|cfg_scale={cfg_scale}|image_cfg_scale={image_cfg_scale}|denoising_strength={denoising_strength}|seed={seed}|subseed{subseed}|subseed_strength={subseed_strength}|seed_resize_from_h={seed_resize_from_h}|seed_resize_from_w={seed_resize_from_w}|seed_enable_extras={seed_enable_extras}|selected_scale_tab={selected_scale_tab}|height={height}|width={width}|scale_by={scale_by}|resize_mode={resize_mode}|inpaint_full_res={inpaint_full_res}|inpaint_full_res_padding={inpaint_full_res_padding}|inpainting_mask_invert={inpainting_mask_invert}|img2img_batch_input_dir={img2img_batch_input_dir}|img2img_batch_output_dir={img2img_batch_output_dir}|img2img_batch_inpaint_mask_dir={img2img_batch_inpaint_mask_dir}|override_settings_texts={override_settings_texts}|args={args}') if sampler_index is None: shared.log.warning('Selected sampler is not enabled') diff --git a/modules/txt2img.py b/modules/txt2img.py index 2ee6f4667..f7a99df6b 100644 --- a/modules/txt2img.py +++ b/modules/txt2img.py @@ -12,7 +12,7 @@ def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, step if shared.sd_model is None: shared.log.warning('Model not loaded') return - shared.log.debug(f'txt2img: id_task={id_task}|prompt={prompt}|negative_prompt={negative_prompt}|prompt_styles={prompt_styles}|steps={steps}|sampler_index={sampler_index}|restore_faces={restore_faces}|tiling={tiling}|n_iter={n_iter}|batch_size={batch_size}|cfg_scale={cfg_scale}|seed={seed}|subseed={subseed}|subseed_strength={subseed_strength}|seed_resize_from_h={seed_resize_from_h}|seed_resize_from_w={seed_resize_from_w}|seed_enable_extras={seed_enable_extras}|height={height}|width={width}|enable_hr={enable_hr}|denoising_strength={denoising_strength}|hr_scale={hr_scale}|hr_upscaler={hr_upscaler}|hr_second_pass_steps={hr_second_pass_steps}|hr_resize_x={hr_resize_x}|hr_resize_y={hr_resize_y}|override_settings_texts={override_settings_texts}') + shared.log.debug(f'txt2img: id_task={id_task}|prompt={prompt}|negative_prompt={negative_prompt}|prompt_styles={prompt_styles}|steps={steps}|sampler_index={sampler_index}|restore_faces={restore_faces}|tiling={tiling}|n_iter={n_iter}|batch_size={batch_size}|cfg_scale={cfg_scale}|seed={seed}|subseed={subseed}|subseed_strength={subseed_strength}|seed_resize_from_h={seed_resize_from_h}|seed_resize_from_w={seed_resize_from_w}|seed_enable_extras={seed_enable_extras}|height={height}|width={width}|enable_hr={enable_hr}|denoising_strength={denoising_strength}|hr_scale={hr_scale}|hr_upscaler={hr_upscaler}|hr_second_pass_steps={hr_second_pass_steps}|hr_resize_x={hr_resize_x}|hr_resize_y={hr_resize_y}|override_settings_texts={override_settings_texts}args={args}') if sampler_index is None: shared.log.warning('Selected sampler is not enabled') sampler_index = 0 diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py index 9cb78a4df..b66ea82b1 100644 --- a/modules/ui_extensions.py +++ b/modules/ui_extensions.py @@ -310,7 +310,7 @@ def refresh_extensions_list_from_data(search_text, sort_column): update_available = (remote is not None) & (installed) & (datetime.utcfromtimestamp(commit_date + 60 * 60) < datetime.fromisoformat(ext.get('updated', '2000-01-01T00:00:00.000Z')[:-1])) ext['sort_string'] = f"{'1' if ext['is_builtin'] else '0'}{'1' if ext['installed'] else '0'}{ext.get('updated', '2000-01-01T00:00')}" ext['sort_user'] = f"{'0' if ext['is_builtin'] else '1'}{'1' if ext['installed'] else '0'}{ext.get('name', '')}" - ext['sort_enabled'] = f"{'1' if ext['enabled'] else '0'}{'1' if ext['is_builtin'] else '0'}{'1' if ext['installed'] else '0'}{ext.get('updated', '2000-01-01T00:00')}" + ext['sort_enabled'] = f"{'0' if ext['enabled'] else '1'}{'1' if ext['is_builtin'] else '0'}{'1' if ext['installed'] else '0'}{ext.get('updated', '2000-01-01T00:00')}" ext['sort_update'] = f"{'1' if update_available else '0'}{'1' if ext['installed'] else '0'}{ext.get('updated', '2000-01-01T00:00')}" tags = ext.get("tags", []) tags_string = ' '.join(tags) From c1e70df845e4bfe892f94fb5e64b16a3a22e189a Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 18 May 2023 07:36:38 -0400 Subject: [PATCH 160/282] follow symlinks --- extensions-builtin/Lora/lora.py | 4 +--- javascript/style.css | 6 ++++-- modules/shared.py | 2 +- modules/ui_extra_networks.py | 2 +- modules/ui_extra_networks_textual_inversion.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/extensions-builtin/Lora/lora.py b/extensions-builtin/Lora/lora.py index b5d0c98f9..9d9efd73a 100644 --- a/extensions-builtin/Lora/lora.py +++ b/extensions-builtin/Lora/lora.py @@ -1,9 +1,7 @@ -import glob import os import re -import torch from typing import Union - +import torch from modules import shared, devices, sd_models, errors, scripts metadata_tags_order = {"ss_sd_model_name": 1, "ss_resolution": 2, "ss_clip_skip": 3, "ss_num_train_images": 10, "ss_tag_frequency": 20} diff --git a/javascript/style.css b/javascript/style.css index 76d8fc467..b43cc7728 100644 --- a/javascript/style.css +++ b/javascript/style.css @@ -186,8 +186,10 @@ div#extras_scale_to_tab div.form{ } .extra-network-cards{ - height: 725px; - overflow: scroll; + height: fit-content; + max-height: 50vh; + overflow-y: scroll; + overflow-x: hidden; resize: vertical; } diff --git a/modules/shared.py b/modules/shared.py index 62e12cbf1..b893ad106 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -733,7 +733,7 @@ def walk_files(path, allowed_extensions=None): return if allowed_extensions is not None: allowed_extensions = set(allowed_extensions) - for root, _dirs, files in os.walk(path): + for root, _dirs, files in os.walk(path, followlinks=True): for filename in files: if allowed_extensions is not None: _, ext = os.path.splitext(filename) diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py index c044b23d0..95ed70d78 100644 --- a/modules/ui_extra_networks.py +++ b/modules/ui_extra_networks.py @@ -81,7 +81,7 @@ class ExtraNetworksPage: subdirs = {} allowed_folders = [os.path.abspath(x) for x in self.allowed_directories_for_previews()] for parentdir in [*set(allowed_folders)]: - for root, dirs, _files in os.walk(parentdir): + for root, dirs, _files in os.walk(parentdir, followlinks=True): for dirname in dirs: x = os.path.join(root, dirname) if not os.path.isdir(x): diff --git a/modules/ui_extra_networks_textual_inversion.py b/modules/ui_extra_networks_textual_inversion.py index 1abf39675..47b8cdd5a 100644 --- a/modules/ui_extra_networks_textual_inversion.py +++ b/modules/ui_extra_networks_textual_inversion.py @@ -16,7 +16,7 @@ class ExtraNetworksPageTextualInversion(ui_extra_networks.ExtraNetworksPage): def list_items(self): embeddings = [emb for emb in sd_hijack.model_hijack.embedding_db.word_embeddings.values()] if len(embeddings) == 0: # maybe not loaded yet, so lets just look them up - for root, _dirs, fns in os.walk(shared.opts.embeddings_dir): + for root, _dirs, fns in os.walk(shared.opts.embeddings_dir, followlinks=True): for fn in fns: if fn.lower().endswith(".pt"): embedding = Embedding(0, fn) From 08d78294786d0a3bb45e1595f012b6fe6d353948 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 18 May 2023 07:47:18 -0400 Subject: [PATCH 161/282] fix script order --- cli/train/setup.log | 6477 ------------------------------------------ javascript/style.css | 2 +- javascript/ui.js | 4 +- 3 files changed, 3 insertions(+), 6480 deletions(-) delete mode 100644 cli/train/setup.log diff --git a/cli/train/setup.log b/cli/train/setup.log deleted file mode 100644 index 3feee6c55..000000000 --- a/cli/train/setup.log +++ /dev/null @@ -1,6477 +0,0 @@ -2023-05-15 15:42:37,787 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:37,789 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 15:42:37,790 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:37,793 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 15:42:37,794 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:37,804 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 194 -2023-05-15 15:42:37,805 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:37,807 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 15:42:37,808 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 15:42:37,810 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:37,812 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 15:42:37,813 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:37,821 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 194 -2023-05-15 15:42:37,831 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | args: {'type': 'lora', 'name': 'test', 'tag': 'person', 'input': '/home/vlado/generative/Input/mia/', 'output': '', 'process': 'original,interrogate,resize,square', 'gradient': 1, 'steps': 2500, 'batch': 1, 'lr': 0.0001, 'dim': 40, 'repeats': 10, 'alpha': 0, 'overwrite': False, 'debug': False, 'model': 'v1-5-pruned-emaonly.safetensors', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'process_dir': '/tmp/train/test'} -2023-05-15 15:42:37,831 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | train using lora style training -2023-05-15 15:42:38,931 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 26.39, 'used': 1.02, 'total': 27.41} gpu current: {'free': 10.42, 'used': 1.57, 'total': 12.0} gpu peak: {'active': 0.0, 'allocated': 0.0, 'reserved': 0.0} -2023-05-15 15:42:38,931 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 15:42:39,068 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing input images: 40 -2023-05-15 15:42:39,069 | WARNING | /home/vlado/dev/automatic/cli/train/./train.py | removing existing processed folder: /tmp/train/test -2023-05-15 15:42:39,069 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing current step: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 15:42:39,070 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing concept: person -2023-05-15 15:42:39,070 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing output folder: /tmp/train/test/10_person -2023-05-15 15:42:39,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:42:39,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 15:42:39,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:39,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:39,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:39,110 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:39,997 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 15:42:40,004 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:40,154 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 187 -2023-05-15 15:42:40,162 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:40,163 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102947_Instagram.jpg => /tmp/train/test/10_person/001-original-Screenshot_20221225_102947_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:40,167 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:42:40,167 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06@' -2023-05-15 15:42:40,167 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:40,167 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:40,167 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:40,203 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:41,146 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 15:42:41,152 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:41,302 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 291 -2023-05-15 15:42:41,309 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:41,309 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102956_Instagram.jpg => /tmp/train/test/10_person/002-original-Screenshot_20221225_102956_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:41,312 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:42:41,312 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 15:42:41,313 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:41,313 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:41,313 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:41,343 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:42,126 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 175 -2023-05-15 15:42:42,133 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:42,262 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 185 -2023-05-15 15:42:42,269 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:42,270 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103005_Instagram.jpg => /tmp/train/test/10_person/003-original-Screenshot_20221225_103005_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:42,273 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:42:42,273 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xff' -2023-05-15 15:42:42,273 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:42,273 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:42,273 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:42,304 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:43,016 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 15:42:43,022 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:43,145 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 262 -2023-05-15 15:42:43,152 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:43,153 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103018_Instagram.jpg => /tmp/train/test/10_person/004-original-Screenshot_20221225_103018_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:43,156 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:42:43,156 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06X' -2023-05-15 15:42:43,156 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:43,156 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:43,156 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:43,183 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:43,892 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 15:42:43,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:44,027 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 227 -2023-05-15 15:42:44,035 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:44,035 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103034_Instagram.jpg => /tmp/train/test/10_person/005-original-Screenshot_20221225_103034_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:44,039 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:42:44,039 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 15:42:44,039 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:44,040 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:44,040 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:44,066 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:44,771 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:42:44,777 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:44,900 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 497 -2023-05-15 15:42:44,907 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:44,907 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103043_Instagram.jpg => /tmp/train/test/10_person/006-original-Screenshot_20221225_103043_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:44,910 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:42:44,910 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:42:44,910 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:44,910 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:44,910 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:44,935 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:45,650 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 15:42:45,656 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:45,785 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 15:42:45,792 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:45,792 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103058_Instagram.jpg => /tmp/train/test/10_person/007-original-Screenshot_20221225_103058_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:45,795 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:42:45,796 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:42:45,796 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:45,796 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:45,796 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:45,822 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:46,523 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 15:42:46,528 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:46,655 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 251 -2023-05-15 15:42:46,663 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:46,663 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103106_Instagram.jpg => /tmp/train/test/10_person/008-original-Screenshot_20221225_103106_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:46,666 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:42:46,666 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:42:46,666 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:46,666 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:46,666 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:46,689 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:47,433 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:42:47,439 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:47,565 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 216 -2023-05-15 15:42:47,572 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:47,572 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103115_Instagram.jpg => /tmp/train/test/10_person/009-original-Screenshot_20221225_103115_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:47,575 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:42:47,575 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xc8' -2023-05-15 15:42:47,576 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:47,576 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:47,576 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:47,604 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:48,303 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 140 -2023-05-15 15:42:48,309 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:48,432 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 263 -2023-05-15 15:42:48,439 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:48,439 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103128_Instagram.jpg => /tmp/train/test/10_person/010-original-Screenshot_20221225_103128_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:48,442 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:42:48,442 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xfb' -2023-05-15 15:42:48,442 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:48,442 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:48,442 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:48,470 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:49,161 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 15:42:49,167 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:49,295 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 192 -2023-05-15 15:42:49,303 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:49,303 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103144_Instagram.jpg => /tmp/train/test/10_person/011-original-Screenshot_20221225_103144_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:49,307 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 15:42:49,307 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xb6' -2023-05-15 15:42:49,307 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:49,307 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:49,307 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:49,335 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:50,092 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 179 -2023-05-15 15:42:50,098 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:50,223 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 348 -2023-05-15 15:42:50,230 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:50,230 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103159_Instagram.jpg => /tmp/train/test/10_person/012-original-Screenshot_20221225_103159_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:50,234 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:42:50,234 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 15:42:50,234 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:50,234 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:50,234 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:50,260 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:50,983 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 15:42:50,989 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:51,117 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 299 -2023-05-15 15:42:51,125 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:51,125 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103207_Instagram.jpg => /tmp/train/test/10_person/013-original-Screenshot_20221225_103207_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:51,128 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:42:51,128 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:42:51,128 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:51,128 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:51,128 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:51,155 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:51,868 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 176 -2023-05-15 15:42:51,874 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:52,001 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 343 -2023-05-15 15:42:52,009 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:52,009 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103222_Instagram.jpg => /tmp/train/test/10_person/014-original-Screenshot_20221225_103222_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:52,012 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:42:52,012 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 15:42:52,012 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:52,012 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:52,012 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:52,038 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:52,769 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 189 -2023-05-15 15:42:52,775 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:52,904 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 311 -2023-05-15 15:42:52,911 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:52,911 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103233_Instagram.jpg => /tmp/train/test/10_person/015-original-Screenshot_20221225_103233_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:52,914 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:42:52,915 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:42:52,915 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:52,915 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:52,915 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:52,941 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:53,789 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 15:42:53,794 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:53,925 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 366 -2023-05-15 15:42:53,932 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:53,932 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103240_Instagram.jpg => /tmp/train/test/10_person/016-original-Screenshot_20221225_103240_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:53,936 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 15:42:53,936 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x06' -2023-05-15 15:42:53,936 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:53,936 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:53,936 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:53,965 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:54,747 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 15:42:54,754 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:54,887 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 712 -2023-05-15 15:42:54,895 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:54,895 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103256_Instagram.jpg => /tmp/train/test/10_person/017-original-Screenshot_20221225_103256_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:54,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:42:54,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:42:54,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:54,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:54,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:54,921 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:55,701 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 15:42:55,707 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:55,834 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 169 -2023-05-15 15:42:55,842 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:55,842 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103313_Instagram.jpg => /tmp/train/test/10_person/018-original-Screenshot_20221225_103313_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:55,845 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:42:55,845 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:42:55,845 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:55,845 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:55,845 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:55,871 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:56,742 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 15:42:56,747 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:56,888 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 253 -2023-05-15 15:42:56,895 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:56,895 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103321_Instagram.jpg => /tmp/train/test/10_person/019-original-Screenshot_20221225_103321_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:56,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:42:56,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:42:56,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:56,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:56,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:56,923 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:57,693 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 15:42:57,699 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:57,828 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 295 -2023-05-15 15:42:57,835 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:57,835 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103335_Instagram.jpg => /tmp/train/test/10_person/020-original-Screenshot_20221225_103335_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:57,838 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:42:57,838 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:42:57,838 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:57,838 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:57,838 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:57,865 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:58,690 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 165 -2023-05-15 15:42:58,696 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:58,829 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 252 -2023-05-15 15:42:58,837 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:58,837 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103345_Instagram.jpg => /tmp/train/test/10_person/021-original-Screenshot_20221225_103345_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:58,840 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:42:58,840 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06c' -2023-05-15 15:42:58,840 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:58,840 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:58,840 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:58,867 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:59,661 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 15:42:59,667 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:42:59,796 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 15:42:59,803 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:42:59,804 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103406_Instagram.jpg => /tmp/train/test/10_person/022-original-Screenshot_20221225_103406_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:42:59,807 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:42:59,807 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 15:42:59,807 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:42:59,807 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:42:59,807 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:42:59,833 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:00,668 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 15:43:00,674 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:00,805 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 237 -2023-05-15 15:43:00,812 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:43:00,812 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103427_Instagram.jpg => /tmp/train/test/10_person/023-original-Screenshot_20221225_103427_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:43:00,815 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:43:00,815 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 15:43:00,815 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:43:00,815 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:43:00,815 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:43:00,844 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:01,581 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 15:43:01,587 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:01,723 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 308 -2023-05-15 15:43:01,730 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:43:01,730 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103433_Instagram.jpg => /tmp/train/test/10_person/024-original-Screenshot_20221225_103433_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:43:01,733 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:43:01,734 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x95' -2023-05-15 15:43:01,734 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:43:01,734 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:43:01,734 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:43:01,755 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:02,539 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 15:43:02,544 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:02,676 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 15:43:02,683 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:43:02,683 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103445_Instagram.jpg => /tmp/train/test/10_person/025-original-Screenshot_20221225_103445_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:43:02,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:43:02,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x93' -2023-05-15 15:43:02,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:43:02,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:43:02,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:43:02,710 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:03,477 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 157 -2023-05-15 15:43:03,482 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:03,624 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 434 -2023-05-15 15:43:03,631 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:43:03,631 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103500_Instagram.jpg => /tmp/train/test/10_person/026-original-Screenshot_20221225_103500_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:43:03,635 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:43:03,635 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x8b' -2023-05-15 15:43:03,635 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:43:03,635 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:43:03,635 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:43:03,664 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:04,496 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 15:43:04,502 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:04,626 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 457 -2023-05-15 15:43:04,632 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:43:04,632 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103507_Instagram.jpg => /tmp/train/test/10_person/027-original-Screenshot_20221225_103507_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:43:04,635 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:43:04,635 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:43:04,636 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:43:04,636 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:43:04,636 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:43:04,655 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:05,455 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 15:43:05,460 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:05,585 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 362 -2023-05-15 15:43:05,592 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:43:05,592 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103522_Instagram.jpg => /tmp/train/test/10_person/028-original-Screenshot_20221225_103522_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:43:05,597 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9c' -2023-05-15 15:43:05,597 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:43:05,597 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:43:05,597 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:43:05,597 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:43:05,621 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:06,404 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 15:43:06,409 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:06,539 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 15:43:06,546 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:43:06,546 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103530_Instagram.jpg => /tmp/train/test/10_person/029-original-Screenshot_20221225_103530_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:43:06,549 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:43:06,549 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:43:06,549 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:43:06,549 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:43:06,549 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:43:06,573 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:07,337 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 154 -2023-05-15 15:43:07,342 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:07,473 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 113 -2023-05-15 15:43:07,481 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:43:07,481 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103536_Instagram.jpg => /tmp/train/test/10_person/030-original-Screenshot_20221225_103536_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:43:07,484 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x8a' -2023-05-15 15:43:07,484 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:43:07,484 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:43:07,484 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:43:07,484 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:43:07,508 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:08,289 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 15:43:08,294 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:08,421 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 15:43:08,428 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:43:08,428 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103543_Instagram.jpg => /tmp/train/test/10_person/031-original-Screenshot_20221225_103543_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:43:08,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:43:08,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:43:08,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:43:08,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:43:08,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:43:08,456 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:09,245 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 15:43:09,250 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:09,374 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 236 -2023-05-15 15:43:09,381 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:43:09,381 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103553_Instagram.jpg => /tmp/train/test/10_person/032-original-Screenshot_20221225_103553_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:43:09,384 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:43:09,384 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:43:09,384 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:43:09,384 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:43:09,384 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:43:09,406 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:10,208 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 174 -2023-05-15 15:43:10,213 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:10,350 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 204 -2023-05-15 15:43:10,357 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:43:10,357 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103559_Instagram.jpg => /tmp/train/test/10_person/033-original-Screenshot_20221225_103559_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:43:10,360 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:43:10,360 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 15:43:10,360 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:43:10,360 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:43:10,360 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:43:10,383 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:11,223 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 15:43:11,228 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:11,353 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 628 -2023-05-15 15:43:11,360 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:43:11,360 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103613_Instagram.jpg => /tmp/train/test/10_person/034-original-Screenshot_20221225_103613_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:43:11,363 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:43:11,364 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 15:43:11,364 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:43:11,364 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:43:11,364 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:43:11,385 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:12,145 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 167 -2023-05-15 15:43:12,150 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:12,268 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 563 -2023-05-15 15:43:12,275 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:43:12,275 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103621_Instagram.jpg => /tmp/train/test/10_person/035-original-Screenshot_20221225_103621_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:43:12,278 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:43:12,278 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9d' -2023-05-15 15:43:12,278 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:43:12,278 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:43:12,278 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:43:12,303 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:13,065 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:43:13,070 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:13,195 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 512 -2023-05-15 15:43:13,202 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:43:13,202 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103629_Instagram.jpg => /tmp/train/test/10_person/036-original-Screenshot_20221225_103629_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:43:13,205 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:43:13,205 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:43:13,206 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:43:13,206 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:43:13,206 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:43:13,229 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:13,991 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 15:43:13,996 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:14,129 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 160 -2023-05-15 15:43:14,136 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:43:14,136 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103638_Instagram.jpg => /tmp/train/test/10_person/037-original-Screenshot_20221225_103638_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:43:14,139 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:43:14,139 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x04\xb0' -2023-05-15 15:43:14,139 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:43:14,139 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:43:14,139 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:43:14,162 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:14,963 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 168 -2023-05-15 15:43:14,968 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:15,090 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 908 -2023-05-15 15:43:15,096 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:43:15,097 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103649_Instagram.jpg => /tmp/train/test/10_person/038-original-Screenshot_20221225_103649_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:43:15,100 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:43:15,100 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 15:43:15,100 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:43:15,100 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:43:15,100 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:43:15,127 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:15,868 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:43:15,873 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:15,999 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 289 -2023-05-15 15:43:16,006 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:43:16,006 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103656_Instagram.jpg => /tmp/train/test/10_person/039-original-Screenshot_20221225_103656_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:43:16,009 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:43:16,009 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x15' -2023-05-15 15:43:16,009 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:43:16,009 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:43:16,009 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:43:16,038 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:16,772 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 15:43:16,777 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:43:16,914 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 15:43:16,921 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:43:16,921 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103727_Instagram.jpg => /tmp/train/test/10_person/040-original-Screenshot_20221225_103727_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:43:16,922 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | input datasets ['/tmp/train/test/10_person'] -2023-05-15 15:43:16,925 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTPS connection (1): huggingface.co:443 -2023-05-15 15:43:17,055 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /stabilityai/sd-vae-ft-mse/resolve/main/config.json HTTP/1.1" 200 0 -2023-05-15 15:43:28,352 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps result: {'inputs': 40, 'outputs': {'original': 40, 'total': 40}, 'metadata': '/tmp/train/test/test.json'} -2023-05-15 15:43:28,493 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 22.56, 'used': 4.84, 'total': 27.41} gpu current: {'free': 9.7, 'used': 2.3, 'total': 12.0} gpu peak: {'active': 0.95, 'allocated': 0.95, 'reserved': 1.11} -2023-05-15 15:43:28,498 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | lora options: {'bucket_no_upscale': False, 'bucket_reso_steps': 64, 'cache_latents': True, 'caption_dropout_every_n_epochs': None, 'caption_dropout_rate': 0.0, 'caption_extension': '.txt', 'caption_extention': '.txt', 'caption_tag_dropout_rate': 0.0, 'clip_skip': None, 'color_aug': False, 'dataset_repeats': 1, 'debug_dataset': False, 'enable_bucket': False, 'face_crop_aug_range': None, 'flip_aug': False, 'full_fp16': False, 'gradient_accumulation_steps': 1, 'gradient_checkpointing': False, 'in_json': '/tmp/train/test/test.json', 'keep_tokens': None, 'learning_rate': 0.0001, 'log_prefix': None, 'logging_dir': None, 'lr_scheduler_num_cycles': 1, 'lr_scheduler_power': 1, 'lr_scheduler': 'cosine', 'lr_warmup_steps': 0, 'max_bucket_reso': 1024, 'max_data_loader_n_workers': 8, 'max_grad_norm': 0.0, 'max_token_length': None, 'max_train_epochs': None, 'max_train_steps': 2500, 'mem_eff_attn': False, 'min_bucket_reso': 256, 'mixed_precision': 'fp16', 'network_alpha': 20, 'network_args': None, 'network_dim': 40, 'network_module': 'networks.lora', 'network_train_text_encoder_only': False, 'network_train_unet_only': False, 'network_weights': None, 'no_metadata': False, 'output_dir': '/home/vlado/dev/automatic/models/Lora', 'output_name': 'test', 'persistent_data_loader_workers': False, 'pretrained_model_name_or_path': 'v1-5-pruned-emaonly.safetensors', 'prior_loss_weight': 1.0, 'random_crop': False, 'reg_data_dir': None, 'resolution': '512,512', 'resume': None, 'save_every_n_epochs': None, 'save_last_n_epochs_state': None, 'save_last_n_epochs': None, 'save_model_as': 'ckpt', 'save_n_epoch_ratio': None, 'save_precision': 'fp16', 'save_state': False, 'seed': 42, 'shuffle_caption': False, 'text_encoder_lr': 5e-05, 'train_batch_size': 1, 'train_data_dir': '/tmp/train/test', 'training_comment': 'mood-magic', 'unet_lr': 0.0001, 'use_8bit_adam': False, 'v_parameterization': False, 'v2': False, 'vae': None, 'xformers': False} -2023-05-15 15:43:28,548 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/vocab.json HTTP/1.1" 200 0 -2023-05-15 15:43:28,699 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /v1-5-pruned-emaonly.safetensors/resolve/main/model_index.json HTTP/1.1" 404 0 -2023-05-15 15:44:57,256 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:44:57,260 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 15:44:57,261 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:44:57,264 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 15:44:57,265 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:44:57,273 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 194 -2023-05-15 15:46:38,390 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:38,393 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 15:46:38,393 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:38,396 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 15:46:38,397 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:38,405 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 194 -2023-05-15 15:46:38,406 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:38,408 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 15:46:38,408 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 15:46:38,410 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | AAA -2023-05-15 15:46:38,410 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:38,413 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 15:46:38,414 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:38,423 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 194 -2023-05-15 15:46:38,423 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | AAA: {'options': {'sd_model_checkpoint': 'v1-5-pruned-emaonly.safetensors [6ce0161689]', 'sd_checkpoint_cache': 0.0, 'sd_vae_checkpoint_cache': 0.0, 'sd_vae': 'Automatic', 'stream_load': False, 'model_reuse_dict': False, 'inpainting_mask_weight': 1.0, 'initial_noise_multiplier': 1.0, 'img2img_color_correction': False, 'img2img_fix_steps': False, 'img2img_background_color': '#ffffff', 'enable_quantization': True, 'comma_padding_backtrack': 20.0, 'CLIP_stop_at_last_layers': 1.0, 'upcast_attn': False, 'cross_attention_optimization': 'Scaled-Dot-Product', 'cross_attention_options': [], 'sub_quad_q_chunk_size': 512.0, 'sub_quad_kv_chunk_size': 512.0, 'sub_quad_chunk_threshold': 80.0, 'always_batch_cond_uncond': False, 'temp_dir': '', 'clean_temp_dir_at_start': True, 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'vae_dir': '/home/vlado/dev/automatic/models/VAE', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'hypernetwork_dir': '/home/vlado/dev/automatic/models/hypernetworks', 'codeformer_models_path': '/home/vlado/dev/automatic/models/Codeformer', 'gfpgan_models_path': '/home/vlado/dev/automatic/models/GFPGAN', 'esrgan_models_path': '/home/vlado/dev/automatic/models/ESRGAN', 'bsrgan_models_path': '/home/vlado/dev/automatic/models/BSRGAN', 'realesrgan_models_path': '/home/vlado/dev/automatic/models/RealESRGAN', 'scunet_models_path': '/home/vlado/dev/automatic/models/ScuNET', 'swinir_models_path': '/home/vlado/dev/automatic/models/SwinIR', 'ldsr_models_path': '/home/vlado/dev/automatic/models/LDSR', 'clip_models_path': '/home/vlado/dev/automatic/models/CLIP', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'styles_dir': 'styles.csv', 'samples_save': True, 'samples_format': 'jpg', 'samples_filename_pattern': '', 'save_images_add_number': True, 'grid_save': True, 'grid_format': 'jpg', 'grid_extended_filename': True, 'grid_only_if_multiple': True, 'grid_prevent_empty_spots': True, 'n_rows': -1.0, 'save_txt': False, 'save_log_fn': '', 'save_images_before_face_restoration': False, 'save_images_before_highres_fix': False, 'save_images_before_color_correction': False, 'save_mask': False, 'save_mask_composite': False, 'jpeg_quality': 85.0, 'webp_lossless': False, 'img_max_size_mp': 200.0, 'use_original_name_batch': True, 'use_upscaler_name_as_suffix': True, 'save_selected_only': True, 'save_init_img': False, 'save_to_dirs': False, 'grid_save_to_dirs': False, 'use_save_to_dirs_for_ui': False, 'directories_filename_pattern': '[date]', 'directories_max_prompt_words': 8.0, 'outdir_samples': '', 'outdir_txt2img_samples': 'outputs/text', 'outdir_img2img_samples': 'outputs/image', 'outdir_extras_samples': 'outputs/extras', 'outdir_grids': '', 'outdir_txt2img_grids': 'outputs/grids', 'outdir_img2img_grids': 'outputs/grids', 'outdir_save': 'outputs/save', 'outdir_init_images': 'outputs/init-images', 'memmon_poll_rate': 2.0, 'precision': 'Autocast', 'cuda_dtype': 'FP16', 'no_half': False, 'no_half_vae': False, 'upcast_sampling': False, 'disable_nan_check': True, 'rollback_vae': False, 'opt_channelslast': False, 'cudnn_benchmark': False, 'cuda_allow_tf32': True, 'cuda_allow_tf16_reduced': True, 'cuda_compile': False, 'cuda_compile_mode': 'none', 'cuda_compile_verbose': False, 'cuda_compile_errors': True, 'disable_gc': True, 'upscaler_for_img2img': 'None', 'realesrgan_enabled_models': ['R-ESRGAN 4x+', 'R-ESRGAN 4x+ Anime6B'], 'ESRGAN_tile': 192.0, 'ESRGAN_tile_overlap': 8.0, 'SCUNET_tile': 256.0, 'SCUNET_tile_overlap': 8.0, 'use_old_hires_fix_width_height': False, 'dont_fix_second_order_samplers_schedule': False, 'face_restoration_model': 'CodeFormer', 'code_former_weight': 0.2, 'face_restoration_unload': False, 'unload_models_when_training': False, 'pin_memory': True, 'save_optimizer_state': False, 'save_training_settings_to_txt': False, 'dataset_filename_word_regex': '', 'dataset_filename_join_string': ' ', 'embeddings_templates_dir': '/home/vlado/dev/automatic/train/templates', 'training_image_repeats_per_epoch': 10.0, 'training_write_csv_every': 0.0, 'training_enable_tensorboard': False, 'training_tensorboard_save_images': False, 'training_tensorboard_flush_every': 120.0, 'interrogate_keep_models_in_memory': False, 'interrogate_return_ranks': True, 'interrogate_clip_num_beams': 1.0, 'interrogate_clip_min_length': 32.0, 'interrogate_clip_max_length': 192.0, 'interrogate_clip_dict_limit': 2048.0, 'interrogate_clip_skip_categories': ['artists', 'movements', 'flavors'], 'interrogate_deepbooru_score_threshold': 0.65, 'deepbooru_sort_alpha': False, 'deepbooru_use_spaces': False, 'deepbooru_escape': True, 'deepbooru_filter_tags': '', 'extra_networks_default_view': 'cards', 'extra_networks_default_multiplier': 1.0, 'extra_networks_card_width': 0.0, 'extra_networks_card_height': 0.0, 'extra_networks_add_text_separator': ' ', 'sd_hypernetwork': 'None', 'gradio_theme': 'black-orange', 'return_grid': True, 'return_mask': False, 'return_mask_composite': False, 'disable_weights_auto_swap': True, 'send_seed': True, 'send_size': True, 'font': '', 'keyedit_precision_attention': 0.1, 'keyedit_precision_extra': 0.05, 'keyedit_delimiters': '.,\\/!?%^*;:{}=`~()', 'quicksettings': 'sd_model_checkpoint', 'hidden_tabs': [], 'ui_tab_reorder': 'From Text, From Image, Process Image', 'ui_scripts_reorder': 'Enable Dynamic Thresholding, ControlNet', 'ui_reorder': 'inpaint, sampler, checkboxes, hires_fix, dimensions, cfg, seed, batch, override_settings, scripts', 'ui_extra_networks_tab_reorder': '', 'show_progressbar': True, 'live_previews_enable': True, 'show_progress_grid': True, 'notification_audio_enable': False, 'notification_audio_path': 'html/notification.mp3', 'show_progress_every_n_steps': 1.0, 'show_progress_type': 'Approx NN', 'live_preview_content': 'Combined', 'live_preview_refresh_period': 250.0, 'show_samplers': ['Euler a', 'UniPC', 'DDIM', 'DPM++ SDE', 'DPM++ SDE', 'DPM2 Karras', 'DPM++ 2M Karras'], 'fallback_sampler': 'Euler a', 'xyz_fallback_sampler': 'None', 'eta_ancestral': 1.0, 'eta_ddim': 0.0, 'ddim_discretize': 'uniform', 's_churn': 0.0, 's_min_uncond': 0.0, 's_tmin': 0.0, 's_noise': 1.0, 'eta_noise_seed_delta': 0.0, 'always_discard_next_to_last_sigma': False, 'uni_pc_variant': 'bh1', 'uni_pc_skip_type': 'time_uniform', 'uni_pc_order': 3.0, 'uni_pc_lower_order_final': True, 'token_merging': False, 'token_merging_ratio': 0.5, 'token_merging_hr_only': True, 'token_merging_ratio_hr': 0.5, 'token_merging_random': False, 'token_merging_merge_attention': True, 'token_merging_merge_cross_attention': False, 'token_merging_merge_mlp': False, 'token_merging_maximum_down_sampling': 1.0, 'token_merging_stride_x': 2.0, 'token_merging_stride_y': 2.0, 'postprocessing_enable_in_main_ui': [], 'postprocessing_operation_order': [], 'upscaling_max_images_in_cache': 5.0, 'disabled_extensions': [], 'disable_all_extensions': 'none', 'sd_checkpoint_hash': '6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa', 'sd_lyco': 'None', 'sd_lora': 'None'}, 'flags': {'error': 500, 'reason': 'Internal Server Error', 'url': 'http://127.0.0.1:7860/sdapi/v1/cmd-flags'}} -2023-05-15 15:46:38,436 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | args: {'type': 'lora', 'name': 'test', 'tag': 'person', 'input': '/home/vlado/generative/Input/mia/', 'output': '', 'process': 'original,interrogate,resize,square', 'gradient': 1, 'steps': 2500, 'batch': 1, 'lr': 0.0001, 'dim': 40, 'repeats': 10, 'alpha': 0, 'overwrite': False, 'debug': False, 'model': 'v1-5-pruned-emaonly.safetensors', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'process_dir': '/tmp/train/test'} -2023-05-15 15:46:38,436 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | train using lora style training -2023-05-15 15:46:39,548 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 26.38, 'used': 1.02, 'total': 27.41} gpu current: {'free': 10.42, 'used': 1.57, 'total': 12.0} gpu peak: {'active': 0.0, 'allocated': 0.0, 'reserved': 0.0} -2023-05-15 15:46:39,548 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 15:46:39,678 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing input images: 40 -2023-05-15 15:46:39,679 | WARNING | /home/vlado/dev/automatic/cli/train/./train.py | removing existing processed folder: /tmp/train/test -2023-05-15 15:46:39,681 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing current step: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 15:46:39,681 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing concept: person -2023-05-15 15:46:39,682 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing output folder: /tmp/train/test/10_person -2023-05-15 15:46:39,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:46:39,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 15:46:39,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:46:39,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:46:39,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:46:39,716 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:40,547 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 15:46:40,554 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:40,691 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 187 -2023-05-15 15:46:40,698 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:46:40,699 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102947_Instagram.jpg => /tmp/train/test/10_person/001-original-Screenshot_20221225_102947_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:46:40,702 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:46:40,702 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06@' -2023-05-15 15:46:40,702 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:46:40,702 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:46:40,702 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:46:40,729 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:41,458 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 15:46:41,464 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:41,596 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 291 -2023-05-15 15:46:41,604 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:46:41,604 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102956_Instagram.jpg => /tmp/train/test/10_person/002-original-Screenshot_20221225_102956_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:46:41,607 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:46:41,607 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 15:46:41,607 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:46:41,607 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:46:41,607 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:46:41,634 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:42,435 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 175 -2023-05-15 15:46:42,441 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:42,576 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 185 -2023-05-15 15:46:42,584 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:46:42,584 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103005_Instagram.jpg => /tmp/train/test/10_person/003-original-Screenshot_20221225_103005_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:46:42,587 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:46:42,587 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xff' -2023-05-15 15:46:42,587 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:46:42,587 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:46:42,587 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:46:42,616 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:43,389 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 15:46:43,395 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:43,529 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 262 -2023-05-15 15:46:43,536 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:46:43,536 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103018_Instagram.jpg => /tmp/train/test/10_person/004-original-Screenshot_20221225_103018_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:46:43,539 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:46:43,539 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06X' -2023-05-15 15:46:43,539 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:46:43,539 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:46:43,539 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:46:43,564 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:44,254 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 15:46:44,260 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:44,385 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 227 -2023-05-15 15:46:44,393 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:46:44,393 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103034_Instagram.jpg => /tmp/train/test/10_person/005-original-Screenshot_20221225_103034_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:46:44,396 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:46:44,396 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 15:46:44,396 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:46:44,396 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:46:44,396 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:46:44,419 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:45,158 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:46:45,163 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:45,293 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 497 -2023-05-15 15:46:45,300 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:46:45,300 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103043_Instagram.jpg => /tmp/train/test/10_person/006-original-Screenshot_20221225_103043_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:46:45,304 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:46:45,304 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:46:45,304 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:46:45,304 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:46:45,304 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:46:45,327 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:46,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 15:46:46,080 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:46,217 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 15:46:46,224 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:46:46,224 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103058_Instagram.jpg => /tmp/train/test/10_person/007-original-Screenshot_20221225_103058_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:46:46,234 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:46:46,234 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:46:46,234 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:46:46,234 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:46:46,234 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:46:46,263 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:46,997 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 15:46:47,003 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:47,139 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 251 -2023-05-15 15:46:47,147 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:46:47,147 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103106_Instagram.jpg => /tmp/train/test/10_person/008-original-Screenshot_20221225_103106_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:46:47,150 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:46:47,151 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:46:47,151 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:46:47,151 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:46:47,151 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:46:47,171 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:59,869 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:59,872 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 15:46:59,873 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:59,876 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 15:46:59,877 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:59,885 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 194 -2023-05-15 15:46:59,886 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:59,888 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 15:46:59,888 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 15:46:59,890 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | AAA -2023-05-15 15:46:59,891 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:59,893 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 15:46:59,893 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:46:59,902 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 194 -2023-05-15 15:46:59,902 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | AAA: {'options': {'sd_model_checkpoint': 'v1-5-pruned-emaonly.safetensors [6ce0161689]', 'sd_checkpoint_cache': 0.0, 'sd_vae_checkpoint_cache': 0.0, 'sd_vae': 'Automatic', 'stream_load': False, 'model_reuse_dict': False, 'inpainting_mask_weight': 1.0, 'initial_noise_multiplier': 1.0, 'img2img_color_correction': False, 'img2img_fix_steps': False, 'img2img_background_color': '#ffffff', 'enable_quantization': True, 'comma_padding_backtrack': 20.0, 'CLIP_stop_at_last_layers': 1.0, 'upcast_attn': False, 'cross_attention_optimization': 'Scaled-Dot-Product', 'cross_attention_options': [], 'sub_quad_q_chunk_size': 512.0, 'sub_quad_kv_chunk_size': 512.0, 'sub_quad_chunk_threshold': 80.0, 'always_batch_cond_uncond': False, 'temp_dir': '', 'clean_temp_dir_at_start': True, 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'vae_dir': '/home/vlado/dev/automatic/models/VAE', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'hypernetwork_dir': '/home/vlado/dev/automatic/models/hypernetworks', 'codeformer_models_path': '/home/vlado/dev/automatic/models/Codeformer', 'gfpgan_models_path': '/home/vlado/dev/automatic/models/GFPGAN', 'esrgan_models_path': '/home/vlado/dev/automatic/models/ESRGAN', 'bsrgan_models_path': '/home/vlado/dev/automatic/models/BSRGAN', 'realesrgan_models_path': '/home/vlado/dev/automatic/models/RealESRGAN', 'scunet_models_path': '/home/vlado/dev/automatic/models/ScuNET', 'swinir_models_path': '/home/vlado/dev/automatic/models/SwinIR', 'ldsr_models_path': '/home/vlado/dev/automatic/models/LDSR', 'clip_models_path': '/home/vlado/dev/automatic/models/CLIP', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'styles_dir': 'styles.csv', 'samples_save': True, 'samples_format': 'jpg', 'samples_filename_pattern': '', 'save_images_add_number': True, 'grid_save': True, 'grid_format': 'jpg', 'grid_extended_filename': True, 'grid_only_if_multiple': True, 'grid_prevent_empty_spots': True, 'n_rows': -1.0, 'save_txt': False, 'save_log_fn': '', 'save_images_before_face_restoration': False, 'save_images_before_highres_fix': False, 'save_images_before_color_correction': False, 'save_mask': False, 'save_mask_composite': False, 'jpeg_quality': 85.0, 'webp_lossless': False, 'img_max_size_mp': 200.0, 'use_original_name_batch': True, 'use_upscaler_name_as_suffix': True, 'save_selected_only': True, 'save_init_img': False, 'save_to_dirs': False, 'grid_save_to_dirs': False, 'use_save_to_dirs_for_ui': False, 'directories_filename_pattern': '[date]', 'directories_max_prompt_words': 8.0, 'outdir_samples': '', 'outdir_txt2img_samples': 'outputs/text', 'outdir_img2img_samples': 'outputs/image', 'outdir_extras_samples': 'outputs/extras', 'outdir_grids': '', 'outdir_txt2img_grids': 'outputs/grids', 'outdir_img2img_grids': 'outputs/grids', 'outdir_save': 'outputs/save', 'outdir_init_images': 'outputs/init-images', 'memmon_poll_rate': 2.0, 'precision': 'Autocast', 'cuda_dtype': 'FP16', 'no_half': False, 'no_half_vae': False, 'upcast_sampling': False, 'disable_nan_check': True, 'rollback_vae': False, 'opt_channelslast': False, 'cudnn_benchmark': False, 'cuda_allow_tf32': True, 'cuda_allow_tf16_reduced': True, 'cuda_compile': False, 'cuda_compile_mode': 'none', 'cuda_compile_verbose': False, 'cuda_compile_errors': True, 'disable_gc': True, 'upscaler_for_img2img': 'None', 'realesrgan_enabled_models': ['R-ESRGAN 4x+', 'R-ESRGAN 4x+ Anime6B'], 'ESRGAN_tile': 192.0, 'ESRGAN_tile_overlap': 8.0, 'SCUNET_tile': 256.0, 'SCUNET_tile_overlap': 8.0, 'use_old_hires_fix_width_height': False, 'dont_fix_second_order_samplers_schedule': False, 'face_restoration_model': 'CodeFormer', 'code_former_weight': 0.2, 'face_restoration_unload': False, 'unload_models_when_training': False, 'pin_memory': True, 'save_optimizer_state': False, 'save_training_settings_to_txt': False, 'dataset_filename_word_regex': '', 'dataset_filename_join_string': ' ', 'embeddings_templates_dir': '/home/vlado/dev/automatic/train/templates', 'training_image_repeats_per_epoch': 10.0, 'training_write_csv_every': 0.0, 'training_enable_tensorboard': False, 'training_tensorboard_save_images': False, 'training_tensorboard_flush_every': 120.0, 'interrogate_keep_models_in_memory': False, 'interrogate_return_ranks': True, 'interrogate_clip_num_beams': 1.0, 'interrogate_clip_min_length': 32.0, 'interrogate_clip_max_length': 192.0, 'interrogate_clip_dict_limit': 2048.0, 'interrogate_clip_skip_categories': ['artists', 'movements', 'flavors'], 'interrogate_deepbooru_score_threshold': 0.65, 'deepbooru_sort_alpha': False, 'deepbooru_use_spaces': False, 'deepbooru_escape': True, 'deepbooru_filter_tags': '', 'extra_networks_default_view': 'cards', 'extra_networks_default_multiplier': 1.0, 'extra_networks_card_width': 0.0, 'extra_networks_card_height': 0.0, 'extra_networks_add_text_separator': ' ', 'sd_hypernetwork': 'None', 'gradio_theme': 'black-orange', 'return_grid': True, 'return_mask': False, 'return_mask_composite': False, 'disable_weights_auto_swap': True, 'send_seed': True, 'send_size': True, 'font': '', 'keyedit_precision_attention': 0.1, 'keyedit_precision_extra': 0.05, 'keyedit_delimiters': '.,\\/!?%^*;:{}=`~()', 'quicksettings': 'sd_model_checkpoint', 'hidden_tabs': [], 'ui_tab_reorder': 'From Text, From Image, Process Image', 'ui_scripts_reorder': 'Enable Dynamic Thresholding, ControlNet', 'ui_reorder': 'inpaint, sampler, checkboxes, hires_fix, dimensions, cfg, seed, batch, override_settings, scripts', 'ui_extra_networks_tab_reorder': '', 'show_progressbar': True, 'live_previews_enable': True, 'show_progress_grid': True, 'notification_audio_enable': False, 'notification_audio_path': 'html/notification.mp3', 'show_progress_every_n_steps': 1.0, 'show_progress_type': 'Approx NN', 'live_preview_content': 'Combined', 'live_preview_refresh_period': 250.0, 'show_samplers': ['Euler a', 'UniPC', 'DDIM', 'DPM++ SDE', 'DPM++ SDE', 'DPM2 Karras', 'DPM++ 2M Karras'], 'fallback_sampler': 'Euler a', 'xyz_fallback_sampler': 'None', 'eta_ancestral': 1.0, 'eta_ddim': 0.0, 'ddim_discretize': 'uniform', 's_churn': 0.0, 's_min_uncond': 0.0, 's_tmin': 0.0, 's_noise': 1.0, 'eta_noise_seed_delta': 0.0, 'always_discard_next_to_last_sigma': False, 'uni_pc_variant': 'bh1', 'uni_pc_skip_type': 'time_uniform', 'uni_pc_order': 3.0, 'uni_pc_lower_order_final': True, 'token_merging': False, 'token_merging_ratio': 0.5, 'token_merging_hr_only': True, 'token_merging_ratio_hr': 0.5, 'token_merging_random': False, 'token_merging_merge_attention': True, 'token_merging_merge_cross_attention': False, 'token_merging_merge_mlp': False, 'token_merging_maximum_down_sampling': 1.0, 'token_merging_stride_x': 2.0, 'token_merging_stride_y': 2.0, 'postprocessing_enable_in_main_ui': [], 'postprocessing_operation_order': [], 'upscaling_max_images_in_cache': 5.0, 'disabled_extensions': [], 'disable_all_extensions': 'none', 'sd_checkpoint_hash': '6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa', 'sd_lyco': 'None', 'sd_lora': 'None'}, 'flags': {'error': 500, 'reason': 'Internal Server Error', 'url': 'http://127.0.0.1:7860/sdapi/v1/cmd-flags'}} -2023-05-15 15:46:59,919 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | args: {'type': 'lora', 'name': 'test', 'tag': 'person', 'input': '/home/vlado/generative/Input/mia/', 'output': '', 'process': 'original,interrogate,resize,square', 'gradient': 1, 'steps': 2500, 'batch': 1, 'lr': 0.0001, 'dim': 40, 'repeats': 10, 'alpha': 0, 'overwrite': False, 'debug': True, 'model': 'v1-5-pruned-emaonly.safetensors', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'process_dir': '/tmp/train/test'} -2023-05-15 15:46:59,920 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | train using lora style training -2023-05-15 15:47:00,997 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 26.38, 'used': 1.03, 'total': 27.41} gpu current: {'free': 10.42, 'used': 1.57, 'total': 12.0} gpu peak: {'active': 0.0, 'allocated': 0.0, 'reserved': 0.0} -2023-05-15 15:47:00,998 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 15:47:01,123 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing input images: 40 -2023-05-15 15:47:01,124 | WARNING | /home/vlado/dev/automatic/cli/train/./train.py | removing existing processed folder: /tmp/train/test -2023-05-15 15:47:01,125 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing current step: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 15:47:01,125 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing concept: person -2023-05-15 15:47:01,126 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing output folder: /tmp/train/test/10_person -2023-05-15 15:47:01,130 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:01,130 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 15:47:01,130 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:01,130 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:01,130 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:01,161 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:01,895 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 15:47:01,902 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:02,033 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 187 -2023-05-15 15:47:02,040 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:02,041 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102947_Instagram.jpg => /tmp/train/test/10_person/001-original-Screenshot_20221225_102947_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:02,044 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:02,044 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06@' -2023-05-15 15:47:02,044 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:02,044 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:02,044 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:02,072 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:02,890 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 15:47:02,896 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:03,026 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 291 -2023-05-15 15:47:03,033 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:03,033 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102956_Instagram.jpg => /tmp/train/test/10_person/002-original-Screenshot_20221225_102956_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:03,036 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:03,036 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 15:47:03,036 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:03,036 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:03,036 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:03,063 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:03,866 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 175 -2023-05-15 15:47:03,873 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:04,012 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 185 -2023-05-15 15:47:04,020 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:04,020 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103005_Instagram.jpg => /tmp/train/test/10_person/003-original-Screenshot_20221225_103005_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:04,023 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:04,023 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xff' -2023-05-15 15:47:04,023 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:04,023 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:04,023 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:04,053 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:04,815 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 15:47:04,822 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:04,955 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 262 -2023-05-15 15:47:04,963 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:04,963 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103018_Instagram.jpg => /tmp/train/test/10_person/004-original-Screenshot_20221225_103018_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:04,966 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:04,966 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06X' -2023-05-15 15:47:04,967 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:04,967 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:04,967 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:04,992 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:05,699 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 15:47:05,705 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:05,833 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 227 -2023-05-15 15:47:05,840 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:05,840 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103034_Instagram.jpg => /tmp/train/test/10_person/005-original-Screenshot_20221225_103034_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:05,843 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:05,843 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 15:47:05,843 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:05,843 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:05,843 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:05,867 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:06,578 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:47:06,584 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:06,712 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 497 -2023-05-15 15:47:06,719 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:06,719 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103043_Instagram.jpg => /tmp/train/test/10_person/006-original-Screenshot_20221225_103043_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:06,722 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:06,722 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:47:06,722 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:06,722 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:06,722 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:06,746 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:07,521 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 15:47:07,526 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:07,659 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 15:47:07,666 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:07,667 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103058_Instagram.jpg => /tmp/train/test/10_person/007-original-Screenshot_20221225_103058_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:07,670 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:07,670 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:47:07,670 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:07,670 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:07,670 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:07,694 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:08,471 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 15:47:08,476 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:08,611 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 251 -2023-05-15 15:47:08,619 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:08,619 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103106_Instagram.jpg => /tmp/train/test/10_person/008-original-Screenshot_20221225_103106_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:08,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:08,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:47:08,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:08,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:08,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:08,644 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:09,404 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:47:09,410 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:09,543 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 216 -2023-05-15 15:47:09,550 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:09,550 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103115_Instagram.jpg => /tmp/train/test/10_person/009-original-Screenshot_20221225_103115_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:09,553 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:09,553 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xc8' -2023-05-15 15:47:09,553 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:09,553 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:09,553 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:09,581 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:10,343 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 140 -2023-05-15 15:47:10,350 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:10,479 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 263 -2023-05-15 15:47:10,487 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:10,487 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103128_Instagram.jpg => /tmp/train/test/10_person/010-original-Screenshot_20221225_103128_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:10,490 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:10,490 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xfb' -2023-05-15 15:47:10,490 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:10,490 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:10,490 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:10,517 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:11,234 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 15:47:11,240 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:11,366 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 192 -2023-05-15 15:47:11,373 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:11,373 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103144_Instagram.jpg => /tmp/train/test/10_person/011-original-Screenshot_20221225_103144_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:11,377 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 15:47:11,377 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xb6' -2023-05-15 15:47:11,377 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:11,377 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:11,377 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:11,402 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:12,184 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 179 -2023-05-15 15:47:12,190 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:12,315 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 348 -2023-05-15 15:47:12,322 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:12,322 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103159_Instagram.jpg => /tmp/train/test/10_person/012-original-Screenshot_20221225_103159_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:12,325 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:12,326 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 15:47:12,326 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:12,326 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:12,326 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:12,349 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:13,082 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 15:47:13,088 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:13,220 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 299 -2023-05-15 15:47:13,227 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:13,227 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103207_Instagram.jpg => /tmp/train/test/10_person/013-original-Screenshot_20221225_103207_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:13,230 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:13,230 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:47:13,231 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:13,231 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:13,231 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:13,255 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:13,977 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 176 -2023-05-15 15:47:13,983 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:14,110 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 343 -2023-05-15 15:47:14,118 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:14,118 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103222_Instagram.jpg => /tmp/train/test/10_person/014-original-Screenshot_20221225_103222_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:14,121 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:14,121 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 15:47:14,121 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:14,121 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:14,121 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:14,144 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:14,944 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 189 -2023-05-15 15:47:14,950 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:15,074 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 311 -2023-05-15 15:47:15,082 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:15,082 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103233_Instagram.jpg => /tmp/train/test/10_person/015-original-Screenshot_20221225_103233_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:15,085 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:15,085 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:47:15,085 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:15,085 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:15,085 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:15,109 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:15,922 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 15:47:15,927 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:16,060 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 366 -2023-05-15 15:47:16,068 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:16,068 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103240_Instagram.jpg => /tmp/train/test/10_person/016-original-Screenshot_20221225_103240_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:16,071 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 15:47:16,071 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x06' -2023-05-15 15:47:16,071 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:16,071 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:16,071 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:16,098 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:16,937 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 15:47:16,943 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:17,079 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 712 -2023-05-15 15:47:17,087 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:17,087 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103256_Instagram.jpg => /tmp/train/test/10_person/017-original-Screenshot_20221225_103256_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:17,090 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:17,090 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:47:17,090 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:17,090 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:17,090 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:17,110 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:17,880 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 15:47:17,886 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:18,015 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 169 -2023-05-15 15:47:18,023 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:18,023 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103313_Instagram.jpg => /tmp/train/test/10_person/018-original-Screenshot_20221225_103313_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:18,026 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:18,026 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:47:18,026 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:18,026 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:18,026 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:18,050 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:18,803 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 15:47:18,809 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:18,938 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 253 -2023-05-15 15:47:18,946 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:18,946 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103321_Instagram.jpg => /tmp/train/test/10_person/019-original-Screenshot_20221225_103321_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:18,949 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:18,949 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:47:18,949 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:18,949 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:18,949 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:18,972 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:19,700 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 15:47:19,705 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:19,829 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 295 -2023-05-15 15:47:19,836 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:19,837 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103335_Instagram.jpg => /tmp/train/test/10_person/020-original-Screenshot_20221225_103335_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:19,840 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:19,840 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:47:19,840 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:19,840 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:19,840 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:19,863 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:20,645 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 165 -2023-05-15 15:47:20,650 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:20,779 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 252 -2023-05-15 15:47:20,787 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:20,787 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103345_Instagram.jpg => /tmp/train/test/10_person/021-original-Screenshot_20221225_103345_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:20,790 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:20,791 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06c' -2023-05-15 15:47:20,791 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:20,791 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:20,791 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:20,814 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:21,543 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 15:47:21,549 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:21,676 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 15:47:21,683 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:21,683 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103406_Instagram.jpg => /tmp/train/test/10_person/022-original-Screenshot_20221225_103406_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:21,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:21,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 15:47:21,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:21,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:21,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:21,709 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:22,486 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 15:47:22,492 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:22,614 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 237 -2023-05-15 15:47:22,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:22,622 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103427_Instagram.jpg => /tmp/train/test/10_person/023-original-Screenshot_20221225_103427_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:22,625 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:22,625 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 15:47:22,625 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:22,625 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:22,625 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:22,647 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:23,343 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 15:47:23,348 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:23,474 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 308 -2023-05-15 15:47:23,481 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:23,481 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103433_Instagram.jpg => /tmp/train/test/10_person/024-original-Screenshot_20221225_103433_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:23,484 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:23,484 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x95' -2023-05-15 15:47:23,484 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:23,484 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:23,484 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:23,503 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:24,256 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 15:47:24,261 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:24,382 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 15:47:24,389 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:24,389 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103445_Instagram.jpg => /tmp/train/test/10_person/025-original-Screenshot_20221225_103445_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:24,392 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:24,392 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x93' -2023-05-15 15:47:24,392 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:24,392 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:24,392 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:24,414 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:25,135 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 157 -2023-05-15 15:47:25,141 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:25,264 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 434 -2023-05-15 15:47:25,271 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:25,271 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103500_Instagram.jpg => /tmp/train/test/10_person/026-original-Screenshot_20221225_103500_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:25,274 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:25,274 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x8b' -2023-05-15 15:47:25,274 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:25,274 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:25,274 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:25,296 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:25,995 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 15:47:26,001 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:26,125 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 457 -2023-05-15 15:47:26,132 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:26,132 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103507_Instagram.jpg => /tmp/train/test/10_person/027-original-Screenshot_20221225_103507_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:26,135 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:26,135 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:47:26,135 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:26,135 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:26,135 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:26,152 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:26,895 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 15:47:26,899 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:27,021 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 362 -2023-05-15 15:47:27,028 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:27,028 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103522_Instagram.jpg => /tmp/train/test/10_person/028-original-Screenshot_20221225_103522_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:27,031 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9c' -2023-05-15 15:47:27,032 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:47:27,032 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:27,032 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:27,032 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:27,052 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:27,766 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 15:47:27,771 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:27,892 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 15:47:27,899 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:27,899 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103530_Instagram.jpg => /tmp/train/test/10_person/029-original-Screenshot_20221225_103530_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:27,903 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:27,903 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:47:27,903 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:27,903 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:27,903 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:27,923 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:28,631 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 154 -2023-05-15 15:47:28,636 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:28,756 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 113 -2023-05-15 15:47:28,763 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:28,763 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103536_Instagram.jpg => /tmp/train/test/10_person/030-original-Screenshot_20221225_103536_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:28,766 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x8a' -2023-05-15 15:47:28,766 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:47:28,766 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:28,766 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:28,767 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:28,788 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:29,519 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 15:47:29,524 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:29,644 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 15:47:29,651 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:29,652 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103543_Instagram.jpg => /tmp/train/test/10_person/031-original-Screenshot_20221225_103543_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:29,655 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:29,655 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:47:29,655 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:29,655 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:29,655 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:29,675 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:30,380 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 15:47:30,385 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:30,505 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 236 -2023-05-15 15:47:30,512 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:30,512 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103553_Instagram.jpg => /tmp/train/test/10_person/032-original-Screenshot_20221225_103553_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:30,516 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:30,516 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:47:30,516 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:30,516 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:30,516 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:30,535 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:31,262 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 174 -2023-05-15 15:47:31,267 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:31,393 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 204 -2023-05-15 15:47:31,400 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:31,400 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103559_Instagram.jpg => /tmp/train/test/10_person/033-original-Screenshot_20221225_103559_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:31,403 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:31,403 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 15:47:31,403 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:31,403 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:31,403 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:31,423 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:32,190 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 15:47:32,195 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:32,321 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 628 -2023-05-15 15:47:32,328 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:32,328 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103613_Instagram.jpg => /tmp/train/test/10_person/034-original-Screenshot_20221225_103613_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:32,332 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:32,332 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 15:47:32,332 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:32,332 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:32,332 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:32,352 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:33,091 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 167 -2023-05-15 15:47:33,096 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:33,220 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 563 -2023-05-15 15:47:33,227 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:33,227 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103621_Instagram.jpg => /tmp/train/test/10_person/035-original-Screenshot_20221225_103621_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:33,230 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:33,230 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9d' -2023-05-15 15:47:33,230 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:33,230 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:33,230 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:33,254 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:34,013 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:47:34,018 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:34,141 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 512 -2023-05-15 15:47:34,148 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:34,148 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103629_Instagram.jpg => /tmp/train/test/10_person/036-original-Screenshot_20221225_103629_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:34,151 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:34,151 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:47:34,151 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:34,151 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:34,151 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:34,172 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:34,937 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 15:47:34,942 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:35,073 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 160 -2023-05-15 15:47:35,080 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:35,080 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103638_Instagram.jpg => /tmp/train/test/10_person/037-original-Screenshot_20221225_103638_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:35,085 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:35,085 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x04\xb0' -2023-05-15 15:47:35,085 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:35,085 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:35,085 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:35,105 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:35,828 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 168 -2023-05-15 15:47:35,832 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:35,950 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 908 -2023-05-15 15:47:35,956 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:35,956 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103649_Instagram.jpg => /tmp/train/test/10_person/038-original-Screenshot_20221225_103649_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:35,959 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:35,959 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 15:47:35,959 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:35,959 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:35,959 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:35,981 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:36,729 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:47:36,735 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:36,864 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 289 -2023-05-15 15:47:36,871 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:36,872 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103656_Instagram.jpg => /tmp/train/test/10_person/039-original-Screenshot_20221225_103656_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:36,875 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:47:36,875 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x15' -2023-05-15 15:47:36,875 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:47:36,875 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:47:36,875 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:47:36,901 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:37,602 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 15:47:37,608 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:47:37,731 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 15:47:37,739 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:47:37,739 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103727_Instagram.jpg => /tmp/train/test/10_person/040-original-Screenshot_20221225_103727_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:47:37,740 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | input datasets ['/tmp/train/test/10_person'] -2023-05-15 15:47:37,743 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTPS connection (1): huggingface.co:443 -2023-05-15 15:47:37,866 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /stabilityai/sd-vae-ft-mse/resolve/main/config.json HTTP/1.1" 200 0 -2023-05-15 15:47:44,905 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps result: {'inputs': 40, 'outputs': {'original': 40, 'total': 40}, 'metadata': '/tmp/train/test/test.json'} -2023-05-15 15:47:45,063 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 22.55, 'used': 4.86, 'total': 27.41} gpu current: {'free': 9.7, 'used': 2.3, 'total': 12.0} gpu peak: {'active': 0.95, 'allocated': 0.95, 'reserved': 1.11} -2023-05-15 15:47:45,068 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | lora options: {'bucket_no_upscale': False, 'bucket_reso_steps': 64, 'cache_latents': True, 'caption_dropout_every_n_epochs': None, 'caption_dropout_rate': 0.0, 'caption_extension': '.txt', 'caption_extention': '.txt', 'caption_tag_dropout_rate': 0.0, 'clip_skip': None, 'color_aug': False, 'dataset_repeats': 1, 'debug_dataset': False, 'enable_bucket': False, 'face_crop_aug_range': None, 'flip_aug': False, 'full_fp16': False, 'gradient_accumulation_steps': 1, 'gradient_checkpointing': False, 'in_json': '/tmp/train/test/test.json', 'keep_tokens': None, 'learning_rate': 0.0001, 'log_prefix': None, 'logging_dir': None, 'lr_scheduler_num_cycles': 1, 'lr_scheduler_power': 1, 'lr_scheduler': 'cosine', 'lr_warmup_steps': 0, 'max_bucket_reso': 1024, 'max_data_loader_n_workers': 8, 'max_grad_norm': 0.0, 'max_token_length': None, 'max_train_epochs': None, 'max_train_steps': 2500, 'mem_eff_attn': False, 'min_bucket_reso': 256, 'mixed_precision': 'fp16', 'network_alpha': 20, 'network_args': None, 'network_dim': 40, 'network_module': 'networks.lora', 'network_train_text_encoder_only': False, 'network_train_unet_only': False, 'network_weights': None, 'no_metadata': False, 'output_dir': '/home/vlado/dev/automatic/models/Lora', 'output_name': 'test', 'persistent_data_loader_workers': False, 'pretrained_model_name_or_path': 'v1-5-pruned-emaonly.safetensors', 'prior_loss_weight': 1.0, 'random_crop': False, 'reg_data_dir': None, 'resolution': '512,512', 'resume': None, 'save_every_n_epochs': None, 'save_last_n_epochs_state': None, 'save_last_n_epochs': None, 'save_model_as': 'ckpt', 'save_n_epoch_ratio': None, 'save_precision': 'fp16', 'save_state': False, 'seed': 42, 'shuffle_caption': False, 'text_encoder_lr': 5e-05, 'train_batch_size': 1, 'train_data_dir': '/tmp/train/test', 'training_comment': 'mood-magic', 'unet_lr': 0.0001, 'use_8bit_adam': False, 'v_parameterization': False, 'v2': False, 'vae': None, 'xformers': False} -2023-05-15 15:47:45,118 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/vocab.json HTTP/1.1" 200 0 -2023-05-15 15:47:45,270 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /v1-5-pruned-emaonly.safetensors/resolve/main/model_index.json HTTP/1.1" 404 0 -2023-05-15 15:48:56,560 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:48:56,565 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 15:48:56,566 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:48:56,568 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 15:48:56,569 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:48:56,591 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 194 -2023-05-15 15:48:56,592 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:48:56,593 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 15:48:56,594 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 15:48:56,595 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | AAA -2023-05-15 15:48:56,596 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:48:56,599 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 15:48:56,599 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:48:56,607 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 194 -2023-05-15 15:48:56,608 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | AAA: {'options': {'sd_model_checkpoint': 'v1-5-pruned-emaonly.safetensors [6ce0161689]', 'sd_checkpoint_cache': 0.0, 'sd_vae_checkpoint_cache': 0.0, 'sd_vae': 'Automatic', 'stream_load': False, 'model_reuse_dict': False, 'inpainting_mask_weight': 1.0, 'initial_noise_multiplier': 1.0, 'img2img_color_correction': False, 'img2img_fix_steps': False, 'img2img_background_color': '#ffffff', 'enable_quantization': True, 'comma_padding_backtrack': 20.0, 'CLIP_stop_at_last_layers': 1.0, 'upcast_attn': False, 'cross_attention_optimization': 'Scaled-Dot-Product', 'cross_attention_options': [], 'sub_quad_q_chunk_size': 512.0, 'sub_quad_kv_chunk_size': 512.0, 'sub_quad_chunk_threshold': 80.0, 'always_batch_cond_uncond': False, 'temp_dir': '', 'clean_temp_dir_at_start': True, 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'vae_dir': '/home/vlado/dev/automatic/models/VAE', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'hypernetwork_dir': '/home/vlado/dev/automatic/models/hypernetworks', 'codeformer_models_path': '/home/vlado/dev/automatic/models/Codeformer', 'gfpgan_models_path': '/home/vlado/dev/automatic/models/GFPGAN', 'esrgan_models_path': '/home/vlado/dev/automatic/models/ESRGAN', 'bsrgan_models_path': '/home/vlado/dev/automatic/models/BSRGAN', 'realesrgan_models_path': '/home/vlado/dev/automatic/models/RealESRGAN', 'scunet_models_path': '/home/vlado/dev/automatic/models/ScuNET', 'swinir_models_path': '/home/vlado/dev/automatic/models/SwinIR', 'ldsr_models_path': '/home/vlado/dev/automatic/models/LDSR', 'clip_models_path': '/home/vlado/dev/automatic/models/CLIP', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'styles_dir': 'styles.csv', 'samples_save': True, 'samples_format': 'jpg', 'samples_filename_pattern': '', 'save_images_add_number': True, 'grid_save': True, 'grid_format': 'jpg', 'grid_extended_filename': True, 'grid_only_if_multiple': True, 'grid_prevent_empty_spots': True, 'n_rows': -1.0, 'save_txt': False, 'save_log_fn': '', 'save_images_before_face_restoration': False, 'save_images_before_highres_fix': False, 'save_images_before_color_correction': False, 'save_mask': False, 'save_mask_composite': False, 'jpeg_quality': 85.0, 'webp_lossless': False, 'img_max_size_mp': 200.0, 'use_original_name_batch': True, 'use_upscaler_name_as_suffix': True, 'save_selected_only': True, 'save_init_img': False, 'save_to_dirs': False, 'grid_save_to_dirs': False, 'use_save_to_dirs_for_ui': False, 'directories_filename_pattern': '[date]', 'directories_max_prompt_words': 8.0, 'outdir_samples': '', 'outdir_txt2img_samples': 'outputs/text', 'outdir_img2img_samples': 'outputs/image', 'outdir_extras_samples': 'outputs/extras', 'outdir_grids': '', 'outdir_txt2img_grids': 'outputs/grids', 'outdir_img2img_grids': 'outputs/grids', 'outdir_save': 'outputs/save', 'outdir_init_images': 'outputs/init-images', 'memmon_poll_rate': 2.0, 'precision': 'Autocast', 'cuda_dtype': 'FP16', 'no_half': False, 'no_half_vae': False, 'upcast_sampling': False, 'disable_nan_check': True, 'rollback_vae': False, 'opt_channelslast': False, 'cudnn_benchmark': False, 'cuda_allow_tf32': True, 'cuda_allow_tf16_reduced': True, 'cuda_compile': False, 'cuda_compile_mode': 'none', 'cuda_compile_verbose': False, 'cuda_compile_errors': True, 'disable_gc': True, 'upscaler_for_img2img': 'None', 'realesrgan_enabled_models': ['R-ESRGAN 4x+', 'R-ESRGAN 4x+ Anime6B'], 'ESRGAN_tile': 192.0, 'ESRGAN_tile_overlap': 8.0, 'SCUNET_tile': 256.0, 'SCUNET_tile_overlap': 8.0, 'use_old_hires_fix_width_height': False, 'dont_fix_second_order_samplers_schedule': False, 'face_restoration_model': 'CodeFormer', 'code_former_weight': 0.2, 'face_restoration_unload': False, 'unload_models_when_training': False, 'pin_memory': True, 'save_optimizer_state': False, 'save_training_settings_to_txt': False, 'dataset_filename_word_regex': '', 'dataset_filename_join_string': ' ', 'embeddings_templates_dir': '/home/vlado/dev/automatic/train/templates', 'training_image_repeats_per_epoch': 10.0, 'training_write_csv_every': 0.0, 'training_enable_tensorboard': False, 'training_tensorboard_save_images': False, 'training_tensorboard_flush_every': 120.0, 'interrogate_keep_models_in_memory': False, 'interrogate_return_ranks': True, 'interrogate_clip_num_beams': 1.0, 'interrogate_clip_min_length': 32.0, 'interrogate_clip_max_length': 192.0, 'interrogate_clip_dict_limit': 2048.0, 'interrogate_clip_skip_categories': ['artists', 'movements', 'flavors'], 'interrogate_deepbooru_score_threshold': 0.65, 'deepbooru_sort_alpha': False, 'deepbooru_use_spaces': False, 'deepbooru_escape': True, 'deepbooru_filter_tags': '', 'extra_networks_default_view': 'cards', 'extra_networks_default_multiplier': 1.0, 'extra_networks_card_width': 0.0, 'extra_networks_card_height': 0.0, 'extra_networks_add_text_separator': ' ', 'sd_hypernetwork': 'None', 'gradio_theme': 'black-orange', 'return_grid': True, 'return_mask': False, 'return_mask_composite': False, 'disable_weights_auto_swap': True, 'send_seed': True, 'send_size': True, 'font': '', 'keyedit_precision_attention': 0.1, 'keyedit_precision_extra': 0.05, 'keyedit_delimiters': '.,\\/!?%^*;:{}=`~()', 'quicksettings': 'sd_model_checkpoint', 'hidden_tabs': [], 'ui_tab_reorder': 'From Text, From Image, Process Image', 'ui_scripts_reorder': 'Enable Dynamic Thresholding, ControlNet', 'ui_reorder': 'inpaint, sampler, checkboxes, hires_fix, dimensions, cfg, seed, batch, override_settings, scripts', 'ui_extra_networks_tab_reorder': '', 'show_progressbar': True, 'live_previews_enable': True, 'show_progress_grid': True, 'notification_audio_enable': False, 'notification_audio_path': 'html/notification.mp3', 'show_progress_every_n_steps': 1.0, 'show_progress_type': 'Approx NN', 'live_preview_content': 'Combined', 'live_preview_refresh_period': 250.0, 'show_samplers': ['Euler a', 'UniPC', 'DDIM', 'DPM++ SDE', 'DPM++ SDE', 'DPM2 Karras', 'DPM++ 2M Karras'], 'fallback_sampler': 'Euler a', 'xyz_fallback_sampler': 'None', 'eta_ancestral': 1.0, 'eta_ddim': 0.0, 'ddim_discretize': 'uniform', 's_churn': 0.0, 's_min_uncond': 0.0, 's_tmin': 0.0, 's_noise': 1.0, 'eta_noise_seed_delta': 0.0, 'always_discard_next_to_last_sigma': False, 'uni_pc_variant': 'bh1', 'uni_pc_skip_type': 'time_uniform', 'uni_pc_order': 3.0, 'uni_pc_lower_order_final': True, 'token_merging': False, 'token_merging_ratio': 0.5, 'token_merging_hr_only': True, 'token_merging_ratio_hr': 0.5, 'token_merging_random': False, 'token_merging_merge_attention': True, 'token_merging_merge_cross_attention': False, 'token_merging_merge_mlp': False, 'token_merging_maximum_down_sampling': 1.0, 'token_merging_stride_x': 2.0, 'token_merging_stride_y': 2.0, 'postprocessing_enable_in_main_ui': [], 'postprocessing_operation_order': [], 'upscaling_max_images_in_cache': 5.0, 'disabled_extensions': [], 'disable_all_extensions': 'none', 'sd_checkpoint_hash': '6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa', 'sd_lyco': 'None', 'sd_lora': 'None'}, 'flags': {'error': 500, 'reason': 'Internal Server Error', 'url': 'http://127.0.0.1:7860/sdapi/v1/cmd-flags'}} -2023-05-15 15:48:56,628 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | args: {'type': 'lora', 'name': 'test', 'tag': 'person', 'input': '/home/vlado/generative/Input/mia/', 'output': '', 'process': 'original,interrogate,resize,square', 'gradient': 1, 'steps': 2500, 'batch': 1, 'lr': 0.0001, 'dim': 40, 'repeats': 10, 'alpha': 0, 'overwrite': False, 'debug': True, 'model': 'v1-5-pruned-emaonly.safetensors', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'process_dir': '/tmp/train/test'} -2023-05-15 15:48:56,629 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | train using lora style training -2023-05-15 15:48:58,310 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 26.38, 'used': 1.02, 'total': 27.41} gpu current: {'free': 10.42, 'used': 1.57, 'total': 12.0} gpu peak: {'active': 0.0, 'allocated': 0.0, 'reserved': 0.0} -2023-05-15 15:48:58,311 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 15:48:58,466 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing input images: 40 -2023-05-15 15:48:58,467 | WARNING | /home/vlado/dev/automatic/cli/train/./train.py | removing existing processed folder: /tmp/train/test -2023-05-15 15:48:58,469 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing current step: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 15:48:58,469 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing concept: person -2023-05-15 15:48:58,470 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing output folder: /tmp/train/test/10_person -2023-05-15 15:48:58,475 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:48:58,475 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 15:48:58,475 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:48:58,475 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:48:58,475 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:48:58,508 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:07,767 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 15:49:07,777 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:09,513 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 187 -2023-05-15 15:49:09,521 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:09,521 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102947_Instagram.jpg => /tmp/train/test/10_person/001-original-Screenshot_20221225_102947_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:09,525 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:09,525 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06@' -2023-05-15 15:49:09,525 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:09,525 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:09,525 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:09,557 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:10,451 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 15:49:10,457 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:10,598 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 291 -2023-05-15 15:49:10,605 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:10,605 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102956_Instagram.jpg => /tmp/train/test/10_person/002-original-Screenshot_20221225_102956_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:10,609 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:10,609 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 15:49:10,609 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:10,609 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:10,609 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:10,636 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:11,509 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 175 -2023-05-15 15:49:11,516 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:11,668 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 185 -2023-05-15 15:49:11,675 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:11,675 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103005_Instagram.jpg => /tmp/train/test/10_person/003-original-Screenshot_20221225_103005_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:11,679 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:11,679 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xff' -2023-05-15 15:49:11,679 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:11,679 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:11,679 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:11,710 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:12,600 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 15:49:12,607 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:12,753 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 262 -2023-05-15 15:49:12,761 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:12,761 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103018_Instagram.jpg => /tmp/train/test/10_person/004-original-Screenshot_20221225_103018_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:12,765 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:12,765 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06X' -2023-05-15 15:49:12,765 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:12,765 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:12,765 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:12,790 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:13,650 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 15:49:13,656 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:13,810 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 227 -2023-05-15 15:49:13,817 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:13,817 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103034_Instagram.jpg => /tmp/train/test/10_person/005-original-Screenshot_20221225_103034_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:13,821 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:13,821 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 15:49:13,821 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:13,821 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:13,821 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:13,843 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:14,641 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:49:14,647 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:14,814 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 497 -2023-05-15 15:49:14,821 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:14,822 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103043_Instagram.jpg => /tmp/train/test/10_person/006-original-Screenshot_20221225_103043_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:14,825 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:14,825 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:49:14,825 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:14,825 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:14,825 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:14,863 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:15,819 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 15:49:15,824 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:15,990 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 15:49:15,997 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:15,997 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103058_Instagram.jpg => /tmp/train/test/10_person/007-original-Screenshot_20221225_103058_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:16,000 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:16,000 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:49:16,000 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:16,000 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:16,000 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:16,025 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:16,853 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 15:49:16,859 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:16,998 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 251 -2023-05-15 15:49:17,006 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:17,006 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103106_Instagram.jpg => /tmp/train/test/10_person/008-original-Screenshot_20221225_103106_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:17,010 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:17,010 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:49:17,010 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:17,010 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:17,010 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:17,031 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:17,879 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:49:17,884 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:18,027 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 216 -2023-05-15 15:49:18,035 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:18,035 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103115_Instagram.jpg => /tmp/train/test/10_person/009-original-Screenshot_20221225_103115_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:18,038 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:18,038 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xc8' -2023-05-15 15:49:18,038 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:18,038 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:18,038 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:18,065 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:18,902 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 140 -2023-05-15 15:49:18,909 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:19,055 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 263 -2023-05-15 15:49:19,063 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:19,063 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103128_Instagram.jpg => /tmp/train/test/10_person/010-original-Screenshot_20221225_103128_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:19,066 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:19,066 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xfb' -2023-05-15 15:49:19,066 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:19,066 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:19,066 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:19,093 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:19,854 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 15:49:19,860 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:20,032 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 192 -2023-05-15 15:49:20,040 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:20,040 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103144_Instagram.jpg => /tmp/train/test/10_person/011-original-Screenshot_20221225_103144_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:20,044 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 15:49:20,044 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xb6' -2023-05-15 15:49:20,044 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:20,044 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:20,044 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:20,070 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:20,908 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 179 -2023-05-15 15:49:20,914 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:21,056 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 348 -2023-05-15 15:49:21,064 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:21,064 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103159_Instagram.jpg => /tmp/train/test/10_person/012-original-Screenshot_20221225_103159_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:21,067 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:21,067 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 15:49:21,067 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:21,067 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:21,067 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:21,090 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:21,870 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 15:49:21,876 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:22,012 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 299 -2023-05-15 15:49:22,020 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:22,020 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103207_Instagram.jpg => /tmp/train/test/10_person/013-original-Screenshot_20221225_103207_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:22,023 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:22,023 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:49:22,023 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:22,023 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:22,023 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:22,048 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:22,882 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 176 -2023-05-15 15:49:22,888 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:23,032 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 343 -2023-05-15 15:49:23,040 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:23,040 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103222_Instagram.jpg => /tmp/train/test/10_person/014-original-Screenshot_20221225_103222_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:23,043 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:23,043 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 15:49:23,043 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:23,043 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:23,043 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:23,067 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:23,846 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 189 -2023-05-15 15:49:23,851 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:23,987 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 311 -2023-05-15 15:49:23,995 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:23,995 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103233_Instagram.jpg => /tmp/train/test/10_person/015-original-Screenshot_20221225_103233_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:23,998 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:23,998 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:49:23,998 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:23,998 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:23,998 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:24,022 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:24,805 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 15:49:24,811 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:24,951 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 366 -2023-05-15 15:49:24,959 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:24,959 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103240_Instagram.jpg => /tmp/train/test/10_person/016-original-Screenshot_20221225_103240_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:24,962 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 15:49:24,962 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x06' -2023-05-15 15:49:24,962 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:24,962 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:24,962 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:24,989 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:25,778 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 15:49:25,784 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:25,919 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 712 -2023-05-15 15:49:25,926 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:25,926 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103256_Instagram.jpg => /tmp/train/test/10_person/017-original-Screenshot_20221225_103256_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:25,930 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:25,930 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:49:25,930 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:25,930 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:25,930 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:25,950 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:26,689 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 15:49:26,694 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:26,829 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 169 -2023-05-15 15:49:26,836 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:26,836 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103313_Instagram.jpg => /tmp/train/test/10_person/018-original-Screenshot_20221225_103313_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:26,839 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:26,840 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:49:26,840 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:26,840 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:26,840 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:26,863 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:27,699 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 15:49:27,704 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:27,842 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 253 -2023-05-15 15:49:27,849 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:27,849 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103321_Instagram.jpg => /tmp/train/test/10_person/019-original-Screenshot_20221225_103321_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:27,858 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:27,858 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:49:27,858 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:27,858 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:27,858 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:27,889 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:28,685 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 15:49:28,691 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:28,839 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 295 -2023-05-15 15:49:28,847 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:28,847 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103335_Instagram.jpg => /tmp/train/test/10_person/020-original-Screenshot_20221225_103335_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:28,850 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:28,850 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:49:28,850 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:28,850 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:28,850 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:28,876 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:29,650 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 165 -2023-05-15 15:49:29,656 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:29,803 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 252 -2023-05-15 15:49:29,811 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:29,811 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103345_Instagram.jpg => /tmp/train/test/10_person/021-original-Screenshot_20221225_103345_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:29,815 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:29,815 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06c' -2023-05-15 15:49:29,815 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:29,815 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:29,815 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:29,843 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:30,600 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 15:49:30,606 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:30,740 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 15:49:30,747 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:30,747 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103406_Instagram.jpg => /tmp/train/test/10_person/022-original-Screenshot_20221225_103406_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:30,751 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:30,751 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 15:49:30,751 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:30,751 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:30,751 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:30,774 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:31,520 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 15:49:31,525 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:31,657 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 237 -2023-05-15 15:49:31,665 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:31,665 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103427_Instagram.jpg => /tmp/train/test/10_person/023-original-Screenshot_20221225_103427_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:31,668 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:31,668 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 15:49:31,668 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:31,668 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:31,668 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:31,690 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:32,450 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 15:49:32,456 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:32,587 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 308 -2023-05-15 15:49:32,594 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:32,594 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103433_Instagram.jpg => /tmp/train/test/10_person/024-original-Screenshot_20221225_103433_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:32,597 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:32,597 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x95' -2023-05-15 15:49:32,597 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:32,597 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:32,597 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:32,617 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:33,413 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 15:49:33,418 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:33,556 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 15:49:33,563 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:33,563 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103445_Instagram.jpg => /tmp/train/test/10_person/025-original-Screenshot_20221225_103445_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:33,566 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:33,566 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x93' -2023-05-15 15:49:33,566 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:33,566 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:33,566 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:33,588 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:34,455 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 157 -2023-05-15 15:49:34,461 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:34,628 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 434 -2023-05-15 15:49:34,635 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:34,636 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103500_Instagram.jpg => /tmp/train/test/10_person/026-original-Screenshot_20221225_103500_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:34,639 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:34,639 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x8b' -2023-05-15 15:49:34,639 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:34,639 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:34,639 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:34,665 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:35,456 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 15:49:35,461 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:35,603 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 457 -2023-05-15 15:49:35,610 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:35,610 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103507_Instagram.jpg => /tmp/train/test/10_person/027-original-Screenshot_20221225_103507_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:35,613 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:35,613 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:49:35,613 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:35,613 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:35,613 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:35,630 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:36,458 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 15:49:36,464 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:36,636 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 362 -2023-05-15 15:49:36,644 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:36,644 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103522_Instagram.jpg => /tmp/train/test/10_person/028-original-Screenshot_20221225_103522_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:36,649 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9c' -2023-05-15 15:49:36,649 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:49:36,649 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:36,649 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:36,649 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:36,675 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:37,676 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 15:49:37,681 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:37,837 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 15:49:37,844 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:37,844 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103530_Instagram.jpg => /tmp/train/test/10_person/029-original-Screenshot_20221225_103530_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:37,848 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:37,848 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:49:37,848 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:37,848 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:37,848 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:37,869 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:38,620 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 154 -2023-05-15 15:49:38,626 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:38,763 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 113 -2023-05-15 15:49:38,770 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:38,770 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103536_Instagram.jpg => /tmp/train/test/10_person/030-original-Screenshot_20221225_103536_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:38,774 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x8a' -2023-05-15 15:49:38,774 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:49:38,774 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:38,774 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:38,774 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:38,795 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:39,553 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 15:49:39,558 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:39,696 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 15:49:39,703 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:39,703 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103543_Instagram.jpg => /tmp/train/test/10_person/031-original-Screenshot_20221225_103543_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:39,708 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:39,708 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:49:39,708 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:39,708 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:39,708 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:39,730 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:40,512 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 15:49:40,517 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:40,652 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 236 -2023-05-15 15:49:40,659 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:40,659 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103553_Instagram.jpg => /tmp/train/test/10_person/032-original-Screenshot_20221225_103553_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:40,662 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:40,662 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:49:40,662 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:40,662 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:40,662 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:40,682 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:41,476 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 174 -2023-05-15 15:49:41,482 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:41,612 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 204 -2023-05-15 15:49:41,619 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:41,619 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103559_Instagram.jpg => /tmp/train/test/10_person/033-original-Screenshot_20221225_103559_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:41,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:41,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 15:49:41,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:41,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:41,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:41,643 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:42,419 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 15:49:42,424 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:42,555 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 628 -2023-05-15 15:49:42,563 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:42,563 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103613_Instagram.jpg => /tmp/train/test/10_person/034-original-Screenshot_20221225_103613_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:42,566 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:42,566 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 15:49:42,566 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:42,566 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:42,566 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:42,587 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:43,396 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 167 -2023-05-15 15:49:43,402 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:43,546 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 563 -2023-05-15 15:49:43,554 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:43,554 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103621_Instagram.jpg => /tmp/train/test/10_person/035-original-Screenshot_20221225_103621_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:43,557 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:43,557 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9d' -2023-05-15 15:49:43,557 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:43,557 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:43,557 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:43,581 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:44,370 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:49:44,376 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:44,522 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 512 -2023-05-15 15:49:44,529 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:44,529 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103629_Instagram.jpg => /tmp/train/test/10_person/036-original-Screenshot_20221225_103629_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:44,532 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:44,532 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:49:44,532 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:44,532 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:44,532 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:44,553 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:45,347 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 15:49:45,352 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:45,490 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 160 -2023-05-15 15:49:45,497 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:45,498 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103638_Instagram.jpg => /tmp/train/test/10_person/037-original-Screenshot_20221225_103638_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:45,501 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:45,501 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x04\xb0' -2023-05-15 15:49:45,501 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:45,501 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:45,501 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:45,521 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:46,310 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 168 -2023-05-15 15:49:46,315 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:46,447 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 908 -2023-05-15 15:49:46,453 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:46,454 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103649_Instagram.jpg => /tmp/train/test/10_person/038-original-Screenshot_20221225_103649_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:46,457 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:46,457 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 15:49:46,457 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:46,457 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:46,457 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:46,480 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:47,336 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:49:47,341 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:47,481 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 289 -2023-05-15 15:49:47,489 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:47,489 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103656_Instagram.jpg => /tmp/train/test/10_person/039-original-Screenshot_20221225_103656_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:47,494 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:49:47,494 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x15' -2023-05-15 15:49:47,494 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:49:47,494 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:49:47,494 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:49:47,521 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:48,333 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 15:49:48,339 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:49:48,491 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 15:49:48,499 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:49:48,499 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103727_Instagram.jpg => /tmp/train/test/10_person/040-original-Screenshot_20221225_103727_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:49:48,500 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | input datasets ['/tmp/train/test/10_person'] -2023-05-15 15:49:48,503 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTPS connection (1): huggingface.co:443 -2023-05-15 15:49:48,647 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /stabilityai/sd-vae-ft-mse/resolve/main/config.json HTTP/1.1" 200 0 -2023-05-15 15:49:56,358 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps result: {'inputs': 40, 'outputs': {'original': 40, 'total': 40}, 'metadata': '/tmp/train/test/test.json'} -2023-05-15 15:49:56,522 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 22.23, 'used': 5.18, 'total': 27.41} gpu current: {'free': 9.7, 'used': 2.3, 'total': 12.0} gpu peak: {'active': 0.95, 'allocated': 0.95, 'reserved': 1.11} -2023-05-15 15:49:56,527 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | lora options: {'bucket_no_upscale': False, 'bucket_reso_steps': 64, 'cache_latents': True, 'caption_dropout_every_n_epochs': None, 'caption_dropout_rate': 0.0, 'caption_extension': '.txt', 'caption_extention': '.txt', 'caption_tag_dropout_rate': 0.0, 'clip_skip': None, 'color_aug': False, 'dataset_repeats': 1, 'debug_dataset': False, 'enable_bucket': False, 'face_crop_aug_range': None, 'flip_aug': False, 'full_fp16': False, 'gradient_accumulation_steps': 1, 'gradient_checkpointing': False, 'in_json': '/tmp/train/test/test.json', 'keep_tokens': None, 'learning_rate': 0.0001, 'log_prefix': None, 'logging_dir': None, 'lr_scheduler_num_cycles': 1, 'lr_scheduler_power': 1, 'lr_scheduler': 'cosine', 'lr_warmup_steps': 0, 'max_bucket_reso': 1024, 'max_data_loader_n_workers': 8, 'max_grad_norm': 0.0, 'max_token_length': None, 'max_train_epochs': None, 'max_train_steps': 2500, 'mem_eff_attn': False, 'min_bucket_reso': 256, 'mixed_precision': 'fp16', 'network_alpha': 20, 'network_args': None, 'network_dim': 40, 'network_module': 'networks.lora', 'network_train_text_encoder_only': False, 'network_train_unet_only': False, 'network_weights': None, 'no_metadata': False, 'output_dir': '/home/vlado/dev/automatic/models/Lora', 'output_name': 'test', 'persistent_data_loader_workers': False, 'pretrained_model_name_or_path': 'v1-5-pruned-emaonly.safetensors', 'prior_loss_weight': 1.0, 'random_crop': False, 'reg_data_dir': None, 'resolution': '512,512', 'resume': None, 'save_every_n_epochs': None, 'save_last_n_epochs_state': None, 'save_last_n_epochs': None, 'save_model_as': 'ckpt', 'save_n_epoch_ratio': None, 'save_precision': 'fp16', 'save_state': False, 'seed': 42, 'shuffle_caption': False, 'text_encoder_lr': 5e-05, 'train_batch_size': 1, 'train_data_dir': '/tmp/train/test', 'training_comment': 'mood-magic', 'unet_lr': 0.0001, 'use_8bit_adam': False, 'v_parameterization': False, 'v2': False, 'vae': None, 'xformers': False} -2023-05-15 15:49:56,574 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/vocab.json HTTP/1.1" 200 0 -2023-05-15 15:49:56,878 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /v1-5-pruned-emaonly.safetensors/resolve/main/model_index.json HTTP/1.1" 404 0 -2023-05-15 15:51:13,665 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:13,668 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 15:51:13,668 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:13,671 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 15:51:13,672 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:13,681 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 194 -2023-05-15 15:51:13,682 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:13,684 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 15:51:13,685 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 15:51:13,686 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | AAA -2023-05-15 15:51:13,687 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:13,690 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 15:51:13,691 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:13,699 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 194 -2023-05-15 15:51:13,699 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | AAA: {'options': {'sd_model_checkpoint': 'v1-5-pruned-emaonly.safetensors [6ce0161689]', 'sd_checkpoint_cache': 0.0, 'sd_vae_checkpoint_cache': 0.0, 'sd_vae': 'Automatic', 'stream_load': False, 'model_reuse_dict': False, 'inpainting_mask_weight': 1.0, 'initial_noise_multiplier': 1.0, 'img2img_color_correction': False, 'img2img_fix_steps': False, 'img2img_background_color': '#ffffff', 'enable_quantization': True, 'comma_padding_backtrack': 20.0, 'CLIP_stop_at_last_layers': 1.0, 'upcast_attn': False, 'cross_attention_optimization': 'Scaled-Dot-Product', 'cross_attention_options': [], 'sub_quad_q_chunk_size': 512.0, 'sub_quad_kv_chunk_size': 512.0, 'sub_quad_chunk_threshold': 80.0, 'always_batch_cond_uncond': False, 'temp_dir': '', 'clean_temp_dir_at_start': True, 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'vae_dir': '/home/vlado/dev/automatic/models/VAE', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'hypernetwork_dir': '/home/vlado/dev/automatic/models/hypernetworks', 'codeformer_models_path': '/home/vlado/dev/automatic/models/Codeformer', 'gfpgan_models_path': '/home/vlado/dev/automatic/models/GFPGAN', 'esrgan_models_path': '/home/vlado/dev/automatic/models/ESRGAN', 'bsrgan_models_path': '/home/vlado/dev/automatic/models/BSRGAN', 'realesrgan_models_path': '/home/vlado/dev/automatic/models/RealESRGAN', 'scunet_models_path': '/home/vlado/dev/automatic/models/ScuNET', 'swinir_models_path': '/home/vlado/dev/automatic/models/SwinIR', 'ldsr_models_path': '/home/vlado/dev/automatic/models/LDSR', 'clip_models_path': '/home/vlado/dev/automatic/models/CLIP', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'styles_dir': 'styles.csv', 'samples_save': True, 'samples_format': 'jpg', 'samples_filename_pattern': '', 'save_images_add_number': True, 'grid_save': True, 'grid_format': 'jpg', 'grid_extended_filename': True, 'grid_only_if_multiple': True, 'grid_prevent_empty_spots': True, 'n_rows': -1.0, 'save_txt': False, 'save_log_fn': '', 'save_images_before_face_restoration': False, 'save_images_before_highres_fix': False, 'save_images_before_color_correction': False, 'save_mask': False, 'save_mask_composite': False, 'jpeg_quality': 85.0, 'webp_lossless': False, 'img_max_size_mp': 200.0, 'use_original_name_batch': True, 'use_upscaler_name_as_suffix': True, 'save_selected_only': True, 'save_init_img': False, 'save_to_dirs': False, 'grid_save_to_dirs': False, 'use_save_to_dirs_for_ui': False, 'directories_filename_pattern': '[date]', 'directories_max_prompt_words': 8.0, 'outdir_samples': '', 'outdir_txt2img_samples': 'outputs/text', 'outdir_img2img_samples': 'outputs/image', 'outdir_extras_samples': 'outputs/extras', 'outdir_grids': '', 'outdir_txt2img_grids': 'outputs/grids', 'outdir_img2img_grids': 'outputs/grids', 'outdir_save': 'outputs/save', 'outdir_init_images': 'outputs/init-images', 'memmon_poll_rate': 2.0, 'precision': 'Autocast', 'cuda_dtype': 'FP16', 'no_half': False, 'no_half_vae': False, 'upcast_sampling': False, 'disable_nan_check': True, 'rollback_vae': False, 'opt_channelslast': False, 'cudnn_benchmark': False, 'cuda_allow_tf32': True, 'cuda_allow_tf16_reduced': True, 'cuda_compile': False, 'cuda_compile_mode': 'none', 'cuda_compile_verbose': False, 'cuda_compile_errors': True, 'disable_gc': True, 'upscaler_for_img2img': 'None', 'realesrgan_enabled_models': ['R-ESRGAN 4x+', 'R-ESRGAN 4x+ Anime6B'], 'ESRGAN_tile': 192.0, 'ESRGAN_tile_overlap': 8.0, 'SCUNET_tile': 256.0, 'SCUNET_tile_overlap': 8.0, 'use_old_hires_fix_width_height': False, 'dont_fix_second_order_samplers_schedule': False, 'face_restoration_model': 'CodeFormer', 'code_former_weight': 0.2, 'face_restoration_unload': False, 'unload_models_when_training': False, 'pin_memory': True, 'save_optimizer_state': False, 'save_training_settings_to_txt': False, 'dataset_filename_word_regex': '', 'dataset_filename_join_string': ' ', 'embeddings_templates_dir': '/home/vlado/dev/automatic/train/templates', 'training_image_repeats_per_epoch': 10.0, 'training_write_csv_every': 0.0, 'training_enable_tensorboard': False, 'training_tensorboard_save_images': False, 'training_tensorboard_flush_every': 120.0, 'interrogate_keep_models_in_memory': False, 'interrogate_return_ranks': True, 'interrogate_clip_num_beams': 1.0, 'interrogate_clip_min_length': 32.0, 'interrogate_clip_max_length': 192.0, 'interrogate_clip_dict_limit': 2048.0, 'interrogate_clip_skip_categories': ['artists', 'movements', 'flavors'], 'interrogate_deepbooru_score_threshold': 0.65, 'deepbooru_sort_alpha': False, 'deepbooru_use_spaces': False, 'deepbooru_escape': True, 'deepbooru_filter_tags': '', 'extra_networks_default_view': 'cards', 'extra_networks_default_multiplier': 1.0, 'extra_networks_card_width': 0.0, 'extra_networks_card_height': 0.0, 'extra_networks_add_text_separator': ' ', 'sd_hypernetwork': 'None', 'gradio_theme': 'black-orange', 'return_grid': True, 'return_mask': False, 'return_mask_composite': False, 'disable_weights_auto_swap': True, 'send_seed': True, 'send_size': True, 'font': '', 'keyedit_precision_attention': 0.1, 'keyedit_precision_extra': 0.05, 'keyedit_delimiters': '.,\\/!?%^*;:{}=`~()', 'quicksettings': 'sd_model_checkpoint', 'hidden_tabs': [], 'ui_tab_reorder': 'From Text, From Image, Process Image', 'ui_scripts_reorder': 'Enable Dynamic Thresholding, ControlNet', 'ui_reorder': 'inpaint, sampler, checkboxes, hires_fix, dimensions, cfg, seed, batch, override_settings, scripts', 'ui_extra_networks_tab_reorder': '', 'show_progressbar': True, 'live_previews_enable': True, 'show_progress_grid': True, 'notification_audio_enable': False, 'notification_audio_path': 'html/notification.mp3', 'show_progress_every_n_steps': 1.0, 'show_progress_type': 'Approx NN', 'live_preview_content': 'Combined', 'live_preview_refresh_period': 250.0, 'show_samplers': ['Euler a', 'UniPC', 'DDIM', 'DPM++ SDE', 'DPM++ SDE', 'DPM2 Karras', 'DPM++ 2M Karras'], 'fallback_sampler': 'Euler a', 'xyz_fallback_sampler': 'None', 'eta_ancestral': 1.0, 'eta_ddim': 0.0, 'ddim_discretize': 'uniform', 's_churn': 0.0, 's_min_uncond': 0.0, 's_tmin': 0.0, 's_noise': 1.0, 'eta_noise_seed_delta': 0.0, 'always_discard_next_to_last_sigma': False, 'uni_pc_variant': 'bh1', 'uni_pc_skip_type': 'time_uniform', 'uni_pc_order': 3.0, 'uni_pc_lower_order_final': True, 'token_merging': False, 'token_merging_ratio': 0.5, 'token_merging_hr_only': True, 'token_merging_ratio_hr': 0.5, 'token_merging_random': False, 'token_merging_merge_attention': True, 'token_merging_merge_cross_attention': False, 'token_merging_merge_mlp': False, 'token_merging_maximum_down_sampling': 1.0, 'token_merging_stride_x': 2.0, 'token_merging_stride_y': 2.0, 'postprocessing_enable_in_main_ui': [], 'postprocessing_operation_order': [], 'upscaling_max_images_in_cache': 5.0, 'disabled_extensions': [], 'disable_all_extensions': 'none', 'sd_checkpoint_hash': '6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa', 'sd_lyco': 'None', 'sd_lora': 'None'}, 'flags': {'error': 500, 'reason': 'Internal Server Error', 'url': 'http://127.0.0.1:7860/sdapi/v1/cmd-flags'}} -2023-05-15 15:51:13,716 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | args: {'type': 'lora', 'name': 'test', 'tag': 'person', 'input': '/home/vlado/generative/Input/mia/', 'output': '', 'process': 'original,interrogate,resize,square', 'gradient': 1, 'steps': 2500, 'batch': 1, 'lr': 0.0001, 'dim': 40, 'repeats': 10, 'alpha': 0, 'overwrite': False, 'debug': True, 'model': 'v1-5-pruned-emaonly.safetensors', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'process_dir': '/tmp/train/test'} -2023-05-15 15:51:13,718 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | train using lora style training -2023-05-15 15:51:14,820 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 26.38, 'used': 1.02, 'total': 27.41} gpu current: {'free': 10.42, 'used': 1.57, 'total': 12.0} gpu peak: {'active': 0.0, 'allocated': 0.0, 'reserved': 0.0} -2023-05-15 15:51:14,821 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 15:51:14,948 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing input images: 40 -2023-05-15 15:51:14,948 | WARNING | /home/vlado/dev/automatic/cli/train/./train.py | removing existing processed folder: /tmp/train/test -2023-05-15 15:51:14,950 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing current step: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 15:51:14,951 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing concept: person -2023-05-15 15:51:14,951 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing output folder: /tmp/train/test/10_person -2023-05-15 15:51:14,957 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:14,957 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 15:51:14,957 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:14,957 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:14,957 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:14,988 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:15,912 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 15:51:15,919 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:16,081 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 187 -2023-05-15 15:51:16,088 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:16,088 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102947_Instagram.jpg => /tmp/train/test/10_person/001-original-Screenshot_20221225_102947_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:16,091 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:16,091 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06@' -2023-05-15 15:51:16,091 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:16,092 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:16,092 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:16,119 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:16,995 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 15:51:17,001 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:17,142 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 291 -2023-05-15 15:51:17,149 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:17,149 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102956_Instagram.jpg => /tmp/train/test/10_person/002-original-Screenshot_20221225_102956_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:17,152 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:17,152 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 15:51:17,152 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:17,152 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:17,152 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:17,180 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:18,009 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 175 -2023-05-15 15:51:18,016 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:18,150 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 185 -2023-05-15 15:51:18,157 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:18,157 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103005_Instagram.jpg => /tmp/train/test/10_person/003-original-Screenshot_20221225_103005_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:18,161 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:18,161 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xff' -2023-05-15 15:51:18,161 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:18,161 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:18,161 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:18,189 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:18,984 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 15:51:18,990 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:19,129 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 262 -2023-05-15 15:51:19,137 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:19,137 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103018_Instagram.jpg => /tmp/train/test/10_person/004-original-Screenshot_20221225_103018_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:19,140 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:19,140 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06X' -2023-05-15 15:51:19,140 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:19,140 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:19,140 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:19,164 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:19,985 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 15:51:19,990 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:20,137 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 227 -2023-05-15 15:51:20,144 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:20,144 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103034_Instagram.jpg => /tmp/train/test/10_person/005-original-Screenshot_20221225_103034_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:20,147 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:20,147 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 15:51:20,147 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:20,147 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:20,147 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:20,171 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:20,986 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:51:20,991 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:21,127 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 497 -2023-05-15 15:51:21,135 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:21,135 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103043_Instagram.jpg => /tmp/train/test/10_person/006-original-Screenshot_20221225_103043_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:21,138 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:21,138 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:51:21,138 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:21,138 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:21,138 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:21,161 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:21,973 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 15:51:21,979 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:22,122 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 15:51:22,130 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:22,130 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103058_Instagram.jpg => /tmp/train/test/10_person/007-original-Screenshot_20221225_103058_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:22,133 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:22,133 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:51:22,133 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:22,133 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:22,133 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:22,157 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:22,921 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 15:51:22,927 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:23,064 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 251 -2023-05-15 15:51:23,071 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:23,072 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103106_Instagram.jpg => /tmp/train/test/10_person/008-original-Screenshot_20221225_103106_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:23,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:23,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:51:23,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:23,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:23,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:23,095 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:23,854 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:51:23,860 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:23,992 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 216 -2023-05-15 15:51:24,000 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:24,000 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103115_Instagram.jpg => /tmp/train/test/10_person/009-original-Screenshot_20221225_103115_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:24,003 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:24,003 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xc8' -2023-05-15 15:51:24,003 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:24,003 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:24,003 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:24,030 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:24,783 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 140 -2023-05-15 15:51:24,789 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:24,923 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 263 -2023-05-15 15:51:24,931 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:24,931 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103128_Instagram.jpg => /tmp/train/test/10_person/010-original-Screenshot_20221225_103128_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:24,934 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:24,934 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xfb' -2023-05-15 15:51:24,934 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:24,934 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:24,934 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:24,961 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:25,728 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 15:51:25,734 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:25,875 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 192 -2023-05-15 15:51:25,883 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:25,883 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103144_Instagram.jpg => /tmp/train/test/10_person/011-original-Screenshot_20221225_103144_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:25,886 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 15:51:25,886 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xb6' -2023-05-15 15:51:25,886 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:25,886 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:25,886 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:25,912 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:26,717 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 179 -2023-05-15 15:51:26,723 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:26,869 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 348 -2023-05-15 15:51:26,877 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:26,877 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103159_Instagram.jpg => /tmp/train/test/10_person/012-original-Screenshot_20221225_103159_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:26,880 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:26,880 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 15:51:26,880 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:26,880 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:26,880 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:26,904 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:27,644 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 15:51:27,650 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:27,786 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 299 -2023-05-15 15:51:27,794 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:27,794 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103207_Instagram.jpg => /tmp/train/test/10_person/013-original-Screenshot_20221225_103207_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:27,797 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:27,797 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:51:27,797 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:27,797 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:27,797 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:27,823 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:28,594 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 176 -2023-05-15 15:51:28,600 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:28,751 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 343 -2023-05-15 15:51:28,759 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:28,759 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103222_Instagram.jpg => /tmp/train/test/10_person/014-original-Screenshot_20221225_103222_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:28,763 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:28,763 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 15:51:28,763 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:28,763 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:28,763 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:28,788 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:29,588 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 189 -2023-05-15 15:51:29,594 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:29,727 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 311 -2023-05-15 15:51:29,734 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:29,734 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103233_Instagram.jpg => /tmp/train/test/10_person/015-original-Screenshot_20221225_103233_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:29,739 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:29,739 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:51:29,739 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:29,739 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:29,739 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:29,764 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:30,575 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 15:51:30,580 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:30,721 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 366 -2023-05-15 15:51:30,728 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:30,728 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103240_Instagram.jpg => /tmp/train/test/10_person/016-original-Screenshot_20221225_103240_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:30,732 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 15:51:30,732 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x06' -2023-05-15 15:51:30,732 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:30,732 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:30,732 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:30,759 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:31,545 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 15:51:31,551 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:31,701 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 712 -2023-05-15 15:51:31,708 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:31,708 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103256_Instagram.jpg => /tmp/train/test/10_person/017-original-Screenshot_20221225_103256_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:31,711 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:31,711 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:51:31,711 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:31,711 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:31,712 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:31,732 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:32,485 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 15:51:32,491 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:32,636 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 169 -2023-05-15 15:51:32,643 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:32,644 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103313_Instagram.jpg => /tmp/train/test/10_person/018-original-Screenshot_20221225_103313_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:32,663 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:32,663 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:51:32,663 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:32,663 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:32,663 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:32,687 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:33,483 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 15:51:33,490 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:33,623 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 253 -2023-05-15 15:51:33,630 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:33,630 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103321_Instagram.jpg => /tmp/train/test/10_person/019-original-Screenshot_20221225_103321_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:33,633 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:33,633 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:51:33,633 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:33,633 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:33,633 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:33,657 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:34,392 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 15:51:34,398 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:34,530 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 295 -2023-05-15 15:51:34,538 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:34,538 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103335_Instagram.jpg => /tmp/train/test/10_person/020-original-Screenshot_20221225_103335_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:34,541 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:34,541 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:51:34,541 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:34,541 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:34,541 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:34,566 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:35,345 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 165 -2023-05-15 15:51:35,351 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:35,482 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 252 -2023-05-15 15:51:35,490 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:35,490 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103345_Instagram.jpg => /tmp/train/test/10_person/021-original-Screenshot_20221225_103345_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:35,493 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:35,493 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06c' -2023-05-15 15:51:35,493 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:35,493 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:35,493 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:35,518 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:36,248 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 15:51:36,254 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:36,388 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 15:51:36,395 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:36,395 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103406_Instagram.jpg => /tmp/train/test/10_person/022-original-Screenshot_20221225_103406_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:36,398 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:36,398 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 15:51:36,398 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:36,398 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:36,398 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:36,422 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:37,164 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 15:51:37,170 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:37,303 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 237 -2023-05-15 15:51:37,310 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:37,310 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103427_Instagram.jpg => /tmp/train/test/10_person/023-original-Screenshot_20221225_103427_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:37,313 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:37,313 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 15:51:37,313 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:37,313 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:37,313 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:37,336 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:38,082 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 15:51:38,087 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:38,224 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 308 -2023-05-15 15:51:38,232 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:38,232 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103433_Instagram.jpg => /tmp/train/test/10_person/024-original-Screenshot_20221225_103433_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:38,235 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:38,235 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x95' -2023-05-15 15:51:38,235 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:38,235 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:38,235 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:38,255 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:39,055 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 15:51:39,059 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:39,202 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 15:51:39,209 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:39,209 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103445_Instagram.jpg => /tmp/train/test/10_person/025-original-Screenshot_20221225_103445_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:39,212 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:39,212 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x93' -2023-05-15 15:51:39,212 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:39,212 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:39,212 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:39,235 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:40,006 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 157 -2023-05-15 15:51:40,012 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:40,147 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 434 -2023-05-15 15:51:40,154 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:40,154 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103500_Instagram.jpg => /tmp/train/test/10_person/026-original-Screenshot_20221225_103500_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:40,157 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:40,158 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x8b' -2023-05-15 15:51:40,158 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:40,158 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:40,158 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:40,180 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:40,944 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 15:51:40,949 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:41,094 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 457 -2023-05-15 15:51:41,102 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:41,102 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103507_Instagram.jpg => /tmp/train/test/10_person/027-original-Screenshot_20221225_103507_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:41,105 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:41,105 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:51:41,105 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:41,105 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:41,105 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:41,123 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:41,904 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 15:51:41,908 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:42,037 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 362 -2023-05-15 15:51:42,044 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:42,044 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103522_Instagram.jpg => /tmp/train/test/10_person/028-original-Screenshot_20221225_103522_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:42,047 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9c' -2023-05-15 15:51:42,048 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:51:42,048 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:42,048 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:42,048 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:42,069 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:42,796 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 15:51:42,801 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:42,929 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 15:51:42,936 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:42,936 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103530_Instagram.jpg => /tmp/train/test/10_person/029-original-Screenshot_20221225_103530_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:42,939 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:42,939 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:51:42,939 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:42,939 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:42,939 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:42,960 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:43,692 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 154 -2023-05-15 15:51:43,697 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:43,827 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 113 -2023-05-15 15:51:43,835 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:43,835 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103536_Instagram.jpg => /tmp/train/test/10_person/030-original-Screenshot_20221225_103536_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:43,838 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x8a' -2023-05-15 15:51:43,838 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:51:43,838 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:43,838 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:43,838 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:43,860 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:44,621 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 15:51:44,626 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:44,754 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 15:51:44,761 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:44,761 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103543_Instagram.jpg => /tmp/train/test/10_person/031-original-Screenshot_20221225_103543_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:44,764 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:44,764 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:51:44,764 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:44,764 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:44,764 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:44,784 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:45,581 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 15:51:45,586 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:45,731 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 236 -2023-05-15 15:51:45,738 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:45,738 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103553_Instagram.jpg => /tmp/train/test/10_person/032-original-Screenshot_20221225_103553_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:45,743 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:45,743 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:51:45,743 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:45,743 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:45,743 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:45,764 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:46,528 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 174 -2023-05-15 15:51:46,533 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:46,664 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 204 -2023-05-15 15:51:46,671 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:46,671 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103559_Instagram.jpg => /tmp/train/test/10_person/033-original-Screenshot_20221225_103559_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:46,674 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:46,675 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 15:51:46,675 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:46,675 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:46,675 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:46,695 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:47,445 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 15:51:47,449 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:47,580 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 628 -2023-05-15 15:51:47,587 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:47,587 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103613_Instagram.jpg => /tmp/train/test/10_person/034-original-Screenshot_20221225_103613_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:47,590 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:47,590 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 15:51:47,590 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:47,590 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:47,590 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:47,611 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:48,381 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 167 -2023-05-15 15:51:48,386 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:48,516 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 563 -2023-05-15 15:51:48,523 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:48,523 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103621_Instagram.jpg => /tmp/train/test/10_person/035-original-Screenshot_20221225_103621_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:48,526 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:48,526 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9d' -2023-05-15 15:51:48,526 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:48,526 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:48,526 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:48,548 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:49,303 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:51:49,309 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:49,439 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 512 -2023-05-15 15:51:49,446 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:49,446 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103629_Instagram.jpg => /tmp/train/test/10_person/036-original-Screenshot_20221225_103629_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:49,449 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:49,449 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:51:49,449 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:49,449 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:49,449 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:49,470 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:50,270 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 15:51:50,275 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:50,412 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 160 -2023-05-15 15:51:50,419 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:50,419 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103638_Instagram.jpg => /tmp/train/test/10_person/037-original-Screenshot_20221225_103638_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:50,422 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:50,423 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x04\xb0' -2023-05-15 15:51:50,423 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:50,423 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:50,423 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:50,442 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:51,206 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 168 -2023-05-15 15:51:51,211 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:51,341 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 908 -2023-05-15 15:51:51,347 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:51,347 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103649_Instagram.jpg => /tmp/train/test/10_person/038-original-Screenshot_20221225_103649_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:51,351 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:51,351 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 15:51:51,351 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:51,351 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:51,351 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:51,374 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:52,150 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:51:52,156 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:52,286 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 289 -2023-05-15 15:51:52,293 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:52,293 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103656_Instagram.jpg => /tmp/train/test/10_person/039-original-Screenshot_20221225_103656_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:52,298 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:51:52,298 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x15' -2023-05-15 15:51:52,298 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:51:52,298 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:51:52,298 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:51:52,324 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:53,338 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 15:51:53,344 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:51:53,510 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 15:51:53,518 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:51:53,518 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103727_Instagram.jpg => /tmp/train/test/10_person/040-original-Screenshot_20221225_103727_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:51:53,518 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | input datasets ['/tmp/train/test/10_person'] -2023-05-15 15:51:53,521 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTPS connection (1): huggingface.co:443 -2023-05-15 15:51:53,709 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /stabilityai/sd-vae-ft-mse/resolve/main/config.json HTTP/1.1" 200 0 -2023-05-15 15:52:00,870 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps result: {'inputs': 40, 'outputs': {'original': 40, 'total': 40}, 'metadata': '/tmp/train/test/test.json'} -2023-05-15 15:52:01,001 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 22.56, 'used': 4.85, 'total': 27.41} gpu current: {'free': 9.7, 'used': 2.3, 'total': 12.0} gpu peak: {'active': 0.95, 'allocated': 0.95, 'reserved': 1.11} -2023-05-15 15:52:01,006 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | lora options: {'bucket_no_upscale': False, 'bucket_reso_steps': 64, 'cache_latents': True, 'caption_dropout_every_n_epochs': None, 'caption_dropout_rate': 0.0, 'caption_extension': '.txt', 'caption_extention': '.txt', 'caption_tag_dropout_rate': 0.0, 'clip_skip': None, 'color_aug': False, 'dataset_repeats': 1, 'debug_dataset': False, 'enable_bucket': False, 'face_crop_aug_range': None, 'flip_aug': False, 'full_fp16': False, 'gradient_accumulation_steps': 1, 'gradient_checkpointing': False, 'in_json': '/tmp/train/test/test.json', 'keep_tokens': None, 'learning_rate': 0.0001, 'log_prefix': None, 'logging_dir': None, 'lr_scheduler_num_cycles': 1, 'lr_scheduler_power': 1, 'lr_scheduler': 'cosine', 'lr_warmup_steps': 0, 'max_bucket_reso': 1024, 'max_data_loader_n_workers': 8, 'max_grad_norm': 0.0, 'max_token_length': None, 'max_train_epochs': None, 'max_train_steps': 2500, 'mem_eff_attn': False, 'min_bucket_reso': 256, 'mixed_precision': 'fp16', 'network_alpha': 20, 'network_args': None, 'network_dim': 40, 'network_module': 'networks.lora', 'network_train_text_encoder_only': False, 'network_train_unet_only': False, 'network_weights': None, 'no_metadata': False, 'output_dir': '/home/vlado/dev/automatic/models/Lora', 'output_name': 'test', 'persistent_data_loader_workers': False, 'pretrained_model_name_or_path': 'v1-5-pruned-emaonly.safetensors', 'prior_loss_weight': 1.0, 'random_crop': False, 'reg_data_dir': None, 'resolution': '512,512', 'resume': None, 'save_every_n_epochs': None, 'save_last_n_epochs_state': None, 'save_last_n_epochs': None, 'save_model_as': 'ckpt', 'save_n_epoch_ratio': None, 'save_precision': 'fp16', 'save_state': False, 'seed': 42, 'shuffle_caption': False, 'text_encoder_lr': 5e-05, 'train_batch_size': 1, 'train_data_dir': '/tmp/train/test', 'training_comment': 'mood-magic', 'unet_lr': 0.0001, 'use_8bit_adam': False, 'v_parameterization': False, 'v2': False, 'vae': None, 'xformers': False} -2023-05-15 15:52:01,054 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/vocab.json HTTP/1.1" 200 0 -2023-05-15 15:52:01,204 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /v1-5-pruned-emaonly.safetensors/resolve/main/model_index.json HTTP/1.1" 404 0 -2023-05-15 15:56:58,222 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:56:58,225 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 15:56:58,225 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:56:58,228 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 15:56:58,229 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:56:58,270 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 15:56:58,271 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:56:58,273 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 15:56:58,273 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 15:56:58,275 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | AAA -2023-05-15 15:56:58,276 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:56:58,278 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 15:56:58,279 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:56:58,306 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 15:56:58,307 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | AAA: {'options': {'sd_model_checkpoint': 'v1-5-pruned-emaonly.safetensors [6ce0161689]', 'sd_checkpoint_cache': 0.0, 'sd_vae_checkpoint_cache': 0.0, 'sd_vae': 'Automatic', 'stream_load': False, 'model_reuse_dict': False, 'inpainting_mask_weight': 1.0, 'initial_noise_multiplier': 1.0, 'img2img_color_correction': False, 'img2img_fix_steps': False, 'img2img_background_color': '#ffffff', 'enable_quantization': True, 'comma_padding_backtrack': 20.0, 'CLIP_stop_at_last_layers': 1.0, 'upcast_attn': False, 'cross_attention_optimization': 'Scaled-Dot-Product', 'cross_attention_options': [], 'sub_quad_q_chunk_size': 512.0, 'sub_quad_kv_chunk_size': 512.0, 'sub_quad_chunk_threshold': 80.0, 'always_batch_cond_uncond': False, 'temp_dir': '', 'clean_temp_dir_at_start': True, 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'vae_dir': '/home/vlado/dev/automatic/models/VAE', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'hypernetwork_dir': '/home/vlado/dev/automatic/models/hypernetworks', 'codeformer_models_path': '/home/vlado/dev/automatic/models/Codeformer', 'gfpgan_models_path': '/home/vlado/dev/automatic/models/GFPGAN', 'esrgan_models_path': '/home/vlado/dev/automatic/models/ESRGAN', 'bsrgan_models_path': '/home/vlado/dev/automatic/models/BSRGAN', 'realesrgan_models_path': '/home/vlado/dev/automatic/models/RealESRGAN', 'scunet_models_path': '/home/vlado/dev/automatic/models/ScuNET', 'swinir_models_path': '/home/vlado/dev/automatic/models/SwinIR', 'ldsr_models_path': '/home/vlado/dev/automatic/models/LDSR', 'clip_models_path': '/home/vlado/dev/automatic/models/CLIP', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'styles_dir': 'styles.csv', 'samples_save': True, 'samples_format': 'jpg', 'samples_filename_pattern': '', 'save_images_add_number': True, 'grid_save': True, 'grid_format': 'jpg', 'grid_extended_filename': True, 'grid_only_if_multiple': True, 'grid_prevent_empty_spots': True, 'n_rows': -1.0, 'save_txt': False, 'save_log_fn': '', 'save_images_before_face_restoration': False, 'save_images_before_highres_fix': False, 'save_images_before_color_correction': False, 'save_mask': False, 'save_mask_composite': False, 'jpeg_quality': 85.0, 'webp_lossless': False, 'img_max_size_mp': 200.0, 'use_original_name_batch': True, 'use_upscaler_name_as_suffix': True, 'save_selected_only': True, 'save_init_img': False, 'save_to_dirs': False, 'grid_save_to_dirs': False, 'use_save_to_dirs_for_ui': False, 'directories_filename_pattern': '[date]', 'directories_max_prompt_words': 8.0, 'outdir_samples': '', 'outdir_txt2img_samples': 'outputs/text', 'outdir_img2img_samples': 'outputs/image', 'outdir_extras_samples': 'outputs/extras', 'outdir_grids': '', 'outdir_txt2img_grids': 'outputs/grids', 'outdir_img2img_grids': 'outputs/grids', 'outdir_save': 'outputs/save', 'outdir_init_images': 'outputs/init-images', 'memmon_poll_rate': 2.0, 'precision': 'Autocast', 'cuda_dtype': 'FP16', 'no_half': False, 'no_half_vae': False, 'upcast_sampling': False, 'disable_nan_check': True, 'rollback_vae': False, 'opt_channelslast': False, 'cudnn_benchmark': False, 'cuda_allow_tf32': True, 'cuda_allow_tf16_reduced': True, 'cuda_compile': False, 'cuda_compile_mode': 'none', 'cuda_compile_verbose': False, 'cuda_compile_errors': True, 'disable_gc': True, 'upscaler_for_img2img': 'None', 'realesrgan_enabled_models': ['R-ESRGAN 4x+', 'R-ESRGAN 4x+ Anime6B'], 'ESRGAN_tile': 192.0, 'ESRGAN_tile_overlap': 8.0, 'SCUNET_tile': 256.0, 'SCUNET_tile_overlap': 8.0, 'use_old_hires_fix_width_height': False, 'dont_fix_second_order_samplers_schedule': False, 'face_restoration_model': 'CodeFormer', 'code_former_weight': 0.2, 'face_restoration_unload': False, 'unload_models_when_training': False, 'pin_memory': True, 'save_optimizer_state': False, 'save_training_settings_to_txt': False, 'dataset_filename_word_regex': '', 'dataset_filename_join_string': ' ', 'embeddings_templates_dir': '/home/vlado/dev/automatic/train/templates', 'training_image_repeats_per_epoch': 10.0, 'training_write_csv_every': 0.0, 'training_enable_tensorboard': False, 'training_tensorboard_save_images': False, 'training_tensorboard_flush_every': 120.0, 'interrogate_keep_models_in_memory': False, 'interrogate_return_ranks': True, 'interrogate_clip_num_beams': 1.0, 'interrogate_clip_min_length': 32.0, 'interrogate_clip_max_length': 192.0, 'interrogate_clip_dict_limit': 2048.0, 'interrogate_clip_skip_categories': ['artists', 'movements', 'flavors'], 'interrogate_deepbooru_score_threshold': 0.65, 'deepbooru_sort_alpha': False, 'deepbooru_use_spaces': False, 'deepbooru_escape': True, 'deepbooru_filter_tags': '', 'extra_networks_default_view': 'cards', 'extra_networks_default_multiplier': 1.0, 'extra_networks_card_width': 0.0, 'extra_networks_card_height': 0.0, 'extra_networks_add_text_separator': ' ', 'sd_hypernetwork': 'None', 'gradio_theme': 'black-orange', 'return_grid': True, 'return_mask': False, 'return_mask_composite': False, 'disable_weights_auto_swap': True, 'send_seed': True, 'send_size': True, 'font': '', 'keyedit_precision_attention': 0.1, 'keyedit_precision_extra': 0.05, 'keyedit_delimiters': '.,\\/!?%^*;:{}=`~()', 'quicksettings': 'sd_model_checkpoint', 'hidden_tabs': [], 'ui_tab_reorder': 'From Text, From Image, Process Image', 'ui_scripts_reorder': 'Enable Dynamic Thresholding, ControlNet', 'ui_reorder': 'inpaint, sampler, checkboxes, hires_fix, dimensions, cfg, seed, batch, override_settings, scripts', 'ui_extra_networks_tab_reorder': '', 'show_progressbar': True, 'live_previews_enable': True, 'show_progress_grid': True, 'notification_audio_enable': False, 'notification_audio_path': 'html/notification.mp3', 'show_progress_every_n_steps': 1.0, 'show_progress_type': 'Approx NN', 'live_preview_content': 'Combined', 'live_preview_refresh_period': 250.0, 'show_samplers': ['Euler a', 'UniPC', 'DDIM', 'DPM++ SDE', 'DPM++ SDE', 'DPM2 Karras', 'DPM++ 2M Karras'], 'fallback_sampler': 'Euler a', 'xyz_fallback_sampler': 'None', 'eta_ancestral': 1.0, 'eta_ddim': 0.0, 'ddim_discretize': 'uniform', 's_churn': 0.0, 's_min_uncond': 0.0, 's_tmin': 0.0, 's_noise': 1.0, 'eta_noise_seed_delta': 0.0, 'always_discard_next_to_last_sigma': False, 'uni_pc_variant': 'bh1', 'uni_pc_skip_type': 'time_uniform', 'uni_pc_order': 3.0, 'uni_pc_lower_order_final': True, 'token_merging': False, 'token_merging_ratio': 0.5, 'token_merging_hr_only': True, 'token_merging_ratio_hr': 0.5, 'token_merging_random': False, 'token_merging_merge_attention': True, 'token_merging_merge_cross_attention': False, 'token_merging_merge_mlp': False, 'token_merging_maximum_down_sampling': 1.0, 'token_merging_stride_x': 2.0, 'token_merging_stride_y': 2.0, 'postprocessing_enable_in_main_ui': [], 'postprocessing_operation_order': [], 'upscaling_max_images_in_cache': 5.0, 'disabled_extensions': [], 'disable_all_extensions': 'none', 'sd_checkpoint_hash': '6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa', 'sd_lyco': 'None', 'sd_lora': 'None'}, 'flags': {'error': 500, 'reason': 'Internal Server Error', 'url': 'http://127.0.0.1:7860/sdapi/v1/cmd-flags'}} -2023-05-15 15:56:58,323 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | args: {'type': 'lora', 'name': 'test', 'tag': 'person', 'input': '/home/vlado/generative/Input/mia/', 'output': '', 'process': 'original,interrogate,resize,square', 'gradient': 1, 'steps': 2500, 'batch': 1, 'lr': 0.0001, 'dim': 40, 'repeats': 10, 'alpha': 0, 'overwrite': False, 'debug': True, 'model': 'v1-5-pruned-emaonly.safetensors', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'process_dir': '/tmp/train/test'} -2023-05-15 15:56:58,324 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | train using lora style training -2023-05-15 15:56:59,454 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 26.38, 'used': 1.02, 'total': 27.41} gpu current: {'free': 10.42, 'used': 1.57, 'total': 12.0} gpu peak: {'active': 0.0, 'allocated': 0.0, 'reserved': 0.0} -2023-05-15 15:56:59,455 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 15:56:59,620 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing input images: 40 -2023-05-15 15:56:59,622 | WARNING | /home/vlado/dev/automatic/cli/train/./train.py | removing existing processed folder: /tmp/train/test -2023-05-15 15:56:59,624 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing current step: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 15:56:59,625 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing concept: person -2023-05-15 15:56:59,625 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing output folder: /tmp/train/test/10_person -2023-05-15 15:56:59,631 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:56:59,631 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 15:56:59,631 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:56:59,631 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:56:59,631 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:56:59,667 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:07,333 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 15:57:07,340 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:08,606 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 187 -2023-05-15 15:57:08,614 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:08,614 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102947_Instagram.jpg => /tmp/train/test/10_person/001-original-Screenshot_20221225_102947_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:08,619 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:08,619 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06@' -2023-05-15 15:57:08,619 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:08,619 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:08,619 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:08,648 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:09,543 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 15:57:09,550 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:09,699 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 291 -2023-05-15 15:57:09,706 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:09,706 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102956_Instagram.jpg => /tmp/train/test/10_person/002-original-Screenshot_20221225_102956_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:09,710 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:09,710 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 15:57:09,710 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:09,710 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:09,710 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:09,737 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:10,581 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 175 -2023-05-15 15:57:10,587 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:10,736 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 185 -2023-05-15 15:57:10,743 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:10,743 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103005_Instagram.jpg => /tmp/train/test/10_person/003-original-Screenshot_20221225_103005_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:10,747 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:10,747 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xff' -2023-05-15 15:57:10,747 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:10,747 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:10,747 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:10,776 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:11,568 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 15:57:11,574 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:11,710 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 262 -2023-05-15 15:57:11,718 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:11,718 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103018_Instagram.jpg => /tmp/train/test/10_person/004-original-Screenshot_20221225_103018_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:11,722 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:11,722 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06X' -2023-05-15 15:57:11,722 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:11,722 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:11,722 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:11,746 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:12,547 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 15:57:12,553 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:12,696 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 227 -2023-05-15 15:57:12,704 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:12,704 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103034_Instagram.jpg => /tmp/train/test/10_person/005-original-Screenshot_20221225_103034_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:12,707 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:12,707 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 15:57:12,707 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:12,707 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:12,707 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:12,730 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:13,573 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:57:13,579 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:13,715 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 497 -2023-05-15 15:57:13,722 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:13,722 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103043_Instagram.jpg => /tmp/train/test/10_person/006-original-Screenshot_20221225_103043_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:13,726 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:13,726 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:57:13,726 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:13,726 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:13,726 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:13,750 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:14,508 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 15:57:14,514 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:14,665 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 15:57:14,673 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:14,673 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103058_Instagram.jpg => /tmp/train/test/10_person/007-original-Screenshot_20221225_103058_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:14,676 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:14,676 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:57:14,676 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:14,676 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:14,676 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:14,700 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:15,562 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 15:57:15,568 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:15,709 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 251 -2023-05-15 15:57:15,717 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:15,717 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103106_Instagram.jpg => /tmp/train/test/10_person/008-original-Screenshot_20221225_103106_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:15,721 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:15,721 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:57:15,721 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:15,721 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:15,721 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:15,743 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:16,614 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:57:16,620 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:16,754 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 216 -2023-05-15 15:57:16,761 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:16,761 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103115_Instagram.jpg => /tmp/train/test/10_person/009-original-Screenshot_20221225_103115_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:16,764 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:16,764 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xc8' -2023-05-15 15:57:16,764 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:16,764 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:16,764 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:16,791 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:17,533 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 140 -2023-05-15 15:57:17,540 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:17,678 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 263 -2023-05-15 15:57:17,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:17,686 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103128_Instagram.jpg => /tmp/train/test/10_person/010-original-Screenshot_20221225_103128_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:17,689 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:17,689 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xfb' -2023-05-15 15:57:17,689 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:17,689 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:17,689 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:17,715 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:18,516 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 15:57:18,522 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:18,661 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 192 -2023-05-15 15:57:18,669 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:18,669 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103144_Instagram.jpg => /tmp/train/test/10_person/011-original-Screenshot_20221225_103144_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:18,672 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 15:57:18,672 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xb6' -2023-05-15 15:57:18,672 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:18,672 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:18,672 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:18,699 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:19,598 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 179 -2023-05-15 15:57:19,604 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:19,764 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 348 -2023-05-15 15:57:19,772 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:19,772 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103159_Instagram.jpg => /tmp/train/test/10_person/012-original-Screenshot_20221225_103159_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:19,777 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:19,777 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 15:57:19,777 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:19,777 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:19,777 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:19,804 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:20,658 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 15:57:20,664 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:20,822 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 299 -2023-05-15 15:57:20,831 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:20,831 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103207_Instagram.jpg => /tmp/train/test/10_person/013-original-Screenshot_20221225_103207_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:20,834 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:20,834 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:57:20,834 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:20,834 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:20,834 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:20,861 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:21,714 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 176 -2023-05-15 15:57:21,720 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:21,870 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 343 -2023-05-15 15:57:21,878 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:21,878 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103222_Instagram.jpg => /tmp/train/test/10_person/014-original-Screenshot_20221225_103222_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:21,881 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:21,881 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 15:57:21,881 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:21,881 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:21,881 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:21,906 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:22,693 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 189 -2023-05-15 15:57:22,699 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:22,842 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 311 -2023-05-15 15:57:22,850 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:22,850 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103233_Instagram.jpg => /tmp/train/test/10_person/015-original-Screenshot_20221225_103233_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:22,854 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:22,854 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:57:22,854 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:22,854 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:22,854 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:22,881 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:23,685 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 15:57:23,691 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:23,864 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 366 -2023-05-15 15:57:23,872 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:23,872 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103240_Instagram.jpg => /tmp/train/test/10_person/016-original-Screenshot_20221225_103240_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:23,875 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 15:57:23,875 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x06' -2023-05-15 15:57:23,876 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:23,876 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:23,876 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:23,904 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:24,738 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 15:57:24,744 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:24,883 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 712 -2023-05-15 15:57:24,891 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:24,891 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103256_Instagram.jpg => /tmp/train/test/10_person/017-original-Screenshot_20221225_103256_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:24,894 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:24,894 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:57:24,894 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:24,894 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:24,894 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:24,915 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:25,727 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 15:57:25,733 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:25,878 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 169 -2023-05-15 15:57:25,886 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:25,886 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103313_Instagram.jpg => /tmp/train/test/10_person/018-original-Screenshot_20221225_103313_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:25,889 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:25,889 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:57:25,889 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:25,889 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:25,889 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:25,913 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:26,816 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 15:57:26,822 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:26,982 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 253 -2023-05-15 15:57:26,990 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:26,990 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103321_Instagram.jpg => /tmp/train/test/10_person/019-original-Screenshot_20221225_103321_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:26,993 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:26,993 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:57:26,993 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:26,993 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:26,993 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:27,018 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:27,830 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 15:57:27,836 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:27,976 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 295 -2023-05-15 15:57:27,984 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:27,984 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103335_Instagram.jpg => /tmp/train/test/10_person/020-original-Screenshot_20221225_103335_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:27,987 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:27,987 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:57:27,987 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:27,987 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:27,987 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:28,013 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:28,800 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 165 -2023-05-15 15:57:28,806 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:28,945 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 252 -2023-05-15 15:57:28,953 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:28,953 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103345_Instagram.jpg => /tmp/train/test/10_person/021-original-Screenshot_20221225_103345_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:28,956 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:28,956 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06c' -2023-05-15 15:57:28,956 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:28,956 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:28,956 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:28,981 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:29,763 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 15:57:29,769 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:29,906 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 15:57:29,914 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:29,914 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103406_Instagram.jpg => /tmp/train/test/10_person/022-original-Screenshot_20221225_103406_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:29,917 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:29,917 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 15:57:29,917 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:29,917 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:29,917 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:29,940 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:30,697 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 15:57:30,702 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:30,842 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 237 -2023-05-15 15:57:30,850 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:30,850 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103427_Instagram.jpg => /tmp/train/test/10_person/023-original-Screenshot_20221225_103427_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:30,854 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:30,854 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 15:57:30,854 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:30,854 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:30,854 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:30,877 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:31,706 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 15:57:31,713 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:31,880 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 308 -2023-05-15 15:57:31,887 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:31,888 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103433_Instagram.jpg => /tmp/train/test/10_person/024-original-Screenshot_20221225_103433_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:31,892 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:31,892 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x95' -2023-05-15 15:57:31,892 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:31,892 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:31,892 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:31,913 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:32,725 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 15:57:32,730 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:32,865 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 15:57:32,872 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:32,872 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103445_Instagram.jpg => /tmp/train/test/10_person/025-original-Screenshot_20221225_103445_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:32,875 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:32,875 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x93' -2023-05-15 15:57:32,875 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:32,875 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:32,875 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:32,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:33,663 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 157 -2023-05-15 15:57:33,669 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:33,826 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 434 -2023-05-15 15:57:33,833 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:33,833 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103500_Instagram.jpg => /tmp/train/test/10_person/026-original-Screenshot_20221225_103500_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:33,837 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:33,837 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x8b' -2023-05-15 15:57:33,837 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:33,837 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:33,837 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:33,860 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:34,715 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 15:57:34,720 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:34,864 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 457 -2023-05-15 15:57:34,871 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:34,871 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103507_Instagram.jpg => /tmp/train/test/10_person/027-original-Screenshot_20221225_103507_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:34,875 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:34,875 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:57:34,875 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:34,875 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:34,875 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:34,893 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:35,710 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 15:57:35,715 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:35,859 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 362 -2023-05-15 15:57:35,866 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:35,866 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103522_Instagram.jpg => /tmp/train/test/10_person/028-original-Screenshot_20221225_103522_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:35,869 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9c' -2023-05-15 15:57:35,869 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:57:35,870 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:35,870 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:35,870 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:35,894 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:36,711 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 15:57:36,716 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:36,851 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 15:57:36,858 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:36,858 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103530_Instagram.jpg => /tmp/train/test/10_person/029-original-Screenshot_20221225_103530_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:36,861 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:36,861 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:57:36,861 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:36,861 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:36,861 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:36,884 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:37,640 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 154 -2023-05-15 15:57:37,645 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:37,781 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 113 -2023-05-15 15:57:37,788 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:37,789 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103536_Instagram.jpg => /tmp/train/test/10_person/030-original-Screenshot_20221225_103536_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:37,792 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x8a' -2023-05-15 15:57:37,793 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:57:37,793 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:37,793 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:37,793 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:37,817 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:38,584 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 15:57:38,589 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:38,725 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 15:57:38,732 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:38,732 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103543_Instagram.jpg => /tmp/train/test/10_person/031-original-Screenshot_20221225_103543_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:38,735 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:38,735 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:57:38,735 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:38,735 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:38,735 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:38,755 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:39,549 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 15:57:39,555 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:39,696 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 236 -2023-05-15 15:57:39,703 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:39,703 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103553_Instagram.jpg => /tmp/train/test/10_person/032-original-Screenshot_20221225_103553_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:39,706 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:39,706 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:57:39,706 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:39,706 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:39,706 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:39,727 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:40,537 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 174 -2023-05-15 15:57:40,542 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:40,683 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 204 -2023-05-15 15:57:40,690 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:40,690 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103559_Instagram.jpg => /tmp/train/test/10_person/033-original-Screenshot_20221225_103559_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:40,693 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:40,693 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 15:57:40,693 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:40,693 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:40,693 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:40,713 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:41,468 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 15:57:41,473 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:41,615 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 628 -2023-05-15 15:57:41,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:41,622 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103613_Instagram.jpg => /tmp/train/test/10_person/034-original-Screenshot_20221225_103613_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:41,625 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:41,626 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 15:57:41,626 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:41,626 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:41,626 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:41,645 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:42,385 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 167 -2023-05-15 15:57:42,390 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:42,521 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 563 -2023-05-15 15:57:42,529 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:42,529 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103621_Instagram.jpg => /tmp/train/test/10_person/035-original-Screenshot_20221225_103621_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:42,533 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:42,533 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9d' -2023-05-15 15:57:42,533 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:42,533 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:42,533 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:42,562 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:43,331 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:57:43,336 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:43,475 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 512 -2023-05-15 15:57:43,482 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:43,482 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103629_Instagram.jpg => /tmp/train/test/10_person/036-original-Screenshot_20221225_103629_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:43,485 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:43,485 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:57:43,485 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:43,485 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:43,485 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:43,505 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:44,318 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 15:57:44,323 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:44,462 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 160 -2023-05-15 15:57:44,470 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:44,470 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103638_Instagram.jpg => /tmp/train/test/10_person/037-original-Screenshot_20221225_103638_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:44,473 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:44,473 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x04\xb0' -2023-05-15 15:57:44,473 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:44,473 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:44,473 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:44,493 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:45,309 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 168 -2023-05-15 15:57:45,313 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:45,441 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 908 -2023-05-15 15:57:45,447 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:45,447 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103649_Instagram.jpg => /tmp/train/test/10_person/038-original-Screenshot_20221225_103649_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:45,450 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:45,450 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 15:57:45,450 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:45,450 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:45,450 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:45,475 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:46,315 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:57:46,321 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:46,473 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 289 -2023-05-15 15:57:46,481 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:46,481 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103656_Instagram.jpg => /tmp/train/test/10_person/039-original-Screenshot_20221225_103656_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:46,484 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:57:46,484 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x15' -2023-05-15 15:57:46,484 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:57:46,484 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:57:46,484 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:57:46,513 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:47,319 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 15:57:47,326 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:57:47,468 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 15:57:47,476 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:57:47,476 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103727_Instagram.jpg => /tmp/train/test/10_person/040-original-Screenshot_20221225_103727_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:57:47,476 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | input datasets ['/tmp/train/test/10_person'] -2023-05-15 15:57:47,479 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTPS connection (1): huggingface.co:443 -2023-05-15 15:57:47,581 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /stabilityai/sd-vae-ft-mse/resolve/main/config.json HTTP/1.1" 200 0 -2023-05-15 15:58:01,019 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps result: {'inputs': 40, 'outputs': {'original': 40, 'total': 40}, 'metadata': '/tmp/train/test/test.json'} -2023-05-15 15:58:01,146 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 22.59, 'used': 4.82, 'total': 27.41} gpu current: {'free': 9.7, 'used': 2.3, 'total': 12.0} gpu peak: {'active': 0.95, 'allocated': 0.95, 'reserved': 1.11} -2023-05-15 15:58:01,152 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | lora options: {'bucket_no_upscale': False, 'bucket_reso_steps': 64, 'cache_latents': True, 'caption_dropout_every_n_epochs': None, 'caption_dropout_rate': 0.0, 'caption_extension': '.txt', 'caption_extention': '.txt', 'caption_tag_dropout_rate': 0.0, 'clip_skip': None, 'color_aug': False, 'dataset_repeats': 1, 'debug_dataset': False, 'enable_bucket': False, 'face_crop_aug_range': None, 'flip_aug': False, 'full_fp16': False, 'gradient_accumulation_steps': 1, 'gradient_checkpointing': False, 'in_json': '/tmp/train/test/test.json', 'keep_tokens': None, 'learning_rate': 0.0001, 'log_prefix': None, 'logging_dir': None, 'lr_scheduler_num_cycles': 1, 'lr_scheduler_power': 1, 'lr_scheduler': 'cosine', 'lr_warmup_steps': 0, 'max_bucket_reso': 1024, 'max_data_loader_n_workers': 8, 'max_grad_norm': 0.0, 'max_token_length': None, 'max_train_epochs': None, 'max_train_steps': 2500, 'mem_eff_attn': False, 'min_bucket_reso': 256, 'mixed_precision': 'fp16', 'network_alpha': 20, 'network_args': None, 'network_dim': 40, 'network_module': 'networks.lora', 'network_train_text_encoder_only': False, 'network_train_unet_only': False, 'network_weights': None, 'no_metadata': False, 'output_dir': '/home/vlado/dev/automatic/models/Lora', 'output_name': 'test', 'persistent_data_loader_workers': False, 'pretrained_model_name_or_path': 'v1-5-pruned-emaonly.safetensors', 'prior_loss_weight': 1.0, 'random_crop': False, 'reg_data_dir': None, 'resolution': '512,512', 'resume': None, 'save_every_n_epochs': None, 'save_last_n_epochs_state': None, 'save_last_n_epochs': None, 'save_model_as': 'ckpt', 'save_n_epoch_ratio': None, 'save_precision': 'fp16', 'save_state': False, 'seed': 42, 'shuffle_caption': False, 'text_encoder_lr': 5e-05, 'train_batch_size': 1, 'train_data_dir': '/tmp/train/test', 'training_comment': 'mood-magic', 'unet_lr': 0.0001, 'use_8bit_adam': False, 'v_parameterization': False, 'v2': False, 'vae': None, 'xformers': False} -2023-05-15 15:58:01,206 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/vocab.json HTTP/1.1" 200 0 -2023-05-15 15:58:01,372 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /v1-5-pruned-emaonly.safetensors/resolve/main/model_index.json HTTP/1.1" 404 0 -2023-05-15 15:59:00,157 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:00,160 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 15:59:00,161 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:00,163 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 15:59:00,164 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:00,193 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 15:59:00,194 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:00,197 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 15:59:00,197 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 15:59:00,199 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:00,202 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 15:59:00,203 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:00,231 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 15:59:00,247 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | args: {'type': 'lora', 'name': 'test', 'tag': 'person', 'input': '/home/vlado/generative/Input/mia/', 'output': '', 'process': 'original,interrogate,resize,square', 'gradient': 1, 'steps': 2500, 'batch': 1, 'lr': 0.0001, 'dim': 40, 'repeats': 10, 'alpha': 0, 'overwrite': False, 'debug': True, 'model': 'v1-5-pruned-emaonly.safetensors', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'process_dir': '/tmp/train/test'} -2023-05-15 15:59:00,249 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | server flags: {'error': 500, 'reason': 'Internal Server Error', 'url': 'http://127.0.0.1:7860/sdapi/v1/cmd-flags'} -2023-05-15 15:59:00,249 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | server options: {'sd_model_checkpoint': 'v1-5-pruned-emaonly.safetensors [6ce0161689]', 'sd_checkpoint_cache': 0.0, 'sd_vae_checkpoint_cache': 0.0, 'sd_vae': 'Automatic', 'stream_load': False, 'model_reuse_dict': False, 'inpainting_mask_weight': 1.0, 'initial_noise_multiplier': 1.0, 'img2img_color_correction': False, 'img2img_fix_steps': False, 'img2img_background_color': '#ffffff', 'enable_quantization': True, 'comma_padding_backtrack': 20.0, 'CLIP_stop_at_last_layers': 1.0, 'upcast_attn': False, 'cross_attention_optimization': 'Scaled-Dot-Product', 'cross_attention_options': [], 'sub_quad_q_chunk_size': 512.0, 'sub_quad_kv_chunk_size': 512.0, 'sub_quad_chunk_threshold': 80.0, 'always_batch_cond_uncond': False, 'temp_dir': '', 'clean_temp_dir_at_start': True, 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'vae_dir': '/home/vlado/dev/automatic/models/VAE', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'hypernetwork_dir': '/home/vlado/dev/automatic/models/hypernetworks', 'codeformer_models_path': '/home/vlado/dev/automatic/models/Codeformer', 'gfpgan_models_path': '/home/vlado/dev/automatic/models/GFPGAN', 'esrgan_models_path': '/home/vlado/dev/automatic/models/ESRGAN', 'bsrgan_models_path': '/home/vlado/dev/automatic/models/BSRGAN', 'realesrgan_models_path': '/home/vlado/dev/automatic/models/RealESRGAN', 'scunet_models_path': '/home/vlado/dev/automatic/models/ScuNET', 'swinir_models_path': '/home/vlado/dev/automatic/models/SwinIR', 'ldsr_models_path': '/home/vlado/dev/automatic/models/LDSR', 'clip_models_path': '/home/vlado/dev/automatic/models/CLIP', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'styles_dir': 'styles.csv', 'samples_save': True, 'samples_format': 'jpg', 'samples_filename_pattern': '', 'save_images_add_number': True, 'grid_save': True, 'grid_format': 'jpg', 'grid_extended_filename': True, 'grid_only_if_multiple': True, 'grid_prevent_empty_spots': True, 'n_rows': -1.0, 'save_txt': False, 'save_log_fn': '', 'save_images_before_face_restoration': False, 'save_images_before_highres_fix': False, 'save_images_before_color_correction': False, 'save_mask': False, 'save_mask_composite': False, 'jpeg_quality': 85.0, 'webp_lossless': False, 'img_max_size_mp': 200.0, 'use_original_name_batch': True, 'use_upscaler_name_as_suffix': True, 'save_selected_only': True, 'save_init_img': False, 'save_to_dirs': False, 'grid_save_to_dirs': False, 'use_save_to_dirs_for_ui': False, 'directories_filename_pattern': '[date]', 'directories_max_prompt_words': 8.0, 'outdir_samples': '', 'outdir_txt2img_samples': 'outputs/text', 'outdir_img2img_samples': 'outputs/image', 'outdir_extras_samples': 'outputs/extras', 'outdir_grids': '', 'outdir_txt2img_grids': 'outputs/grids', 'outdir_img2img_grids': 'outputs/grids', 'outdir_save': 'outputs/save', 'outdir_init_images': 'outputs/init-images', 'memmon_poll_rate': 2.0, 'precision': 'Autocast', 'cuda_dtype': 'FP16', 'no_half': False, 'no_half_vae': False, 'upcast_sampling': False, 'disable_nan_check': True, 'rollback_vae': False, 'opt_channelslast': False, 'cudnn_benchmark': False, 'cuda_allow_tf32': True, 'cuda_allow_tf16_reduced': True, 'cuda_compile': False, 'cuda_compile_mode': 'none', 'cuda_compile_verbose': False, 'cuda_compile_errors': True, 'disable_gc': True, 'upscaler_for_img2img': 'None', 'realesrgan_enabled_models': ['R-ESRGAN 4x+', 'R-ESRGAN 4x+ Anime6B'], 'ESRGAN_tile': 192.0, 'ESRGAN_tile_overlap': 8.0, 'SCUNET_tile': 256.0, 'SCUNET_tile_overlap': 8.0, 'use_old_hires_fix_width_height': False, 'dont_fix_second_order_samplers_schedule': False, 'face_restoration_model': 'CodeFormer', 'code_former_weight': 0.2, 'face_restoration_unload': False, 'unload_models_when_training': False, 'pin_memory': True, 'save_optimizer_state': False, 'save_training_settings_to_txt': False, 'dataset_filename_word_regex': '', 'dataset_filename_join_string': ' ', 'embeddings_templates_dir': '/home/vlado/dev/automatic/train/templates', 'training_image_repeats_per_epoch': 10.0, 'training_write_csv_every': 0.0, 'training_enable_tensorboard': False, 'training_tensorboard_save_images': False, 'training_tensorboard_flush_every': 120.0, 'interrogate_keep_models_in_memory': False, 'interrogate_return_ranks': True, 'interrogate_clip_num_beams': 1.0, 'interrogate_clip_min_length': 32.0, 'interrogate_clip_max_length': 192.0, 'interrogate_clip_dict_limit': 2048.0, 'interrogate_clip_skip_categories': ['artists', 'movements', 'flavors'], 'interrogate_deepbooru_score_threshold': 0.65, 'deepbooru_sort_alpha': False, 'deepbooru_use_spaces': False, 'deepbooru_escape': True, 'deepbooru_filter_tags': '', 'extra_networks_default_view': 'cards', 'extra_networks_default_multiplier': 1.0, 'extra_networks_card_width': 0.0, 'extra_networks_card_height': 0.0, 'extra_networks_add_text_separator': ' ', 'sd_hypernetwork': 'None', 'gradio_theme': 'black-orange', 'return_grid': True, 'return_mask': False, 'return_mask_composite': False, 'disable_weights_auto_swap': True, 'send_seed': True, 'send_size': True, 'font': '', 'keyedit_precision_attention': 0.1, 'keyedit_precision_extra': 0.05, 'keyedit_delimiters': '.,\\/!?%^*;:{}=`~()', 'quicksettings': 'sd_model_checkpoint', 'hidden_tabs': [], 'ui_tab_reorder': 'From Text, From Image, Process Image', 'ui_scripts_reorder': 'Enable Dynamic Thresholding, ControlNet', 'ui_reorder': 'inpaint, sampler, checkboxes, hires_fix, dimensions, cfg, seed, batch, override_settings, scripts', 'ui_extra_networks_tab_reorder': '', 'show_progressbar': True, 'live_previews_enable': True, 'show_progress_grid': True, 'notification_audio_enable': False, 'notification_audio_path': 'html/notification.mp3', 'show_progress_every_n_steps': 1.0, 'show_progress_type': 'Approx NN', 'live_preview_content': 'Combined', 'live_preview_refresh_period': 250.0, 'show_samplers': ['Euler a', 'UniPC', 'DDIM', 'DPM++ SDE', 'DPM++ SDE', 'DPM2 Karras', 'DPM++ 2M Karras'], 'fallback_sampler': 'Euler a', 'xyz_fallback_sampler': 'None', 'eta_ancestral': 1.0, 'eta_ddim': 0.0, 'ddim_discretize': 'uniform', 's_churn': 0.0, 's_min_uncond': 0.0, 's_tmin': 0.0, 's_noise': 1.0, 'eta_noise_seed_delta': 0.0, 'always_discard_next_to_last_sigma': False, 'uni_pc_variant': 'bh1', 'uni_pc_skip_type': 'time_uniform', 'uni_pc_order': 3.0, 'uni_pc_lower_order_final': True, 'token_merging': False, 'token_merging_ratio': 0.5, 'token_merging_hr_only': True, 'token_merging_ratio_hr': 0.5, 'token_merging_random': False, 'token_merging_merge_attention': True, 'token_merging_merge_cross_attention': False, 'token_merging_merge_mlp': False, 'token_merging_maximum_down_sampling': 1.0, 'token_merging_stride_x': 2.0, 'token_merging_stride_y': 2.0, 'postprocessing_enable_in_main_ui': [], 'postprocessing_operation_order': [], 'upscaling_max_images_in_cache': 5.0, 'disabled_extensions': [], 'disable_all_extensions': 'none', 'sd_checkpoint_hash': '6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa', 'sd_lyco': 'None', 'sd_lora': 'None'} -2023-05-15 15:59:00,256 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | train using lora style training -2023-05-15 15:59:01,964 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 26.39, 'used': 1.01, 'total': 27.41} gpu current: {'free': 10.42, 'used': 1.57, 'total': 12.0} gpu peak: {'active': 0.0, 'allocated': 0.0, 'reserved': 0.0} -2023-05-15 15:59:01,965 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 15:59:02,089 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing input images: 40 -2023-05-15 15:59:02,090 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processed folder exists: /tmp/train/test -2023-05-15 15:59:02,091 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing current step: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 15:59:02,091 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing concept: person -2023-05-15 15:59:02,092 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing output folder: /tmp/train/test/10_person -2023-05-15 15:59:02,097 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:02,097 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 15:59:02,097 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:02,097 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:02,097 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:02,129 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:03,349 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 15:59:03,358 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:03,565 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 187 -2023-05-15 15:59:03,573 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:03,573 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102947_Instagram.jpg => /tmp/train/test/10_person/001-original-Screenshot_20221225_102947_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:03,577 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:03,577 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06@' -2023-05-15 15:59:03,577 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:03,577 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:03,577 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:03,606 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:04,680 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 15:59:04,688 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:04,887 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 291 -2023-05-15 15:59:04,894 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:04,895 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102956_Instagram.jpg => /tmp/train/test/10_person/002-original-Screenshot_20221225_102956_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:04,899 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:04,899 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 15:59:04,899 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:04,899 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:04,899 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:04,931 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:06,070 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 175 -2023-05-15 15:59:06,077 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:06,242 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 185 -2023-05-15 15:59:06,250 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:06,250 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103005_Instagram.jpg => /tmp/train/test/10_person/003-original-Screenshot_20221225_103005_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:06,254 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:06,254 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xff' -2023-05-15 15:59:06,254 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:06,254 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:06,254 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:06,283 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:07,153 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 15:59:07,159 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:07,304 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 262 -2023-05-15 15:59:07,311 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:07,311 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103018_Instagram.jpg => /tmp/train/test/10_person/004-original-Screenshot_20221225_103018_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:07,315 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:07,315 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06X' -2023-05-15 15:59:07,315 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:07,315 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:07,315 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:07,340 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:08,219 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 15:59:08,224 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:08,370 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 227 -2023-05-15 15:59:08,378 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:08,379 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103034_Instagram.jpg => /tmp/train/test/10_person/005-original-Screenshot_20221225_103034_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:08,382 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:08,382 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 15:59:08,382 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:08,382 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:08,382 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:08,405 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:09,190 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:59:09,196 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:09,345 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 497 -2023-05-15 15:59:09,353 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:09,354 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103043_Instagram.jpg => /tmp/train/test/10_person/006-original-Screenshot_20221225_103043_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:09,357 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:09,357 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:59:09,357 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:09,357 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:09,357 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:09,382 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:10,186 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 15:59:10,192 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:10,331 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 15:59:10,339 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:10,339 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103058_Instagram.jpg => /tmp/train/test/10_person/007-original-Screenshot_20221225_103058_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:10,342 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:10,342 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:59:10,342 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:10,342 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:10,342 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:10,367 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:11,173 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 15:59:11,178 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:11,320 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 251 -2023-05-15 15:59:11,327 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:11,327 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103106_Instagram.jpg => /tmp/train/test/10_person/008-original-Screenshot_20221225_103106_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:11,330 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:11,330 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:59:11,330 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:11,330 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:11,330 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:11,352 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:12,157 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:59:12,162 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:12,301 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 216 -2023-05-15 15:59:12,309 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:12,309 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103115_Instagram.jpg => /tmp/train/test/10_person/009-original-Screenshot_20221225_103115_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:12,312 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:12,312 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xc8' -2023-05-15 15:59:12,312 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:12,312 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:12,312 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:12,339 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:13,118 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 140 -2023-05-15 15:59:13,125 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:13,261 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 263 -2023-05-15 15:59:13,269 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:13,269 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103128_Instagram.jpg => /tmp/train/test/10_person/010-original-Screenshot_20221225_103128_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:13,272 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:13,272 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xfb' -2023-05-15 15:59:13,272 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:13,272 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:13,272 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:13,298 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:14,087 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 15:59:14,093 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:14,238 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 192 -2023-05-15 15:59:14,246 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:14,246 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103144_Instagram.jpg => /tmp/train/test/10_person/011-original-Screenshot_20221225_103144_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:14,249 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 15:59:14,249 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xb6' -2023-05-15 15:59:14,249 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:14,249 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:14,249 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:14,274 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:15,098 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 179 -2023-05-15 15:59:15,104 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:15,242 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 348 -2023-05-15 15:59:15,249 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:15,250 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103159_Instagram.jpg => /tmp/train/test/10_person/012-original-Screenshot_20221225_103159_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:15,253 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:15,253 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 15:59:15,253 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:15,253 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:15,253 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:15,276 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:16,111 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 15:59:16,117 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:16,266 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 299 -2023-05-15 15:59:16,273 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:16,274 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103207_Instagram.jpg => /tmp/train/test/10_person/013-original-Screenshot_20221225_103207_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:16,277 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:16,277 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:59:16,277 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:16,277 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:16,277 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:16,301 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:17,097 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 176 -2023-05-15 15:59:17,103 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:17,247 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 343 -2023-05-15 15:59:17,255 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:17,255 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103222_Instagram.jpg => /tmp/train/test/10_person/014-original-Screenshot_20221225_103222_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:17,258 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:17,258 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 15:59:17,258 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:17,258 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:17,258 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:17,282 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:18,057 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 189 -2023-05-15 15:59:18,063 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:18,206 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 311 -2023-05-15 15:59:18,214 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:18,214 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103233_Instagram.jpg => /tmp/train/test/10_person/015-original-Screenshot_20221225_103233_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:18,218 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:18,218 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:59:18,218 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:18,218 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:18,218 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:18,242 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:19,010 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 15:59:19,016 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:19,151 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 366 -2023-05-15 15:59:19,159 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:19,159 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103240_Instagram.jpg => /tmp/train/test/10_person/016-original-Screenshot_20221225_103240_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:19,162 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 15:59:19,162 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x06' -2023-05-15 15:59:19,162 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:19,162 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:19,162 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:19,189 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:19,975 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 15:59:19,981 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:20,121 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 712 -2023-05-15 15:59:20,129 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:20,129 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103256_Instagram.jpg => /tmp/train/test/10_person/017-original-Screenshot_20221225_103256_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:20,132 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:20,132 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:59:20,132 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:20,132 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:20,132 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:20,153 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:20,974 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 15:59:20,980 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:21,114 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 169 -2023-05-15 15:59:21,121 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:21,121 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103313_Instagram.jpg => /tmp/train/test/10_person/018-original-Screenshot_20221225_103313_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:21,124 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:21,124 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:59:21,124 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:21,124 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:21,124 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:21,148 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:22,020 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 15:59:22,026 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:22,162 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 253 -2023-05-15 15:59:22,169 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:22,169 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103321_Instagram.jpg => /tmp/train/test/10_person/019-original-Screenshot_20221225_103321_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:22,172 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:22,172 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 15:59:22,172 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:22,172 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:22,172 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:22,196 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:22,947 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 15:59:22,953 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:23,096 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 295 -2023-05-15 15:59:23,104 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:23,104 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103335_Instagram.jpg => /tmp/train/test/10_person/020-original-Screenshot_20221225_103335_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:23,107 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:23,107 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 15:59:23,107 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:23,107 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:23,107 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:23,130 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:23,883 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 165 -2023-05-15 15:59:23,889 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:24,022 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 252 -2023-05-15 15:59:24,029 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:24,029 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103345_Instagram.jpg => /tmp/train/test/10_person/021-original-Screenshot_20221225_103345_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:24,032 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:24,033 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06c' -2023-05-15 15:59:24,033 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:24,033 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:24,033 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:24,057 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:24,789 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 15:59:24,795 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:24,928 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 15:59:24,935 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:24,936 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103406_Instagram.jpg => /tmp/train/test/10_person/022-original-Screenshot_20221225_103406_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:24,939 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:24,939 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 15:59:24,939 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:24,939 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:24,939 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:24,961 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:25,726 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 15:59:25,732 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:25,867 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 237 -2023-05-15 15:59:25,874 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:25,874 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103427_Instagram.jpg => /tmp/train/test/10_person/023-original-Screenshot_20221225_103427_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:25,878 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:25,878 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 15:59:25,878 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:25,878 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:25,878 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:25,901 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:26,636 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 15:59:26,641 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:26,775 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 308 -2023-05-15 15:59:26,782 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:26,782 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103433_Instagram.jpg => /tmp/train/test/10_person/024-original-Screenshot_20221225_103433_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:26,785 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:26,785 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x95' -2023-05-15 15:59:26,785 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:26,785 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:26,785 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:26,805 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:27,588 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 15:59:27,593 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:27,726 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 15:59:27,732 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:27,733 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103445_Instagram.jpg => /tmp/train/test/10_person/025-original-Screenshot_20221225_103445_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:27,736 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:27,736 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x93' -2023-05-15 15:59:27,736 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:27,736 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:27,736 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:27,758 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:28,502 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 157 -2023-05-15 15:59:28,508 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:28,637 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 434 -2023-05-15 15:59:28,644 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:28,644 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103500_Instagram.jpg => /tmp/train/test/10_person/026-original-Screenshot_20221225_103500_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:28,647 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:28,647 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x8b' -2023-05-15 15:59:28,647 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:28,647 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:28,647 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:28,669 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:29,417 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 15:59:29,422 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:29,554 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 457 -2023-05-15 15:59:29,560 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:29,561 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103507_Instagram.jpg => /tmp/train/test/10_person/027-original-Screenshot_20221225_103507_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:29,564 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:29,564 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:59:29,564 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:29,564 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:29,564 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:29,581 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:30,367 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 15:59:30,372 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:30,500 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 362 -2023-05-15 15:59:30,507 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:30,507 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103522_Instagram.jpg => /tmp/train/test/10_person/028-original-Screenshot_20221225_103522_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:30,510 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9c' -2023-05-15 15:59:30,510 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:59:30,510 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:30,510 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:30,510 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:30,531 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:31,281 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 15:59:31,286 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:31,423 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 15:59:31,430 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:31,430 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103530_Instagram.jpg => /tmp/train/test/10_person/029-original-Screenshot_20221225_103530_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:31,433 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:31,434 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:59:31,434 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:31,434 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:31,434 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:31,454 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:32,200 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 154 -2023-05-15 15:59:32,206 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:32,335 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 113 -2023-05-15 15:59:32,342 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:32,342 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103536_Instagram.jpg => /tmp/train/test/10_person/030-original-Screenshot_20221225_103536_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:32,345 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x8a' -2023-05-15 15:59:32,346 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:59:32,346 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:32,346 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:32,346 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:32,368 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:33,134 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 15:59:33,139 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:33,271 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 15:59:33,278 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:33,278 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103543_Instagram.jpg => /tmp/train/test/10_person/031-original-Screenshot_20221225_103543_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:33,281 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:33,281 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:59:33,281 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:33,282 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:33,282 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:33,301 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:34,042 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 15:59:34,047 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:34,175 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 236 -2023-05-15 15:59:34,182 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:34,182 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103553_Instagram.jpg => /tmp/train/test/10_person/032-original-Screenshot_20221225_103553_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:34,185 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:34,185 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:59:34,185 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:34,185 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:34,185 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:34,205 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:34,944 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 174 -2023-05-15 15:59:34,949 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:35,078 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 204 -2023-05-15 15:59:35,085 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:35,085 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103559_Instagram.jpg => /tmp/train/test/10_person/033-original-Screenshot_20221225_103559_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:35,088 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:35,088 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 15:59:35,088 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:35,088 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:35,088 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:35,108 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:35,852 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 15:59:35,857 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:36,000 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 628 -2023-05-15 15:59:36,008 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:36,008 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103613_Instagram.jpg => /tmp/train/test/10_person/034-original-Screenshot_20221225_103613_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:36,012 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:36,012 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 15:59:36,012 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:36,012 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:36,012 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:36,033 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:36,798 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 167 -2023-05-15 15:59:36,803 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:36,937 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 563 -2023-05-15 15:59:36,944 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:36,944 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103621_Instagram.jpg => /tmp/train/test/10_person/035-original-Screenshot_20221225_103621_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:36,948 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:36,948 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9d' -2023-05-15 15:59:36,948 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:36,948 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:36,948 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:36,970 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:37,726 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:59:37,731 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:37,869 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 512 -2023-05-15 15:59:37,876 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:37,876 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103629_Instagram.jpg => /tmp/train/test/10_person/036-original-Screenshot_20221225_103629_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:37,879 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:37,879 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 15:59:37,879 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:37,879 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:37,879 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:37,899 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:38,648 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 15:59:38,653 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:38,781 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 160 -2023-05-15 15:59:38,788 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:38,788 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103638_Instagram.jpg => /tmp/train/test/10_person/037-original-Screenshot_20221225_103638_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:38,791 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:38,791 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x04\xb0' -2023-05-15 15:59:38,791 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:38,791 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:38,791 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:38,810 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:39,545 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 168 -2023-05-15 15:59:39,549 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:39,677 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 908 -2023-05-15 15:59:39,683 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:39,683 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103649_Instagram.jpg => /tmp/train/test/10_person/038-original-Screenshot_20221225_103649_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:39,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:39,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 15:59:39,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:39,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:39,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:39,709 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:40,475 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 15:59:40,481 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:40,615 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 289 -2023-05-15 15:59:40,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:40,622 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103656_Instagram.jpg => /tmp/train/test/10_person/039-original-Screenshot_20221225_103656_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:40,625 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 15:59:40,625 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x15' -2023-05-15 15:59:40,626 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 15:59:40,626 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 15:59:40,626 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 15:59:40,650 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:41,394 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 15:59:41,400 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 15:59:41,534 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 15:59:41,541 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 15:59:41,541 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103727_Instagram.jpg => /tmp/train/test/10_person/040-original-Screenshot_20221225_103727_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 15:59:41,542 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | input datasets ['/tmp/train/test/10_person'] -2023-05-15 15:59:41,545 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTPS connection (1): huggingface.co:443 -2023-05-15 15:59:41,669 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /stabilityai/sd-vae-ft-mse/resolve/main/config.json HTTP/1.1" 200 0 -2023-05-15 15:59:48,943 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps result: {'inputs': 40, 'outputs': {'original': 40, 'total': 40}, 'metadata': '/tmp/train/test/test.json'} -2023-05-15 15:59:49,071 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 22.35, 'used': 5.06, 'total': 27.41} gpu current: {'free': 9.7, 'used': 2.3, 'total': 12.0} gpu peak: {'active': 0.95, 'allocated': 0.95, 'reserved': 1.11} -2023-05-15 15:59:49,076 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | lora options: {'bucket_no_upscale': False, 'bucket_reso_steps': 64, 'cache_latents': True, 'caption_dropout_every_n_epochs': None, 'caption_dropout_rate': 0.0, 'caption_extension': '.txt', 'caption_extention': '.txt', 'caption_tag_dropout_rate': 0.0, 'clip_skip': None, 'color_aug': False, 'dataset_repeats': 1, 'debug_dataset': False, 'enable_bucket': False, 'face_crop_aug_range': None, 'flip_aug': False, 'full_fp16': False, 'gradient_accumulation_steps': 1, 'gradient_checkpointing': False, 'in_json': '/tmp/train/test/test.json', 'keep_tokens': None, 'learning_rate': 0.0001, 'log_prefix': None, 'logging_dir': None, 'lr_scheduler_num_cycles': 1, 'lr_scheduler_power': 1, 'lr_scheduler': 'cosine', 'lr_warmup_steps': 0, 'max_bucket_reso': 1024, 'max_data_loader_n_workers': 8, 'max_grad_norm': 0.0, 'max_token_length': None, 'max_train_epochs': None, 'max_train_steps': 2500, 'mem_eff_attn': False, 'min_bucket_reso': 256, 'mixed_precision': 'fp16', 'network_alpha': 20, 'network_args': None, 'network_dim': 40, 'network_module': 'networks.lora', 'network_train_text_encoder_only': False, 'network_train_unet_only': False, 'network_weights': None, 'no_metadata': False, 'output_dir': '/home/vlado/dev/automatic/models/Lora', 'output_name': 'test', 'persistent_data_loader_workers': False, 'pretrained_model_name_or_path': 'v1-5-pruned-emaonly.safetensors', 'prior_loss_weight': 1.0, 'random_crop': False, 'reg_data_dir': None, 'resolution': '512,512', 'resume': None, 'save_every_n_epochs': None, 'save_last_n_epochs_state': None, 'save_last_n_epochs': None, 'save_model_as': 'ckpt', 'save_n_epoch_ratio': None, 'save_precision': 'fp16', 'save_state': False, 'seed': 42, 'shuffle_caption': False, 'text_encoder_lr': 5e-05, 'train_batch_size': 1, 'train_data_dir': '/tmp/train/test', 'training_comment': 'mood-magic', 'unet_lr': 0.0001, 'use_8bit_adam': False, 'v_parameterization': False, 'v2': False, 'vae': None, 'xformers': False} -2023-05-15 15:59:49,202 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/vocab.json HTTP/1.1" 200 0 -2023-05-15 15:59:49,440 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /v1-5-pruned-emaonly.safetensors/resolve/main/model_index.json HTTP/1.1" 404 0 -2023-05-15 16:02:05,924 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:02:05,930 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 16:02:05,931 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:02:05,934 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:02:05,935 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:02:05,963 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:02:05,964 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:02:05,965 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 16:02:05,966 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 16:02:05,968 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:02:05,970 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:02:05,971 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:02:05,998 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:02:06,002 | ERROR | /home/vlado/dev/automatic/cli/train/./train.py | cannot find loaded model: /home/vlado/dev/automatic/models/Stable-diffusion/v1-5-pruned-emaonly.safetensors -2023-05-15 16:02:47,536 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:02:47,538 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 16:02:47,538 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:02:47,541 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:02:47,542 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:02:47,569 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:02:47,570 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:02:47,572 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 16:02:47,572 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 16:02:47,574 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:02:47,577 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:02:47,578 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:02:47,604 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:02:47,608 | ERROR | /home/vlado/dev/automatic/cli/train/./train.py | cannot find loaded model: /home/vlado/dev/automatic/models/Stable-diffusion/v1-5-pruned-emaonly.safetensors -2023-05-15 16:03:20,788 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:03:20,790 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 16:03:20,791 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:03:20,794 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:03:20,795 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:03:20,824 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:03:20,825 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:03:20,828 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 16:03:20,828 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 16:03:20,831 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:03:20,833 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:03:20,834 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:03:20,863 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:03:20,867 | ERROR | /home/vlado/dev/automatic/cli/train/./train.py | cannot find loaded model: v1-5-pruned-emaonly.safetensors -2023-05-15 16:03:39,862 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:03:39,865 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 16:03:39,865 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:03:39,868 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:03:39,869 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:03:39,897 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:03:39,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:03:39,900 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 16:03:39,900 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 16:03:39,902 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:03:39,905 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:03:39,905 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:03:39,933 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:03:39,937 | ERROR | /home/vlado/dev/automatic/cli/train/./train.py | cannot find loaded model: v1-5-pruned-emaonly.safetensors -2023-05-15 16:04:07,204 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:04:07,206 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 16:04:07,207 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:04:07,210 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:04:07,210 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:04:07,238 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:04:07,239 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:04:07,241 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 16:04:07,241 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 16:04:07,243 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:04:07,245 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:04:07,246 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:04:07,273 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:04:07,278 | ERROR | /home/vlado/dev/automatic/cli/train/./train.py | cannot find loaded model: v1-5-pruned-emaonly.safetensors -2023-05-15 16:05:24,619 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:24,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 16:05:24,623 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:24,626 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:05:24,627 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:24,653 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:05:24,654 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:24,656 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 16:05:24,656 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 16:05:24,658 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:24,660 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:05:24,661 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:24,688 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:05:24,700 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | args: {'type': 'lora', 'name': 'test', 'tag': 'person', 'input': '/home/vlado/generative/Input/mia/', 'output': '', 'process': 'original,interrogate,resize,square', 'gradient': 1, 'steps': 2500, 'batch': 1, 'lr': 0.0001, 'dim': 40, 'repeats': 10, 'alpha': 0, 'overwrite': False, 'debug': True, 'model': '/home/vlado/dev/automatic/models/v1-5-pruned-emaonly.safetensors', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'process_dir': '/tmp/train/test'} -2023-05-15 16:05:24,701 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | server flags: {'error': 500, 'reason': 'Internal Server Error', 'url': 'http://127.0.0.1:7860/sdapi/v1/cmd-flags'} -2023-05-15 16:05:24,702 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | server options: {'sd_model_checkpoint': 'v1-5-pruned-emaonly.safetensors [6ce0161689]', 'sd_checkpoint_cache': 0.0, 'sd_vae_checkpoint_cache': 0.0, 'sd_vae': 'Automatic', 'stream_load': False, 'model_reuse_dict': False, 'inpainting_mask_weight': 1.0, 'initial_noise_multiplier': 1.0, 'img2img_color_correction': False, 'img2img_fix_steps': False, 'img2img_background_color': '#ffffff', 'enable_quantization': True, 'comma_padding_backtrack': 20.0, 'CLIP_stop_at_last_layers': 1.0, 'upcast_attn': False, 'cross_attention_optimization': 'Scaled-Dot-Product', 'cross_attention_options': [], 'sub_quad_q_chunk_size': 512.0, 'sub_quad_kv_chunk_size': 512.0, 'sub_quad_chunk_threshold': 80.0, 'always_batch_cond_uncond': False, 'temp_dir': '', 'clean_temp_dir_at_start': True, 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'vae_dir': '/home/vlado/dev/automatic/models/VAE', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'hypernetwork_dir': '/home/vlado/dev/automatic/models/hypernetworks', 'codeformer_models_path': '/home/vlado/dev/automatic/models/Codeformer', 'gfpgan_models_path': '/home/vlado/dev/automatic/models/GFPGAN', 'esrgan_models_path': '/home/vlado/dev/automatic/models/ESRGAN', 'bsrgan_models_path': '/home/vlado/dev/automatic/models/BSRGAN', 'realesrgan_models_path': '/home/vlado/dev/automatic/models/RealESRGAN', 'scunet_models_path': '/home/vlado/dev/automatic/models/ScuNET', 'swinir_models_path': '/home/vlado/dev/automatic/models/SwinIR', 'ldsr_models_path': '/home/vlado/dev/automatic/models/LDSR', 'clip_models_path': '/home/vlado/dev/automatic/models/CLIP', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'styles_dir': 'styles.csv', 'samples_save': True, 'samples_format': 'jpg', 'samples_filename_pattern': '', 'save_images_add_number': True, 'grid_save': True, 'grid_format': 'jpg', 'grid_extended_filename': True, 'grid_only_if_multiple': True, 'grid_prevent_empty_spots': True, 'n_rows': -1.0, 'save_txt': False, 'save_log_fn': '', 'save_images_before_face_restoration': False, 'save_images_before_highres_fix': False, 'save_images_before_color_correction': False, 'save_mask': False, 'save_mask_composite': False, 'jpeg_quality': 85.0, 'webp_lossless': False, 'img_max_size_mp': 200.0, 'use_original_name_batch': True, 'use_upscaler_name_as_suffix': True, 'save_selected_only': True, 'save_init_img': False, 'save_to_dirs': False, 'grid_save_to_dirs': False, 'use_save_to_dirs_for_ui': False, 'directories_filename_pattern': '[date]', 'directories_max_prompt_words': 8.0, 'outdir_samples': '', 'outdir_txt2img_samples': 'outputs/text', 'outdir_img2img_samples': 'outputs/image', 'outdir_extras_samples': 'outputs/extras', 'outdir_grids': '', 'outdir_txt2img_grids': 'outputs/grids', 'outdir_img2img_grids': 'outputs/grids', 'outdir_save': 'outputs/save', 'outdir_init_images': 'outputs/init-images', 'memmon_poll_rate': 2.0, 'precision': 'Autocast', 'cuda_dtype': 'FP16', 'no_half': False, 'no_half_vae': False, 'upcast_sampling': False, 'disable_nan_check': True, 'rollback_vae': False, 'opt_channelslast': False, 'cudnn_benchmark': False, 'cuda_allow_tf32': True, 'cuda_allow_tf16_reduced': True, 'cuda_compile': False, 'cuda_compile_mode': 'none', 'cuda_compile_verbose': False, 'cuda_compile_errors': True, 'disable_gc': True, 'upscaler_for_img2img': 'None', 'realesrgan_enabled_models': ['R-ESRGAN 4x+', 'R-ESRGAN 4x+ Anime6B'], 'ESRGAN_tile': 192.0, 'ESRGAN_tile_overlap': 8.0, 'SCUNET_tile': 256.0, 'SCUNET_tile_overlap': 8.0, 'use_old_hires_fix_width_height': False, 'dont_fix_second_order_samplers_schedule': False, 'face_restoration_model': 'CodeFormer', 'code_former_weight': 0.2, 'face_restoration_unload': False, 'unload_models_when_training': False, 'pin_memory': True, 'save_optimizer_state': False, 'save_training_settings_to_txt': False, 'dataset_filename_word_regex': '', 'dataset_filename_join_string': ' ', 'embeddings_templates_dir': '/home/vlado/dev/automatic/train/templates', 'training_image_repeats_per_epoch': 10.0, 'training_write_csv_every': 0.0, 'training_enable_tensorboard': False, 'training_tensorboard_save_images': False, 'training_tensorboard_flush_every': 120.0, 'interrogate_keep_models_in_memory': False, 'interrogate_return_ranks': True, 'interrogate_clip_num_beams': 1.0, 'interrogate_clip_min_length': 32.0, 'interrogate_clip_max_length': 192.0, 'interrogate_clip_dict_limit': 2048.0, 'interrogate_clip_skip_categories': ['artists', 'movements', 'flavors'], 'interrogate_deepbooru_score_threshold': 0.65, 'deepbooru_sort_alpha': False, 'deepbooru_use_spaces': False, 'deepbooru_escape': True, 'deepbooru_filter_tags': '', 'extra_networks_default_view': 'cards', 'extra_networks_default_multiplier': 1.0, 'extra_networks_card_width': 0.0, 'extra_networks_card_height': 0.0, 'extra_networks_add_text_separator': ' ', 'sd_hypernetwork': 'None', 'gradio_theme': 'black-orange', 'return_grid': True, 'return_mask': False, 'return_mask_composite': False, 'disable_weights_auto_swap': True, 'send_seed': True, 'send_size': True, 'font': '', 'keyedit_precision_attention': 0.1, 'keyedit_precision_extra': 0.05, 'keyedit_delimiters': '.,\\/!?%^*;:{}=`~()', 'quicksettings': 'sd_model_checkpoint', 'hidden_tabs': [], 'ui_tab_reorder': 'From Text, From Image, Process Image', 'ui_scripts_reorder': 'Enable Dynamic Thresholding, ControlNet', 'ui_reorder': 'inpaint, sampler, checkboxes, hires_fix, dimensions, cfg, seed, batch, override_settings, scripts', 'ui_extra_networks_tab_reorder': '', 'show_progressbar': True, 'live_previews_enable': True, 'show_progress_grid': True, 'notification_audio_enable': False, 'notification_audio_path': 'html/notification.mp3', 'show_progress_every_n_steps': 1.0, 'show_progress_type': 'Approx NN', 'live_preview_content': 'Combined', 'live_preview_refresh_period': 250.0, 'show_samplers': ['Euler a', 'UniPC', 'DDIM', 'DPM++ SDE', 'DPM++ SDE', 'DPM2 Karras', 'DPM++ 2M Karras'], 'fallback_sampler': 'Euler a', 'xyz_fallback_sampler': 'None', 'eta_ancestral': 1.0, 'eta_ddim': 0.0, 'ddim_discretize': 'uniform', 's_churn': 0.0, 's_min_uncond': 0.0, 's_tmin': 0.0, 's_noise': 1.0, 'eta_noise_seed_delta': 0.0, 'always_discard_next_to_last_sigma': False, 'uni_pc_variant': 'bh1', 'uni_pc_skip_type': 'time_uniform', 'uni_pc_order': 3.0, 'uni_pc_lower_order_final': True, 'token_merging': False, 'token_merging_ratio': 0.5, 'token_merging_hr_only': True, 'token_merging_ratio_hr': 0.5, 'token_merging_random': False, 'token_merging_merge_attention': True, 'token_merging_merge_cross_attention': False, 'token_merging_merge_mlp': False, 'token_merging_maximum_down_sampling': 1.0, 'token_merging_stride_x': 2.0, 'token_merging_stride_y': 2.0, 'postprocessing_enable_in_main_ui': [], 'postprocessing_operation_order': [], 'upscaling_max_images_in_cache': 5.0, 'disabled_extensions': [], 'disable_all_extensions': 'none', 'sd_checkpoint_hash': '6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa', 'sd_lyco': 'None', 'sd_lora': 'None'} -2023-05-15 16:05:24,708 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | train using lora style training -2023-05-15 16:05:25,887 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 26.39, 'used': 1.02, 'total': 27.41} gpu current: {'free': 10.42, 'used': 1.57, 'total': 12.0} gpu peak: {'active': 0.0, 'allocated': 0.0, 'reserved': 0.0} -2023-05-15 16:05:25,889 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 16:05:26,020 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing input images: 40 -2023-05-15 16:05:26,021 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processed folder exists: /tmp/train/test -2023-05-15 16:05:26,022 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing current step: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 16:05:26,022 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing concept: person -2023-05-15 16:05:26,023 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing output folder: /tmp/train/test/10_person -2023-05-15 16:05:26,027 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:26,027 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:05:26,027 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:26,027 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:26,027 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:26,058 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:26,916 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 16:05:26,923 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:27,080 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 187 -2023-05-15 16:05:27,087 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:27,087 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102947_Instagram.jpg => /tmp/train/test/10_person/001-original-Screenshot_20221225_102947_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:27,090 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:27,090 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06@' -2023-05-15 16:05:27,090 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:27,090 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:27,090 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:27,118 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:27,880 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 16:05:27,886 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:28,019 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 291 -2023-05-15 16:05:28,026 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:28,027 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102956_Instagram.jpg => /tmp/train/test/10_person/002-original-Screenshot_20221225_102956_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:28,030 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:28,030 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:05:28,030 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:28,030 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:28,030 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:28,057 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:28,848 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 175 -2023-05-15 16:05:28,855 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:28,988 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 185 -2023-05-15 16:05:28,995 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:28,995 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103005_Instagram.jpg => /tmp/train/test/10_person/003-original-Screenshot_20221225_103005_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:28,998 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:28,998 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xff' -2023-05-15 16:05:28,998 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:28,998 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:28,998 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:29,025 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:29,759 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 16:05:29,766 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:29,902 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 262 -2023-05-15 16:05:29,910 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:29,910 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103018_Instagram.jpg => /tmp/train/test/10_person/004-original-Screenshot_20221225_103018_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:29,913 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:29,913 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06X' -2023-05-15 16:05:29,913 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:29,913 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:29,913 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:29,938 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:30,690 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 16:05:30,696 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:30,828 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 227 -2023-05-15 16:05:30,835 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:30,835 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103034_Instagram.jpg => /tmp/train/test/10_person/005-original-Screenshot_20221225_103034_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:30,838 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:30,838 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:05:30,838 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:30,838 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:30,838 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:30,861 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:31,614 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:05:31,619 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:31,759 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 497 -2023-05-15 16:05:31,766 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:31,767 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103043_Instagram.jpg => /tmp/train/test/10_person/006-original-Screenshot_20221225_103043_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:31,770 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:31,770 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:05:31,770 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:31,770 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:31,770 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:31,793 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:32,526 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 16:05:32,532 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:32,666 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 16:05:32,674 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:32,674 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103058_Instagram.jpg => /tmp/train/test/10_person/007-original-Screenshot_20221225_103058_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:32,677 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:32,677 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:05:32,677 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:32,677 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:32,677 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:32,702 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:33,474 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 16:05:33,480 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:33,617 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 251 -2023-05-15 16:05:33,624 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:33,624 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103106_Instagram.jpg => /tmp/train/test/10_person/008-original-Screenshot_20221225_103106_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:33,627 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:33,627 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:05:33,627 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:33,627 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:33,627 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:33,648 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:34,406 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:05:34,412 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:34,552 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 216 -2023-05-15 16:05:34,559 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:34,559 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103115_Instagram.jpg => /tmp/train/test/10_person/009-original-Screenshot_20221225_103115_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:34,562 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:34,563 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xc8' -2023-05-15 16:05:34,563 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:34,563 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:34,563 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:34,590 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:35,324 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 140 -2023-05-15 16:05:35,331 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:35,466 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 263 -2023-05-15 16:05:35,474 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:35,474 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103128_Instagram.jpg => /tmp/train/test/10_person/010-original-Screenshot_20221225_103128_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:35,477 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:35,477 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xfb' -2023-05-15 16:05:35,477 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:35,477 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:35,477 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:35,502 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:36,251 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 16:05:36,257 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:36,395 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 192 -2023-05-15 16:05:36,402 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:36,402 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103144_Instagram.jpg => /tmp/train/test/10_person/011-original-Screenshot_20221225_103144_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:36,405 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 16:05:36,405 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xb6' -2023-05-15 16:05:36,405 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:36,405 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:36,406 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:36,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:37,208 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 179 -2023-05-15 16:05:37,214 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:37,350 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 348 -2023-05-15 16:05:37,358 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:37,358 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103159_Instagram.jpg => /tmp/train/test/10_person/012-original-Screenshot_20221225_103159_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:37,361 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:37,361 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 16:05:37,361 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:37,361 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:37,361 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:37,385 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:38,136 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 16:05:38,141 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:38,275 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 299 -2023-05-15 16:05:38,282 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:38,282 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103207_Instagram.jpg => /tmp/train/test/10_person/013-original-Screenshot_20221225_103207_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:38,286 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:38,286 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:05:38,286 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:38,286 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:38,286 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:38,310 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:39,048 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 176 -2023-05-15 16:05:39,054 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:39,187 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 343 -2023-05-15 16:05:39,195 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:39,195 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103222_Instagram.jpg => /tmp/train/test/10_person/014-original-Screenshot_20221225_103222_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:39,198 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:39,198 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 16:05:39,198 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:39,198 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:39,198 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:39,222 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:39,977 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 189 -2023-05-15 16:05:39,983 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:40,117 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 311 -2023-05-15 16:05:40,124 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:40,124 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103233_Instagram.jpg => /tmp/train/test/10_person/015-original-Screenshot_20221225_103233_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:40,127 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:40,127 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:05:40,128 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:40,128 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:40,128 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:40,151 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:40,913 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 16:05:40,918 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:41,050 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 366 -2023-05-15 16:05:41,058 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:41,058 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103240_Instagram.jpg => /tmp/train/test/10_person/016-original-Screenshot_20221225_103240_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:41,061 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 16:05:41,061 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x06' -2023-05-15 16:05:41,061 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:41,061 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:41,061 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:41,087 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:41,837 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 16:05:41,844 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:41,977 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 712 -2023-05-15 16:05:41,985 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:41,985 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103256_Instagram.jpg => /tmp/train/test/10_person/017-original-Screenshot_20221225_103256_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:41,988 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:41,988 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:05:41,988 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:41,988 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:41,988 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:42,008 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:42,747 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 16:05:42,753 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:42,887 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 169 -2023-05-15 16:05:42,895 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:42,895 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103313_Instagram.jpg => /tmp/train/test/10_person/018-original-Screenshot_20221225_103313_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:42,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:42,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:05:42,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:42,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:42,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:42,921 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:43,696 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 16:05:43,702 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:43,835 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 253 -2023-05-15 16:05:43,843 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:43,843 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103321_Instagram.jpg => /tmp/train/test/10_person/019-original-Screenshot_20221225_103321_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:43,846 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:43,846 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:05:43,846 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:43,846 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:43,846 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:43,869 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:44,611 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 16:05:44,616 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:44,754 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 295 -2023-05-15 16:05:44,762 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:44,762 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103335_Instagram.jpg => /tmp/train/test/10_person/020-original-Screenshot_20221225_103335_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:44,765 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:44,765 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:05:44,765 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:44,765 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:44,765 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:44,789 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:45,537 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 165 -2023-05-15 16:05:45,543 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:45,676 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 252 -2023-05-15 16:05:45,683 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:45,683 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103345_Instagram.jpg => /tmp/train/test/10_person/021-original-Screenshot_20221225_103345_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:45,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:45,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06c' -2023-05-15 16:05:45,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:45,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:45,686 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:45,709 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:46,446 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 16:05:46,452 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:46,584 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 16:05:46,591 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:46,591 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103406_Instagram.jpg => /tmp/train/test/10_person/022-original-Screenshot_20221225_103406_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:46,595 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:46,595 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 16:05:46,595 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:46,595 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:46,595 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:46,617 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:47,385 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 16:05:47,390 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:47,522 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 237 -2023-05-15 16:05:47,529 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:47,529 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103427_Instagram.jpg => /tmp/train/test/10_person/023-original-Screenshot_20221225_103427_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:47,532 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:47,532 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 16:05:47,532 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:47,532 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:47,532 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:47,554 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:48,283 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 16:05:48,288 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:48,420 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 308 -2023-05-15 16:05:48,428 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:48,428 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103433_Instagram.jpg => /tmp/train/test/10_person/024-original-Screenshot_20221225_103433_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:48,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:48,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x95' -2023-05-15 16:05:48,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:48,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:48,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:48,450 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:49,231 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 16:05:49,236 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:49,366 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 16:05:49,373 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:49,373 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103445_Instagram.jpg => /tmp/train/test/10_person/025-original-Screenshot_20221225_103445_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:49,376 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:49,376 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x93' -2023-05-15 16:05:49,376 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:49,376 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:49,376 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:49,397 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:50,142 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 157 -2023-05-15 16:05:50,147 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:50,282 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 434 -2023-05-15 16:05:50,288 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:50,288 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103500_Instagram.jpg => /tmp/train/test/10_person/026-original-Screenshot_20221225_103500_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:50,291 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:50,291 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x8b' -2023-05-15 16:05:50,291 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:50,292 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:50,292 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:50,313 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:51,048 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 16:05:51,053 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:51,181 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 457 -2023-05-15 16:05:51,188 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:51,188 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103507_Instagram.jpg => /tmp/train/test/10_person/027-original-Screenshot_20221225_103507_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:51,191 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:51,191 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:05:51,191 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:51,191 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:51,191 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:51,208 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:51,981 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 16:05:51,985 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:52,115 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 362 -2023-05-15 16:05:52,122 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:52,122 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103522_Instagram.jpg => /tmp/train/test/10_person/028-original-Screenshot_20221225_103522_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:52,125 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9c' -2023-05-15 16:05:52,125 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:05:52,125 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:52,125 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:52,125 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:52,147 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:52,973 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 16:05:52,978 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:53,122 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 16:05:53,128 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:53,128 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103530_Instagram.jpg => /tmp/train/test/10_person/029-original-Screenshot_20221225_103530_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:53,132 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:53,132 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:05:53,132 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:53,132 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:53,132 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:53,152 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:54,247 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 154 -2023-05-15 16:05:54,251 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:54,422 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 113 -2023-05-15 16:05:54,429 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:54,429 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103536_Instagram.jpg => /tmp/train/test/10_person/030-original-Screenshot_20221225_103536_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:54,433 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x8a' -2023-05-15 16:05:54,433 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:05:54,433 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:54,433 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:54,433 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:54,454 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:55,465 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 16:05:55,470 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:55,635 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 16:05:55,641 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:55,641 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103543_Instagram.jpg => /tmp/train/test/10_person/031-original-Screenshot_20221225_103543_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:55,645 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:55,645 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:05:55,645 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:55,645 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:55,645 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:55,665 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:56,697 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 16:05:56,702 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:56,839 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 236 -2023-05-15 16:05:56,846 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:56,846 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103553_Instagram.jpg => /tmp/train/test/10_person/032-original-Screenshot_20221225_103553_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:56,850 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:56,850 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:05:56,850 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:56,850 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:56,850 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:56,870 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:57,829 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 174 -2023-05-15 16:05:57,834 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:57,996 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 204 -2023-05-15 16:05:58,003 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:58,003 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103559_Instagram.jpg => /tmp/train/test/10_person/033-original-Screenshot_20221225_103559_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:58,006 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:58,006 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 16:05:58,006 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:58,006 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:58,006 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:58,027 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:59,112 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 16:05:59,117 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:05:59,276 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 628 -2023-05-15 16:05:59,283 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:05:59,283 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103613_Instagram.jpg => /tmp/train/test/10_person/034-original-Screenshot_20221225_103613_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:05:59,286 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:05:59,286 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 16:05:59,286 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:05:59,286 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:05:59,286 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:05:59,307 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:06:00,215 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 167 -2023-05-15 16:06:00,220 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:06:00,385 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 563 -2023-05-15 16:06:00,392 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:06:00,392 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103621_Instagram.jpg => /tmp/train/test/10_person/035-original-Screenshot_20221225_103621_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:06:00,395 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:06:00,395 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9d' -2023-05-15 16:06:00,396 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:06:00,396 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:06:00,396 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:06:00,419 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:06:01,418 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:06:01,424 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:06:01,556 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 512 -2023-05-15 16:06:01,563 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:06:01,563 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103629_Instagram.jpg => /tmp/train/test/10_person/036-original-Screenshot_20221225_103629_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:06:01,566 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:06:01,566 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:06:01,566 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:06:01,566 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:06:01,566 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:06:01,587 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:06:02,468 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 16:06:02,473 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:06:02,624 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 160 -2023-05-15 16:06:02,631 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:06:02,631 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103638_Instagram.jpg => /tmp/train/test/10_person/037-original-Screenshot_20221225_103638_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:06:02,634 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:06:02,635 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x04\xb0' -2023-05-15 16:06:02,635 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:06:02,635 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:06:02,635 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:06:02,654 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:06:03,463 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 168 -2023-05-15 16:06:03,468 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:06:03,619 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 908 -2023-05-15 16:06:03,625 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:06:03,625 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103649_Instagram.jpg => /tmp/train/test/10_person/038-original-Screenshot_20221225_103649_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:06:03,629 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:06:03,629 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 16:06:03,629 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:06:03,629 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:06:03,629 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:06:03,651 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:06:04,717 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:06:04,722 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:06:04,885 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 289 -2023-05-15 16:06:04,892 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:06:04,892 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103656_Instagram.jpg => /tmp/train/test/10_person/039-original-Screenshot_20221225_103656_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:06:04,896 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:06:04,896 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x15' -2023-05-15 16:06:04,896 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:06:04,896 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:06:04,896 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:06:04,922 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:06:05,979 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 16:06:05,985 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:06:06,129 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 16:06:06,137 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:06:06,137 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103727_Instagram.jpg => /tmp/train/test/10_person/040-original-Screenshot_20221225_103727_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:06:06,138 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | input datasets ['/tmp/train/test/10_person'] -2023-05-15 16:06:06,141 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTPS connection (1): huggingface.co:443 -2023-05-15 16:06:06,884 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /stabilityai/sd-vae-ft-mse/resolve/main/config.json HTTP/1.1" 200 0 -2023-05-15 16:06:14,243 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps result: {'inputs': 40, 'outputs': {'original': 40, 'total': 40}, 'metadata': '/tmp/train/test/test.json'} -2023-05-15 16:06:14,357 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 22.39, 'used': 5.02, 'total': 27.41} gpu current: {'free': 9.7, 'used': 2.3, 'total': 12.0} gpu peak: {'active': 0.95, 'allocated': 0.95, 'reserved': 1.11} -2023-05-15 16:06:14,362 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | lora options: {'bucket_no_upscale': False, 'bucket_reso_steps': 64, 'cache_latents': True, 'caption_dropout_every_n_epochs': None, 'caption_dropout_rate': 0.0, 'caption_extension': '.txt', 'caption_extention': '.txt', 'caption_tag_dropout_rate': 0.0, 'clip_skip': None, 'color_aug': False, 'dataset_repeats': 1, 'debug_dataset': False, 'enable_bucket': False, 'face_crop_aug_range': None, 'flip_aug': False, 'full_fp16': False, 'gradient_accumulation_steps': 1, 'gradient_checkpointing': False, 'in_json': '/tmp/train/test/test.json', 'keep_tokens': None, 'learning_rate': 0.0001, 'log_prefix': None, 'logging_dir': None, 'lr_scheduler_num_cycles': 1, 'lr_scheduler_power': 1, 'lr_scheduler': 'cosine', 'lr_warmup_steps': 0, 'max_bucket_reso': 1024, 'max_data_loader_n_workers': 8, 'max_grad_norm': 0.0, 'max_token_length': None, 'max_train_epochs': None, 'max_train_steps': 2500, 'mem_eff_attn': False, 'min_bucket_reso': 256, 'mixed_precision': 'fp16', 'network_alpha': 20, 'network_args': None, 'network_dim': 40, 'network_module': 'networks.lora', 'network_train_text_encoder_only': False, 'network_train_unet_only': False, 'network_weights': None, 'no_metadata': False, 'output_dir': '/home/vlado/dev/automatic/models/Lora', 'output_name': 'test', 'persistent_data_loader_workers': False, 'pretrained_model_name_or_path': '/home/vlado/dev/automatic/models/v1-5-pruned-emaonly.safetensors', 'prior_loss_weight': 1.0, 'random_crop': False, 'reg_data_dir': None, 'resolution': '512,512', 'resume': None, 'save_every_n_epochs': None, 'save_last_n_epochs_state': None, 'save_last_n_epochs': None, 'save_model_as': 'ckpt', 'save_n_epoch_ratio': None, 'save_precision': 'fp16', 'save_state': False, 'seed': 42, 'shuffle_caption': False, 'text_encoder_lr': 5e-05, 'train_batch_size': 1, 'train_data_dir': '/tmp/train/test', 'training_comment': 'mood-magic', 'unet_lr': 0.0001, 'use_8bit_adam': False, 'v_parameterization': False, 'v2': False, 'vae': None, 'xformers': False} -2023-05-15 16:06:15,418 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/vocab.json HTTP/1.1" 200 0 -2023-05-15 16:06:24,236 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/config.json HTTP/1.1" 200 0 -2023-05-15 16:06:25,063 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/model.safetensors HTTP/1.1" 404 0 -2023-05-15 16:06:25,917 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/model.safetensors.index.json HTTP/1.1" 404 0 -2023-05-15 16:06:26,753 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/pytorch_model.bin HTTP/1.1" 302 0 -2023-05-15 16:10:28,458 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:10:28,463 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 16:10:28,464 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:10:28,468 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:10:28,468 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:10:28,496 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:10:28,497 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:10:28,499 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 16:10:28,499 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 16:10:28,501 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:10:28,504 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:10:28,504 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:10:28,531 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:16:15,088 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:15,093 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 16:16:15,095 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:15,098 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:16:15,099 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:15,127 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:16:15,127 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:15,129 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 16:16:15,129 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 16:16:15,132 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:15,134 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:16:15,135 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:15,162 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:16:15,174 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | args: {'type': 'lora', 'model': '/home/vlado/dev/automatic/models/v1-5-pruned-emaonly.safetensors', 'name': 'test', 'tag': 'person', 'input': '/home/vlado/generative/Input/mia/', 'output': '', 'process': 'original,interrogate,resize,square', 'gradient': 1, 'steps': 2500, 'batch': 1, 'lr': 0.0001, 'dim': 40, 'repeats': 10, 'alpha': 0, 'overwrite': False, 'debug': True, 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'process_dir': '/tmp/train/test'} -2023-05-15 16:16:15,175 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | server flags: {'error': 500, 'reason': 'Internal Server Error', 'url': 'http://127.0.0.1:7860/sdapi/v1/cmd-flags'} -2023-05-15 16:16:15,176 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | server options: {'sd_model_checkpoint': 'v1-5-pruned-emaonly.safetensors [6ce0161689]', 'sd_checkpoint_cache': 0.0, 'sd_vae_checkpoint_cache': 0.0, 'sd_vae': 'Automatic', 'stream_load': False, 'model_reuse_dict': False, 'inpainting_mask_weight': 1.0, 'initial_noise_multiplier': 1.0, 'img2img_color_correction': False, 'img2img_fix_steps': False, 'img2img_background_color': '#ffffff', 'enable_quantization': True, 'comma_padding_backtrack': 20.0, 'CLIP_stop_at_last_layers': 1.0, 'upcast_attn': False, 'cross_attention_optimization': 'Scaled-Dot-Product', 'cross_attention_options': [], 'sub_quad_q_chunk_size': 512.0, 'sub_quad_kv_chunk_size': 512.0, 'sub_quad_chunk_threshold': 80.0, 'always_batch_cond_uncond': False, 'temp_dir': '', 'clean_temp_dir_at_start': True, 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'vae_dir': '/home/vlado/dev/automatic/models/VAE', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'hypernetwork_dir': '/home/vlado/dev/automatic/models/hypernetworks', 'codeformer_models_path': '/home/vlado/dev/automatic/models/Codeformer', 'gfpgan_models_path': '/home/vlado/dev/automatic/models/GFPGAN', 'esrgan_models_path': '/home/vlado/dev/automatic/models/ESRGAN', 'bsrgan_models_path': '/home/vlado/dev/automatic/models/BSRGAN', 'realesrgan_models_path': '/home/vlado/dev/automatic/models/RealESRGAN', 'scunet_models_path': '/home/vlado/dev/automatic/models/ScuNET', 'swinir_models_path': '/home/vlado/dev/automatic/models/SwinIR', 'ldsr_models_path': '/home/vlado/dev/automatic/models/LDSR', 'clip_models_path': '/home/vlado/dev/automatic/models/CLIP', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'styles_dir': 'styles.csv', 'samples_save': True, 'samples_format': 'jpg', 'samples_filename_pattern': '', 'save_images_add_number': True, 'grid_save': True, 'grid_format': 'jpg', 'grid_extended_filename': True, 'grid_only_if_multiple': True, 'grid_prevent_empty_spots': True, 'n_rows': -1.0, 'save_txt': False, 'save_log_fn': '', 'save_images_before_face_restoration': False, 'save_images_before_highres_fix': False, 'save_images_before_color_correction': False, 'save_mask': False, 'save_mask_composite': False, 'jpeg_quality': 85.0, 'webp_lossless': False, 'img_max_size_mp': 200.0, 'use_original_name_batch': True, 'use_upscaler_name_as_suffix': True, 'save_selected_only': True, 'save_init_img': False, 'save_to_dirs': False, 'grid_save_to_dirs': False, 'use_save_to_dirs_for_ui': False, 'directories_filename_pattern': '[date]', 'directories_max_prompt_words': 8.0, 'outdir_samples': '', 'outdir_txt2img_samples': 'outputs/text', 'outdir_img2img_samples': 'outputs/image', 'outdir_extras_samples': 'outputs/extras', 'outdir_grids': '', 'outdir_txt2img_grids': 'outputs/grids', 'outdir_img2img_grids': 'outputs/grids', 'outdir_save': 'outputs/save', 'outdir_init_images': 'outputs/init-images', 'memmon_poll_rate': 2.0, 'precision': 'Autocast', 'cuda_dtype': 'FP16', 'no_half': False, 'no_half_vae': False, 'upcast_sampling': False, 'disable_nan_check': True, 'rollback_vae': False, 'opt_channelslast': False, 'cudnn_benchmark': False, 'cuda_allow_tf32': True, 'cuda_allow_tf16_reduced': True, 'cuda_compile': False, 'cuda_compile_mode': 'none', 'cuda_compile_verbose': False, 'cuda_compile_errors': True, 'disable_gc': True, 'upscaler_for_img2img': 'None', 'realesrgan_enabled_models': ['R-ESRGAN 4x+', 'R-ESRGAN 4x+ Anime6B'], 'ESRGAN_tile': 192.0, 'ESRGAN_tile_overlap': 8.0, 'SCUNET_tile': 256.0, 'SCUNET_tile_overlap': 8.0, 'use_old_hires_fix_width_height': False, 'dont_fix_second_order_samplers_schedule': False, 'face_restoration_model': 'CodeFormer', 'code_former_weight': 0.2, 'face_restoration_unload': False, 'unload_models_when_training': False, 'pin_memory': True, 'save_optimizer_state': False, 'save_training_settings_to_txt': False, 'dataset_filename_word_regex': '', 'dataset_filename_join_string': ' ', 'embeddings_templates_dir': '/home/vlado/dev/automatic/train/templates', 'training_image_repeats_per_epoch': 10.0, 'training_write_csv_every': 0.0, 'training_enable_tensorboard': False, 'training_tensorboard_save_images': False, 'training_tensorboard_flush_every': 120.0, 'interrogate_keep_models_in_memory': False, 'interrogate_return_ranks': True, 'interrogate_clip_num_beams': 1.0, 'interrogate_clip_min_length': 32.0, 'interrogate_clip_max_length': 192.0, 'interrogate_clip_dict_limit': 2048.0, 'interrogate_clip_skip_categories': ['artists', 'movements', 'flavors'], 'interrogate_deepbooru_score_threshold': 0.65, 'deepbooru_sort_alpha': False, 'deepbooru_use_spaces': False, 'deepbooru_escape': True, 'deepbooru_filter_tags': '', 'extra_networks_default_view': 'cards', 'extra_networks_default_multiplier': 1.0, 'extra_networks_card_width': 0.0, 'extra_networks_card_height': 0.0, 'extra_networks_add_text_separator': ' ', 'sd_hypernetwork': 'None', 'gradio_theme': 'black-orange', 'return_grid': True, 'return_mask': False, 'return_mask_composite': False, 'disable_weights_auto_swap': True, 'send_seed': True, 'send_size': True, 'font': '', 'keyedit_precision_attention': 0.1, 'keyedit_precision_extra': 0.05, 'keyedit_delimiters': '.,\\/!?%^*;:{}=`~()', 'quicksettings': 'sd_model_checkpoint', 'hidden_tabs': [], 'ui_tab_reorder': 'From Text, From Image, Process Image', 'ui_scripts_reorder': 'Enable Dynamic Thresholding, ControlNet', 'ui_reorder': 'inpaint, sampler, checkboxes, hires_fix, dimensions, cfg, seed, batch, override_settings, scripts', 'ui_extra_networks_tab_reorder': '', 'show_progressbar': True, 'live_previews_enable': True, 'show_progress_grid': True, 'notification_audio_enable': False, 'notification_audio_path': 'html/notification.mp3', 'show_progress_every_n_steps': 1.0, 'show_progress_type': 'Approx NN', 'live_preview_content': 'Combined', 'live_preview_refresh_period': 250.0, 'show_samplers': ['Euler a', 'UniPC', 'DDIM', 'DPM++ SDE', 'DPM++ SDE', 'DPM2 Karras', 'DPM++ 2M Karras'], 'fallback_sampler': 'Euler a', 'xyz_fallback_sampler': 'None', 'eta_ancestral': 1.0, 'eta_ddim': 0.0, 'ddim_discretize': 'uniform', 's_churn': 0.0, 's_min_uncond': 0.0, 's_tmin': 0.0, 's_noise': 1.0, 'eta_noise_seed_delta': 0.0, 'always_discard_next_to_last_sigma': False, 'uni_pc_variant': 'bh1', 'uni_pc_skip_type': 'time_uniform', 'uni_pc_order': 3.0, 'uni_pc_lower_order_final': True, 'token_merging': False, 'token_merging_ratio': 0.5, 'token_merging_hr_only': True, 'token_merging_ratio_hr': 0.5, 'token_merging_random': False, 'token_merging_merge_attention': True, 'token_merging_merge_cross_attention': False, 'token_merging_merge_mlp': False, 'token_merging_maximum_down_sampling': 1.0, 'token_merging_stride_x': 2.0, 'token_merging_stride_y': 2.0, 'postprocessing_enable_in_main_ui': [], 'postprocessing_operation_order': [], 'upscaling_max_images_in_cache': 5.0, 'disabled_extensions': [], 'disable_all_extensions': 'none', 'sd_checkpoint_hash': '6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa', 'sd_lyco': 'None', 'sd_lora': 'None'} -2023-05-15 16:16:15,183 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | train using lora style training -2023-05-15 16:16:16,821 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 26.39, 'used': 1.02, 'total': 27.41} gpu current: {'free': 10.42, 'used': 1.57, 'total': 12.0} gpu peak: {'active': 0.0, 'allocated': 0.0, 'reserved': 0.0} -2023-05-15 16:16:16,822 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 16:16:16,952 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing input images: 40 -2023-05-15 16:16:16,952 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processed folder exists: /tmp/train/test -2023-05-15 16:16:16,953 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing current step: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 16:16:16,953 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing concept: person -2023-05-15 16:16:16,954 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing output folder: /tmp/train/test/10_person -2023-05-15 16:16:16,959 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:16,959 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:16:16,959 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:16,959 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:16,959 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:16,993 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:18,079 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 16:16:18,087 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:18,284 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 187 -2023-05-15 16:16:18,291 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:18,291 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102947_Instagram.jpg => /tmp/train/test/10_person/001-original-Screenshot_20221225_102947_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:18,294 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:18,294 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06@' -2023-05-15 16:16:18,295 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:18,295 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:18,295 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:18,326 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:19,395 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 16:16:19,402 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:19,583 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 291 -2023-05-15 16:16:19,590 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:19,590 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102956_Instagram.jpg => /tmp/train/test/10_person/002-original-Screenshot_20221225_102956_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:19,594 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:19,594 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:16:19,594 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:19,594 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:19,594 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:19,626 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:20,698 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 175 -2023-05-15 16:16:20,705 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:20,876 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 185 -2023-05-15 16:16:20,883 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:20,884 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103005_Instagram.jpg => /tmp/train/test/10_person/003-original-Screenshot_20221225_103005_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:20,887 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:20,887 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xff' -2023-05-15 16:16:20,887 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:20,887 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:20,887 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:20,917 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:21,941 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 16:16:21,947 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:22,109 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 262 -2023-05-15 16:16:22,117 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:22,117 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103018_Instagram.jpg => /tmp/train/test/10_person/004-original-Screenshot_20221225_103018_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:22,120 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:22,121 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06X' -2023-05-15 16:16:22,121 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:22,121 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:22,121 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:22,147 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:23,044 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 16:16:23,049 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:23,199 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 227 -2023-05-15 16:16:23,207 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:23,207 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103034_Instagram.jpg => /tmp/train/test/10_person/005-original-Screenshot_20221225_103034_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:23,210 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:23,210 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:16:23,210 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:23,210 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:23,210 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:23,236 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:24,209 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:16:24,214 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:24,372 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 497 -2023-05-15 16:16:24,379 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:24,380 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103043_Instagram.jpg => /tmp/train/test/10_person/006-original-Screenshot_20221225_103043_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:24,383 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:24,383 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:16:24,383 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:24,383 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:24,383 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:24,409 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:25,226 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 16:16:25,232 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:25,402 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 16:16:25,410 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:25,410 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103058_Instagram.jpg => /tmp/train/test/10_person/007-original-Screenshot_20221225_103058_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:25,413 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:25,413 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:16:25,413 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:25,413 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:25,413 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:25,440 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:26,236 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 16:16:26,242 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:26,401 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 251 -2023-05-15 16:16:26,408 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:26,409 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103106_Instagram.jpg => /tmp/train/test/10_person/008-original-Screenshot_20221225_103106_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:26,412 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:26,412 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:16:26,412 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:26,412 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:26,412 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:26,435 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:27,288 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:16:27,294 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:27,438 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 216 -2023-05-15 16:16:27,445 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:27,445 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103115_Instagram.jpg => /tmp/train/test/10_person/009-original-Screenshot_20221225_103115_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:27,448 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:27,448 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xc8' -2023-05-15 16:16:27,448 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:27,448 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:27,448 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:27,480 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:28,385 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 140 -2023-05-15 16:16:28,391 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:28,556 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 263 -2023-05-15 16:16:28,563 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:28,563 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103128_Instagram.jpg => /tmp/train/test/10_person/010-original-Screenshot_20221225_103128_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:28,567 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:28,567 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xfb' -2023-05-15 16:16:28,567 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:28,567 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:28,567 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:28,595 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:29,557 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 16:16:29,564 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:29,734 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 192 -2023-05-15 16:16:29,742 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:29,742 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103144_Instagram.jpg => /tmp/train/test/10_person/011-original-Screenshot_20221225_103144_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:29,745 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 16:16:29,745 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xb6' -2023-05-15 16:16:29,745 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:29,745 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:29,745 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:29,773 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:30,835 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 179 -2023-05-15 16:16:30,841 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:31,007 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 348 -2023-05-15 16:16:31,014 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:31,015 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103159_Instagram.jpg => /tmp/train/test/10_person/012-original-Screenshot_20221225_103159_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:31,018 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:31,018 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 16:16:31,018 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:31,018 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:31,018 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:31,045 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:32,012 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 16:16:32,018 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:32,171 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 299 -2023-05-15 16:16:32,178 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:32,178 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103207_Instagram.jpg => /tmp/train/test/10_person/013-original-Screenshot_20221225_103207_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:32,182 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:32,182 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:16:32,182 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:32,182 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:32,182 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:32,211 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:33,071 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 176 -2023-05-15 16:16:33,077 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:33,222 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 343 -2023-05-15 16:16:33,229 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:33,229 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103222_Instagram.jpg => /tmp/train/test/10_person/014-original-Screenshot_20221225_103222_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:33,233 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:33,233 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 16:16:33,233 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:33,233 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:33,233 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:33,259 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:34,090 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 189 -2023-05-15 16:16:34,096 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:34,262 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 311 -2023-05-15 16:16:34,270 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:34,270 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103233_Instagram.jpg => /tmp/train/test/10_person/015-original-Screenshot_20221225_103233_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:34,273 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:34,273 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:16:34,273 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:34,273 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:34,273 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:34,300 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:35,147 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 16:16:35,152 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:35,323 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 366 -2023-05-15 16:16:35,331 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:35,331 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103240_Instagram.jpg => /tmp/train/test/10_person/016-original-Screenshot_20221225_103240_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:35,334 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 16:16:35,334 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x06' -2023-05-15 16:16:35,334 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:35,334 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:35,334 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:35,364 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:36,269 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 16:16:36,275 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:36,443 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 712 -2023-05-15 16:16:36,450 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:36,451 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103256_Instagram.jpg => /tmp/train/test/10_person/017-original-Screenshot_20221225_103256_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:36,454 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:36,454 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:16:36,454 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:36,454 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:36,454 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:36,480 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:37,361 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 16:16:37,367 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:37,535 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 169 -2023-05-15 16:16:37,542 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:37,542 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103313_Instagram.jpg => /tmp/train/test/10_person/018-original-Screenshot_20221225_103313_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:37,546 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:37,546 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:16:37,546 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:37,546 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:37,546 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:37,572 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:38,436 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 16:16:38,442 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:38,598 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 253 -2023-05-15 16:16:38,606 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:38,606 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103321_Instagram.jpg => /tmp/train/test/10_person/019-original-Screenshot_20221225_103321_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:38,609 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:38,609 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:16:38,609 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:38,609 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:38,609 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:38,635 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:39,501 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 16:16:39,507 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:39,664 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 295 -2023-05-15 16:16:39,672 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:39,672 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103335_Instagram.jpg => /tmp/train/test/10_person/020-original-Screenshot_20221225_103335_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:39,675 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:39,675 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:16:39,675 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:39,675 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:39,675 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:39,701 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:40,538 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 165 -2023-05-15 16:16:40,543 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:40,713 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 252 -2023-05-15 16:16:40,720 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:40,720 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103345_Instagram.jpg => /tmp/train/test/10_person/021-original-Screenshot_20221225_103345_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:40,723 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:40,723 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06c' -2023-05-15 16:16:40,724 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:40,724 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:40,724 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:40,750 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:41,574 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 16:16:41,580 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:41,733 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 16:16:41,740 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:41,741 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103406_Instagram.jpg => /tmp/train/test/10_person/022-original-Screenshot_20221225_103406_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:41,744 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:41,744 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 16:16:41,744 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:41,744 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:41,744 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:41,769 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:42,763 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 16:16:42,768 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:42,918 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 237 -2023-05-15 16:16:42,926 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:42,926 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103427_Instagram.jpg => /tmp/train/test/10_person/023-original-Screenshot_20221225_103427_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:42,929 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:42,929 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 16:16:42,929 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:42,929 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:42,929 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:42,956 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:43,876 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 16:16:43,881 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:44,030 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 308 -2023-05-15 16:16:44,038 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:44,038 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103433_Instagram.jpg => /tmp/train/test/10_person/024-original-Screenshot_20221225_103433_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:44,041 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:44,041 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x95' -2023-05-15 16:16:44,041 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:44,041 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:44,041 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:44,062 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:45,064 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 16:16:45,069 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:45,219 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 16:16:45,226 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:45,226 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103445_Instagram.jpg => /tmp/train/test/10_person/025-original-Screenshot_20221225_103445_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:45,230 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:45,230 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x93' -2023-05-15 16:16:45,230 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:45,230 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:45,230 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:45,254 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:46,271 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 157 -2023-05-15 16:16:46,277 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:46,441 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 434 -2023-05-15 16:16:46,448 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:46,448 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103500_Instagram.jpg => /tmp/train/test/10_person/026-original-Screenshot_20221225_103500_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:46,452 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:46,452 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x8b' -2023-05-15 16:16:46,452 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:46,452 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:46,452 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:46,478 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:47,337 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 16:16:47,343 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:47,488 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 457 -2023-05-15 16:16:47,495 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:47,495 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103507_Instagram.jpg => /tmp/train/test/10_person/027-original-Screenshot_20221225_103507_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:47,499 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:47,499 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:16:47,499 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:47,499 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:47,499 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:47,517 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:48,401 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 16:16:48,406 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:48,553 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 362 -2023-05-15 16:16:48,560 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:48,560 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103522_Instagram.jpg => /tmp/train/test/10_person/028-original-Screenshot_20221225_103522_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:48,563 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9c' -2023-05-15 16:16:48,563 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:16:48,563 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:48,563 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:48,563 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:48,587 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:49,539 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 16:16:49,544 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:49,690 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 16:16:49,697 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:49,697 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103530_Instagram.jpg => /tmp/train/test/10_person/029-original-Screenshot_20221225_103530_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:49,701 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:49,701 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:16:49,701 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:49,701 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:49,701 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:49,725 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:50,749 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 154 -2023-05-15 16:16:50,754 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:50,893 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 113 -2023-05-15 16:16:50,900 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:50,900 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103536_Instagram.jpg => /tmp/train/test/10_person/030-original-Screenshot_20221225_103536_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:50,903 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x8a' -2023-05-15 16:16:50,903 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:16:50,903 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:50,903 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:50,903 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:50,927 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:51,868 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 16:16:51,873 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:52,026 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 16:16:52,033 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:52,033 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103543_Instagram.jpg => /tmp/train/test/10_person/031-original-Screenshot_20221225_103543_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:52,037 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:52,037 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:16:52,037 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:52,037 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:52,037 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:52,060 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:52,872 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 16:16:52,878 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:53,015 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 236 -2023-05-15 16:16:53,022 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:53,023 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103553_Instagram.jpg => /tmp/train/test/10_person/032-original-Screenshot_20221225_103553_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:53,026 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:53,026 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:16:53,026 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:53,026 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:53,026 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:53,047 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:53,804 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 174 -2023-05-15 16:16:53,809 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:53,955 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 204 -2023-05-15 16:16:53,962 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:53,962 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103559_Instagram.jpg => /tmp/train/test/10_person/033-original-Screenshot_20221225_103559_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:53,967 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:53,967 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 16:16:53,967 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:53,967 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:53,967 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:53,994 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:54,775 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 16:16:54,780 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:54,925 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 628 -2023-05-15 16:16:54,933 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:54,933 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103613_Instagram.jpg => /tmp/train/test/10_person/034-original-Screenshot_20221225_103613_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:54,936 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:54,936 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 16:16:54,936 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:54,936 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:54,936 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:54,959 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:55,784 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 167 -2023-05-15 16:16:55,790 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:55,927 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 563 -2023-05-15 16:16:55,935 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:55,935 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103621_Instagram.jpg => /tmp/train/test/10_person/035-original-Screenshot_20221225_103621_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:55,938 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:55,938 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9d' -2023-05-15 16:16:55,938 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:55,938 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:55,938 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:55,963 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:56,790 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:16:56,796 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:56,937 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 512 -2023-05-15 16:16:56,944 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:56,944 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103629_Instagram.jpg => /tmp/train/test/10_person/036-original-Screenshot_20221225_103629_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:56,948 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:56,948 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:16:56,948 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:56,948 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:56,948 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:56,973 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:57,813 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 16:16:57,818 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:57,958 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 160 -2023-05-15 16:16:57,965 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:57,965 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103638_Instagram.jpg => /tmp/train/test/10_person/037-original-Screenshot_20221225_103638_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:57,968 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:57,969 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x04\xb0' -2023-05-15 16:16:57,969 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:57,969 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:57,969 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:57,993 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:58,839 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 168 -2023-05-15 16:16:58,843 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:58,980 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 908 -2023-05-15 16:16:58,986 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:16:58,986 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103649_Instagram.jpg => /tmp/train/test/10_person/038-original-Screenshot_20221225_103649_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:16:58,990 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:16:58,990 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 16:16:58,990 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:16:58,990 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:16:58,990 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:16:59,018 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:16:59,852 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:16:59,858 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:17:00,004 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 289 -2023-05-15 16:17:00,011 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:17:00,011 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103656_Instagram.jpg => /tmp/train/test/10_person/039-original-Screenshot_20221225_103656_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:17:00,014 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:17:00,014 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x15' -2023-05-15 16:17:00,014 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:17:00,014 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:17:00,014 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:17:00,055 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:17:00,848 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 16:17:00,854 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:17:00,987 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 16:17:00,994 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:17:00,994 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103727_Instagram.jpg => /tmp/train/test/10_person/040-original-Screenshot_20221225_103727_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:17:00,995 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | input datasets ['/tmp/train/test/10_person'] -2023-05-15 16:17:00,998 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTPS connection (1): huggingface.co:443 -2023-05-15 16:17:01,951 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /stabilityai/sd-vae-ft-mse/resolve/main/config.json HTTP/1.1" 200 0 -2023-05-15 16:17:10,280 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps result: {'inputs': 40, 'outputs': {'original': 40, 'total': 40}, 'metadata': '/tmp/train/test/test.json'} -2023-05-15 16:17:10,427 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 22.57, 'used': 4.84, 'total': 27.41} gpu current: {'free': 9.7, 'used': 2.3, 'total': 12.0} gpu peak: {'active': 0.95, 'allocated': 0.95, 'reserved': 1.11} -2023-05-15 16:17:10,432 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | lora options: {'bucket_no_upscale': False, 'bucket_reso_steps': 64, 'cache_latents': True, 'caption_dropout_every_n_epochs': None, 'caption_dropout_rate': 0.0, 'caption_extension': '.txt', 'caption_extention': '.txt', 'caption_tag_dropout_rate': 0.0, 'clip_skip': None, 'color_aug': False, 'dataset_repeats': 1, 'debug_dataset': False, 'enable_bucket': False, 'face_crop_aug_range': None, 'flip_aug': False, 'full_fp16': False, 'gradient_accumulation_steps': 1, 'gradient_checkpointing': False, 'in_json': '/tmp/train/test/test.json', 'keep_tokens': None, 'learning_rate': 0.0001, 'log_prefix': None, 'logging_dir': None, 'lr_scheduler_num_cycles': 1, 'lr_scheduler_power': 1, 'lr_scheduler': 'cosine', 'lr_warmup_steps': 0, 'max_bucket_reso': 1024, 'max_data_loader_n_workers': 8, 'max_grad_norm': 0.0, 'max_token_length': None, 'max_train_epochs': None, 'max_train_steps': 2500, 'mem_eff_attn': False, 'min_bucket_reso': 256, 'mixed_precision': 'fp16', 'network_alpha': 20, 'network_args': None, 'network_dim': 40, 'network_module': 'networks.lora', 'network_train_text_encoder_only': False, 'network_train_unet_only': False, 'network_weights': None, 'no_metadata': False, 'output_dir': '/home/vlado/dev/automatic/models/Lora', 'output_name': 'test', 'persistent_data_loader_workers': False, 'pretrained_model_name_or_path': '/home/vlado/dev/automatic/models/v1-5-pruned-emaonly.safetensors', 'prior_loss_weight': 1.0, 'random_crop': False, 'reg_data_dir': None, 'resolution': '512,512', 'resume': None, 'save_every_n_epochs': None, 'save_last_n_epochs_state': None, 'save_last_n_epochs': None, 'save_model_as': 'ckpt', 'save_n_epoch_ratio': None, 'save_precision': 'fp16', 'save_state': False, 'seed': 42, 'shuffle_caption': False, 'text_encoder_lr': 5e-05, 'train_batch_size': 1, 'train_data_dir': '/tmp/train/test', 'training_comment': 'mood-magic', 'unet_lr': 0.0001, 'use_8bit_adam': False, 'v_parameterization': False, 'v2': False, 'vae': None, 'xformers': False} -2023-05-15 16:17:11,208 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/vocab.json HTTP/1.1" 200 0 -2023-05-15 16:17:15,891 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/config.json HTTP/1.1" 200 0 -2023-05-15 16:17:16,521 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/model.safetensors HTTP/1.1" 404 0 -2023-05-15 16:17:17,178 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/model.safetensors.index.json HTTP/1.1" 404 0 -2023-05-15 16:17:17,870 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/pytorch_model.bin HTTP/1.1" 302 0 -2023-05-15 16:23:43,538 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:43,544 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 16:23:43,545 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:43,548 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:23:43,548 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:43,576 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:23:43,577 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:43,579 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 16:23:43,579 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 16:23:43,581 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:43,584 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:23:43,585 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:43,610 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:23:43,623 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | args: {'type': 'lycoris', 'model': '/home/vlado/dev/automatic/models/v1-5-pruned-emaonly.safetensors', 'name': 'test', 'tag': 'person', 'input': '/home/vlado/generative/Input/mia/', 'output': '', 'process': 'original,interrogate,resize,square', 'gradient': 1, 'steps': 2500, 'batch': 1, 'lr': 0.0001, 'dim': 40, 'repeats': 10, 'alpha': 0, 'overwrite': False, 'debug': True, 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'process_dir': '/tmp/train/test'} -2023-05-15 16:23:43,624 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | server flags: {'error': 500, 'reason': 'Internal Server Error', 'url': 'http://127.0.0.1:7860/sdapi/v1/cmd-flags'} -2023-05-15 16:23:43,625 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | server options: {'sd_model_checkpoint': 'v1-5-pruned-emaonly.safetensors [6ce0161689]', 'sd_checkpoint_cache': 0.0, 'sd_vae_checkpoint_cache': 0.0, 'sd_vae': 'Automatic', 'stream_load': False, 'model_reuse_dict': False, 'inpainting_mask_weight': 1.0, 'initial_noise_multiplier': 1.0, 'img2img_color_correction': False, 'img2img_fix_steps': False, 'img2img_background_color': '#ffffff', 'enable_quantization': True, 'comma_padding_backtrack': 20.0, 'CLIP_stop_at_last_layers': 1.0, 'upcast_attn': False, 'cross_attention_optimization': 'Scaled-Dot-Product', 'cross_attention_options': [], 'sub_quad_q_chunk_size': 512.0, 'sub_quad_kv_chunk_size': 512.0, 'sub_quad_chunk_threshold': 80.0, 'always_batch_cond_uncond': False, 'temp_dir': '', 'clean_temp_dir_at_start': True, 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'vae_dir': '/home/vlado/dev/automatic/models/VAE', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'hypernetwork_dir': '/home/vlado/dev/automatic/models/hypernetworks', 'codeformer_models_path': '/home/vlado/dev/automatic/models/Codeformer', 'gfpgan_models_path': '/home/vlado/dev/automatic/models/GFPGAN', 'esrgan_models_path': '/home/vlado/dev/automatic/models/ESRGAN', 'bsrgan_models_path': '/home/vlado/dev/automatic/models/BSRGAN', 'realesrgan_models_path': '/home/vlado/dev/automatic/models/RealESRGAN', 'scunet_models_path': '/home/vlado/dev/automatic/models/ScuNET', 'swinir_models_path': '/home/vlado/dev/automatic/models/SwinIR', 'ldsr_models_path': '/home/vlado/dev/automatic/models/LDSR', 'clip_models_path': '/home/vlado/dev/automatic/models/CLIP', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'styles_dir': 'styles.csv', 'samples_save': True, 'samples_format': 'jpg', 'samples_filename_pattern': '', 'save_images_add_number': True, 'grid_save': True, 'grid_format': 'jpg', 'grid_extended_filename': True, 'grid_only_if_multiple': True, 'grid_prevent_empty_spots': True, 'n_rows': -1.0, 'save_txt': False, 'save_log_fn': '', 'save_images_before_face_restoration': False, 'save_images_before_highres_fix': False, 'save_images_before_color_correction': False, 'save_mask': False, 'save_mask_composite': False, 'jpeg_quality': 85.0, 'webp_lossless': False, 'img_max_size_mp': 200.0, 'use_original_name_batch': True, 'use_upscaler_name_as_suffix': True, 'save_selected_only': True, 'save_init_img': False, 'save_to_dirs': False, 'grid_save_to_dirs': False, 'use_save_to_dirs_for_ui': False, 'directories_filename_pattern': '[date]', 'directories_max_prompt_words': 8.0, 'outdir_samples': '', 'outdir_txt2img_samples': 'outputs/text', 'outdir_img2img_samples': 'outputs/image', 'outdir_extras_samples': 'outputs/extras', 'outdir_grids': '', 'outdir_txt2img_grids': 'outputs/grids', 'outdir_img2img_grids': 'outputs/grids', 'outdir_save': 'outputs/save', 'outdir_init_images': 'outputs/init-images', 'memmon_poll_rate': 2.0, 'precision': 'Autocast', 'cuda_dtype': 'FP16', 'no_half': False, 'no_half_vae': False, 'upcast_sampling': False, 'disable_nan_check': True, 'rollback_vae': False, 'opt_channelslast': False, 'cudnn_benchmark': False, 'cuda_allow_tf32': True, 'cuda_allow_tf16_reduced': True, 'cuda_compile': False, 'cuda_compile_mode': 'none', 'cuda_compile_verbose': False, 'cuda_compile_errors': True, 'disable_gc': True, 'upscaler_for_img2img': 'None', 'realesrgan_enabled_models': ['R-ESRGAN 4x+', 'R-ESRGAN 4x+ Anime6B'], 'ESRGAN_tile': 192.0, 'ESRGAN_tile_overlap': 8.0, 'SCUNET_tile': 256.0, 'SCUNET_tile_overlap': 8.0, 'use_old_hires_fix_width_height': False, 'dont_fix_second_order_samplers_schedule': False, 'face_restoration_model': 'CodeFormer', 'code_former_weight': 0.2, 'face_restoration_unload': False, 'unload_models_when_training': False, 'pin_memory': True, 'save_optimizer_state': False, 'save_training_settings_to_txt': False, 'dataset_filename_word_regex': '', 'dataset_filename_join_string': ' ', 'embeddings_templates_dir': '/home/vlado/dev/automatic/train/templates', 'training_image_repeats_per_epoch': 10.0, 'training_write_csv_every': 0.0, 'training_enable_tensorboard': False, 'training_tensorboard_save_images': False, 'training_tensorboard_flush_every': 120.0, 'interrogate_keep_models_in_memory': False, 'interrogate_return_ranks': True, 'interrogate_clip_num_beams': 1.0, 'interrogate_clip_min_length': 32.0, 'interrogate_clip_max_length': 192.0, 'interrogate_clip_dict_limit': 2048.0, 'interrogate_clip_skip_categories': ['artists', 'movements', 'flavors'], 'interrogate_deepbooru_score_threshold': 0.65, 'deepbooru_sort_alpha': False, 'deepbooru_use_spaces': False, 'deepbooru_escape': True, 'deepbooru_filter_tags': '', 'extra_networks_default_view': 'cards', 'extra_networks_default_multiplier': 1.0, 'extra_networks_card_width': 0.0, 'extra_networks_card_height': 0.0, 'extra_networks_add_text_separator': ' ', 'sd_hypernetwork': 'None', 'gradio_theme': 'black-orange', 'return_grid': True, 'return_mask': False, 'return_mask_composite': False, 'disable_weights_auto_swap': True, 'send_seed': True, 'send_size': True, 'font': '', 'keyedit_precision_attention': 0.1, 'keyedit_precision_extra': 0.05, 'keyedit_delimiters': '.,\\/!?%^*;:{}=`~()', 'quicksettings': 'sd_model_checkpoint', 'hidden_tabs': [], 'ui_tab_reorder': 'From Text, From Image, Process Image', 'ui_scripts_reorder': 'Enable Dynamic Thresholding, ControlNet', 'ui_reorder': 'inpaint, sampler, checkboxes, hires_fix, dimensions, cfg, seed, batch, override_settings, scripts', 'ui_extra_networks_tab_reorder': '', 'show_progressbar': True, 'live_previews_enable': True, 'show_progress_grid': True, 'notification_audio_enable': False, 'notification_audio_path': 'html/notification.mp3', 'show_progress_every_n_steps': 1.0, 'show_progress_type': 'Approx NN', 'live_preview_content': 'Combined', 'live_preview_refresh_period': 250.0, 'show_samplers': ['Euler a', 'UniPC', 'DDIM', 'DPM++ SDE', 'DPM++ SDE', 'DPM2 Karras', 'DPM++ 2M Karras'], 'fallback_sampler': 'Euler a', 'xyz_fallback_sampler': 'None', 'eta_ancestral': 1.0, 'eta_ddim': 0.0, 'ddim_discretize': 'uniform', 's_churn': 0.0, 's_min_uncond': 0.0, 's_tmin': 0.0, 's_noise': 1.0, 'eta_noise_seed_delta': 0.0, 'always_discard_next_to_last_sigma': False, 'uni_pc_variant': 'bh1', 'uni_pc_skip_type': 'time_uniform', 'uni_pc_order': 3.0, 'uni_pc_lower_order_final': True, 'token_merging': False, 'token_merging_ratio': 0.5, 'token_merging_hr_only': True, 'token_merging_ratio_hr': 0.5, 'token_merging_random': False, 'token_merging_merge_attention': True, 'token_merging_merge_cross_attention': False, 'token_merging_merge_mlp': False, 'token_merging_maximum_down_sampling': 1.0, 'token_merging_stride_x': 2.0, 'token_merging_stride_y': 2.0, 'postprocessing_enable_in_main_ui': [], 'postprocessing_operation_order': [], 'upscaling_max_images_in_cache': 5.0, 'disabled_extensions': [], 'disable_all_extensions': 'none', 'sd_checkpoint_hash': '6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa', 'sd_lyco': 'None', 'sd_lora': 'None'} -2023-05-15 16:23:43,632 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | train using lycoris network -2023-05-15 16:23:45,204 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 26.39, 'used': 1.01, 'total': 27.41} gpu current: {'free': 10.42, 'used': 1.57, 'total': 12.0} gpu peak: {'active': 0.0, 'allocated': 0.0, 'reserved': 0.0} -2023-05-15 16:23:45,205 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 16:23:45,329 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing input images: 40 -2023-05-15 16:23:45,330 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processed folder exists: /tmp/train/test -2023-05-15 16:23:45,331 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing current step: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 16:23:45,331 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing concept: person -2023-05-15 16:23:45,332 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing output folder: /tmp/train/test/10_person -2023-05-15 16:23:45,337 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:23:45,337 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:23:45,337 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:23:45,337 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:23:45,337 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:23:45,368 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:46,237 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 16:23:46,244 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:46,409 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 187 -2023-05-15 16:23:46,417 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:23:46,417 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102947_Instagram.jpg => /tmp/train/test/10_person/001-original-Screenshot_20221225_102947_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:23:46,420 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:23:46,420 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06@' -2023-05-15 16:23:46,420 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:23:46,420 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:23:46,420 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:23:46,446 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:47,216 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 16:23:47,222 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:47,359 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 291 -2023-05-15 16:23:47,366 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:23:47,366 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102956_Instagram.jpg => /tmp/train/test/10_person/002-original-Screenshot_20221225_102956_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:23:47,370 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:23:47,370 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:23:47,370 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:23:47,370 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:23:47,370 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:23:47,397 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:48,185 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 175 -2023-05-15 16:23:48,192 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:48,326 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 185 -2023-05-15 16:23:48,333 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:23:48,333 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103005_Instagram.jpg => /tmp/train/test/10_person/003-original-Screenshot_20221225_103005_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:23:48,336 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:23:48,336 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xff' -2023-05-15 16:23:48,336 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:23:48,336 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:23:48,336 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:23:48,364 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:49,098 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 16:23:49,104 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:49,241 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 262 -2023-05-15 16:23:49,249 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:23:49,249 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103018_Instagram.jpg => /tmp/train/test/10_person/004-original-Screenshot_20221225_103018_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:23:49,252 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:23:49,252 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06X' -2023-05-15 16:23:49,252 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:23:49,252 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:23:49,252 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:23:49,276 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:50,010 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 16:23:50,017 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:50,154 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 227 -2023-05-15 16:23:50,161 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:23:50,161 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103034_Instagram.jpg => /tmp/train/test/10_person/005-original-Screenshot_20221225_103034_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:23:50,165 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:23:50,165 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:23:50,165 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:23:50,165 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:23:50,165 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:23:50,188 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:50,981 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:23:50,986 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:51,118 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 497 -2023-05-15 16:23:51,125 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:23:51,125 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103043_Instagram.jpg => /tmp/train/test/10_person/006-original-Screenshot_20221225_103043_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:23:51,128 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:23:51,128 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:23:51,128 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:23:51,128 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:23:51,128 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:23:51,151 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:51,883 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 16:23:51,889 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:52,021 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 16:23:52,028 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:23:52,028 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103058_Instagram.jpg => /tmp/train/test/10_person/007-original-Screenshot_20221225_103058_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:23:52,032 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:23:52,032 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:23:52,032 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:23:52,032 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:23:52,032 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:23:52,056 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:52,894 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 16:23:52,900 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:53,037 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 251 -2023-05-15 16:23:53,045 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:23:53,045 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103106_Instagram.jpg => /tmp/train/test/10_person/008-original-Screenshot_20221225_103106_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:23:53,048 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:23:53,048 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:23:53,048 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:23:53,048 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:23:53,048 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:23:53,069 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:53,873 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:23:53,879 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:54,017 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 216 -2023-05-15 16:23:54,024 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:23:54,025 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103115_Instagram.jpg => /tmp/train/test/10_person/009-original-Screenshot_20221225_103115_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:23:54,028 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:23:54,028 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xc8' -2023-05-15 16:23:54,028 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:23:54,028 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:23:54,028 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:23:54,054 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:54,986 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 140 -2023-05-15 16:23:54,992 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:55,159 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 263 -2023-05-15 16:23:55,167 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:23:55,167 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103128_Instagram.jpg => /tmp/train/test/10_person/010-original-Screenshot_20221225_103128_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:23:55,170 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:23:55,170 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xfb' -2023-05-15 16:23:55,170 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:23:55,170 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:23:55,170 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:23:55,196 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:56,063 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 16:23:56,069 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:56,217 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 192 -2023-05-15 16:23:56,224 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:23:56,225 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103144_Instagram.jpg => /tmp/train/test/10_person/011-original-Screenshot_20221225_103144_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:23:56,228 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 16:23:56,228 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xb6' -2023-05-15 16:23:56,228 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:23:56,228 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:23:56,228 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:23:56,253 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:57,185 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 179 -2023-05-15 16:23:57,191 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:57,345 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 348 -2023-05-15 16:23:57,353 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:23:57,353 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103159_Instagram.jpg => /tmp/train/test/10_person/012-original-Screenshot_20221225_103159_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:23:57,356 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:23:57,356 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 16:23:57,357 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:23:57,357 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:23:57,357 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:23:57,381 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:58,177 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 16:23:58,183 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:58,327 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 299 -2023-05-15 16:23:58,334 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:23:58,335 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103207_Instagram.jpg => /tmp/train/test/10_person/013-original-Screenshot_20221225_103207_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:23:58,339 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:23:58,339 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:23:58,339 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:23:58,339 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:23:58,339 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:23:58,367 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:59,195 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 176 -2023-05-15 16:23:59,201 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:23:59,362 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 343 -2023-05-15 16:23:59,370 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:23:59,370 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103222_Instagram.jpg => /tmp/train/test/10_person/014-original-Screenshot_20221225_103222_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:23:59,373 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:23:59,373 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 16:23:59,373 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:23:59,373 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:23:59,373 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:23:59,397 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:00,441 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 189 -2023-05-15 16:24:00,447 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:00,583 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 311 -2023-05-15 16:24:00,591 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:00,591 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103233_Instagram.jpg => /tmp/train/test/10_person/015-original-Screenshot_20221225_103233_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:00,594 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:00,594 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:24:00,594 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:00,594 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:00,594 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:00,619 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:01,570 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 16:24:01,576 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:01,733 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 366 -2023-05-15 16:24:01,740 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:01,740 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103240_Instagram.jpg => /tmp/train/test/10_person/016-original-Screenshot_20221225_103240_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:01,743 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 16:24:01,743 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x06' -2023-05-15 16:24:01,743 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:01,743 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:01,743 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:01,770 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:02,708 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 16:24:02,715 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:02,880 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 712 -2023-05-15 16:24:02,888 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:02,888 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103256_Instagram.jpg => /tmp/train/test/10_person/017-original-Screenshot_20221225_103256_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:02,891 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:02,891 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:24:02,891 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:02,891 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:02,891 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:02,912 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:03,952 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 16:24:03,958 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:04,113 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 169 -2023-05-15 16:24:04,121 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:04,121 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103313_Instagram.jpg => /tmp/train/test/10_person/018-original-Screenshot_20221225_103313_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:04,124 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:04,124 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:24:04,124 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:04,124 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:04,124 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:04,148 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:05,002 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 16:24:05,008 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:05,164 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 253 -2023-05-15 16:24:05,171 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:05,171 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103321_Instagram.jpg => /tmp/train/test/10_person/019-original-Screenshot_20221225_103321_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:05,175 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:05,175 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:24:05,175 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:05,175 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:05,175 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:05,200 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:06,053 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 16:24:06,059 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:06,211 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 295 -2023-05-15 16:24:06,218 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:06,218 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103335_Instagram.jpg => /tmp/train/test/10_person/020-original-Screenshot_20221225_103335_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:06,221 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:06,221 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:24:06,221 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:06,221 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:06,221 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:06,246 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:07,250 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 165 -2023-05-15 16:24:07,256 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:07,424 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 252 -2023-05-15 16:24:07,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:07,431 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103345_Instagram.jpg => /tmp/train/test/10_person/021-original-Screenshot_20221225_103345_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:07,434 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:07,434 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06c' -2023-05-15 16:24:07,434 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:07,434 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:07,434 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:07,458 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:08,427 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 16:24:08,433 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:08,571 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 16:24:08,578 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:08,578 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103406_Instagram.jpg => /tmp/train/test/10_person/022-original-Screenshot_20221225_103406_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:08,581 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:08,581 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 16:24:08,581 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:08,581 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:08,581 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:08,604 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:09,485 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 16:24:09,491 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:09,632 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 237 -2023-05-15 16:24:09,640 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:09,640 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103427_Instagram.jpg => /tmp/train/test/10_person/023-original-Screenshot_20221225_103427_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:09,646 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:09,646 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 16:24:09,646 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:09,646 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:09,646 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:09,671 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:10,467 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 16:24:10,473 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:10,612 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 308 -2023-05-15 16:24:10,619 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:10,619 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103433_Instagram.jpg => /tmp/train/test/10_person/024-original-Screenshot_20221225_103433_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:10,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:10,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x95' -2023-05-15 16:24:10,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:10,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:10,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:10,641 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:11,803 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 16:24:11,808 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:11,959 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 16:24:11,965 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:11,965 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103445_Instagram.jpg => /tmp/train/test/10_person/025-original-Screenshot_20221225_103445_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:11,969 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:11,969 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x93' -2023-05-15 16:24:11,969 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:11,969 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:11,969 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:11,990 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:13,025 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 157 -2023-05-15 16:24:13,031 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:13,189 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 434 -2023-05-15 16:24:13,197 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:13,197 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103500_Instagram.jpg => /tmp/train/test/10_person/026-original-Screenshot_20221225_103500_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:13,200 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:13,200 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x8b' -2023-05-15 16:24:13,200 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:13,200 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:13,200 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:13,223 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:14,119 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 16:24:14,125 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:14,289 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 457 -2023-05-15 16:24:14,296 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:14,296 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103507_Instagram.jpg => /tmp/train/test/10_person/027-original-Screenshot_20221225_103507_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:14,300 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:14,300 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:24:14,300 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:14,300 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:14,300 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:14,318 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:15,435 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 16:24:15,439 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:15,601 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 362 -2023-05-15 16:24:15,607 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:15,607 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103522_Instagram.jpg => /tmp/train/test/10_person/028-original-Screenshot_20221225_103522_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:15,611 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9c' -2023-05-15 16:24:15,611 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:24:15,611 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:15,611 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:15,611 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:15,632 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:16,447 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 16:24:16,452 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:16,617 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 16:24:16,624 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:16,624 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103530_Instagram.jpg => /tmp/train/test/10_person/029-original-Screenshot_20221225_103530_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:16,628 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:16,628 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:24:16,628 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:16,628 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:16,628 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:16,648 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:17,550 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 154 -2023-05-15 16:24:17,555 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:17,718 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 113 -2023-05-15 16:24:17,725 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:17,725 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103536_Instagram.jpg => /tmp/train/test/10_person/030-original-Screenshot_20221225_103536_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:17,728 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x8a' -2023-05-15 16:24:17,728 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:24:17,728 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:17,728 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:17,728 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:17,750 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:18,732 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 16:24:18,737 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:18,906 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 16:24:18,913 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:18,913 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103543_Instagram.jpg => /tmp/train/test/10_person/031-original-Screenshot_20221225_103543_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:18,917 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:18,917 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:24:18,917 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:18,917 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:18,917 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:18,937 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:20,033 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 16:24:20,038 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:20,204 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 236 -2023-05-15 16:24:20,211 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:20,211 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103553_Instagram.jpg => /tmp/train/test/10_person/032-original-Screenshot_20221225_103553_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:20,214 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:20,215 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:24:20,215 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:20,215 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:20,215 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:20,234 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:21,306 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 174 -2023-05-15 16:24:21,311 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:21,462 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 204 -2023-05-15 16:24:21,469 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:21,469 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103559_Instagram.jpg => /tmp/train/test/10_person/033-original-Screenshot_20221225_103559_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:21,472 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:21,472 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 16:24:21,472 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:21,472 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:21,472 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:21,492 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:22,511 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 16:24:22,516 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:22,651 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 628 -2023-05-15 16:24:22,658 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:22,658 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103613_Instagram.jpg => /tmp/train/test/10_person/034-original-Screenshot_20221225_103613_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:22,662 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:22,662 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 16:24:22,662 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:22,662 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:22,662 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:22,681 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:23,471 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 167 -2023-05-15 16:24:23,476 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:23,608 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 563 -2023-05-15 16:24:23,615 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:23,615 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103621_Instagram.jpg => /tmp/train/test/10_person/035-original-Screenshot_20221225_103621_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:23,618 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:23,619 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9d' -2023-05-15 16:24:23,619 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:23,619 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:23,619 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:23,641 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:24,380 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:24:24,386 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:24,524 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 512 -2023-05-15 16:24:24,531 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:24,531 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103629_Instagram.jpg => /tmp/train/test/10_person/036-original-Screenshot_20221225_103629_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:24,534 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:24,534 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:24:24,534 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:24,534 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:24,534 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:24,555 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:25,312 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 16:24:25,317 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:25,447 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 160 -2023-05-15 16:24:25,454 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:25,454 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103638_Instagram.jpg => /tmp/train/test/10_person/037-original-Screenshot_20221225_103638_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:25,457 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:25,457 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x04\xb0' -2023-05-15 16:24:25,457 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:25,457 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:25,457 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:25,476 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:26,211 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 168 -2023-05-15 16:24:26,215 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:26,344 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 908 -2023-05-15 16:24:26,350 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:26,350 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103649_Instagram.jpg => /tmp/train/test/10_person/038-original-Screenshot_20221225_103649_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:26,353 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:26,353 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 16:24:26,353 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:26,353 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:26,353 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:26,375 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:27,146 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:24:27,151 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:27,283 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 289 -2023-05-15 16:24:27,290 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:27,290 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103656_Instagram.jpg => /tmp/train/test/10_person/039-original-Screenshot_20221225_103656_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:27,293 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:24:27,293 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x15' -2023-05-15 16:24:27,293 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:24:27,293 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:24:27,293 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:24:27,319 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:28,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 16:24:28,081 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:24:28,213 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 16:24:28,221 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:24:28,221 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103727_Instagram.jpg => /tmp/train/test/10_person/040-original-Screenshot_20221225_103727_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:24:28,223 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | input datasets ['/tmp/train/test/10_person'] -2023-05-15 16:24:28,226 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTPS connection (1): huggingface.co:443 -2023-05-15 16:24:29,334 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /stabilityai/sd-vae-ft-mse/resolve/main/config.json HTTP/1.1" 200 0 -2023-05-15 16:24:37,632 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps result: {'inputs': 40, 'outputs': {'original': 40, 'total': 40}, 'metadata': '/tmp/train/test/test.json'} -2023-05-15 16:24:37,746 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 22.56, 'used': 4.85, 'total': 27.41} gpu current: {'free': 9.7, 'used': 2.3, 'total': 12.0} gpu peak: {'active': 0.95, 'allocated': 0.95, 'reserved': 1.11} -2023-05-15 16:24:37,748 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | lycoris options: {'bucket_no_upscale': False, 'bucket_reso_steps': 64, 'cache_latents': True, 'caption_dropout_every_n_epochs': None, 'caption_dropout_rate': 0.0, 'caption_extension': '.txt', 'caption_extention': '.txt', 'caption_tag_dropout_rate': 0.0, 'clip_skip': None, 'color_aug': False, 'dataset_repeats': 1, 'debug_dataset': False, 'enable_bucket': False, 'face_crop_aug_range': None, 'flip_aug': False, 'full_fp16': False, 'gradient_accumulation_steps': 1, 'gradient_checkpointing': False, 'in_json': '/tmp/train/test/test.json', 'keep_tokens': None, 'learning_rate': 0.0001, 'log_prefix': None, 'logging_dir': None, 'lr_scheduler_num_cycles': 1, 'lr_scheduler_power': 1, 'lr_scheduler': 'cosine', 'lr_warmup_steps': 0, 'max_bucket_reso': 1024, 'max_data_loader_n_workers': 8, 'max_grad_norm': 0.0, 'max_token_length': None, 'max_train_epochs': None, 'max_train_steps': 2500, 'mem_eff_attn': False, 'min_bucket_reso': 256, 'mixed_precision': 'fp16', 'network_alpha': 20, 'network_args': None, 'network_dim': 40, 'network_module': 'lycoris.kohya', 'network_train_text_encoder_only': False, 'network_train_unet_only': False, 'network_weights': None, 'no_metadata': False, 'output_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'output_name': 'test', 'persistent_data_loader_workers': False, 'pretrained_model_name_or_path': '/home/vlado/dev/automatic/models/v1-5-pruned-emaonly.safetensors', 'prior_loss_weight': 1.0, 'random_crop': False, 'reg_data_dir': None, 'resolution': '512,512', 'resume': None, 'save_every_n_epochs': None, 'save_last_n_epochs_state': None, 'save_last_n_epochs': None, 'save_model_as': 'ckpt', 'save_n_epoch_ratio': None, 'save_precision': 'fp16', 'save_state': False, 'seed': 42, 'shuffle_caption': False, 'text_encoder_lr': 5e-05, 'train_batch_size': 1, 'train_data_dir': '/tmp/train/test', 'training_comment': 'mood-magic', 'unet_lr': 0.0001, 'use_8bit_adam': False, 'v_parameterization': False, 'v2': False, 'vae': None, 'xformers': False} -2023-05-15 16:24:38,775 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/vocab.json HTTP/1.1" 200 0 -2023-05-15 16:24:43,594 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/config.json HTTP/1.1" 200 0 -2023-05-15 16:24:44,743 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/model.safetensors HTTP/1.1" 404 0 -2023-05-15 16:24:45,915 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/model.safetensors.index.json HTTP/1.1" 404 0 -2023-05-15 16:24:47,069 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/pytorch_model.bin HTTP/1.1" 302 0 -2023-05-15 16:27:19,054 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:19,058 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 16:27:19,059 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:19,062 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:27:19,062 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:19,092 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:27:19,093 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:19,096 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 16:27:19,096 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 16:27:19,098 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:19,101 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:27:19,102 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:19,130 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:27:19,145 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | args: {'type': 'lycoris', 'model': '/home/vlado/dev/automatic/models/v1-5-pruned-emaonly.safetensors', 'name': 'test', 'tag': 'person', 'input': '/home/vlado/generative/Input/mia/', 'output': '', 'process': 'original,interrogate,resize,square', 'gradient': 1, 'steps': 2500, 'batch': 1, 'lr': 0.0001, 'dim': 40, 'repeats': 10, 'alpha': 0, 'overwrite': False, 'debug': True, 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'process_dir': '/tmp/train/test'} -2023-05-15 16:27:19,146 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | server flags: {'error': 500, 'reason': 'Internal Server Error', 'url': 'http://127.0.0.1:7860/sdapi/v1/cmd-flags'} -2023-05-15 16:27:19,147 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | server options: {'sd_model_checkpoint': 'v1-5-pruned-emaonly.safetensors [6ce0161689]', 'sd_checkpoint_cache': 0.0, 'sd_vae_checkpoint_cache': 0.0, 'sd_vae': 'Automatic', 'stream_load': False, 'model_reuse_dict': False, 'inpainting_mask_weight': 1.0, 'initial_noise_multiplier': 1.0, 'img2img_color_correction': False, 'img2img_fix_steps': False, 'img2img_background_color': '#ffffff', 'enable_quantization': True, 'comma_padding_backtrack': 20.0, 'CLIP_stop_at_last_layers': 1.0, 'upcast_attn': False, 'cross_attention_optimization': 'Scaled-Dot-Product', 'cross_attention_options': [], 'sub_quad_q_chunk_size': 512.0, 'sub_quad_kv_chunk_size': 512.0, 'sub_quad_chunk_threshold': 80.0, 'always_batch_cond_uncond': False, 'temp_dir': '', 'clean_temp_dir_at_start': True, 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'vae_dir': '/home/vlado/dev/automatic/models/VAE', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'hypernetwork_dir': '/home/vlado/dev/automatic/models/hypernetworks', 'codeformer_models_path': '/home/vlado/dev/automatic/models/Codeformer', 'gfpgan_models_path': '/home/vlado/dev/automatic/models/GFPGAN', 'esrgan_models_path': '/home/vlado/dev/automatic/models/ESRGAN', 'bsrgan_models_path': '/home/vlado/dev/automatic/models/BSRGAN', 'realesrgan_models_path': '/home/vlado/dev/automatic/models/RealESRGAN', 'scunet_models_path': '/home/vlado/dev/automatic/models/ScuNET', 'swinir_models_path': '/home/vlado/dev/automatic/models/SwinIR', 'ldsr_models_path': '/home/vlado/dev/automatic/models/LDSR', 'clip_models_path': '/home/vlado/dev/automatic/models/CLIP', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'styles_dir': 'styles.csv', 'samples_save': True, 'samples_format': 'jpg', 'samples_filename_pattern': '', 'save_images_add_number': True, 'grid_save': True, 'grid_format': 'jpg', 'grid_extended_filename': True, 'grid_only_if_multiple': True, 'grid_prevent_empty_spots': True, 'n_rows': -1.0, 'save_txt': False, 'save_log_fn': '', 'save_images_before_face_restoration': False, 'save_images_before_highres_fix': False, 'save_images_before_color_correction': False, 'save_mask': False, 'save_mask_composite': False, 'jpeg_quality': 85.0, 'webp_lossless': False, 'img_max_size_mp': 200.0, 'use_original_name_batch': True, 'use_upscaler_name_as_suffix': True, 'save_selected_only': True, 'save_init_img': False, 'save_to_dirs': False, 'grid_save_to_dirs': False, 'use_save_to_dirs_for_ui': False, 'directories_filename_pattern': '[date]', 'directories_max_prompt_words': 8.0, 'outdir_samples': '', 'outdir_txt2img_samples': 'outputs/text', 'outdir_img2img_samples': 'outputs/image', 'outdir_extras_samples': 'outputs/extras', 'outdir_grids': '', 'outdir_txt2img_grids': 'outputs/grids', 'outdir_img2img_grids': 'outputs/grids', 'outdir_save': 'outputs/save', 'outdir_init_images': 'outputs/init-images', 'memmon_poll_rate': 2.0, 'precision': 'Autocast', 'cuda_dtype': 'FP16', 'no_half': False, 'no_half_vae': False, 'upcast_sampling': False, 'disable_nan_check': True, 'rollback_vae': False, 'opt_channelslast': False, 'cudnn_benchmark': False, 'cuda_allow_tf32': True, 'cuda_allow_tf16_reduced': True, 'cuda_compile': False, 'cuda_compile_mode': 'none', 'cuda_compile_verbose': False, 'cuda_compile_errors': True, 'disable_gc': True, 'upscaler_for_img2img': 'None', 'realesrgan_enabled_models': ['R-ESRGAN 4x+', 'R-ESRGAN 4x+ Anime6B'], 'ESRGAN_tile': 192.0, 'ESRGAN_tile_overlap': 8.0, 'SCUNET_tile': 256.0, 'SCUNET_tile_overlap': 8.0, 'use_old_hires_fix_width_height': False, 'dont_fix_second_order_samplers_schedule': False, 'face_restoration_model': 'CodeFormer', 'code_former_weight': 0.2, 'face_restoration_unload': False, 'unload_models_when_training': False, 'pin_memory': True, 'save_optimizer_state': False, 'save_training_settings_to_txt': False, 'dataset_filename_word_regex': '', 'dataset_filename_join_string': ' ', 'embeddings_templates_dir': '/home/vlado/dev/automatic/train/templates', 'training_image_repeats_per_epoch': 10.0, 'training_write_csv_every': 0.0, 'training_enable_tensorboard': False, 'training_tensorboard_save_images': False, 'training_tensorboard_flush_every': 120.0, 'interrogate_keep_models_in_memory': False, 'interrogate_return_ranks': True, 'interrogate_clip_num_beams': 1.0, 'interrogate_clip_min_length': 32.0, 'interrogate_clip_max_length': 192.0, 'interrogate_clip_dict_limit': 2048.0, 'interrogate_clip_skip_categories': ['artists', 'movements', 'flavors'], 'interrogate_deepbooru_score_threshold': 0.65, 'deepbooru_sort_alpha': False, 'deepbooru_use_spaces': False, 'deepbooru_escape': True, 'deepbooru_filter_tags': '', 'extra_networks_default_view': 'cards', 'extra_networks_default_multiplier': 1.0, 'extra_networks_card_width': 0.0, 'extra_networks_card_height': 0.0, 'extra_networks_add_text_separator': ' ', 'sd_hypernetwork': 'None', 'gradio_theme': 'black-orange', 'return_grid': True, 'return_mask': False, 'return_mask_composite': False, 'disable_weights_auto_swap': True, 'send_seed': True, 'send_size': True, 'font': '', 'keyedit_precision_attention': 0.1, 'keyedit_precision_extra': 0.05, 'keyedit_delimiters': '.,\\/!?%^*;:{}=`~()', 'quicksettings': 'sd_model_checkpoint', 'hidden_tabs': [], 'ui_tab_reorder': 'From Text, From Image, Process Image', 'ui_scripts_reorder': 'Enable Dynamic Thresholding, ControlNet', 'ui_reorder': 'inpaint, sampler, checkboxes, hires_fix, dimensions, cfg, seed, batch, override_settings, scripts', 'ui_extra_networks_tab_reorder': '', 'show_progressbar': True, 'live_previews_enable': True, 'show_progress_grid': True, 'notification_audio_enable': False, 'notification_audio_path': 'html/notification.mp3', 'show_progress_every_n_steps': 1.0, 'show_progress_type': 'Approx NN', 'live_preview_content': 'Combined', 'live_preview_refresh_period': 250.0, 'show_samplers': ['Euler a', 'UniPC', 'DDIM', 'DPM++ SDE', 'DPM++ SDE', 'DPM2 Karras', 'DPM++ 2M Karras'], 'fallback_sampler': 'Euler a', 'xyz_fallback_sampler': 'None', 'eta_ancestral': 1.0, 'eta_ddim': 0.0, 'ddim_discretize': 'uniform', 's_churn': 0.0, 's_min_uncond': 0.0, 's_tmin': 0.0, 's_noise': 1.0, 'eta_noise_seed_delta': 0.0, 'always_discard_next_to_last_sigma': False, 'uni_pc_variant': 'bh1', 'uni_pc_skip_type': 'time_uniform', 'uni_pc_order': 3.0, 'uni_pc_lower_order_final': True, 'token_merging': False, 'token_merging_ratio': 0.5, 'token_merging_hr_only': True, 'token_merging_ratio_hr': 0.5, 'token_merging_random': False, 'token_merging_merge_attention': True, 'token_merging_merge_cross_attention': False, 'token_merging_merge_mlp': False, 'token_merging_maximum_down_sampling': 1.0, 'token_merging_stride_x': 2.0, 'token_merging_stride_y': 2.0, 'postprocessing_enable_in_main_ui': [], 'postprocessing_operation_order': [], 'upscaling_max_images_in_cache': 5.0, 'disabled_extensions': [], 'disable_all_extensions': 'none', 'sd_checkpoint_hash': '6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa', 'sd_lyco': 'None', 'sd_lora': 'None'} -2023-05-15 16:27:19,154 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | train using lycoris network -2023-05-15 16:27:20,927 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 26.4, 'used': 1.01, 'total': 27.41} gpu current: {'free': 10.42, 'used': 1.57, 'total': 12.0} gpu peak: {'active': 0.0, 'allocated': 0.0, 'reserved': 0.0} -2023-05-15 16:27:20,928 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 16:27:21,055 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing input images: 40 -2023-05-15 16:27:21,055 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processed folder exists: /tmp/train/test -2023-05-15 16:27:21,056 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing current step: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 16:27:21,056 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing concept: person -2023-05-15 16:27:21,057 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing output folder: /tmp/train/test/10_person -2023-05-15 16:27:21,062 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:21,062 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:27:21,062 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:21,062 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:21,062 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:21,092 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:22,029 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 16:27:22,036 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:22,196 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 187 -2023-05-15 16:27:22,204 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:22,204 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102947_Instagram.jpg => /tmp/train/test/10_person/001-original-Screenshot_20221225_102947_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:22,207 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:22,208 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06@' -2023-05-15 16:27:22,208 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:22,208 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:22,208 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:22,235 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:23,007 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 16:27:23,013 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:23,151 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 291 -2023-05-15 16:27:23,160 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:23,160 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102956_Instagram.jpg => /tmp/train/test/10_person/002-original-Screenshot_20221225_102956_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:23,163 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:23,163 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:27:23,163 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:23,163 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:23,163 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:23,190 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:24,005 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 175 -2023-05-15 16:27:24,012 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:24,144 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 185 -2023-05-15 16:27:24,151 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:24,151 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103005_Instagram.jpg => /tmp/train/test/10_person/003-original-Screenshot_20221225_103005_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:24,154 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:24,154 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xff' -2023-05-15 16:27:24,154 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:24,154 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:24,154 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:24,181 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:24,923 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 16:27:24,929 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:25,064 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 262 -2023-05-15 16:27:25,071 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:25,071 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103018_Instagram.jpg => /tmp/train/test/10_person/004-original-Screenshot_20221225_103018_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:25,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:25,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06X' -2023-05-15 16:27:25,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:25,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:25,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:25,098 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:25,851 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 16:27:25,857 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:25,991 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 227 -2023-05-15 16:27:25,998 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:25,998 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103034_Instagram.jpg => /tmp/train/test/10_person/005-original-Screenshot_20221225_103034_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:26,001 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:26,001 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:27:26,001 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:26,001 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:26,001 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:26,024 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:26,763 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:27:26,768 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:26,909 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 497 -2023-05-15 16:27:26,917 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:26,917 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103043_Instagram.jpg => /tmp/train/test/10_person/006-original-Screenshot_20221225_103043_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:26,920 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:26,920 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:27:26,920 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:26,920 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:26,920 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:26,943 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:27,703 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 16:27:27,709 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:27,849 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 16:27:27,856 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:27,856 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103058_Instagram.jpg => /tmp/train/test/10_person/007-original-Screenshot_20221225_103058_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:27,860 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:27,860 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:27:27,860 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:27,860 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:27,860 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:27,884 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:28,630 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 16:27:28,636 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:28,776 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 251 -2023-05-15 16:27:28,783 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:28,783 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103106_Instagram.jpg => /tmp/train/test/10_person/008-original-Screenshot_20221225_103106_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:28,787 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:28,787 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:27:28,787 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:28,787 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:28,787 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:28,807 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:29,581 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:27:29,587 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:29,719 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 216 -2023-05-15 16:27:29,727 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:29,727 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103115_Instagram.jpg => /tmp/train/test/10_person/009-original-Screenshot_20221225_103115_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:29,730 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:29,730 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xc8' -2023-05-15 16:27:29,730 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:29,730 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:29,730 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:29,757 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:30,501 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 140 -2023-05-15 16:27:30,507 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:30,641 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 263 -2023-05-15 16:27:30,649 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:30,649 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103128_Instagram.jpg => /tmp/train/test/10_person/010-original-Screenshot_20221225_103128_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:30,652 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:30,652 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xfb' -2023-05-15 16:27:30,652 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:30,652 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:30,652 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:30,678 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:31,477 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 16:27:31,483 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:31,620 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 192 -2023-05-15 16:27:31,628 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:31,628 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103144_Instagram.jpg => /tmp/train/test/10_person/011-original-Screenshot_20221225_103144_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:31,631 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 16:27:31,631 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xb6' -2023-05-15 16:27:31,632 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:31,632 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:31,632 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:31,656 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:32,452 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 179 -2023-05-15 16:27:32,458 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:32,590 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 348 -2023-05-15 16:27:32,598 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:32,598 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103159_Instagram.jpg => /tmp/train/test/10_person/012-original-Screenshot_20221225_103159_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:32,604 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:32,604 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 16:27:32,604 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:32,604 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:32,604 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:32,632 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:33,418 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 16:27:33,424 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:33,565 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 299 -2023-05-15 16:27:33,572 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:33,573 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103207_Instagram.jpg => /tmp/train/test/10_person/013-original-Screenshot_20221225_103207_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:33,576 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:33,576 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:27:33,576 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:33,576 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:33,576 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:33,600 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:34,400 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 176 -2023-05-15 16:27:34,406 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:34,546 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 343 -2023-05-15 16:27:34,554 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:34,554 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103222_Instagram.jpg => /tmp/train/test/10_person/014-original-Screenshot_20221225_103222_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:34,557 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:34,557 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 16:27:34,557 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:34,557 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:34,557 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:34,581 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:35,362 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 189 -2023-05-15 16:27:35,367 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:35,501 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 311 -2023-05-15 16:27:35,508 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:35,508 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103233_Instagram.jpg => /tmp/train/test/10_person/015-original-Screenshot_20221225_103233_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:35,512 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:35,512 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:27:35,512 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:35,512 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:35,512 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:35,535 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:36,322 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 16:27:36,328 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:36,470 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 366 -2023-05-15 16:27:36,478 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:36,478 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103240_Instagram.jpg => /tmp/train/test/10_person/016-original-Screenshot_20221225_103240_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:36,481 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 16:27:36,481 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x06' -2023-05-15 16:27:36,481 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:36,481 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:36,481 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:36,507 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:37,310 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 16:27:37,317 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:37,463 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 712 -2023-05-15 16:27:37,471 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:37,471 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103256_Instagram.jpg => /tmp/train/test/10_person/017-original-Screenshot_20221225_103256_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:37,475 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:37,475 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:27:37,475 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:37,475 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:37,475 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:37,496 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:38,271 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 16:27:38,277 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:38,421 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 169 -2023-05-15 16:27:38,428 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:38,428 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103313_Instagram.jpg => /tmp/train/test/10_person/018-original-Screenshot_20221225_103313_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:38,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:38,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:27:38,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:38,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:38,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:38,455 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:39,254 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 16:27:39,259 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:39,396 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 253 -2023-05-15 16:27:39,403 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:39,404 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103321_Instagram.jpg => /tmp/train/test/10_person/019-original-Screenshot_20221225_103321_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:39,407 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:39,407 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:27:39,407 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:39,407 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:39,407 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:39,430 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:40,204 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 16:27:40,209 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:40,341 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 295 -2023-05-15 16:27:40,349 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:40,349 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103335_Instagram.jpg => /tmp/train/test/10_person/020-original-Screenshot_20221225_103335_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:40,352 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:40,352 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:27:40,352 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:40,352 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:40,352 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:40,376 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:41,176 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 165 -2023-05-15 16:27:41,182 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:41,311 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 252 -2023-05-15 16:27:41,319 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:41,320 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103345_Instagram.jpg => /tmp/train/test/10_person/021-original-Screenshot_20221225_103345_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:41,323 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:41,323 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06c' -2023-05-15 16:27:41,323 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:41,323 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:41,323 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:41,347 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:42,095 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 16:27:42,101 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:42,248 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 16:27:42,255 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:42,256 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103406_Instagram.jpg => /tmp/train/test/10_person/022-original-Screenshot_20221225_103406_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:42,259 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:42,259 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 16:27:42,260 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:42,260 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:42,260 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:42,283 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:43,058 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 16:27:43,064 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:43,195 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 237 -2023-05-15 16:27:43,202 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:43,202 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103427_Instagram.jpg => /tmp/train/test/10_person/023-original-Screenshot_20221225_103427_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:43,205 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:43,205 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 16:27:43,205 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:43,205 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:43,205 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:43,227 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:43,982 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 16:27:43,988 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:44,118 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 308 -2023-05-15 16:27:44,125 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:44,125 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103433_Instagram.jpg => /tmp/train/test/10_person/024-original-Screenshot_20221225_103433_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:44,128 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:44,128 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x95' -2023-05-15 16:27:44,128 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:44,128 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:44,128 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:44,147 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:44,906 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 16:27:44,911 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:45,040 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 16:27:45,047 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:45,047 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103445_Instagram.jpg => /tmp/train/test/10_person/025-original-Screenshot_20221225_103445_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:45,050 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:45,050 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x93' -2023-05-15 16:27:45,050 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:45,050 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:45,050 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:45,072 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:45,841 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 157 -2023-05-15 16:27:45,846 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:45,973 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 434 -2023-05-15 16:27:45,980 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:45,980 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103500_Instagram.jpg => /tmp/train/test/10_person/026-original-Screenshot_20221225_103500_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:45,983 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:45,983 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x8b' -2023-05-15 16:27:45,983 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:45,983 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:45,983 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:46,005 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:46,740 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 16:27:46,745 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:46,871 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 457 -2023-05-15 16:27:46,878 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:46,878 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103507_Instagram.jpg => /tmp/train/test/10_person/027-original-Screenshot_20221225_103507_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:46,881 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:46,881 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:27:46,881 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:46,881 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:46,881 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:46,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:47,709 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 16:27:47,714 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:47,847 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 362 -2023-05-15 16:27:47,853 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:47,854 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103522_Instagram.jpg => /tmp/train/test/10_person/028-original-Screenshot_20221225_103522_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:47,857 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9c' -2023-05-15 16:27:47,857 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:27:47,857 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:47,857 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:47,857 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:47,877 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:48,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 16:27:48,627 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:48,752 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 16:27:48,759 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:48,759 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103530_Instagram.jpg => /tmp/train/test/10_person/029-original-Screenshot_20221225_103530_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:48,762 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:48,763 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:27:48,763 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:48,763 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:48,763 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:48,783 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:49,621 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 154 -2023-05-15 16:27:49,626 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:49,766 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 113 -2023-05-15 16:27:49,773 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:49,773 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103536_Instagram.jpg => /tmp/train/test/10_person/030-original-Screenshot_20221225_103536_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:49,776 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x8a' -2023-05-15 16:27:49,776 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:27:49,776 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:49,776 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:49,776 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:49,798 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:50,584 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 16:27:50,589 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:50,714 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 16:27:50,721 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:50,721 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103543_Instagram.jpg => /tmp/train/test/10_person/031-original-Screenshot_20221225_103543_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:50,725 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:50,725 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:27:50,725 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:50,725 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:50,725 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:50,745 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:51,498 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 16:27:51,504 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:51,643 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 236 -2023-05-15 16:27:51,650 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:51,650 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103553_Instagram.jpg => /tmp/train/test/10_person/032-original-Screenshot_20221225_103553_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:51,653 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:51,653 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:27:51,653 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:51,653 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:51,654 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:51,674 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:52,456 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 174 -2023-05-15 16:27:52,461 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:52,603 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 204 -2023-05-15 16:27:52,609 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:52,610 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103559_Instagram.jpg => /tmp/train/test/10_person/033-original-Screenshot_20221225_103559_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:52,613 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:52,613 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 16:27:52,613 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:52,613 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:52,613 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:52,634 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:53,551 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 16:27:53,556 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:53,700 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 628 -2023-05-15 16:27:53,708 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:53,708 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103613_Instagram.jpg => /tmp/train/test/10_person/034-original-Screenshot_20221225_103613_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:53,711 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:53,712 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 16:27:53,712 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:53,712 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:53,712 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:53,732 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:54,637 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 167 -2023-05-15 16:27:54,642 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:54,792 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 563 -2023-05-15 16:27:54,799 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:54,799 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103621_Instagram.jpg => /tmp/train/test/10_person/035-original-Screenshot_20221225_103621_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:54,802 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:54,802 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9d' -2023-05-15 16:27:54,802 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:54,802 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:54,802 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:54,824 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:55,721 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:27:55,726 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:55,884 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 512 -2023-05-15 16:27:55,891 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:55,891 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103629_Instagram.jpg => /tmp/train/test/10_person/036-original-Screenshot_20221225_103629_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:55,895 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:55,895 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:27:55,895 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:55,895 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:55,895 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:55,915 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:56,890 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 16:27:56,895 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:57,047 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 160 -2023-05-15 16:27:57,054 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:57,054 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103638_Instagram.jpg => /tmp/train/test/10_person/037-original-Screenshot_20221225_103638_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:57,057 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:57,057 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x04\xb0' -2023-05-15 16:27:57,057 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:57,057 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:57,057 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:57,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:57,933 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 168 -2023-05-15 16:27:57,937 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:58,072 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 908 -2023-05-15 16:27:58,078 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:58,078 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103649_Instagram.jpg => /tmp/train/test/10_person/038-original-Screenshot_20221225_103649_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:58,082 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:58,082 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 16:27:58,082 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:58,082 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:58,082 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:58,104 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:58,957 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:27:58,962 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:27:59,104 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 289 -2023-05-15 16:27:59,111 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:27:59,111 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103656_Instagram.jpg => /tmp/train/test/10_person/039-original-Screenshot_20221225_103656_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:27:59,114 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:27:59,115 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x15' -2023-05-15 16:27:59,115 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:27:59,115 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:27:59,115 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:27:59,140 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:28:00,197 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 16:28:00,203 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:28:00,371 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 16:28:00,379 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:28:00,379 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103727_Instagram.jpg => /tmp/train/test/10_person/040-original-Screenshot_20221225_103727_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:28:00,379 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | input datasets ['/tmp/train/test/10_person'] -2023-05-15 16:28:00,382 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTPS connection (1): huggingface.co:443 -2023-05-15 16:28:01,492 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /stabilityai/sd-vae-ft-mse/resolve/main/config.json HTTP/1.1" 200 0 -2023-05-15 16:28:09,736 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps result: {'inputs': 40, 'outputs': {'original': 40, 'total': 40}, 'metadata': '/tmp/train/test/test.json'} -2023-05-15 16:28:09,850 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 22.58, 'used': 4.83, 'total': 27.41} gpu current: {'free': 9.7, 'used': 2.3, 'total': 12.0} gpu peak: {'active': 0.95, 'allocated': 0.95, 'reserved': 1.11} -2023-05-15 16:28:09,850 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | lycoris options: {'bucket_no_upscale': False, 'bucket_reso_steps': 64, 'cache_latents': True, 'caption_dropout_every_n_epochs': None, 'caption_dropout_rate': 0.0, 'caption_extension': '.txt', 'caption_extention': '.txt', 'caption_tag_dropout_rate': 0.0, 'clip_skip': None, 'color_aug': False, 'dataset_repeats': 1, 'debug_dataset': False, 'enable_bucket': False, 'face_crop_aug_range': None, 'flip_aug': False, 'full_fp16': False, 'gradient_accumulation_steps': 1, 'gradient_checkpointing': False, 'in_json': '/tmp/train/test/test.json', 'keep_tokens': None, 'learning_rate': 0.0001, 'log_prefix': None, 'logging_dir': None, 'lr_scheduler_num_cycles': 1, 'lr_scheduler_power': 1, 'lr_scheduler': 'cosine', 'lr_warmup_steps': 0, 'max_bucket_reso': 1024, 'max_data_loader_n_workers': 8, 'max_grad_norm': 0.0, 'max_token_length': None, 'max_train_epochs': None, 'max_train_steps': 2500, 'mem_eff_attn': False, 'min_bucket_reso': 256, 'mixed_precision': 'fp16', 'network_alpha': 20, 'network_args': None, 'network_dim': 40, 'network_module': 'lycoris.kohya', 'network_train_text_encoder_only': False, 'network_train_unet_only': False, 'network_weights': None, 'no_metadata': False, 'output_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'output_name': 'test', 'persistent_data_loader_workers': False, 'pretrained_model_name_or_path': '/home/vlado/dev/automatic/models/v1-5-pruned-emaonly.safetensors', 'prior_loss_weight': 1.0, 'random_crop': False, 'reg_data_dir': None, 'resolution': '512,512', 'resume': None, 'save_every_n_epochs': None, 'save_last_n_epochs_state': None, 'save_last_n_epochs': None, 'save_model_as': 'ckpt', 'save_n_epoch_ratio': None, 'save_precision': 'fp16', 'save_state': False, 'seed': 42, 'shuffle_caption': False, 'text_encoder_lr': 5e-05, 'train_batch_size': 1, 'train_data_dir': '/tmp/train/test', 'training_comment': 'mood-magic', 'unet_lr': 0.0001, 'use_8bit_adam': False, 'v_parameterization': False, 'v2': False, 'vae': None, 'xformers': False} -2023-05-15 16:28:10,799 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/vocab.json HTTP/1.1" 200 0 -2023-05-15 16:28:15,701 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/config.json HTTP/1.1" 200 0 -2023-05-15 16:28:16,772 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/model.safetensors HTTP/1.1" 404 0 -2023-05-15 16:28:17,938 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/model.safetensors.index.json HTTP/1.1" 404 0 -2023-05-15 16:28:19,147 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/pytorch_model.bin HTTP/1.1" 302 0 -2023-05-15 16:31:44,984 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:31:44,987 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 16:31:44,988 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:31:44,991 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:31:44,991 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:31:45,019 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:31:45,021 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:31:45,023 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 16:31:45,023 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 16:31:45,025 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:31:45,028 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:31:45,028 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:31:45,054 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:31:45,067 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | args: {'type': 'lycoris', 'model': '/home/vlado/dev/automatic/models/v1-5-pruned-emaonly.safetensors', 'name': 'test', 'tag': 'person', 'input': '/home/vlado/generative/Input/mia/', 'output': '', 'process': 'original,interrogate,resize,square', 'gradient': 1, 'steps': 2500, 'batch': 1, 'lr': 0.0001, 'dim': 40, 'repeats': 10, 'alpha': 0, 'overwrite': False, 'debug': True, 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'process_dir': '/tmp/train/test'} -2023-05-15 16:31:45,069 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | server flags: {'error': 500, 'reason': 'Internal Server Error', 'url': 'http://127.0.0.1:7860/sdapi/v1/cmd-flags'} -2023-05-15 16:31:45,070 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | server options: {'sd_model_checkpoint': 'v1-5-pruned-emaonly.safetensors [6ce0161689]', 'sd_checkpoint_cache': 0.0, 'sd_vae_checkpoint_cache': 0.0, 'sd_vae': 'Automatic', 'stream_load': False, 'model_reuse_dict': False, 'inpainting_mask_weight': 1.0, 'initial_noise_multiplier': 1.0, 'img2img_color_correction': False, 'img2img_fix_steps': False, 'img2img_background_color': '#ffffff', 'enable_quantization': True, 'comma_padding_backtrack': 20.0, 'CLIP_stop_at_last_layers': 1.0, 'upcast_attn': False, 'cross_attention_optimization': 'Scaled-Dot-Product', 'cross_attention_options': [], 'sub_quad_q_chunk_size': 512.0, 'sub_quad_kv_chunk_size': 512.0, 'sub_quad_chunk_threshold': 80.0, 'always_batch_cond_uncond': False, 'temp_dir': '', 'clean_temp_dir_at_start': True, 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'vae_dir': '/home/vlado/dev/automatic/models/VAE', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'hypernetwork_dir': '/home/vlado/dev/automatic/models/hypernetworks', 'codeformer_models_path': '/home/vlado/dev/automatic/models/Codeformer', 'gfpgan_models_path': '/home/vlado/dev/automatic/models/GFPGAN', 'esrgan_models_path': '/home/vlado/dev/automatic/models/ESRGAN', 'bsrgan_models_path': '/home/vlado/dev/automatic/models/BSRGAN', 'realesrgan_models_path': '/home/vlado/dev/automatic/models/RealESRGAN', 'scunet_models_path': '/home/vlado/dev/automatic/models/ScuNET', 'swinir_models_path': '/home/vlado/dev/automatic/models/SwinIR', 'ldsr_models_path': '/home/vlado/dev/automatic/models/LDSR', 'clip_models_path': '/home/vlado/dev/automatic/models/CLIP', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'styles_dir': 'styles.csv', 'samples_save': True, 'samples_format': 'jpg', 'samples_filename_pattern': '', 'save_images_add_number': True, 'grid_save': True, 'grid_format': 'jpg', 'grid_extended_filename': True, 'grid_only_if_multiple': True, 'grid_prevent_empty_spots': True, 'n_rows': -1.0, 'save_txt': False, 'save_log_fn': '', 'save_images_before_face_restoration': False, 'save_images_before_highres_fix': False, 'save_images_before_color_correction': False, 'save_mask': False, 'save_mask_composite': False, 'jpeg_quality': 85.0, 'webp_lossless': False, 'img_max_size_mp': 200.0, 'use_original_name_batch': True, 'use_upscaler_name_as_suffix': True, 'save_selected_only': True, 'save_init_img': False, 'save_to_dirs': False, 'grid_save_to_dirs': False, 'use_save_to_dirs_for_ui': False, 'directories_filename_pattern': '[date]', 'directories_max_prompt_words': 8.0, 'outdir_samples': '', 'outdir_txt2img_samples': 'outputs/text', 'outdir_img2img_samples': 'outputs/image', 'outdir_extras_samples': 'outputs/extras', 'outdir_grids': '', 'outdir_txt2img_grids': 'outputs/grids', 'outdir_img2img_grids': 'outputs/grids', 'outdir_save': 'outputs/save', 'outdir_init_images': 'outputs/init-images', 'memmon_poll_rate': 2.0, 'precision': 'Autocast', 'cuda_dtype': 'FP16', 'no_half': False, 'no_half_vae': False, 'upcast_sampling': False, 'disable_nan_check': True, 'rollback_vae': False, 'opt_channelslast': False, 'cudnn_benchmark': False, 'cuda_allow_tf32': True, 'cuda_allow_tf16_reduced': True, 'cuda_compile': False, 'cuda_compile_mode': 'none', 'cuda_compile_verbose': False, 'cuda_compile_errors': True, 'disable_gc': True, 'upscaler_for_img2img': 'None', 'realesrgan_enabled_models': ['R-ESRGAN 4x+', 'R-ESRGAN 4x+ Anime6B'], 'ESRGAN_tile': 192.0, 'ESRGAN_tile_overlap': 8.0, 'SCUNET_tile': 256.0, 'SCUNET_tile_overlap': 8.0, 'use_old_hires_fix_width_height': False, 'dont_fix_second_order_samplers_schedule': False, 'face_restoration_model': 'CodeFormer', 'code_former_weight': 0.2, 'face_restoration_unload': False, 'unload_models_when_training': False, 'pin_memory': True, 'save_optimizer_state': False, 'save_training_settings_to_txt': False, 'dataset_filename_word_regex': '', 'dataset_filename_join_string': ' ', 'embeddings_templates_dir': '/home/vlado/dev/automatic/train/templates', 'training_image_repeats_per_epoch': 10.0, 'training_write_csv_every': 0.0, 'training_enable_tensorboard': False, 'training_tensorboard_save_images': False, 'training_tensorboard_flush_every': 120.0, 'interrogate_keep_models_in_memory': False, 'interrogate_return_ranks': True, 'interrogate_clip_num_beams': 1.0, 'interrogate_clip_min_length': 32.0, 'interrogate_clip_max_length': 192.0, 'interrogate_clip_dict_limit': 2048.0, 'interrogate_clip_skip_categories': ['artists', 'movements', 'flavors'], 'interrogate_deepbooru_score_threshold': 0.65, 'deepbooru_sort_alpha': False, 'deepbooru_use_spaces': False, 'deepbooru_escape': True, 'deepbooru_filter_tags': '', 'extra_networks_default_view': 'cards', 'extra_networks_default_multiplier': 1.0, 'extra_networks_card_width': 0.0, 'extra_networks_card_height': 0.0, 'extra_networks_add_text_separator': ' ', 'sd_hypernetwork': 'None', 'gradio_theme': 'black-orange', 'return_grid': True, 'return_mask': False, 'return_mask_composite': False, 'disable_weights_auto_swap': True, 'send_seed': True, 'send_size': True, 'font': '', 'keyedit_precision_attention': 0.1, 'keyedit_precision_extra': 0.05, 'keyedit_delimiters': '.,\\/!?%^*;:{}=`~()', 'quicksettings': 'sd_model_checkpoint', 'hidden_tabs': [], 'ui_tab_reorder': 'From Text, From Image, Process Image', 'ui_scripts_reorder': 'Enable Dynamic Thresholding, ControlNet', 'ui_reorder': 'inpaint, sampler, checkboxes, hires_fix, dimensions, cfg, seed, batch, override_settings, scripts', 'ui_extra_networks_tab_reorder': '', 'show_progressbar': True, 'live_previews_enable': True, 'show_progress_grid': True, 'notification_audio_enable': False, 'notification_audio_path': 'html/notification.mp3', 'show_progress_every_n_steps': 1.0, 'show_progress_type': 'Approx NN', 'live_preview_content': 'Combined', 'live_preview_refresh_period': 250.0, 'show_samplers': ['Euler a', 'UniPC', 'DDIM', 'DPM++ SDE', 'DPM++ SDE', 'DPM2 Karras', 'DPM++ 2M Karras'], 'fallback_sampler': 'Euler a', 'xyz_fallback_sampler': 'None', 'eta_ancestral': 1.0, 'eta_ddim': 0.0, 'ddim_discretize': 'uniform', 's_churn': 0.0, 's_min_uncond': 0.0, 's_tmin': 0.0, 's_noise': 1.0, 'eta_noise_seed_delta': 0.0, 'always_discard_next_to_last_sigma': False, 'uni_pc_variant': 'bh1', 'uni_pc_skip_type': 'time_uniform', 'uni_pc_order': 3.0, 'uni_pc_lower_order_final': True, 'token_merging': False, 'token_merging_ratio': 0.5, 'token_merging_hr_only': True, 'token_merging_ratio_hr': 0.5, 'token_merging_random': False, 'token_merging_merge_attention': True, 'token_merging_merge_cross_attention': False, 'token_merging_merge_mlp': False, 'token_merging_maximum_down_sampling': 1.0, 'token_merging_stride_x': 2.0, 'token_merging_stride_y': 2.0, 'postprocessing_enable_in_main_ui': [], 'postprocessing_operation_order': [], 'upscaling_max_images_in_cache': 5.0, 'disabled_extensions': [], 'disable_all_extensions': 'none', 'sd_checkpoint_hash': '6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa', 'sd_lyco': 'None', 'sd_lora': 'None'} -2023-05-15 16:31:45,076 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | train using lycoris network -2023-05-15 16:31:46,794 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 26.4, 'used': 1.01, 'total': 27.41} gpu current: {'free': 10.42, 'used': 1.57, 'total': 12.0} gpu peak: {'active': 0.0, 'allocated': 0.0, 'reserved': 0.0} -2023-05-15 16:31:46,795 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 16:31:46,924 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing input images: 40 -2023-05-15 16:31:46,924 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processed folder exists: /tmp/train/test -2023-05-15 16:31:46,925 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing current step: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 16:31:46,926 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing concept: person -2023-05-15 16:31:46,926 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing output folder: /tmp/train/test/10_person -2023-05-15 16:31:46,931 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:31:46,931 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:31:46,931 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:31:46,931 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:31:46,931 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:31:46,961 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:31:47,801 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 16:31:47,808 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:31:47,960 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 187 -2023-05-15 16:31:47,968 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:31:47,968 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102947_Instagram.jpg => /tmp/train/test/10_person/001-original-Screenshot_20221225_102947_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:31:47,971 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:31:47,971 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06@' -2023-05-15 16:31:47,971 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:31:47,971 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:31:47,971 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:31:47,998 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:31:48,776 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 16:31:48,783 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:31:48,918 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 291 -2023-05-15 16:31:48,926 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:31:48,926 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102956_Instagram.jpg => /tmp/train/test/10_person/002-original-Screenshot_20221225_102956_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:31:48,929 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:31:48,929 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:31:48,929 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:31:48,929 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:31:48,929 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:31:48,956 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:31:49,733 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 175 -2023-05-15 16:31:49,740 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:31:49,874 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 185 -2023-05-15 16:31:49,881 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:31:49,881 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103005_Instagram.jpg => /tmp/train/test/10_person/003-original-Screenshot_20221225_103005_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:31:49,884 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:31:49,884 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xff' -2023-05-15 16:31:49,884 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:31:49,884 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:31:49,884 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:31:49,911 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:31:50,690 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 16:31:50,696 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:31:50,837 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 262 -2023-05-15 16:31:50,844 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:31:50,844 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103018_Instagram.jpg => /tmp/train/test/10_person/004-original-Screenshot_20221225_103018_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:31:50,847 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:31:50,847 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06X' -2023-05-15 16:31:50,847 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:31:50,848 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:31:50,848 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:31:50,871 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:24,929 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:24,932 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 16:34:24,932 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:24,935 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:34:24,936 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:24,963 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:34:24,964 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:24,966 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 16:34:24,966 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 16:34:24,968 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:24,971 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:34:24,972 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:25,000 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:34:25,012 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | args: {'type': 'lycoris', 'model': '/home/vlado/dev/automatic/models/v1-5-pruned-emaonly.safetensors', 'name': 'test', 'tag': 'person', 'input': '/home/vlado/generative/Input/mia/', 'output': '', 'process': 'original,interrogate,resize,square', 'gradient': 1, 'steps': 2500, 'batch': 1, 'lr': 0.0001, 'dim': 40, 'repeats': 10, 'alpha': 0, 'overwrite': False, 'debug': True, 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'process_dir': '/tmp/train/test'} -2023-05-15 16:34:25,013 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | server flags: {'error': 500, 'reason': 'Internal Server Error', 'url': 'http://127.0.0.1:7860/sdapi/v1/cmd-flags'} -2023-05-15 16:34:25,014 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | server options: {'sd_model_checkpoint': 'v1-5-pruned-emaonly.safetensors [6ce0161689]', 'sd_checkpoint_cache': 0.0, 'sd_vae_checkpoint_cache': 0.0, 'sd_vae': 'Automatic', 'stream_load': False, 'model_reuse_dict': False, 'inpainting_mask_weight': 1.0, 'initial_noise_multiplier': 1.0, 'img2img_color_correction': False, 'img2img_fix_steps': False, 'img2img_background_color': '#ffffff', 'enable_quantization': True, 'comma_padding_backtrack': 20.0, 'CLIP_stop_at_last_layers': 1.0, 'upcast_attn': False, 'cross_attention_optimization': 'Scaled-Dot-Product', 'cross_attention_options': [], 'sub_quad_q_chunk_size': 512.0, 'sub_quad_kv_chunk_size': 512.0, 'sub_quad_chunk_threshold': 80.0, 'always_batch_cond_uncond': False, 'temp_dir': '', 'clean_temp_dir_at_start': True, 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'vae_dir': '/home/vlado/dev/automatic/models/VAE', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'hypernetwork_dir': '/home/vlado/dev/automatic/models/hypernetworks', 'codeformer_models_path': '/home/vlado/dev/automatic/models/Codeformer', 'gfpgan_models_path': '/home/vlado/dev/automatic/models/GFPGAN', 'esrgan_models_path': '/home/vlado/dev/automatic/models/ESRGAN', 'bsrgan_models_path': '/home/vlado/dev/automatic/models/BSRGAN', 'realesrgan_models_path': '/home/vlado/dev/automatic/models/RealESRGAN', 'scunet_models_path': '/home/vlado/dev/automatic/models/ScuNET', 'swinir_models_path': '/home/vlado/dev/automatic/models/SwinIR', 'ldsr_models_path': '/home/vlado/dev/automatic/models/LDSR', 'clip_models_path': '/home/vlado/dev/automatic/models/CLIP', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'styles_dir': 'styles.csv', 'samples_save': True, 'samples_format': 'jpg', 'samples_filename_pattern': '', 'save_images_add_number': True, 'grid_save': True, 'grid_format': 'jpg', 'grid_extended_filename': True, 'grid_only_if_multiple': True, 'grid_prevent_empty_spots': True, 'n_rows': -1.0, 'save_txt': False, 'save_log_fn': '', 'save_images_before_face_restoration': False, 'save_images_before_highres_fix': False, 'save_images_before_color_correction': False, 'save_mask': False, 'save_mask_composite': False, 'jpeg_quality': 85.0, 'webp_lossless': False, 'img_max_size_mp': 200.0, 'use_original_name_batch': True, 'use_upscaler_name_as_suffix': True, 'save_selected_only': True, 'save_init_img': False, 'save_to_dirs': False, 'grid_save_to_dirs': False, 'use_save_to_dirs_for_ui': False, 'directories_filename_pattern': '[date]', 'directories_max_prompt_words': 8.0, 'outdir_samples': '', 'outdir_txt2img_samples': 'outputs/text', 'outdir_img2img_samples': 'outputs/image', 'outdir_extras_samples': 'outputs/extras', 'outdir_grids': '', 'outdir_txt2img_grids': 'outputs/grids', 'outdir_img2img_grids': 'outputs/grids', 'outdir_save': 'outputs/save', 'outdir_init_images': 'outputs/init-images', 'memmon_poll_rate': 2.0, 'precision': 'Autocast', 'cuda_dtype': 'FP16', 'no_half': False, 'no_half_vae': False, 'upcast_sampling': False, 'disable_nan_check': True, 'rollback_vae': False, 'opt_channelslast': False, 'cudnn_benchmark': False, 'cuda_allow_tf32': True, 'cuda_allow_tf16_reduced': True, 'cuda_compile': False, 'cuda_compile_mode': 'none', 'cuda_compile_verbose': False, 'cuda_compile_errors': True, 'disable_gc': True, 'upscaler_for_img2img': 'None', 'realesrgan_enabled_models': ['R-ESRGAN 4x+', 'R-ESRGAN 4x+ Anime6B'], 'ESRGAN_tile': 192.0, 'ESRGAN_tile_overlap': 8.0, 'SCUNET_tile': 256.0, 'SCUNET_tile_overlap': 8.0, 'use_old_hires_fix_width_height': False, 'dont_fix_second_order_samplers_schedule': False, 'face_restoration_model': 'CodeFormer', 'code_former_weight': 0.2, 'face_restoration_unload': False, 'unload_models_when_training': False, 'pin_memory': True, 'save_optimizer_state': False, 'save_training_settings_to_txt': False, 'dataset_filename_word_regex': '', 'dataset_filename_join_string': ' ', 'embeddings_templates_dir': '/home/vlado/dev/automatic/train/templates', 'training_image_repeats_per_epoch': 10.0, 'training_write_csv_every': 0.0, 'training_enable_tensorboard': False, 'training_tensorboard_save_images': False, 'training_tensorboard_flush_every': 120.0, 'interrogate_keep_models_in_memory': False, 'interrogate_return_ranks': True, 'interrogate_clip_num_beams': 1.0, 'interrogate_clip_min_length': 32.0, 'interrogate_clip_max_length': 192.0, 'interrogate_clip_dict_limit': 2048.0, 'interrogate_clip_skip_categories': ['artists', 'movements', 'flavors'], 'interrogate_deepbooru_score_threshold': 0.65, 'deepbooru_sort_alpha': False, 'deepbooru_use_spaces': False, 'deepbooru_escape': True, 'deepbooru_filter_tags': '', 'extra_networks_default_view': 'cards', 'extra_networks_default_multiplier': 1.0, 'extra_networks_card_width': 0.0, 'extra_networks_card_height': 0.0, 'extra_networks_add_text_separator': ' ', 'sd_hypernetwork': 'None', 'gradio_theme': 'black-orange', 'return_grid': True, 'return_mask': False, 'return_mask_composite': False, 'disable_weights_auto_swap': True, 'send_seed': True, 'send_size': True, 'font': '', 'keyedit_precision_attention': 0.1, 'keyedit_precision_extra': 0.05, 'keyedit_delimiters': '.,\\/!?%^*;:{}=`~()', 'quicksettings': 'sd_model_checkpoint', 'hidden_tabs': [], 'ui_tab_reorder': 'From Text, From Image, Process Image', 'ui_scripts_reorder': 'Enable Dynamic Thresholding, ControlNet', 'ui_reorder': 'inpaint, sampler, checkboxes, hires_fix, dimensions, cfg, seed, batch, override_settings, scripts', 'ui_extra_networks_tab_reorder': '', 'show_progressbar': True, 'live_previews_enable': True, 'show_progress_grid': True, 'notification_audio_enable': False, 'notification_audio_path': 'html/notification.mp3', 'show_progress_every_n_steps': 1.0, 'show_progress_type': 'Approx NN', 'live_preview_content': 'Combined', 'live_preview_refresh_period': 250.0, 'show_samplers': ['Euler a', 'UniPC', 'DDIM', 'DPM++ SDE', 'DPM++ SDE', 'DPM2 Karras', 'DPM++ 2M Karras'], 'fallback_sampler': 'Euler a', 'xyz_fallback_sampler': 'None', 'eta_ancestral': 1.0, 'eta_ddim': 0.0, 'ddim_discretize': 'uniform', 's_churn': 0.0, 's_min_uncond': 0.0, 's_tmin': 0.0, 's_noise': 1.0, 'eta_noise_seed_delta': 0.0, 'always_discard_next_to_last_sigma': False, 'uni_pc_variant': 'bh1', 'uni_pc_skip_type': 'time_uniform', 'uni_pc_order': 3.0, 'uni_pc_lower_order_final': True, 'token_merging': False, 'token_merging_ratio': 0.5, 'token_merging_hr_only': True, 'token_merging_ratio_hr': 0.5, 'token_merging_random': False, 'token_merging_merge_attention': True, 'token_merging_merge_cross_attention': False, 'token_merging_merge_mlp': False, 'token_merging_maximum_down_sampling': 1.0, 'token_merging_stride_x': 2.0, 'token_merging_stride_y': 2.0, 'postprocessing_enable_in_main_ui': [], 'postprocessing_operation_order': [], 'upscaling_max_images_in_cache': 5.0, 'disabled_extensions': [], 'disable_all_extensions': 'none', 'sd_checkpoint_hash': '6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa', 'sd_lyco': 'None', 'sd_lora': 'None'} -2023-05-15 16:34:25,021 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | train using lycoris network -2023-05-15 16:34:26,517 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 26.4, 'used': 1.01, 'total': 27.41} gpu current: {'free': 10.42, 'used': 1.57, 'total': 12.0} gpu peak: {'active': 0.0, 'allocated': 0.0, 'reserved': 0.0} -2023-05-15 16:34:26,518 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 16:34:26,644 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing input images: 40 -2023-05-15 16:34:26,645 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processed folder exists: /tmp/train/test -2023-05-15 16:34:26,645 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing current step: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 16:34:26,646 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing concept: person -2023-05-15 16:34:26,646 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing output folder: /tmp/train/test/10_person -2023-05-15 16:34:26,650 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:26,650 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:34:26,650 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:26,650 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:26,650 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:26,680 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:27,521 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 16:34:27,528 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:27,680 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 187 -2023-05-15 16:34:27,687 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:27,688 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102947_Instagram.jpg => /tmp/train/test/10_person/001-original-Screenshot_20221225_102947_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:27,691 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:27,691 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06@' -2023-05-15 16:34:27,691 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:27,691 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:27,691 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:27,719 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:28,520 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 16:34:28,526 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:28,664 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 291 -2023-05-15 16:34:28,671 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:28,672 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102956_Instagram.jpg => /tmp/train/test/10_person/002-original-Screenshot_20221225_102956_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:28,675 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:28,675 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:34:28,675 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:28,675 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:28,675 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:28,703 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:29,508 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 175 -2023-05-15 16:34:29,515 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:29,650 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 185 -2023-05-15 16:34:29,657 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:29,657 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103005_Instagram.jpg => /tmp/train/test/10_person/003-original-Screenshot_20221225_103005_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:29,660 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:29,660 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xff' -2023-05-15 16:34:29,660 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:29,660 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:29,660 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:29,688 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:30,448 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 16:34:30,455 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:30,596 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 262 -2023-05-15 16:34:30,604 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:30,604 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103018_Instagram.jpg => /tmp/train/test/10_person/004-original-Screenshot_20221225_103018_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:30,607 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:30,607 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06X' -2023-05-15 16:34:30,607 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:30,607 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:30,607 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:30,631 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:31,395 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 16:34:31,400 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:31,533 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 227 -2023-05-15 16:34:31,540 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:31,540 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103034_Instagram.jpg => /tmp/train/test/10_person/005-original-Screenshot_20221225_103034_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:31,543 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:31,543 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:34:31,543 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:31,543 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:31,543 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:31,566 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:32,346 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:34:32,351 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:32,488 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 497 -2023-05-15 16:34:32,495 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:32,495 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103043_Instagram.jpg => /tmp/train/test/10_person/006-original-Screenshot_20221225_103043_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:32,498 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:32,498 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:34:32,498 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:32,498 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:32,498 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:32,521 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:33,320 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 16:34:33,326 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:33,471 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 16:34:33,479 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:33,479 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103058_Instagram.jpg => /tmp/train/test/10_person/007-original-Screenshot_20221225_103058_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:33,482 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:33,482 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:34:33,482 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:33,482 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:33,482 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:33,507 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:34,280 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 16:34:34,286 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:34,426 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 251 -2023-05-15 16:34:34,433 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:34,433 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103106_Instagram.jpg => /tmp/train/test/10_person/008-original-Screenshot_20221225_103106_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:34,437 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:34,437 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:34:34,437 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:34,437 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:34,437 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:34,457 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:35,237 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:34:35,243 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:35,394 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 216 -2023-05-15 16:34:35,401 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:35,401 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103115_Instagram.jpg => /tmp/train/test/10_person/009-original-Screenshot_20221225_103115_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:35,404 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:35,404 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xc8' -2023-05-15 16:34:35,404 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:35,404 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:35,404 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:35,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:36,226 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 140 -2023-05-15 16:34:36,232 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:36,377 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 263 -2023-05-15 16:34:36,385 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:36,385 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103128_Instagram.jpg => /tmp/train/test/10_person/010-original-Screenshot_20221225_103128_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:36,388 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:36,388 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xfb' -2023-05-15 16:34:36,388 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:36,388 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:36,388 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:36,414 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:37,204 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 16:34:37,211 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:37,344 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 192 -2023-05-15 16:34:37,352 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:37,352 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103144_Instagram.jpg => /tmp/train/test/10_person/011-original-Screenshot_20221225_103144_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:37,355 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 16:34:37,355 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xb6' -2023-05-15 16:34:37,355 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:37,355 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:37,355 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:37,380 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:38,198 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 179 -2023-05-15 16:34:38,204 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:38,341 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 348 -2023-05-15 16:34:38,348 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:38,349 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103159_Instagram.jpg => /tmp/train/test/10_person/012-original-Screenshot_20221225_103159_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:38,352 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:38,352 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 16:34:38,352 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:38,352 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:38,352 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:38,375 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:39,160 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 16:34:39,165 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:39,296 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 299 -2023-05-15 16:34:39,304 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:39,304 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103207_Instagram.jpg => /tmp/train/test/10_person/013-original-Screenshot_20221225_103207_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:39,307 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:39,307 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:34:39,307 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:39,307 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:39,307 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:39,332 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:40,103 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 176 -2023-05-15 16:34:40,109 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:40,241 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 343 -2023-05-15 16:34:40,249 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:40,249 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103222_Instagram.jpg => /tmp/train/test/10_person/014-original-Screenshot_20221225_103222_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:40,252 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:40,252 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 16:34:40,252 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:40,252 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:40,252 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:40,276 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:41,060 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 189 -2023-05-15 16:34:41,066 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:41,197 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 311 -2023-05-15 16:34:41,205 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:41,205 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103233_Instagram.jpg => /tmp/train/test/10_person/015-original-Screenshot_20221225_103233_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:41,208 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:41,208 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:34:41,208 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:41,208 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:41,208 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:41,231 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:41,982 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 16:34:41,987 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:42,120 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 366 -2023-05-15 16:34:42,127 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:42,127 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103240_Instagram.jpg => /tmp/train/test/10_person/016-original-Screenshot_20221225_103240_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:42,131 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 16:34:42,131 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x06' -2023-05-15 16:34:42,131 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:42,131 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:42,131 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:42,157 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:42,939 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 16:34:42,945 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:43,086 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 712 -2023-05-15 16:34:43,094 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:43,094 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103256_Instagram.jpg => /tmp/train/test/10_person/017-original-Screenshot_20221225_103256_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:43,097 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:43,097 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:34:43,097 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:43,097 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:43,097 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:43,117 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:43,866 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 16:34:43,872 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:44,002 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 169 -2023-05-15 16:34:44,010 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:44,010 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103313_Instagram.jpg => /tmp/train/test/10_person/018-original-Screenshot_20221225_103313_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:44,013 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:44,013 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:34:44,013 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:44,013 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:44,013 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:44,037 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:44,810 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 16:34:44,816 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:44,952 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 253 -2023-05-15 16:34:44,960 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:44,960 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103321_Instagram.jpg => /tmp/train/test/10_person/019-original-Screenshot_20221225_103321_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:44,963 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:44,963 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:34:44,963 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:44,963 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:44,963 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:44,989 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:45,777 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 16:34:45,783 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:45,920 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 295 -2023-05-15 16:34:45,927 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:45,927 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103335_Instagram.jpg => /tmp/train/test/10_person/020-original-Screenshot_20221225_103335_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:45,930 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:45,930 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:34:45,930 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:45,930 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:45,930 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:45,954 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:46,695 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 165 -2023-05-15 16:34:46,701 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:46,832 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 252 -2023-05-15 16:34:46,839 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:46,839 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103345_Instagram.jpg => /tmp/train/test/10_person/021-original-Screenshot_20221225_103345_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:46,843 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:46,843 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06c' -2023-05-15 16:34:46,843 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:46,843 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:46,843 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:46,867 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:47,645 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 16:34:47,652 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:47,794 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 16:34:47,801 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:47,801 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103406_Instagram.jpg => /tmp/train/test/10_person/022-original-Screenshot_20221225_103406_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:47,804 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:47,804 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 16:34:47,804 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:47,804 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:47,804 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:47,827 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:48,625 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 16:34:48,630 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:48,759 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 237 -2023-05-15 16:34:48,766 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:48,766 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103427_Instagram.jpg => /tmp/train/test/10_person/023-original-Screenshot_20221225_103427_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:48,769 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:48,769 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 16:34:48,769 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:48,769 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:48,769 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:48,792 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:49,530 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 16:34:49,536 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:49,667 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 308 -2023-05-15 16:34:49,674 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:49,674 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103433_Instagram.jpg => /tmp/train/test/10_person/024-original-Screenshot_20221225_103433_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:49,677 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:49,677 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x95' -2023-05-15 16:34:49,677 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:49,677 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:49,677 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:49,696 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:50,496 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 16:34:50,501 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:50,629 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 16:34:50,636 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:50,636 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103445_Instagram.jpg => /tmp/train/test/10_person/025-original-Screenshot_20221225_103445_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:50,640 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:50,640 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x93' -2023-05-15 16:34:50,640 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:50,640 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:50,640 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:50,662 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:51,458 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 157 -2023-05-15 16:34:51,464 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:51,602 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 434 -2023-05-15 16:34:51,609 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:51,609 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103500_Instagram.jpg => /tmp/train/test/10_person/026-original-Screenshot_20221225_103500_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:51,612 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:51,612 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x8b' -2023-05-15 16:34:51,612 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:51,612 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:51,612 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:51,635 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:52,419 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 16:34:52,425 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:52,571 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 457 -2023-05-15 16:34:52,578 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:52,578 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103507_Instagram.jpg => /tmp/train/test/10_person/027-original-Screenshot_20221225_103507_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:52,582 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:52,582 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:34:52,582 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:52,582 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:52,582 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:52,599 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:53,454 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 16:34:53,459 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:53,591 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 362 -2023-05-15 16:34:53,598 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:53,598 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103522_Instagram.jpg => /tmp/train/test/10_person/028-original-Screenshot_20221225_103522_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:53,601 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9c' -2023-05-15 16:34:53,601 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:34:53,601 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:53,601 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:53,601 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:53,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:54,404 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 16:34:54,409 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:54,540 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 16:34:54,547 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:54,547 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103530_Instagram.jpg => /tmp/train/test/10_person/029-original-Screenshot_20221225_103530_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:54,550 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:54,550 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:34:54,550 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:54,550 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:54,550 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:54,570 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:55,311 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 154 -2023-05-15 16:34:55,316 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:55,448 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 113 -2023-05-15 16:34:55,455 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:55,455 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103536_Instagram.jpg => /tmp/train/test/10_person/030-original-Screenshot_20221225_103536_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:55,458 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x8a' -2023-05-15 16:34:55,459 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:34:55,459 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:55,459 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:55,459 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:55,481 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:56,277 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 16:34:56,282 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:56,421 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 16:34:56,428 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:56,428 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103543_Instagram.jpg => /tmp/train/test/10_person/031-original-Screenshot_20221225_103543_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:56,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:56,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:34:56,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:56,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:56,432 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:56,452 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:57,256 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 16:34:57,262 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:57,397 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 236 -2023-05-15 16:34:57,404 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:57,404 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103553_Instagram.jpg => /tmp/train/test/10_person/032-original-Screenshot_20221225_103553_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:57,408 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:57,408 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:34:57,408 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:57,408 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:57,408 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:57,427 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:58,295 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 174 -2023-05-15 16:34:58,300 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:58,436 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 204 -2023-05-15 16:34:58,443 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:58,443 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103559_Instagram.jpg => /tmp/train/test/10_person/033-original-Screenshot_20221225_103559_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:58,446 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:58,446 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 16:34:58,446 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:58,446 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:58,446 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:58,466 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:59,303 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 16:34:59,308 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:34:59,445 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 628 -2023-05-15 16:34:59,452 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:34:59,452 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103613_Instagram.jpg => /tmp/train/test/10_person/034-original-Screenshot_20221225_103613_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:34:59,455 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:34:59,455 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 16:34:59,456 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:34:59,456 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:34:59,456 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:34:59,476 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:35:00,300 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 167 -2023-05-15 16:35:00,305 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:35:00,456 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 563 -2023-05-15 16:35:00,463 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:35:00,463 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103621_Instagram.jpg => /tmp/train/test/10_person/035-original-Screenshot_20221225_103621_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:35:00,467 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:35:00,467 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9d' -2023-05-15 16:35:00,467 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:35:00,467 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:35:00,467 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:35:00,490 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:35:01,331 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:35:01,336 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:35:01,475 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 512 -2023-05-15 16:35:01,483 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:35:01,483 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103629_Instagram.jpg => /tmp/train/test/10_person/036-original-Screenshot_20221225_103629_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:35:01,487 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:35:01,487 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:35:01,487 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:35:01,487 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:35:01,487 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:35:01,511 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:35:02,324 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 16:35:02,329 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:35:02,457 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 160 -2023-05-15 16:35:02,464 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:35:02,464 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103638_Instagram.jpg => /tmp/train/test/10_person/037-original-Screenshot_20221225_103638_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:35:02,467 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:35:02,467 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x04\xb0' -2023-05-15 16:35:02,467 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:35:02,467 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:35:02,467 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:35:02,486 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:35:03,264 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 168 -2023-05-15 16:35:03,269 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:35:03,395 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 908 -2023-05-15 16:35:03,401 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:35:03,401 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103649_Instagram.jpg => /tmp/train/test/10_person/038-original-Screenshot_20221225_103649_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:35:03,405 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:35:03,405 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 16:35:03,405 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:35:03,405 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:35:03,405 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:35:03,428 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:35:04,207 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:35:04,212 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:35:04,347 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 289 -2023-05-15 16:35:04,354 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:35:04,354 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103656_Instagram.jpg => /tmp/train/test/10_person/039-original-Screenshot_20221225_103656_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:35:04,357 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:35:04,357 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x15' -2023-05-15 16:35:04,357 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:35:04,357 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:35:04,357 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:35:04,383 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:35:05,201 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 16:35:05,207 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:35:05,350 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 16:35:05,358 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:35:05,358 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103727_Instagram.jpg => /tmp/train/test/10_person/040-original-Screenshot_20221225_103727_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:35:05,359 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | input datasets ['/tmp/train/test/10_person'] -2023-05-15 16:35:05,362 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTPS connection (1): huggingface.co:443 -2023-05-15 16:35:06,335 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /stabilityai/sd-vae-ft-mse/resolve/main/config.json HTTP/1.1" 200 0 -2023-05-15 16:35:14,590 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps result: {'inputs': 40, 'outputs': {'original': 40, 'total': 40}, 'metadata': '/tmp/train/test/test.json'} -2023-05-15 16:35:14,723 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 22.58, 'used': 4.83, 'total': 27.41} gpu current: {'free': 9.7, 'used': 2.3, 'total': 12.0} gpu peak: {'active': 0.95, 'allocated': 0.95, 'reserved': 1.11} -2023-05-15 16:35:14,723 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | lycoris options: {'bucket_no_upscale': False, 'bucket_reso_steps': 64, 'cache_latents': True, 'caption_dropout_every_n_epochs': None, 'caption_dropout_rate': 0.0, 'caption_extension': '.txt', 'caption_extention': '.txt', 'caption_tag_dropout_rate': 0.0, 'clip_skip': None, 'color_aug': False, 'dataset_repeats': 1, 'debug_dataset': False, 'enable_bucket': False, 'face_crop_aug_range': None, 'flip_aug': False, 'full_fp16': False, 'gradient_accumulation_steps': 1, 'gradient_checkpointing': False, 'in_json': '/tmp/train/test/test.json', 'keep_tokens': None, 'learning_rate': 0.0001, 'log_prefix': None, 'logging_dir': None, 'lr_scheduler_num_cycles': 1, 'lr_scheduler_power': 1, 'lr_scheduler': 'cosine', 'lr_warmup_steps': 0, 'max_bucket_reso': 1024, 'max_data_loader_n_workers': 8, 'max_grad_norm': 0.0, 'max_token_length': None, 'max_train_epochs': None, 'max_train_steps': 2500, 'mem_eff_attn': False, 'min_bucket_reso': 256, 'mixed_precision': 'fp16', 'network_alpha': 20, 'network_args': None, 'network_dim': 40, 'network_module': 'lycoris.kohya', 'network_train_text_encoder_only': False, 'network_train_unet_only': False, 'network_weights': None, 'no_metadata': False, 'output_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'output_name': 'test', 'persistent_data_loader_workers': False, 'pretrained_model_name_or_path': '/home/vlado/dev/automatic/models/v1-5-pruned-emaonly.safetensors', 'prior_loss_weight': 1.0, 'random_crop': False, 'reg_data_dir': None, 'resolution': '512,512', 'resume': None, 'save_every_n_epochs': None, 'save_last_n_epochs_state': None, 'save_last_n_epochs': None, 'save_model_as': 'ckpt', 'save_n_epoch_ratio': None, 'save_precision': 'fp16', 'save_state': False, 'seed': 42, 'shuffle_caption': False, 'text_encoder_lr': 5e-05, 'train_batch_size': 1, 'train_data_dir': '/tmp/train/test', 'training_comment': 'mood-magic', 'unet_lr': 0.0001, 'use_8bit_adam': False, 'v_parameterization': False, 'v2': False, 'vae': None, 'xformers': False} -2023-05-15 16:35:14,726 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | importing lora lib -2023-05-15 16:35:15,574 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/vocab.json HTTP/1.1" 200 0 -2023-05-15 16:35:20,582 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/config.json HTTP/1.1" 200 0 -2023-05-15 16:35:21,536 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/model.safetensors HTTP/1.1" 404 0 -2023-05-15 16:35:22,517 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/model.safetensors.index.json HTTP/1.1" 404 0 -2023-05-15 16:35:23,440 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/pytorch_model.bin HTTP/1.1" 302 0 -2023-05-15 16:44:03,903 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:03,909 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 16:44:03,910 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:03,914 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:44:03,914 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:03,941 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:44:03,942 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:03,944 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 16:44:03,944 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 16:44:03,946 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:03,949 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:44:03,949 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:03,977 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 103 -2023-05-15 16:44:03,989 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | args: {'type': 'lora', 'model': '/home/vlado/dev/automatic/models/v1-5-pruned-emaonly.safetensors', 'name': 'test', 'tag': 'person', 'input': '/home/vlado/generative/Input/mia/', 'output': '', 'process': 'original,interrogate,resize,square', 'gradient': 1, 'steps': 2500, 'batch': 1, 'lr': 0.0001, 'dim': 40, 'repeats': 10, 'alpha': 0, 'overwrite': False, 'debug': True, 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'process_dir': '/tmp/train/test'} -2023-05-15 16:44:03,990 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | server flags: {'error': 500, 'reason': 'Internal Server Error', 'url': 'http://127.0.0.1:7860/sdapi/v1/cmd-flags'} -2023-05-15 16:44:03,991 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | server options: {'sd_model_checkpoint': 'v1-5-pruned-emaonly.safetensors [6ce0161689]', 'sd_checkpoint_cache': 0.0, 'sd_vae_checkpoint_cache': 0.0, 'sd_vae': 'Automatic', 'stream_load': False, 'model_reuse_dict': False, 'inpainting_mask_weight': 1.0, 'initial_noise_multiplier': 1.0, 'img2img_color_correction': False, 'img2img_fix_steps': False, 'img2img_background_color': '#ffffff', 'enable_quantization': True, 'comma_padding_backtrack': 20.0, 'CLIP_stop_at_last_layers': 1.0, 'upcast_attn': False, 'cross_attention_optimization': 'Scaled-Dot-Product', 'cross_attention_options': [], 'sub_quad_q_chunk_size': 512.0, 'sub_quad_kv_chunk_size': 512.0, 'sub_quad_chunk_threshold': 80.0, 'always_batch_cond_uncond': False, 'temp_dir': '', 'clean_temp_dir_at_start': True, 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'vae_dir': '/home/vlado/dev/automatic/models/VAE', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'hypernetwork_dir': '/home/vlado/dev/automatic/models/hypernetworks', 'codeformer_models_path': '/home/vlado/dev/automatic/models/Codeformer', 'gfpgan_models_path': '/home/vlado/dev/automatic/models/GFPGAN', 'esrgan_models_path': '/home/vlado/dev/automatic/models/ESRGAN', 'bsrgan_models_path': '/home/vlado/dev/automatic/models/BSRGAN', 'realesrgan_models_path': '/home/vlado/dev/automatic/models/RealESRGAN', 'scunet_models_path': '/home/vlado/dev/automatic/models/ScuNET', 'swinir_models_path': '/home/vlado/dev/automatic/models/SwinIR', 'ldsr_models_path': '/home/vlado/dev/automatic/models/LDSR', 'clip_models_path': '/home/vlado/dev/automatic/models/CLIP', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'styles_dir': 'styles.csv', 'samples_save': True, 'samples_format': 'jpg', 'samples_filename_pattern': '', 'save_images_add_number': True, 'grid_save': True, 'grid_format': 'jpg', 'grid_extended_filename': True, 'grid_only_if_multiple': True, 'grid_prevent_empty_spots': True, 'n_rows': -1.0, 'save_txt': False, 'save_log_fn': '', 'save_images_before_face_restoration': False, 'save_images_before_highres_fix': False, 'save_images_before_color_correction': False, 'save_mask': False, 'save_mask_composite': False, 'jpeg_quality': 85.0, 'webp_lossless': False, 'img_max_size_mp': 200.0, 'use_original_name_batch': True, 'use_upscaler_name_as_suffix': True, 'save_selected_only': True, 'save_init_img': False, 'save_to_dirs': False, 'grid_save_to_dirs': False, 'use_save_to_dirs_for_ui': False, 'directories_filename_pattern': '[date]', 'directories_max_prompt_words': 8.0, 'outdir_samples': '', 'outdir_txt2img_samples': 'outputs/text', 'outdir_img2img_samples': 'outputs/image', 'outdir_extras_samples': 'outputs/extras', 'outdir_grids': '', 'outdir_txt2img_grids': 'outputs/grids', 'outdir_img2img_grids': 'outputs/grids', 'outdir_save': 'outputs/save', 'outdir_init_images': 'outputs/init-images', 'memmon_poll_rate': 2.0, 'precision': 'Autocast', 'cuda_dtype': 'FP16', 'no_half': False, 'no_half_vae': False, 'upcast_sampling': False, 'disable_nan_check': True, 'rollback_vae': False, 'opt_channelslast': False, 'cudnn_benchmark': False, 'cuda_allow_tf32': True, 'cuda_allow_tf16_reduced': True, 'cuda_compile': False, 'cuda_compile_mode': 'none', 'cuda_compile_verbose': False, 'cuda_compile_errors': True, 'disable_gc': True, 'upscaler_for_img2img': 'None', 'realesrgan_enabled_models': ['R-ESRGAN 4x+', 'R-ESRGAN 4x+ Anime6B'], 'ESRGAN_tile': 192.0, 'ESRGAN_tile_overlap': 8.0, 'SCUNET_tile': 256.0, 'SCUNET_tile_overlap': 8.0, 'use_old_hires_fix_width_height': False, 'dont_fix_second_order_samplers_schedule': False, 'face_restoration_model': 'CodeFormer', 'code_former_weight': 0.2, 'face_restoration_unload': False, 'unload_models_when_training': False, 'pin_memory': True, 'save_optimizer_state': False, 'save_training_settings_to_txt': False, 'dataset_filename_word_regex': '', 'dataset_filename_join_string': ' ', 'embeddings_templates_dir': '/home/vlado/dev/automatic/train/templates', 'training_image_repeats_per_epoch': 10.0, 'training_write_csv_every': 0.0, 'training_enable_tensorboard': False, 'training_tensorboard_save_images': False, 'training_tensorboard_flush_every': 120.0, 'interrogate_keep_models_in_memory': False, 'interrogate_return_ranks': True, 'interrogate_clip_num_beams': 1.0, 'interrogate_clip_min_length': 32.0, 'interrogate_clip_max_length': 192.0, 'interrogate_clip_dict_limit': 2048.0, 'interrogate_clip_skip_categories': ['artists', 'movements', 'flavors'], 'interrogate_deepbooru_score_threshold': 0.65, 'deepbooru_sort_alpha': False, 'deepbooru_use_spaces': False, 'deepbooru_escape': True, 'deepbooru_filter_tags': '', 'extra_networks_default_view': 'cards', 'extra_networks_default_multiplier': 1.0, 'extra_networks_card_width': 0.0, 'extra_networks_card_height': 0.0, 'extra_networks_add_text_separator': ' ', 'sd_hypernetwork': 'None', 'gradio_theme': 'black-orange', 'return_grid': True, 'return_mask': False, 'return_mask_composite': False, 'disable_weights_auto_swap': True, 'send_seed': True, 'send_size': True, 'font': '', 'keyedit_precision_attention': 0.1, 'keyedit_precision_extra': 0.05, 'keyedit_delimiters': '.,\\/!?%^*;:{}=`~()', 'quicksettings': 'sd_model_checkpoint', 'hidden_tabs': [], 'ui_tab_reorder': 'From Text, From Image, Process Image', 'ui_scripts_reorder': 'Enable Dynamic Thresholding, ControlNet', 'ui_reorder': 'inpaint, sampler, checkboxes, hires_fix, dimensions, cfg, seed, batch, override_settings, scripts', 'ui_extra_networks_tab_reorder': '', 'show_progressbar': True, 'live_previews_enable': True, 'show_progress_grid': True, 'notification_audio_enable': False, 'notification_audio_path': 'html/notification.mp3', 'show_progress_every_n_steps': 1.0, 'show_progress_type': 'Approx NN', 'live_preview_content': 'Combined', 'live_preview_refresh_period': 250.0, 'show_samplers': ['Euler a', 'UniPC', 'DDIM', 'DPM++ SDE', 'DPM++ SDE', 'DPM2 Karras', 'DPM++ 2M Karras'], 'fallback_sampler': 'Euler a', 'xyz_fallback_sampler': 'None', 'eta_ancestral': 1.0, 'eta_ddim': 0.0, 'ddim_discretize': 'uniform', 's_churn': 0.0, 's_min_uncond': 0.0, 's_tmin': 0.0, 's_noise': 1.0, 'eta_noise_seed_delta': 0.0, 'always_discard_next_to_last_sigma': False, 'uni_pc_variant': 'bh1', 'uni_pc_skip_type': 'time_uniform', 'uni_pc_order': 3.0, 'uni_pc_lower_order_final': True, 'token_merging': False, 'token_merging_ratio': 0.5, 'token_merging_hr_only': True, 'token_merging_ratio_hr': 0.5, 'token_merging_random': False, 'token_merging_merge_attention': True, 'token_merging_merge_cross_attention': False, 'token_merging_merge_mlp': False, 'token_merging_maximum_down_sampling': 1.0, 'token_merging_stride_x': 2.0, 'token_merging_stride_y': 2.0, 'postprocessing_enable_in_main_ui': [], 'postprocessing_operation_order': [], 'upscaling_max_images_in_cache': 5.0, 'disabled_extensions': [], 'disable_all_extensions': 'none', 'sd_checkpoint_hash': '6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa', 'sd_lyco': 'None', 'sd_lora': 'None'} -2023-05-15 16:44:03,998 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | train using lora style training -2023-05-15 16:44:05,079 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 26.4, 'used': 1.0, 'total': 27.41} gpu current: {'free': 10.42, 'used': 1.57, 'total': 12.0} gpu peak: {'active': 0.0, 'allocated': 0.0, 'reserved': 0.0} -2023-05-15 16:44:05,080 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 16:44:05,208 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing input images: 40 -2023-05-15 16:44:05,208 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processed folder exists: /tmp/train/test -2023-05-15 16:44:05,209 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing current step: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 16:44:05,209 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing concept: person -2023-05-15 16:44:05,210 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing output folder: /tmp/train/test/10_person -2023-05-15 16:44:05,214 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:05,214 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:44:05,214 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:05,214 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:05,214 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:05,246 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:06,247 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 16:44:06,255 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:06,445 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 187 -2023-05-15 16:44:06,453 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:06,453 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102947_Instagram.jpg => /tmp/train/test/10_person/001-original-Screenshot_20221225_102947_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:06,456 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:06,456 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06@' -2023-05-15 16:44:06,456 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:06,456 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:06,456 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:06,484 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:07,520 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 16:44:07,526 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:07,696 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 291 -2023-05-15 16:44:07,703 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:07,703 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102956_Instagram.jpg => /tmp/train/test/10_person/002-original-Screenshot_20221225_102956_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:07,706 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:07,706 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:44:07,706 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:07,706 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:07,707 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:07,734 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:08,826 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 175 -2023-05-15 16:44:08,832 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:09,002 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 185 -2023-05-15 16:44:09,009 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:09,009 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103005_Instagram.jpg => /tmp/train/test/10_person/003-original-Screenshot_20221225_103005_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:09,012 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:09,012 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xff' -2023-05-15 16:44:09,012 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:09,012 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:09,012 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:09,043 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:10,093 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 16:44:10,099 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:10,276 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 262 -2023-05-15 16:44:10,283 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:10,283 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103018_Instagram.jpg => /tmp/train/test/10_person/004-original-Screenshot_20221225_103018_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:10,287 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:10,287 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06X' -2023-05-15 16:44:10,287 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:10,287 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:10,287 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:10,312 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:11,310 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 16:44:11,316 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:11,465 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 227 -2023-05-15 16:44:11,472 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:11,472 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103034_Instagram.jpg => /tmp/train/test/10_person/005-original-Screenshot_20221225_103034_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:11,476 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:11,476 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:44:11,476 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:11,476 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:11,476 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:11,498 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:12,470 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:44:12,475 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:12,640 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 497 -2023-05-15 16:44:12,647 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:12,647 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103043_Instagram.jpg => /tmp/train/test/10_person/006-original-Screenshot_20221225_103043_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:12,650 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:12,651 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:44:12,651 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:12,651 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:12,651 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:12,674 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:13,591 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 16:44:13,596 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:13,771 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 16:44:13,778 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:13,778 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103058_Instagram.jpg => /tmp/train/test/10_person/007-original-Screenshot_20221225_103058_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:13,781 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:13,781 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:44:13,781 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:13,781 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:13,781 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:13,806 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:14,810 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 16:44:14,816 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:14,971 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 251 -2023-05-15 16:44:14,979 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:14,979 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103106_Instagram.jpg => /tmp/train/test/10_person/008-original-Screenshot_20221225_103106_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:14,982 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:14,982 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:44:14,982 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:14,982 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:14,982 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:15,003 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:16,030 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:44:16,036 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:16,202 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 216 -2023-05-15 16:44:16,209 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:16,209 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103115_Instagram.jpg => /tmp/train/test/10_person/009-original-Screenshot_20221225_103115_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:16,213 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:16,213 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xc8' -2023-05-15 16:44:16,213 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:16,213 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:16,213 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:16,239 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:17,303 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 140 -2023-05-15 16:44:17,309 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:17,477 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 263 -2023-05-15 16:44:17,484 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:17,485 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103128_Instagram.jpg => /tmp/train/test/10_person/010-original-Screenshot_20221225_103128_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:17,488 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:17,488 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xfb' -2023-05-15 16:44:17,488 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:17,488 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:17,488 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:17,514 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:18,524 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 16:44:18,530 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:18,681 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 192 -2023-05-15 16:44:18,689 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:18,689 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103144_Instagram.jpg => /tmp/train/test/10_person/011-original-Screenshot_20221225_103144_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:18,692 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 16:44:18,692 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xb6' -2023-05-15 16:44:18,692 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:18,692 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:18,692 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:18,717 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:19,575 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 179 -2023-05-15 16:44:19,581 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:19,734 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 348 -2023-05-15 16:44:19,741 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:19,742 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103159_Instagram.jpg => /tmp/train/test/10_person/012-original-Screenshot_20221225_103159_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:19,745 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:19,745 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 16:44:19,745 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:19,745 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:19,745 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:19,769 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:20,755 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 16:44:20,761 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:20,902 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 299 -2023-05-15 16:44:20,909 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:20,910 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103207_Instagram.jpg => /tmp/train/test/10_person/013-original-Screenshot_20221225_103207_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:20,913 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:20,913 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:44:20,913 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:20,913 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:20,913 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:20,938 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:21,737 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 176 -2023-05-15 16:44:21,743 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:21,886 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 343 -2023-05-15 16:44:21,894 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:21,894 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103222_Instagram.jpg => /tmp/train/test/10_person/014-original-Screenshot_20221225_103222_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:21,897 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:21,897 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 16:44:21,897 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:21,897 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:21,897 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:21,921 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:22,757 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 189 -2023-05-15 16:44:22,763 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:22,906 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 311 -2023-05-15 16:44:22,914 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:22,914 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103233_Instagram.jpg => /tmp/train/test/10_person/015-original-Screenshot_20221225_103233_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:22,917 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:22,917 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:44:22,917 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:22,917 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:22,917 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:22,942 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:23,723 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 16:44:23,729 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:23,859 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 366 -2023-05-15 16:44:23,867 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:23,867 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103240_Instagram.jpg => /tmp/train/test/10_person/016-original-Screenshot_20221225_103240_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:23,870 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 16:44:23,870 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x06' -2023-05-15 16:44:23,870 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:23,870 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:23,870 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:23,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:24,667 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 16:44:24,673 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:24,804 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 712 -2023-05-15 16:44:24,812 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:24,812 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103256_Instagram.jpg => /tmp/train/test/10_person/017-original-Screenshot_20221225_103256_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:24,815 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:24,815 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:44:24,815 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:24,815 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:24,815 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:24,836 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:25,564 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 16:44:25,569 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:25,703 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 169 -2023-05-15 16:44:25,711 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:25,711 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103313_Instagram.jpg => /tmp/train/test/10_person/018-original-Screenshot_20221225_103313_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:25,714 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:25,714 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:44:25,714 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:25,714 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:25,714 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:25,738 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:26,499 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 16:44:26,505 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:26,640 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 253 -2023-05-15 16:44:26,648 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:26,648 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103321_Instagram.jpg => /tmp/train/test/10_person/019-original-Screenshot_20221225_103321_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:26,651 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:26,651 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:44:26,651 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:26,651 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:26,651 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:26,675 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:27,423 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 16:44:27,428 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:27,563 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 295 -2023-05-15 16:44:27,571 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:27,571 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103335_Instagram.jpg => /tmp/train/test/10_person/020-original-Screenshot_20221225_103335_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:27,574 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:27,575 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:44:27,575 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:27,575 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:27,575 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:27,598 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:28,358 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 165 -2023-05-15 16:44:28,364 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:28,496 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 252 -2023-05-15 16:44:28,503 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:28,503 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103345_Instagram.jpg => /tmp/train/test/10_person/021-original-Screenshot_20221225_103345_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:28,506 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:28,506 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06c' -2023-05-15 16:44:28,506 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:28,506 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:28,506 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:28,531 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:29,311 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 16:44:29,316 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:29,457 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 16:44:29,464 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:29,464 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103406_Instagram.jpg => /tmp/train/test/10_person/022-original-Screenshot_20221225_103406_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:29,467 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:29,467 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 16:44:29,467 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:29,467 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:29,467 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:29,490 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:30,235 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 16:44:30,241 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:30,379 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 237 -2023-05-15 16:44:30,386 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:30,386 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103427_Instagram.jpg => /tmp/train/test/10_person/023-original-Screenshot_20221225_103427_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:30,389 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:30,389 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 16:44:30,389 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:30,389 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:30,389 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:30,412 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:31,136 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 16:44:31,141 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:31,271 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 308 -2023-05-15 16:44:31,278 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:31,279 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103433_Instagram.jpg => /tmp/train/test/10_person/024-original-Screenshot_20221225_103433_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:31,282 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:31,282 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x95' -2023-05-15 16:44:31,282 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:31,282 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:31,282 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:31,301 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:32,115 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 16:44:32,120 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:32,248 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 16:44:32,255 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:32,255 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103445_Instagram.jpg => /tmp/train/test/10_person/025-original-Screenshot_20221225_103445_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:32,258 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:32,258 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x93' -2023-05-15 16:44:32,258 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:32,258 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:32,258 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:32,280 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:33,074 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 157 -2023-05-15 16:44:33,080 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:33,210 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 434 -2023-05-15 16:44:33,217 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:33,217 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103500_Instagram.jpg => /tmp/train/test/10_person/026-original-Screenshot_20221225_103500_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:33,220 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:33,220 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x8b' -2023-05-15 16:44:33,220 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:33,220 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:33,220 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:33,244 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:33,966 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 16:44:33,971 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:34,099 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 457 -2023-05-15 16:44:34,107 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:34,107 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103507_Instagram.jpg => /tmp/train/test/10_person/027-original-Screenshot_20221225_103507_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:34,110 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:34,110 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:44:34,110 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:34,110 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:34,110 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:34,127 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:34,880 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 16:44:34,885 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:35,017 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 362 -2023-05-15 16:44:35,024 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:35,024 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103522_Instagram.jpg => /tmp/train/test/10_person/028-original-Screenshot_20221225_103522_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:35,028 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9c' -2023-05-15 16:44:35,028 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:44:35,028 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:35,028 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:35,028 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:35,050 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:35,850 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 16:44:35,855 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:35,987 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 16:44:35,994 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:35,994 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103530_Instagram.jpg => /tmp/train/test/10_person/029-original-Screenshot_20221225_103530_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:35,998 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:35,998 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:44:35,998 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:35,998 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:35,998 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:36,018 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:36,809 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 154 -2023-05-15 16:44:36,814 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:36,947 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 113 -2023-05-15 16:44:36,954 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:36,954 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103536_Instagram.jpg => /tmp/train/test/10_person/030-original-Screenshot_20221225_103536_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:36,957 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x8a' -2023-05-15 16:44:36,957 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:44:36,957 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:36,957 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:36,957 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:36,979 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:37,713 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 16:44:37,718 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:37,848 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 16:44:37,855 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:37,856 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103543_Instagram.jpg => /tmp/train/test/10_person/031-original-Screenshot_20221225_103543_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:37,859 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:37,859 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:44:37,859 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:37,859 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:37,859 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:37,878 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:38,602 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 16:44:38,607 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:38,732 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 236 -2023-05-15 16:44:38,739 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:38,739 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103553_Instagram.jpg => /tmp/train/test/10_person/032-original-Screenshot_20221225_103553_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:38,742 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:38,742 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:44:38,743 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:38,743 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:38,743 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:38,762 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:39,499 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 174 -2023-05-15 16:44:39,504 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:39,631 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 204 -2023-05-15 16:44:39,638 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:39,638 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103559_Instagram.jpg => /tmp/train/test/10_person/033-original-Screenshot_20221225_103559_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:39,641 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:39,642 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 16:44:39,642 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:39,642 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:39,642 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:39,661 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:40,385 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 16:44:40,390 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:40,517 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 628 -2023-05-15 16:44:40,524 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:40,524 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103613_Instagram.jpg => /tmp/train/test/10_person/034-original-Screenshot_20221225_103613_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:40,527 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:40,527 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 16:44:40,527 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:40,527 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:40,527 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:40,547 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:41,280 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 167 -2023-05-15 16:44:41,285 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:41,420 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 563 -2023-05-15 16:44:41,427 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:41,427 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103621_Instagram.jpg => /tmp/train/test/10_person/035-original-Screenshot_20221225_103621_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:41,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:41,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9d' -2023-05-15 16:44:41,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:41,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:41,431 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:41,454 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:42,182 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:44:42,188 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:42,319 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 512 -2023-05-15 16:44:42,326 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:42,326 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103629_Instagram.jpg => /tmp/train/test/10_person/036-original-Screenshot_20221225_103629_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:42,329 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:42,329 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:44:42,329 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:42,329 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:42,329 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:42,349 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:43,068 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 16:44:43,073 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:43,201 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 160 -2023-05-15 16:44:43,208 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:43,208 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103638_Instagram.jpg => /tmp/train/test/10_person/037-original-Screenshot_20221225_103638_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:43,211 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:43,211 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x04\xb0' -2023-05-15 16:44:43,211 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:43,211 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:43,211 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:43,230 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:43,950 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 168 -2023-05-15 16:44:43,954 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:44,077 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 908 -2023-05-15 16:44:44,083 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:44,083 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103649_Instagram.jpg => /tmp/train/test/10_person/038-original-Screenshot_20221225_103649_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:44,086 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:44,086 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 16:44:44,086 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:44,086 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:44,086 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:44,110 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:44,847 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:44:44,853 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:44,981 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 289 -2023-05-15 16:44:44,988 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:44,988 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103656_Instagram.jpg => /tmp/train/test/10_person/039-original-Screenshot_20221225_103656_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:44,991 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:44:44,991 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x15' -2023-05-15 16:44:44,991 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:44:44,991 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:44:44,991 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:44:45,017 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:45,746 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 16:44:45,751 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:44:45,880 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 16:44:45,888 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:44:45,888 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103727_Instagram.jpg => /tmp/train/test/10_person/040-original-Screenshot_20221225_103727_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:44:45,889 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | input datasets ['/tmp/train/test/10_person'] -2023-05-15 16:44:45,892 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTPS connection (1): huggingface.co:443 -2023-05-15 16:44:46,704 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /stabilityai/sd-vae-ft-mse/resolve/main/diffusion_pytorch_model.safetensors HTTP/1.1" 302 0 -2023-05-15 16:44:47,307 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /stabilityai/sd-vae-ft-mse/resolve/main/config.json HTTP/1.1" 200 0 -2023-05-15 16:44:55,334 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps result: {'inputs': 40, 'outputs': {'original': 40, 'total': 40}, 'metadata': '/tmp/train/test/test.json'} -2023-05-15 16:44:55,462 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 22.42, 'used': 4.99, 'total': 27.41} gpu current: {'free': 9.7, 'used': 2.3, 'total': 12.0} gpu peak: {'active': 0.95, 'allocated': 0.95, 'reserved': 1.11} -2023-05-15 16:44:55,466 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | lora options: {'bucket_no_upscale': False, 'bucket_reso_steps': 64, 'cache_latents': True, 'caption_dropout_every_n_epochs': None, 'caption_dropout_rate': 0.0, 'caption_extension': '.txt', 'caption_extention': '.txt', 'caption_tag_dropout_rate': 0.0, 'clip_skip': None, 'color_aug': False, 'dataset_repeats': 1, 'debug_dataset': False, 'enable_bucket': False, 'face_crop_aug_range': None, 'flip_aug': False, 'full_fp16': False, 'gradient_accumulation_steps': 1, 'gradient_checkpointing': False, 'in_json': '/tmp/train/test/test.json', 'keep_tokens': None, 'learning_rate': 0.0001, 'log_prefix': None, 'logging_dir': None, 'lr_scheduler_num_cycles': 1, 'lr_scheduler_power': 1, 'lr_scheduler': 'cosine', 'lr_warmup_steps': 0, 'max_bucket_reso': 1024, 'max_data_loader_n_workers': 8, 'max_grad_norm': 0.0, 'max_token_length': None, 'max_train_epochs': None, 'max_train_steps': 2500, 'mem_eff_attn': False, 'min_bucket_reso': 256, 'mixed_precision': 'fp16', 'network_alpha': 20, 'network_args': None, 'network_dim': 40, 'network_module': 'networks.lora', 'network_train_text_encoder_only': False, 'network_train_unet_only': False, 'network_weights': None, 'no_metadata': False, 'output_dir': '/home/vlado/dev/automatic/models/Lora', 'output_name': 'test', 'persistent_data_loader_workers': False, 'pretrained_model_name_or_path': '/home/vlado/dev/automatic/models/v1-5-pruned-emaonly.safetensors', 'prior_loss_weight': 1.0, 'random_crop': False, 'reg_data_dir': None, 'resolution': '512,512', 'resume': None, 'save_every_n_epochs': None, 'save_last_n_epochs_state': None, 'save_last_n_epochs': None, 'save_model_as': 'ckpt', 'save_n_epoch_ratio': None, 'save_precision': 'fp16', 'save_state': False, 'seed': 42, 'shuffle_caption': False, 'text_encoder_lr': 5e-05, 'train_batch_size': 1, 'train_data_dir': '/tmp/train/test', 'training_comment': 'mood-magic', 'unet_lr': 0.0001, 'use_8bit_adam': False, 'v_parameterization': False, 'v2': False, 'vae': None, 'xformers': False} -2023-05-15 16:44:55,469 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | importing lora lib -2023-05-15 16:44:56,143 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/vocab.json HTTP/1.1" 200 0 -2023-05-15 16:45:00,077 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/config.json HTTP/1.1" 200 0 -2023-05-15 16:45:00,729 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/model.safetensors HTTP/1.1" 404 0 -2023-05-15 16:45:01,415 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/model.safetensors.index.json HTTP/1.1" 404 0 -2023-05-15 16:45:02,134 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/pytorch_model.bin HTTP/1.1" 302 0 -2023-05-15 16:45:54,862 | ERROR | /home/vlado/dev/automatic/cli/train/./train.py | interrupt requested -2023-05-15 16:45:54,864 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:45:54,867 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 16:45:55,059 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 19.19, 'used': 8.21, 'total': 27.41} gpu current: {'free': 9.53, 'used': 2.47, 'total': 12.0} gpu peak: {'active': 3.91, 'allocated': 3.91, 'reserved': 4.36} -2023-05-15 16:45:55,060 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | done -2023-05-15 16:47:32,204 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:47:32,206 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 16:47:32,207 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:47:32,210 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:47:32,211 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:47:32,233 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 151 -2023-05-15 16:47:32,234 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:47:32,237 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 16:47:32,237 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 16:47:32,239 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:47:32,242 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:47:32,242 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:47:32,251 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 500 151 -2023-05-15 16:47:32,264 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | args: {'type': 'lora', 'model': '/home/vlado/dev/automatic/models/v1-5-pruned-emaonly.safetensors', 'name': 'test', 'tag': 'person', 'input': '/home/vlado/generative/Input/mia/', 'output': '', 'process': 'original,interrogate,resize,square', 'gradient': 1, 'steps': 2500, 'batch': 1, 'lr': 0.0001, 'dim': 40, 'repeats': 10, 'alpha': 0, 'overwrite': False, 'debug': True, 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'process_dir': '/tmp/train/test'} -2023-05-15 16:47:32,265 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | server flags: {'error': 500, 'reason': 'Internal Server Error', 'url': 'http://127.0.0.1:7860/sdapi/v1/cmd-flags'} -2023-05-15 16:47:32,266 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | server options: {'sd_model_checkpoint': 'v1-5-pruned-emaonly.safetensors [6ce0161689]', 'sd_checkpoint_cache': 0.0, 'sd_vae_checkpoint_cache': 0.0, 'sd_vae': 'Automatic', 'stream_load': False, 'model_reuse_dict': False, 'inpainting_mask_weight': 1.0, 'initial_noise_multiplier': 1.0, 'img2img_color_correction': False, 'img2img_fix_steps': False, 'img2img_background_color': '#ffffff', 'enable_quantization': True, 'comma_padding_backtrack': 20.0, 'CLIP_stop_at_last_layers': 1.0, 'upcast_attn': False, 'cross_attention_optimization': 'Scaled-Dot-Product', 'cross_attention_options': [], 'sub_quad_q_chunk_size': 512.0, 'sub_quad_kv_chunk_size': 512.0, 'sub_quad_chunk_threshold': 80.0, 'always_batch_cond_uncond': False, 'temp_dir': '', 'clean_temp_dir_at_start': True, 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'vae_dir': '/home/vlado/dev/automatic/models/VAE', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'hypernetwork_dir': '/home/vlado/dev/automatic/models/hypernetworks', 'codeformer_models_path': '/home/vlado/dev/automatic/models/Codeformer', 'gfpgan_models_path': '/home/vlado/dev/automatic/models/GFPGAN', 'esrgan_models_path': '/home/vlado/dev/automatic/models/ESRGAN', 'bsrgan_models_path': '/home/vlado/dev/automatic/models/BSRGAN', 'realesrgan_models_path': '/home/vlado/dev/automatic/models/RealESRGAN', 'scunet_models_path': '/home/vlado/dev/automatic/models/ScuNET', 'swinir_models_path': '/home/vlado/dev/automatic/models/SwinIR', 'ldsr_models_path': '/home/vlado/dev/automatic/models/LDSR', 'clip_models_path': '/home/vlado/dev/automatic/models/CLIP', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'styles_dir': 'styles.csv', 'samples_save': True, 'samples_format': 'jpg', 'samples_filename_pattern': '', 'save_images_add_number': True, 'grid_save': True, 'grid_format': 'jpg', 'grid_extended_filename': True, 'grid_only_if_multiple': True, 'grid_prevent_empty_spots': True, 'n_rows': -1.0, 'save_txt': False, 'save_log_fn': '', 'save_images_before_face_restoration': False, 'save_images_before_highres_fix': False, 'save_images_before_color_correction': False, 'save_mask': False, 'save_mask_composite': False, 'jpeg_quality': 85.0, 'webp_lossless': False, 'img_max_size_mp': 200.0, 'use_original_name_batch': True, 'use_upscaler_name_as_suffix': True, 'save_selected_only': True, 'save_init_img': False, 'save_to_dirs': False, 'grid_save_to_dirs': False, 'use_save_to_dirs_for_ui': False, 'directories_filename_pattern': '[date]', 'directories_max_prompt_words': 8.0, 'outdir_samples': '', 'outdir_txt2img_samples': 'outputs/text', 'outdir_img2img_samples': 'outputs/image', 'outdir_extras_samples': 'outputs/extras', 'outdir_grids': '', 'outdir_txt2img_grids': 'outputs/grids', 'outdir_img2img_grids': 'outputs/grids', 'outdir_save': 'outputs/save', 'outdir_init_images': 'outputs/init-images', 'memmon_poll_rate': 2.0, 'precision': 'Autocast', 'cuda_dtype': 'FP16', 'no_half': False, 'no_half_vae': False, 'upcast_sampling': False, 'disable_nan_check': True, 'rollback_vae': False, 'opt_channelslast': False, 'cudnn_benchmark': False, 'cuda_allow_tf32': True, 'cuda_allow_tf16_reduced': True, 'cuda_compile': False, 'cuda_compile_mode': 'none', 'cuda_compile_verbose': False, 'cuda_compile_errors': True, 'disable_gc': True, 'upscaler_for_img2img': 'None', 'realesrgan_enabled_models': ['R-ESRGAN 4x+', 'R-ESRGAN 4x+ Anime6B'], 'ESRGAN_tile': 192.0, 'ESRGAN_tile_overlap': 8.0, 'SCUNET_tile': 256.0, 'SCUNET_tile_overlap': 8.0, 'use_old_hires_fix_width_height': False, 'dont_fix_second_order_samplers_schedule': False, 'face_restoration_model': 'CodeFormer', 'code_former_weight': 0.2, 'face_restoration_unload': False, 'unload_models_when_training': False, 'pin_memory': True, 'save_optimizer_state': False, 'save_training_settings_to_txt': False, 'dataset_filename_word_regex': '', 'dataset_filename_join_string': ' ', 'embeddings_templates_dir': '/home/vlado/dev/automatic/train/templates', 'training_image_repeats_per_epoch': 10.0, 'training_write_csv_every': 0.0, 'training_enable_tensorboard': False, 'training_tensorboard_save_images': False, 'training_tensorboard_flush_every': 120.0, 'interrogate_keep_models_in_memory': False, 'interrogate_return_ranks': True, 'interrogate_clip_num_beams': 1.0, 'interrogate_clip_min_length': 32.0, 'interrogate_clip_max_length': 192.0, 'interrogate_clip_dict_limit': 2048.0, 'interrogate_clip_skip_categories': ['artists', 'movements', 'flavors'], 'interrogate_deepbooru_score_threshold': 0.65, 'deepbooru_sort_alpha': False, 'deepbooru_use_spaces': False, 'deepbooru_escape': True, 'deepbooru_filter_tags': '', 'extra_networks_default_view': 'cards', 'extra_networks_default_multiplier': 1.0, 'extra_networks_card_width': 0.0, 'extra_networks_card_height': 0.0, 'extra_networks_add_text_separator': ' ', 'sd_hypernetwork': 'None', 'gradio_theme': 'black-orange', 'return_grid': True, 'return_mask': False, 'return_mask_composite': False, 'disable_weights_auto_swap': True, 'send_seed': True, 'send_size': True, 'font': '', 'keyedit_precision_attention': 0.1, 'keyedit_precision_extra': 0.05, 'keyedit_delimiters': '.,\\/!?%^*;:{}=`~()', 'quicksettings': 'sd_model_checkpoint', 'hidden_tabs': [], 'ui_tab_reorder': 'From Text, From Image, Process Image', 'ui_scripts_reorder': 'Enable Dynamic Thresholding, ControlNet', 'ui_reorder': 'inpaint, sampler, checkboxes, hires_fix, dimensions, cfg, seed, batch, override_settings, scripts', 'ui_extra_networks_tab_reorder': '', 'show_progressbar': True, 'live_previews_enable': True, 'show_progress_grid': True, 'notification_audio_enable': False, 'notification_audio_path': 'html/notification.mp3', 'show_progress_every_n_steps': 1.0, 'show_progress_type': 'Approx NN', 'live_preview_content': 'Combined', 'live_preview_refresh_period': 250.0, 'show_samplers': ['Euler a', 'UniPC', 'DDIM', 'DPM++ SDE', 'DPM++ SDE', 'DPM2 Karras', 'DPM++ 2M Karras'], 'fallback_sampler': 'Euler a', 'xyz_fallback_sampler': 'None', 'eta_ancestral': 1.0, 'eta_ddim': 0.0, 'ddim_discretize': 'uniform', 's_churn': 0.0, 's_min_uncond': 0.0, 's_tmin': 0.0, 's_noise': 1.0, 'eta_noise_seed_delta': 0.0, 'always_discard_next_to_last_sigma': False, 'uni_pc_variant': 'bh1', 'uni_pc_skip_type': 'time_uniform', 'uni_pc_order': 3.0, 'uni_pc_lower_order_final': True, 'token_merging': False, 'token_merging_ratio': 0.5, 'token_merging_hr_only': True, 'token_merging_ratio_hr': 0.5, 'token_merging_random': False, 'token_merging_merge_attention': True, 'token_merging_merge_cross_attention': False, 'token_merging_merge_mlp': False, 'token_merging_maximum_down_sampling': 1.0, 'token_merging_stride_x': 2.0, 'token_merging_stride_y': 2.0, 'postprocessing_enable_in_main_ui': [], 'postprocessing_operation_order': [], 'upscaling_max_images_in_cache': 5.0, 'disabled_extensions': [], 'disable_all_extensions': 'none', 'sd_checkpoint_hash': '6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa', 'sd_lyco': 'None', 'sd_lora': 'None'} -2023-05-15 16:47:32,273 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | train using lora style training -2023-05-15 16:47:33,356 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 26.4, 'used': 1.01, 'total': 27.41} gpu current: {'free': 10.42, 'used': 1.57, 'total': 12.0} gpu peak: {'active': 0.0, 'allocated': 0.0, 'reserved': 0.0} -2023-05-15 16:47:33,357 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 16:47:33,485 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing input images: 40 -2023-05-15 16:47:33,486 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processed folder exists: /tmp/train/test -2023-05-15 16:47:33,486 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing current step: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 16:47:33,487 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing concept: person -2023-05-15 16:47:33,487 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing output folder: /tmp/train/test/10_person -2023-05-15 16:47:33,491 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:47:33,491 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:47:33,491 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:47:33,491 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:47:33,491 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:47:33,523 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:47:45,815 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 16:47:45,825 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:07,327 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:07,331 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/progress?skip_current_image=true HTTP/1.1" 200 222 -2023-05-15 16:49:07,332 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:07,335 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:49:07,336 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:07,338 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 200 850 -2023-05-15 16:49:07,338 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:07,340 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/options HTTP/1.1" 200 4 -2023-05-15 16:49:07,340 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | updated server options -2023-05-15 16:49:07,342 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:07,345 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/options HTTP/1.1" 200 2450 -2023-05-15 16:49:07,345 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:07,347 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "GET /sdapi/v1/cmd-flags HTTP/1.1" 200 850 -2023-05-15 16:49:07,358 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | args: {'type': 'lora', 'model': '/home/vlado/dev/automatic/models/v1-5-pruned-emaonly.safetensors', 'name': 'test', 'tag': 'person', 'input': '/home/vlado/generative/Input/mia/', 'output': '', 'process': 'original,interrogate,resize,square', 'gradient': 1, 'steps': 2500, 'batch': 1, 'lr': 0.0001, 'dim': 40, 'repeats': 10, 'alpha': 0, 'overwrite': False, 'debug': True, 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'process_dir': '/tmp/train/test'} -2023-05-15 16:49:07,359 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | server flags: {'config': '/home/vlado/dev/automatic/config.json', 'ui_config': '/home/vlado/dev/automatic/ui-config.json', 'medvram': False, 'lowvram': False, 'ckpt': 'models/v1-5-pruned-emaonly.safetensors', 'vae': None, 'data_dir': '/home/vlado/dev/automatic', 'models_dir': 'models', 'allow_code': False, 'share': False, 'insecure': False, 'use_cpu': [], 'listen': False, 'port': 7860, 'freeze': False, 'auth': None, 'authfile': None, 'autolaunch': False, 'api_auth': None, 'api_log': False, 'device_id': None, 'cors_origins': None, 'cors_regex': None, 'tls_keyfile': None, 'tls_certfile': None, 'tls_selfsign': None, 'server_name': None, 'no_hashing': False, 'no_download': False, 'profile': False, 'disable_queue': False, 'f': False, 'ui_settings_file': '/home/vlado/dev/automatic/config.json', 'ui_config_file': '/home/vlado/dev/automatic/ui-config.json', 'hide_ui_dir_config': False, 'theme': None, 'disable_console_progressbars': True, 'disable_safe_unpickle': True, 'lowram': False, 'disable_extension_access': False, 'api': True, 'debug': True, 'reset': False, 'upgrade': False, 'use_ipex': False, 'use_directml': False, 'use_cuda': False, 'use_rocm': False, 'skip_update': False, 'skip_requirements': False, 'skip_extensions': False, 'skip_git': False, 'skip_torch': False, 'experimental': False, 'reinstall': False, 'test': False, 'version': False, 'ignore': False, 'controlnet_dir': None, 'controlnet_annotator_models_path': None, 'no_half_controlnet': None, 'addnet_max_model_count': 5, 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'vae_dir': '/home/vlado/dev/automatic/models/VAE', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'embeddings_templates_dir': '/home/vlado/dev/automatic/train/templates', 'hypernetwork_dir': '/home/vlado/dev/automatic/models/hypernetworks', 'codeformer_models_path': '/home/vlado/dev/automatic/models/Codeformer', 'gfpgan_models_path': '/home/vlado/dev/automatic/models/GFPGAN', 'esrgan_models_path': '/home/vlado/dev/automatic/models/ESRGAN', 'bsrgan_models_path': '/home/vlado/dev/automatic/models/BSRGAN', 'realesrgan_models_path': '/home/vlado/dev/automatic/models/RealESRGAN', 'scunet_models_path': '/home/vlado/dev/automatic/models/ScuNET', 'swinir_models_path': '/home/vlado/dev/automatic/models/SwinIR', 'ldsr_models_path': '/home/vlado/dev/automatic/models/LDSR', 'clip_models_path': '/home/vlado/dev/automatic/models/CLIP', 'opt_channelslast': False, 'xformers': False, 'disable_nan_check': True, 'token_merging': False, 'rollback_vae': False, 'no_half': False, 'no_half_vae': False, 'precision': 'Autocast', 'sub_quad_q_chunk_size': 512, 'sub_quad_kv_chunk_size': 512, 'sub_quad_chunk_threshold': 80, 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'enable_console_prompts': False} -2023-05-15 16:49:07,363 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | server options: {'sd_model_checkpoint': 'v1-5-pruned-emaonly.safetensors [6ce0161689]', 'sd_checkpoint_cache': 0.0, 'sd_vae_checkpoint_cache': 0.0, 'sd_vae': 'Automatic', 'stream_load': False, 'model_reuse_dict': False, 'inpainting_mask_weight': 1.0, 'initial_noise_multiplier': 1.0, 'img2img_color_correction': False, 'img2img_fix_steps': False, 'img2img_background_color': '#ffffff', 'enable_quantization': True, 'comma_padding_backtrack': 20.0, 'CLIP_stop_at_last_layers': 1.0, 'upcast_attn': False, 'cross_attention_optimization': 'Scaled-Dot-Product', 'cross_attention_options': [], 'sub_quad_q_chunk_size': 512.0, 'sub_quad_kv_chunk_size': 512.0, 'sub_quad_chunk_threshold': 80.0, 'always_batch_cond_uncond': False, 'temp_dir': '', 'clean_temp_dir_at_start': True, 'ckpt_dir': '/home/vlado/dev/automatic/models/Stable-diffusion', 'vae_dir': '/home/vlado/dev/automatic/models/VAE', 'embeddings_dir': '/home/vlado/dev/automatic/models/embeddings', 'hypernetwork_dir': '/home/vlado/dev/automatic/models/hypernetworks', 'codeformer_models_path': '/home/vlado/dev/automatic/models/Codeformer', 'gfpgan_models_path': '/home/vlado/dev/automatic/models/GFPGAN', 'esrgan_models_path': '/home/vlado/dev/automatic/models/ESRGAN', 'bsrgan_models_path': '/home/vlado/dev/automatic/models/BSRGAN', 'realesrgan_models_path': '/home/vlado/dev/automatic/models/RealESRGAN', 'scunet_models_path': '/home/vlado/dev/automatic/models/ScuNET', 'swinir_models_path': '/home/vlado/dev/automatic/models/SwinIR', 'ldsr_models_path': '/home/vlado/dev/automatic/models/LDSR', 'clip_models_path': '/home/vlado/dev/automatic/models/CLIP', 'lora_dir': '/home/vlado/dev/automatic/models/Lora', 'lyco_dir': '/home/vlado/dev/automatic/models/LyCORIS', 'styles_dir': 'styles.csv', 'samples_save': True, 'samples_format': 'jpg', 'samples_filename_pattern': '', 'save_images_add_number': True, 'grid_save': True, 'grid_format': 'jpg', 'grid_extended_filename': True, 'grid_only_if_multiple': True, 'grid_prevent_empty_spots': True, 'n_rows': -1.0, 'save_txt': False, 'save_log_fn': '', 'save_images_before_face_restoration': False, 'save_images_before_highres_fix': False, 'save_images_before_color_correction': False, 'save_mask': False, 'save_mask_composite': False, 'jpeg_quality': 85.0, 'webp_lossless': False, 'img_max_size_mp': 200.0, 'use_original_name_batch': True, 'use_upscaler_name_as_suffix': True, 'save_selected_only': True, 'save_init_img': False, 'save_to_dirs': False, 'grid_save_to_dirs': False, 'use_save_to_dirs_for_ui': False, 'directories_filename_pattern': '[date]', 'directories_max_prompt_words': 8.0, 'outdir_samples': '', 'outdir_txt2img_samples': 'outputs/text', 'outdir_img2img_samples': 'outputs/image', 'outdir_extras_samples': 'outputs/extras', 'outdir_grids': '', 'outdir_txt2img_grids': 'outputs/grids', 'outdir_img2img_grids': 'outputs/grids', 'outdir_save': 'outputs/save', 'outdir_init_images': 'outputs/init-images', 'memmon_poll_rate': 2.0, 'precision': 'Autocast', 'cuda_dtype': 'FP16', 'no_half': False, 'no_half_vae': False, 'upcast_sampling': False, 'disable_nan_check': True, 'rollback_vae': False, 'opt_channelslast': False, 'cudnn_benchmark': False, 'cuda_allow_tf32': True, 'cuda_allow_tf16_reduced': True, 'cuda_compile': False, 'cuda_compile_mode': 'none', 'cuda_compile_verbose': False, 'cuda_compile_errors': True, 'disable_gc': True, 'upscaler_for_img2img': 'None', 'realesrgan_enabled_models': ['R-ESRGAN 4x+', 'R-ESRGAN 4x+ Anime6B'], 'ESRGAN_tile': 192.0, 'ESRGAN_tile_overlap': 8.0, 'SCUNET_tile': 256.0, 'SCUNET_tile_overlap': 8.0, 'use_old_hires_fix_width_height': False, 'dont_fix_second_order_samplers_schedule': False, 'face_restoration_model': 'CodeFormer', 'code_former_weight': 0.2, 'face_restoration_unload': False, 'unload_models_when_training': False, 'pin_memory': True, 'save_optimizer_state': False, 'save_training_settings_to_txt': False, 'dataset_filename_word_regex': '', 'dataset_filename_join_string': ' ', 'embeddings_templates_dir': '/home/vlado/dev/automatic/train/templates', 'training_image_repeats_per_epoch': 10.0, 'training_write_csv_every': 0.0, 'training_enable_tensorboard': False, 'training_tensorboard_save_images': False, 'training_tensorboard_flush_every': 120.0, 'interrogate_keep_models_in_memory': False, 'interrogate_return_ranks': True, 'interrogate_clip_num_beams': 1.0, 'interrogate_clip_min_length': 32.0, 'interrogate_clip_max_length': 192.0, 'interrogate_clip_dict_limit': 2048.0, 'interrogate_clip_skip_categories': ['artists', 'movements', 'flavors'], 'interrogate_deepbooru_score_threshold': 0.65, 'deepbooru_sort_alpha': False, 'deepbooru_use_spaces': False, 'deepbooru_escape': True, 'deepbooru_filter_tags': '', 'extra_networks_default_view': 'cards', 'extra_networks_default_multiplier': 1.0, 'extra_networks_card_width': 0.0, 'extra_networks_card_height': 0.0, 'extra_networks_add_text_separator': ' ', 'sd_hypernetwork': 'None', 'gradio_theme': 'black-orange', 'return_grid': True, 'return_mask': False, 'return_mask_composite': False, 'disable_weights_auto_swap': True, 'send_seed': True, 'send_size': True, 'font': '', 'keyedit_precision_attention': 0.1, 'keyedit_precision_extra': 0.05, 'keyedit_delimiters': '.,\\/!?%^*;:{}=`~()', 'quicksettings': 'sd_model_checkpoint', 'hidden_tabs': [], 'ui_tab_reorder': 'From Text, From Image, Process Image', 'ui_scripts_reorder': 'Enable Dynamic Thresholding, ControlNet', 'ui_reorder': 'inpaint, sampler, checkboxes, hires_fix, dimensions, cfg, seed, batch, override_settings, scripts', 'ui_extra_networks_tab_reorder': '', 'show_progressbar': True, 'live_previews_enable': True, 'show_progress_grid': True, 'notification_audio_enable': False, 'notification_audio_path': 'html/notification.mp3', 'show_progress_every_n_steps': 1.0, 'show_progress_type': 'Approx NN', 'live_preview_content': 'Combined', 'live_preview_refresh_period': 250.0, 'show_samplers': ['Euler a', 'UniPC', 'DDIM', 'DPM++ SDE', 'DPM++ SDE', 'DPM2 Karras', 'DPM++ 2M Karras'], 'fallback_sampler': 'Euler a', 'xyz_fallback_sampler': 'None', 'eta_ancestral': 1.0, 'eta_ddim': 0.0, 'ddim_discretize': 'uniform', 's_churn': 0.0, 's_min_uncond': 0.0, 's_tmin': 0.0, 's_noise': 1.0, 'eta_noise_seed_delta': 0.0, 'always_discard_next_to_last_sigma': False, 'uni_pc_variant': 'bh1', 'uni_pc_skip_type': 'time_uniform', 'uni_pc_order': 3.0, 'uni_pc_lower_order_final': True, 'token_merging': False, 'token_merging_ratio': 0.5, 'token_merging_hr_only': True, 'token_merging_ratio_hr': 0.5, 'token_merging_random': False, 'token_merging_merge_attention': True, 'token_merging_merge_cross_attention': False, 'token_merging_merge_mlp': False, 'token_merging_maximum_down_sampling': 1.0, 'token_merging_stride_x': 2.0, 'token_merging_stride_y': 2.0, 'postprocessing_enable_in_main_ui': [], 'postprocessing_operation_order': [], 'upscaling_max_images_in_cache': 5.0, 'disabled_extensions': [], 'disable_all_extensions': 'none', 'sd_checkpoint_hash': '6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa', 'sd_lyco': 'None', 'sd_lora': 'None'} -2023-05-15 16:49:07,369 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | train using lora style training -2023-05-15 16:49:08,521 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 26.4, 'used': 1.01, 'total': 27.41} gpu current: {'free': 10.42, 'used': 1.57, 'total': 12.0} gpu peak: {'active': 0.0, 'allocated': 0.0, 'reserved': 0.0} -2023-05-15 16:49:08,522 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 16:49:08,651 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing input images: 40 -2023-05-15 16:49:08,651 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processed folder exists: /tmp/train/test -2023-05-15 16:49:08,652 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing current step: ['original', 'interrogate', 'resize', 'square'] -2023-05-15 16:49:08,652 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing concept: person -2023-05-15 16:49:08,653 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing output folder: /tmp/train/test/10_person -2023-05-15 16:49:08,657 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:08,657 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:49:08,657 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:08,657 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:08,657 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:08,691 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:16,780 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 16:49:16,788 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:18,885 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 187 -2023-05-15 16:49:18,893 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:18,893 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102947_Instagram.jpg => /tmp/train/test/10_person/001-original-Screenshot_20221225_102947_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:18,896 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:18,896 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06@' -2023-05-15 16:49:18,896 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:18,896 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:18,896 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:18,928 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:19,855 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 172 -2023-05-15 16:49:19,861 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:20,003 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 291 -2023-05-15 16:49:20,010 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:20,010 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_102956_Instagram.jpg => /tmp/train/test/10_person/002-original-Screenshot_20221225_102956_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:20,014 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:20,014 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:49:20,014 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:20,014 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:20,014 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:20,044 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:20,902 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 175 -2023-05-15 16:49:20,909 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:21,064 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 185 -2023-05-15 16:49:21,071 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:21,072 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103005_Instagram.jpg => /tmp/train/test/10_person/003-original-Screenshot_20221225_103005_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:21,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:21,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xff' -2023-05-15 16:49:21,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:21,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:21,075 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:21,103 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:22,025 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 16:49:22,031 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:22,176 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 262 -2023-05-15 16:49:22,183 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:22,183 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103018_Instagram.jpg => /tmp/train/test/10_person/004-original-Screenshot_20221225_103018_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:22,187 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:22,187 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06X' -2023-05-15 16:49:22,187 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:22,187 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:22,187 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:22,212 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:22,994 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 16:49:23,000 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:23,152 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 227 -2023-05-15 16:49:23,159 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:23,159 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103034_Instagram.jpg => /tmp/train/test/10_person/005-original-Screenshot_20221225_103034_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:23,163 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:23,163 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06;' -2023-05-15 16:49:23,163 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:23,163 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:23,163 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:23,189 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:23,932 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:49:23,938 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:24,082 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 497 -2023-05-15 16:49:24,089 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:24,089 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103043_Instagram.jpg => /tmp/train/test/10_person/006-original-Screenshot_20221225_103043_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:24,093 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:24,093 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:49:24,093 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:24,093 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:24,093 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:24,117 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:24,890 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 16:49:24,896 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:25,031 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 16:49:25,040 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:25,040 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103058_Instagram.jpg => /tmp/train/test/10_person/007-original-Screenshot_20221225_103058_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:25,044 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:25,044 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:49:25,044 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:25,044 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:25,044 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:25,068 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:25,842 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 16:49:25,847 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:25,977 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 251 -2023-05-15 16:49:25,985 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:25,985 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103106_Instagram.jpg => /tmp/train/test/10_person/008-original-Screenshot_20221225_103106_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:25,989 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:25,989 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:49:25,989 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:25,989 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:25,989 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:26,011 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:26,828 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:49:26,833 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:26,963 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 216 -2023-05-15 16:49:26,971 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:26,971 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103115_Instagram.jpg => /tmp/train/test/10_person/009-original-Screenshot_20221225_103115_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:26,974 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:26,974 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xc8' -2023-05-15 16:49:26,974 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:26,974 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:26,974 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:27,004 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:27,807 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 140 -2023-05-15 16:49:27,813 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:27,960 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 263 -2023-05-15 16:49:27,968 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:27,968 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103128_Instagram.jpg => /tmp/train/test/10_person/010-original-Screenshot_20221225_103128_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:27,971 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:27,971 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xfb' -2023-05-15 16:49:27,971 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:27,971 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:27,971 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:27,998 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:28,769 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 16:49:28,775 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:28,907 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 192 -2023-05-15 16:49:28,915 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:28,915 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103144_Instagram.jpg => /tmp/train/test/10_person/011-original-Screenshot_20221225_103144_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:28,918 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 16:49:28,918 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\xb6' -2023-05-15 16:49:28,918 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:28,918 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:28,918 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:28,945 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:29,728 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 179 -2023-05-15 16:49:29,734 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:29,887 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 348 -2023-05-15 16:49:29,895 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:29,895 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103159_Instagram.jpg => /tmp/train/test/10_person/012-original-Screenshot_20221225_103159_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:29,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:29,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 16:49:29,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:29,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:29,898 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:29,923 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:30,702 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 16:49:30,708 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:30,843 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 299 -2023-05-15 16:49:30,851 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:30,851 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103207_Instagram.jpg => /tmp/train/test/10_person/013-original-Screenshot_20221225_103207_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:30,854 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:30,854 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:49:30,854 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:30,854 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:30,854 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:30,880 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:31,614 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 176 -2023-05-15 16:49:31,620 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:31,750 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 343 -2023-05-15 16:49:31,758 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:31,758 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103222_Instagram.jpg => /tmp/train/test/10_person/014-original-Screenshot_20221225_103222_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:31,761 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:31,761 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x02' -2023-05-15 16:49:31,761 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:31,761 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:31,761 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:31,787 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:32,555 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 189 -2023-05-15 16:49:32,561 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:32,690 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 311 -2023-05-15 16:49:32,698 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:32,698 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103233_Instagram.jpg => /tmp/train/test/10_person/015-original-Screenshot_20221225_103233_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:32,701 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:32,701 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:49:32,701 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:32,701 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:32,701 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:32,727 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:33,515 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 16:49:33,521 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:33,651 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 366 -2023-05-15 16:49:33,659 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:33,659 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103240_Instagram.jpg => /tmp/train/test/10_person/016-original-Screenshot_20221225_103240_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:33,662 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\xa0' -2023-05-15 16:49:33,662 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x06' -2023-05-15 16:49:33,662 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:33,662 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:33,662 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:33,692 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:34,476 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 16:49:34,482 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:34,615 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 712 -2023-05-15 16:49:34,622 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:34,622 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103256_Instagram.jpg => /tmp/train/test/10_person/017-original-Screenshot_20221225_103256_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:34,625 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:34,625 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:49:34,625 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:34,625 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:34,625 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:34,648 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:35,400 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 16:49:35,405 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:35,541 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 169 -2023-05-15 16:49:35,549 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:35,549 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103313_Instagram.jpg => /tmp/train/test/10_person/018-original-Screenshot_20221225_103313_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:35,552 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:35,552 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:49:35,552 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:35,552 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:35,552 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:35,578 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:36,369 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 16:49:36,374 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:36,503 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 253 -2023-05-15 16:49:36,511 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:36,511 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103321_Instagram.jpg => /tmp/train/test/10_person/019-original-Screenshot_20221225_103321_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:36,514 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:36,514 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x03' -2023-05-15 16:49:36,514 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:36,514 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:36,514 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:36,540 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:37,318 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 150 -2023-05-15 16:49:37,324 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:37,455 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 295 -2023-05-15 16:49:37,463 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:37,463 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103335_Instagram.jpg => /tmp/train/test/10_person/020-original-Screenshot_20221225_103335_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:37,467 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:37,467 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x00' -2023-05-15 16:49:37,467 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:37,467 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:37,467 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:37,493 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:38,252 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 165 -2023-05-15 16:49:38,258 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:38,391 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 252 -2023-05-15 16:49:38,398 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:38,398 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103345_Instagram.jpg => /tmp/train/test/10_person/021-original-Screenshot_20221225_103345_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:38,401 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:38,401 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06c' -2023-05-15 16:49:38,401 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:38,401 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:38,401 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:38,427 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:39,189 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 159 -2023-05-15 16:49:39,194 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:39,325 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 16:49:39,332 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:39,333 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103406_Instagram.jpg => /tmp/train/test/10_person/022-original-Screenshot_20221225_103406_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:39,336 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:39,336 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 16:49:39,336 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:39,336 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:39,336 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:39,360 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:40,157 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 16:49:40,163 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:40,306 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 237 -2023-05-15 16:49:40,313 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:40,313 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103427_Instagram.jpg => /tmp/train/test/10_person/023-original-Screenshot_20221225_103427_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:40,317 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:40,317 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x06\x10' -2023-05-15 16:49:40,317 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:40,317 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:40,317 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:40,342 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:41,112 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 16:49:41,117 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:41,246 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 308 -2023-05-15 16:49:41,254 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:41,254 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103433_Instagram.jpg => /tmp/train/test/10_person/024-original-Screenshot_20221225_103433_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:41,257 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:41,257 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x95' -2023-05-15 16:49:41,257 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:41,257 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:41,257 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:41,277 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:42,113 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 151 -2023-05-15 16:49:42,118 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:42,291 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 206 -2023-05-15 16:49:42,298 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:42,298 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103445_Instagram.jpg => /tmp/train/test/10_person/025-original-Screenshot_20221225_103445_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:42,301 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:42,301 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x93' -2023-05-15 16:49:42,301 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:42,301 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:42,301 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:42,325 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:43,159 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 157 -2023-05-15 16:49:43,165 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:43,293 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 434 -2023-05-15 16:49:43,300 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:43,300 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103500_Instagram.jpg => /tmp/train/test/10_person/026-original-Screenshot_20221225_103500_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:43,304 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:43,304 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x8b' -2023-05-15 16:49:43,304 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:43,304 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:43,304 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:43,328 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:44,123 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 153 -2023-05-15 16:49:44,128 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:44,274 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 457 -2023-05-15 16:49:44,281 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:44,281 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103507_Instagram.jpg => /tmp/train/test/10_person/027-original-Screenshot_20221225_103507_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:44,285 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:44,285 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:49:44,285 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:44,285 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:44,285 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:44,303 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:45,124 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 178 -2023-05-15 16:49:45,129 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:45,259 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 362 -2023-05-15 16:49:45,266 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:45,266 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103522_Instagram.jpg => /tmp/train/test/10_person/028-original-Screenshot_20221225_103522_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:45,269 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9c' -2023-05-15 16:49:45,269 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:49:45,269 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:45,269 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:45,269 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:45,292 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:46,041 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 16:49:46,046 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:46,176 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 177 -2023-05-15 16:49:46,184 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:46,184 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103530_Instagram.jpg => /tmp/train/test/10_person/029-original-Screenshot_20221225_103530_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:46,189 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:46,189 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:49:46,189 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:46,189 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:46,189 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:46,214 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:46,975 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 154 -2023-05-15 16:49:46,980 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:47,114 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 113 -2023-05-15 16:49:47,121 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:47,121 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103536_Instagram.jpg => /tmp/train/test/10_person/030-original-Screenshot_20221225_103536_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:47,124 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x8a' -2023-05-15 16:49:47,124 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:49:47,124 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:47,124 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:47,124 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:47,147 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:47,911 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 155 -2023-05-15 16:49:47,915 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:48,044 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 149 -2023-05-15 16:49:48,051 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:48,052 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103543_Instagram.jpg => /tmp/train/test/10_person/031-original-Screenshot_20221225_103543_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:48,056 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:48,056 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:49:48,056 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:48,056 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:48,056 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:48,077 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:48,829 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 163 -2023-05-15 16:49:48,834 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:48,961 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 236 -2023-05-15 16:49:48,968 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:48,968 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103553_Instagram.jpg => /tmp/train/test/10_person/032-original-Screenshot_20221225_103553_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:48,971 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:48,971 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:49:48,971 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:48,971 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:48,971 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:48,992 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:49,731 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 174 -2023-05-15 16:49:49,736 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:49,863 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 204 -2023-05-15 16:49:49,870 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:49,870 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103559_Instagram.jpg => /tmp/train/test/10_person/033-original-Screenshot_20221225_103559_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:49,873 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:49,873 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 16:49:49,873 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:49,873 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:49,873 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:49,895 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:50,667 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 162 -2023-05-15 16:49:50,672 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:50,799 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 628 -2023-05-15 16:49:50,806 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:50,806 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103613_Instagram.jpg => /tmp/train/test/10_person/034-original-Screenshot_20221225_103613_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:50,809 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:50,809 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 16:49:50,810 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:50,810 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:50,810 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:50,832 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:51,595 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 167 -2023-05-15 16:49:51,600 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:51,725 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 563 -2023-05-15 16:49:51,732 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:51,732 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103621_Instagram.jpg => /tmp/train/test/10_person/035-original-Screenshot_20221225_103621_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:51,736 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:51,736 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9d' -2023-05-15 16:49:51,736 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:51,736 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:51,736 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:51,760 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:52,535 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:49:52,540 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:52,698 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 512 -2023-05-15 16:49:52,705 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:52,705 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103629_Instagram.jpg => /tmp/train/test/10_person/036-original-Screenshot_20221225_103629_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:52,709 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:52,709 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x98' -2023-05-15 16:49:52,709 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:52,709 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:52,709 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:52,731 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:53,804 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 164 -2023-05-15 16:49:53,809 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:53,962 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 160 -2023-05-15 16:49:53,968 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:53,968 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103638_Instagram.jpg => /tmp/train/test/10_person/037-original-Screenshot_20221225_103638_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:53,972 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:53,972 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x04\xb0' -2023-05-15 16:49:53,972 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:53,972 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:53,972 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:53,992 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:55,025 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 168 -2023-05-15 16:49:55,029 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:55,166 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 908 -2023-05-15 16:49:55,172 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:55,172 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103649_Instagram.jpg => /tmp/train/test/10_person/038-original-Screenshot_20221225_103649_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:55,175 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:55,175 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x05\x9e' -2023-05-15 16:49:55,175 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:55,175 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:55,175 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:55,201 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:56,157 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 166 -2023-05-15 16:49:56,163 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:56,312 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 289 -2023-05-15 16:49:56,319 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:56,319 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103656_Instagram.jpg => /tmp/train/test/10_person/039-original-Screenshot_20221225_103656_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:56,322 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageWidth (256) - type: short (3) - value: b'\x05\x9f' -2023-05-15 16:49:56,322 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ImageLength (257) - type: short (3) - value: b'\x07\x15' -2023-05-15 16:49:56,322 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Software (305) - type: string (2) Tag Location: 46 - Data Location: 74 - value: -2023-05-15 16:49:56,322 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00q' -2023-05-15 16:49:56,322 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py | tag: Orientation (274) - type: long (4) - value: b'\x00\x00\x00\x00' -2023-05-15 16:49:56,349 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:57,256 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 156 -2023-05-15 16:49:57,262 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTP connection (1): 127.0.0.1:7860 -2023-05-15 16:49:57,430 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | http://127.0.0.1:7860 "POST /sdapi/v1/interrogate HTTP/1.1" 200 271 -2023-05-15 16:49:57,438 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/PIL/Image.py | Error closing: fp -2023-05-15 16:49:57,438 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing saved: /home/vlado/generative/Input/mia/Screenshot_20221225_103727_Instagram.jpg => /tmp/train/test/10_person/040-original-Screenshot_20221225_103727_Instagram.jpg ['original', 'interrogate', 'resize', 'square', 'save'] -2023-05-15 16:49:57,439 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | input datasets ['/tmp/train/test/10_person'] -2023-05-15 16:49:57,442 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | Starting new HTTPS connection (1): huggingface.co:443 -2023-05-15 16:49:58,176 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /stabilityai/sd-vae-ft-mse/resolve/main/config.json HTTP/1.1" 200 0 -2023-05-15 16:50:06,312 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | processing steps result: {'inputs': 40, 'outputs': {'original': 40, 'total': 40}, 'metadata': '/tmp/train/test/test.json'} -2023-05-15 16:50:06,438 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | memory cpu: {'free': 22.36, 'used': 5.05, 'total': 27.41} gpu current: {'free': 9.7, 'used': 2.3, 'total': 12.0} gpu peak: {'active': 0.95, 'allocated': 0.95, 'reserved': 1.11} -2023-05-15 16:50:06,443 | INFO | /home/vlado/dev/automatic/cli/train/./train.py | lora options: {'bucket_no_upscale': False, 'bucket_reso_steps': 64, 'cache_latents': True, 'caption_dropout_every_n_epochs': None, 'caption_dropout_rate': 0.0, 'caption_extension': '.txt', 'caption_extention': '.txt', 'caption_tag_dropout_rate': 0.0, 'clip_skip': None, 'color_aug': False, 'dataset_repeats': 1, 'debug_dataset': False, 'enable_bucket': False, 'face_crop_aug_range': None, 'flip_aug': False, 'full_fp16': False, 'gradient_accumulation_steps': 1, 'gradient_checkpointing': False, 'in_json': '/tmp/train/test/test.json', 'keep_tokens': None, 'learning_rate': 0.0001, 'log_prefix': None, 'logging_dir': None, 'lr_scheduler_num_cycles': 1, 'lr_scheduler_power': 1, 'lr_scheduler': 'cosine', 'lr_warmup_steps': 0, 'max_bucket_reso': 1024, 'max_data_loader_n_workers': 8, 'max_grad_norm': 0.0, 'max_token_length': None, 'max_train_epochs': None, 'max_train_steps': 2500, 'mem_eff_attn': False, 'min_bucket_reso': 256, 'mixed_precision': 'fp16', 'network_alpha': 20, 'network_args': None, 'network_dim': 40, 'network_module': 'networks.lora', 'network_train_text_encoder_only': False, 'network_train_unet_only': False, 'network_weights': None, 'no_metadata': False, 'output_dir': '/home/vlado/dev/automatic/models/Lora', 'output_name': 'test', 'persistent_data_loader_workers': False, 'pretrained_model_name_or_path': '/home/vlado/dev/automatic/models/v1-5-pruned-emaonly.safetensors', 'prior_loss_weight': 1.0, 'random_crop': False, 'reg_data_dir': None, 'resolution': '512,512', 'resume': None, 'save_every_n_epochs': None, 'save_last_n_epochs_state': None, 'save_last_n_epochs': None, 'save_model_as': 'ckpt', 'save_n_epoch_ratio': None, 'save_precision': 'fp16', 'save_state': False, 'seed': 42, 'shuffle_caption': False, 'text_encoder_lr': 5e-05, 'train_batch_size': 1, 'train_data_dir': '/tmp/train/test', 'training_comment': 'mood-magic', 'unet_lr': 0.0001, 'use_8bit_adam': False, 'v_parameterization': False, 'v2': False, 'vae': None, 'xformers': False} -2023-05-15 16:50:06,445 | DEBUG | /home/vlado/dev/automatic/cli/train/./train.py | importing lora lib -2023-05-15 16:50:07,201 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/vocab.json HTTP/1.1" 200 0 -2023-05-15 16:50:17,607 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/config.json HTTP/1.1" 200 0 -2023-05-15 16:50:18,092 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/model.safetensors HTTP/1.1" 404 0 -2023-05-15 16:50:18,530 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/model.safetensors.index.json HTTP/1.1" 404 0 -2023-05-15 16:50:18,935 | DEBUG | /home/vlado/.local/lib/python3.10/site-packages/urllib3/connectionpool.py | https://huggingface.co:443 "HEAD /openai/clip-vit-large-patch14/resolve/main/pytorch_model.bin HTTP/1.1" 302 0 diff --git a/javascript/style.css b/javascript/style.css index b43cc7728..498729b83 100644 --- a/javascript/style.css +++ b/javascript/style.css @@ -665,7 +665,7 @@ footer { .extra-network-cards .card ul a:hover{ color: red; } .theme-preview { display: none; position: fixed; border: 4px solid var(--neutral-600); box-shadow: 2px 2px 2px 2px var(--neutral-700); top: 0; bottom: 0; left: 0; right: 0; margin: auto; max-width: 75vw; z-index: 999; } -#scripts_alwayson_txt2img, scripts_alwayson_img2img { display: grid } +#scripts_alwayson_txt2img, #scripts_alwayson_img2img { display: grid } #extras_generate, #extras_interrupt, #extras_skip { display: block !important; position: relative; height: 36px; } #extras_upscale { margin-top: 10px } diff --git a/javascript/ui.js b/javascript/ui.js index 1a0aa6c19..7035f7497 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -1,4 +1,4 @@ -/* global gradioApp */ +/* global gradioApp, onUiUpdate, opts */ window.opts = {}; let tabSelected = ''; @@ -368,7 +368,7 @@ function sort_ui_elements() { const scriptsTxt = gradioApp().getElementById('scripts_alwayson_txt2img').children; for (const el of Array.from(scriptsTxt)) el.style.order = find(el, tabsOrder); - const scriptsImg = gradioApp().getElementById('scripts_alwayson_img2img'); + const scriptsImg = gradioApp().getElementById('scripts_alwayson_img2img').children; for (const el of Array.from(scriptsImg)) el.style.order = find(el, tabsOrder); } From 6c66228cdebdd46e72ad45c15025c3e12fd62e45 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 18 May 2023 08:17:49 -0400 Subject: [PATCH 162/282] fix models dir --- .gitignore | 2 +- modules/modelloader.py | 16 ++-------------- modules/sd_models.py | 2 +- requirements.txt | 2 +- 4 files changed, 5 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index 1c4049a7b..fe0712400 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,9 @@ # defaults __pycache__ +setup.log /cache.json /config.json /params.txt -/setup.log /styles.csv /ui-config.json /user.css diff --git a/modules/modelloader.py b/modules/modelloader.py index 831de6631..09a3a3f3e 100644 --- a/modules/modelloader.py +++ b/modules/modelloader.py @@ -1,4 +1,3 @@ -import glob import os import shutil import importlib @@ -21,20 +20,11 @@ def load_models(model_path: str, model_url: str = None, command_path: str = None @return: A list of paths containing the desired model(s) """ output = [] - try: places = [] - - if command_path is not None and command_path != model_path: - pretrained_path = os.path.join(command_path, 'experiments/pretrained_models') - if os.path.exists(pretrained_path): - print(f"Appending path: {pretrained_path}") - places.append(pretrained_path) - elif os.path.exists(command_path): - places.append(command_path) - places.append(model_path) - + if command_path is not None and command_path != model_path and os.path.isdir(command_path): + places.append(command_path) for place in places: for full_path in shared.walk_files(place, allowed_extensions=ext_filter): if os.path.islink(full_path) and not os.path.exists(full_path): @@ -44,7 +34,6 @@ def load_models(model_path: str, model_url: str = None, command_path: str = None continue if full_path not in output: output.append(full_path) - if model_url is not None and len(output) == 0: if download_name is not None: from basicsr.utils.download_util import load_file_from_url @@ -52,7 +41,6 @@ def load_models(model_path: str, model_url: str = None, command_path: str = None output.append(dl) else: output.append(model_url) - except Exception: pass diff --git a/modules/sd_models.py b/modules/sd_models.py index 2db6ee587..125206bb7 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -97,7 +97,7 @@ def checkpoint_tiles(): def list_models(): global model_path # pylint: disable=global-statement - model_path = shared.opts.ckpt_dir + model_path = shared.cmd_opts.models_dir checkpoints_list.clear() checkpoint_aliases.clear() model_list = modelloader.load_models(model_path=model_path, model_url=None, command_path=shared.opts.ckpt_dir, ext_filter=[".ckpt", ".safetensors"], download_name=None, ext_blacklist=[".vae.ckpt", ".vae.safetensors"]) diff --git a/requirements.txt b/requirements.txt index b064b4587..b72c02bf9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -24,7 +24,6 @@ kornia lark lmdb lpips -numpy omegaconf open-clip-torch opencv-contrib-python @@ -54,6 +53,7 @@ diffusers==0.16.1 einops==0.4.1 gradio==3.29.0 numexpr==2.8.4 +numpy==1.24.3 pandas==1.5.3 protobuf==3.20.3 pytorch_lightning==1.9.4 From 0e46e74c5e7e7147ec9e8251d5fc4e1cf116aa3b Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 18 May 2023 09:27:42 -0400 Subject: [PATCH 163/282] fix extension update/uninstall --- javascript/extensions.js | 2 +- modules/extensions.py | 2 +- modules/ui_extensions.py | 13 ++++++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/javascript/extensions.js b/javascript/extensions.js index 9f5348a93..cec762f8b 100644 --- a/javascript/extensions.js +++ b/javascript/extensions.js @@ -36,7 +36,7 @@ function install_extension(button, url) { } function uninstall_extension(button, url) { - console.log('Extension uninstall:', url); + console.log('Extension uninstall:', url, decodeURIComponent(url), encodeURI(url)); button.disabled = 'disabled'; button.value = 'Uninstalling...'; button.innerHTML = 'uninstalling'; diff --git a/modules/extensions.py b/modules/extensions.py index 0cd8edacf..c0d9083ef 100644 --- a/modules/extensions.py +++ b/modules/extensions.py @@ -23,7 +23,7 @@ class Extension: def __init__(self, name, path, enabled=True, is_builtin=False): self.name = name self.git_name = '' - self.path = path + self.path = path.replace('\\', '/').rstrip('/') self.enabled = enabled self.status = '' self.can_update = False diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py index b66ea82b1..28c1618dc 100644 --- a/modules/ui_extensions.py +++ b/modules/ui_extensions.py @@ -183,15 +183,26 @@ def install_extension(extension_to_install, search_text, sort_column): def uninstall_extension(extension_path, search_text, sort_column): + def errorRemoveReadonly(func, path, exc): + import stat + excvalue = exc[1] + shared.log.debug(f'Exception during cleanup: {func} {path} {excvalue.strerror}') + if func in (os.rmdir, os.remove, os.unlink) and excvalue.errno == errno.EACCES: + shared.log.debug(f'Retrying cleanup: {path}') + os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO) + func(path) + shared.log.info(f'Extension uninstall: {extension_path}') ext = [extension for extension in extensions.extensions if extension.path == extension_path] if len(ext) > 0 and os.path.isdir(extension_path): try: - shutil.rmtree(extension_path, ignore_errors=False) + shutil.rmtree(extension_path, ignore_errors=False, onerror=errorRemoveReadonly) except Exception as e: shared.log.warning(f'Extension uninstall failed: {extension_path} {e}') extensions.extensions = [extension for extension in extensions.extensions if extension.path != extension_path] update_extension_list() + else: + shared.log.warning(f'Extension uninstall cannot find extension: {extension_path}') code = refresh_extensions_list_from_data(search_text, sort_column) # return code, ext_table, message return code, f"Extension uninstalled: {extension_path} | Restart required" From 22a9e70150eed051be2b085add9f516fa0a359d3 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 18 May 2023 09:46:36 -0400 Subject: [PATCH 164/282] allow xyz grid to create images only without grid --- scripts/xyz_grid.py | 51 +++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py index b456b3cb2..575e6bf04 100644 --- a/scripts/xyz_grid.py +++ b/scripts/xyz_grid.py @@ -237,7 +237,7 @@ axis_options = [ ] -def draw_xyz_grid(p, xs, ys, zs, x_labels, y_labels, z_labels, cell, draw_legend, include_lone_images, include_sub_grids, first_axes_processed, second_axes_processed, margin_size): +def draw_xyz_grid(p, xs, ys, zs, x_labels, y_labels, z_labels, cell, draw_legend, include_lone_images, include_sub_grids, first_axes_processed, second_axes_processed, margin_size, no_grid): hor_texts = [[images.GridAnnotation(x)] for x in x_labels] ver_texts = [[images.GridAnnotation(y)] for y in y_labels] title_texts = [[images.GridAnnotation(z)] for z in z_labels] @@ -321,18 +321,20 @@ def draw_xyz_grid(p, xs, ys, zs, x_labels, y_labels, z_labels, cell, draw_legend for i in range(z_count): start_index = (i * len(xs) * len(ys)) + i end_index = start_index + len(xs) * len(ys) - grid = images.image_grid(processed_result.images[start_index:end_index], rows=len(ys)) - if draw_legend: - grid = images.draw_grid_annotations(grid, processed_result.images[start_index].size[0], processed_result.images[start_index].size[1], hor_texts, ver_texts, margin_size) - processed_result.images.insert(i, grid) + if not no_grid: + grid = images.image_grid(processed_result.images[start_index:end_index], rows=len(ys)) + if draw_legend: + grid = images.draw_grid_annotations(grid, processed_result.images[start_index].size[0], processed_result.images[start_index].size[1], hor_texts, ver_texts, margin_size) + processed_result.images.insert(i, grid) processed_result.all_prompts.insert(i, processed_result.all_prompts[start_index]) processed_result.all_seeds.insert(i, processed_result.all_seeds[start_index]) processed_result.infotexts.insert(i, processed_result.infotexts[start_index]) sub_grid_size = processed_result.images[0].size - z_grid = images.image_grid(processed_result.images[:z_count], rows=1) - if draw_legend: - z_grid = images.draw_grid_annotations(z_grid, sub_grid_size[0], sub_grid_size[1], title_texts, [[images.GridAnnotation()]]) - processed_result.images.insert(0, z_grid) + if not no_grid: + z_grid = images.image_grid(processed_result.images[:z_count], rows=1) + if draw_legend: + z_grid = images.draw_grid_annotations(z_grid, sub_grid_size[0], sub_grid_size[1], title_texts, [[images.GridAnnotation()]]) + processed_result.images.insert(0, z_grid) #processed_result.all_prompts.insert(0, processed_result.all_prompts[0]) #processed_result.all_seeds.insert(0, processed_result.all_seeds[0]) processed_result.infotexts.insert(0, processed_result.infotexts[0]) @@ -402,7 +404,7 @@ class Script(scripts.Script): fill_z_button = ToolButton(value=fill_values_symbol, elem_id="xyz_grid_fill_z_tool_button", visible=False) with gr.Row(variant="compact", elem_id="axis_options"): draw_legend = gr.Checkbox(label='Draw legend', value=True, elem_id=self.elem_id("draw_legend")) - no_fixed_seeds = gr.Checkbox(label='Keep -1 for seeds', value=False, elem_id=self.elem_id("no_fixed_seeds")) + no_grid = gr.Checkbox(label='Do not create grid', value=False, elem_id=self.elem_id("no_xyz_grid")) include_lone_images = gr.Checkbox(label='Include Sub Images', value=False, elem_id=self.elem_id("include_lone_images")) include_sub_grids = gr.Checkbox(label='Include Sub Grids', value=False, elem_id=self.elem_id("include_sub_grids")) with gr.Row(variant="compact", elem_id="axis_options"): @@ -463,12 +465,11 @@ class Script(scripts.Script): (z_values_dropdown, lambda params:get_dropdown_update_from_params("Z",params)), ) - return [x_type, x_values, x_values_dropdown, y_type, y_values, y_values_dropdown, z_type, z_values, z_values_dropdown, draw_legend, include_lone_images, include_sub_grids, no_fixed_seeds, margin_size] + return [x_type, x_values, x_values_dropdown, y_type, y_values, y_values_dropdown, z_type, z_values, z_values_dropdown, draw_legend, include_lone_images, include_sub_grids, no_grid, margin_size] - def run(self, p, x_type, x_values, x_values_dropdown, y_type, y_values, y_values_dropdown, z_type, z_values, z_values_dropdown, draw_legend, include_lone_images, include_sub_grids, no_fixed_seeds, margin_size): # pylint: disable=arguments-differ - shared.log.debug(f'xyzgrid: {x_type}|{x_values}|{x_values_dropdown}|{y_type}|{y_values}|{y_values_dropdown}|{z_type}|{z_values}|{z_values_dropdown}|{draw_legend}|{include_lone_images}|{include_sub_grids}|{no_fixed_seeds}|{margin_size}') - if not no_fixed_seeds: - processing.fix_seed(p) + def run(self, p, x_type, x_values, x_values_dropdown, y_type, y_values, y_values_dropdown, z_type, z_values, z_values_dropdown, draw_legend, include_lone_images, include_sub_grids, no_grid, margin_size): # pylint: disable=arguments-differ + shared.log.debug(f'xyzgrid: {x_type}|{x_values}|{x_values_dropdown}|{y_type}|{y_values}|{y_values_dropdown}|{z_type}|{z_values}|{z_values_dropdown}|{draw_legend}|{include_lone_images}|{include_sub_grids}|{no_grid}|{margin_size}') + processing.fix_seed(p) if not shared.opts.return_grid: p.batch_size = 1 def process_axis(opt, vals, vals_dropdown): @@ -535,10 +536,6 @@ class Script(scripts.Script): z_values = ",".join(z_values_dropdown) zs = process_axis(z_opt, z_values, z_values_dropdown) Image.MAX_IMAGE_PIXELS = None # disable check in Pillow and rely on check below to allow large custom image sizes - grid_mp = round(len(xs) * len(ys) * len(zs) * p.width * p.height / 1000000) - if grid_mp > shared.opts.img_max_size_mp: - shared.log.warning(f'Grid size: {grid_mp} excedes {shared.opts.img_max_size_mp} MPixels') - return def fix_axis_seeds(axis_opt, axis_list): if axis_opt.label in ['Seed', 'Var. seed']: @@ -546,10 +543,9 @@ class Script(scripts.Script): else: return axis_list - if not no_fixed_seeds: - xs = fix_axis_seeds(x_opt, xs) - ys = fix_axis_seeds(y_opt, ys) - zs = fix_axis_seeds(z_opt, zs) + xs = fix_axis_seeds(x_opt, xs) + ys = fix_axis_seeds(y_opt, ys) + zs = fix_axis_seeds(z_opt, zs) if x_opt.label == 'Steps': total_steps = sum(xs) * len(ys) * len(zs) @@ -616,12 +612,12 @@ class Script(scripts.Script): if x_opt.label != 'Nothing': pc.extra_generation_params["X Type"] = x_opt.label pc.extra_generation_params["X Values"] = x_values - if x_opt.label in ["Seed", "Var. seed"] and not no_fixed_seeds: + if x_opt.label in ["Seed", "Var. seed"]: pc.extra_generation_params["Fixed X Values"] = ", ".join([str(x) for x in xs]) if y_opt.label != 'Nothing': pc.extra_generation_params["Y Type"] = y_opt.label pc.extra_generation_params["Y Values"] = y_values - if y_opt.label in ["Seed", "Var. seed"] and not no_fixed_seeds: + if y_opt.label in ["Seed", "Var. seed"]: pc.extra_generation_params["Fixed Y Values"] = ", ".join([str(y) for y in ys]) grid_infotext[subgrid_index] = processing.create_infotext(pc, pc.all_prompts, pc.all_seeds, pc.all_subseeds) # Sets main grid infotext @@ -631,7 +627,7 @@ class Script(scripts.Script): if z_opt.label != 'Nothing': pc.extra_generation_params["Z Type"] = z_opt.label pc.extra_generation_params["Z Values"] = z_values - if z_opt.label in ["Seed", "Var. seed"] and not no_fixed_seeds: + if z_opt.label in ["Seed", "Var. seed"]: pc.extra_generation_params["Fixed Z Values"] = ", ".join([str(z) for z in zs]) grid_infotext[0] = processing.create_infotext(pc, pc.all_prompts, pc.all_seeds, pc.all_subseeds) return res @@ -651,7 +647,8 @@ class Script(scripts.Script): include_sub_grids=include_sub_grids, first_axes_processed=first_axes_processed, second_axes_processed=second_axes_processed, - margin_size=margin_size + margin_size=margin_size, + no_grid=no_grid, ) if not processed.images: From df1fae7248ebe3b83f06cf4d4470a44e8c401f56 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 18 May 2023 10:17:39 -0400 Subject: [PATCH 165/282] fix models path --- extensions-builtin/multidiffusion-upscaler-for-automatic1111 | 2 +- modules/sd_models.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 index 23f3a1443..a4d3cd4e7 160000 --- a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 +++ b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 @@ -1 +1 @@ -Subproject commit 23f3a14432e7740f4a59322ba36eafbf042dffb0 +Subproject commit a4d3cd4e7ddbe40c2d190f5b05dce59112307a4f diff --git a/modules/sd_models.py b/modules/sd_models.py index 125206bb7..df19aaeff 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -97,7 +97,7 @@ def checkpoint_tiles(): def list_models(): global model_path # pylint: disable=global-statement - model_path = shared.cmd_opts.models_dir + model_path = os.path.join(shared.cmd_opts.models_dir, 'Stable-diffusion') checkpoints_list.clear() checkpoint_aliases.clear() model_list = modelloader.load_models(model_path=model_path, model_url=None, command_path=shared.opts.ckpt_dir, ext_filter=[".ckpt", ".safetensors"], download_name=None, ext_blacklist=[".vae.ckpt", ".vae.safetensors"]) From 8b682183e32ed533546c016491d20342c790bf56 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 18 May 2023 10:41:24 -0400 Subject: [PATCH 166/282] update gradio --- javascript/generationParams.js | 33 ++++++++++++++++++++++----------- modules/sd_models.py | 2 +- requirements.txt | 3 ++- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/javascript/generationParams.js b/javascript/generationParams.js index b98418406..4d9b06f75 100644 --- a/javascript/generationParams.js +++ b/javascript/generationParams.js @@ -1,7 +1,27 @@ +/* global gradioApp, onUiUpdate */ // attaches listeners to the txt2img and img2img galleries to update displayed generation param text when the image changes -let txt2img_gallery; let img2img_gallery; let - modal; +function attachGalleryListeners(tab_name) { + const gallery = gradioApp().querySelector(`#${tab_name}_gallery`); + gallery?.addEventListener('click', () => setTimeout(() => { + gradioApp() + .getElementById(`${tab_name}_generation_info_button`) + ?.click(); + }, 500)); + gallery?.addEventListener('keydown', (e) => { + if (e.keyCode == 37 || e.keyCode == 39) { // left or right arrow + gradioApp() + .getElementById(`${tab_name}_generation_info_button`) + .click(); + } + }); + return gallery; +} + +let txt2img_gallery; +let img2img_gallery; +let modal; + onUiUpdate(() => { if (!txt2img_gallery) txt2img_gallery = attachGalleryListeners('txt2img'); if (!img2img_gallery) img2img_gallery = attachGalleryListeners('img2img'); @@ -19,12 +39,3 @@ let modalObserver = new MutationObserver((mutations) => { }); }); -function attachGalleryListeners(tab_name) { - gallery = gradioApp().querySelector(`#${tab_name}_gallery`); - gallery?.addEventListener('click', () => gradioApp().getElementById(`${tab_name}_generation_info_button`).click()); - gallery?.addEventListener('keydown', (e) => { - if (e.keyCode == 37 || e.keyCode == 39) // left or right arrow - { gradioApp().getElementById(`${tab_name}_generation_info_button`).click(); } - }); - return gallery; -} diff --git a/modules/sd_models.py b/modules/sd_models.py index df19aaeff..f6447c56c 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -457,7 +457,7 @@ def reload_model_weights(sd_model=None, info=None): current_checkpoint_info = None else: current_checkpoint_info = sd_model.sd_checkpoint_info - if sd_model.sd_model_checkpoint == checkpoint_info.filename: + if checkpoint_info is not None and sd_model.sd_model_checkpoint == checkpoint_info.filename: return if shared.cmd_opts.lowvram or shared.cmd_opts.medvram: lowvram.send_everything_to_cpu() diff --git a/requirements.txt b/requirements.txt index b72c02bf9..700ccc23b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -51,9 +51,10 @@ accelerate==0.18.0 opencv-python==4.7.0.72 diffusers==0.16.1 einops==0.4.1 -gradio==3.29.0 +gradio==3.31.0 numexpr==2.8.4 numpy==1.24.3 +numba==0.57.0 pandas==1.5.3 protobuf==3.20.3 pytorch_lightning==1.9.4 From 325c0945d2d9db7d7b9b48d34be10b6b7a069746 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 18 May 2023 14:04:06 -0400 Subject: [PATCH 167/282] update model path --- modules/sd_models.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/sd_models.py b/modules/sd_models.py index f6447c56c..d637e9190 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -96,11 +96,9 @@ def checkpoint_tiles(): def list_models(): - global model_path # pylint: disable=global-statement - model_path = os.path.join(shared.cmd_opts.models_dir, 'Stable-diffusion') checkpoints_list.clear() checkpoint_aliases.clear() - model_list = modelloader.load_models(model_path=model_path, model_url=None, command_path=shared.opts.ckpt_dir, ext_filter=[".ckpt", ".safetensors"], download_name=None, ext_blacklist=[".vae.ckpt", ".vae.safetensors"]) + model_list = modelloader.load_models(model_path=os.path.join(shared.cmd_opts.models_dir, 'Stable-diffusion'), model_url=None, command_path=shared.opts.ckpt_dir, ext_filter=[".ckpt", ".safetensors"], download_name=None, ext_blacklist=[".vae.ckpt", ".vae.safetensors"]) if shared.cmd_opts.ckpt is not None: if not os.path.exists(shared.cmd_opts.ckpt): if shared.cmd_opts.ckpt.lower() != "none": From 0c1bb95b1326d8b4e6a89da31867a7703e6f4ad9 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 18 May 2023 14:16:30 -0400 Subject: [PATCH 168/282] test fix --- modules/extensions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/extensions.py b/modules/extensions.py index c0d9083ef..0cd8edacf 100644 --- a/modules/extensions.py +++ b/modules/extensions.py @@ -23,7 +23,7 @@ class Extension: def __init__(self, name, path, enabled=True, is_builtin=False): self.name = name self.git_name = '' - self.path = path.replace('\\', '/').rstrip('/') + self.path = path self.enabled = enabled self.status = '' self.can_update = False From 314a9bf67c5f5b8b68543d51b14a20eda751bfb6 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 18 May 2023 14:55:43 -0400 Subject: [PATCH 169/282] fix extension uninstall --- javascript/extensions.js | 2 +- modules/ui_extensions.py | 25 ++++++++++++++----------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/javascript/extensions.js b/javascript/extensions.js index cec762f8b..d59a7d059 100644 --- a/javascript/extensions.js +++ b/javascript/extensions.js @@ -36,7 +36,7 @@ function install_extension(button, url) { } function uninstall_extension(button, url) { - console.log('Extension uninstall:', url, decodeURIComponent(url), encodeURI(url)); + console.log('Extension uninstall:', url, JSON.stringify(url), decodeURIComponent(url), encodeURI(url)); button.disabled = 'disabled'; button.value = 'Uninstalling...'; button.innerHTML = 'uninstalling'; diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py index 28c1618dc..470a3cbf1 100644 --- a/modules/ui_extensions.py +++ b/modules/ui_extensions.py @@ -192,24 +192,26 @@ def uninstall_extension(extension_path, search_text, sort_column): os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO) func(path) - shared.log.info(f'Extension uninstall: {extension_path}') - ext = [extension for extension in extensions.extensions if extension.path == extension_path] + ext = [extension for extension in extensions.extensions if os.path.abspath(extension.path) == os.path.abspath(extension_path)] if len(ext) > 0 and os.path.isdir(extension_path): + found = ext[0] try: - shutil.rmtree(extension_path, ignore_errors=False, onerror=errorRemoveReadonly) + shutil.rmtree(found.path, ignore_errors=False, onerror=errorRemoveReadonly) except Exception as e: - shared.log.warning(f'Extension uninstall failed: {extension_path} {e}') - extensions.extensions = [extension for extension in extensions.extensions if extension.path != extension_path] + shared.log.warning(f'Extension uninstall failed: {found.path} {e}') + extensions.extensions = [extension for extension in extensions.extensions if os.path.abspath(found.path) != os.path.abspath(extension_path)] update_extension_list() + code = refresh_extensions_list_from_data(search_text, sort_column) + shared.log.info(f'Extension uninstalled: {found.path}') + return code, f"Extension uninstalled: {found.path} | Restart required" else: shared.log.warning(f'Extension uninstall cannot find extension: {extension_path}') - code = refresh_extensions_list_from_data(search_text, sort_column) - # return code, ext_table, message - return code, f"Extension uninstalled: {extension_path} | Restart required" + code = refresh_extensions_list_from_data(search_text, sort_column) + return code, f"Extension uninstalled failed: {extension_path}" def update_extension(extension_path, search_text, sort_column): - exts = [extension for extension in extensions.extensions if extension.path == extension_path] + exts = [extension for extension in extensions.extensions if os.path.abspath(extension.path) == os.path.abspath(extension_path)] shared.state.job_count = len(exts) for ext in exts: shared.log.debug(f'Extensions update start: {ext.name} {ext.commit_hash} {ext.commit_date}') @@ -339,10 +341,11 @@ def refresh_extensions_list_from_data(search_text, sort_column): type_code = f"""
{"SYSTEM" if ext['is_builtin'] else 'USER'}
""" version_code = f"""
{ext['version']}
""" enabled_code = f"""""" + masked_path = html.escape(path.replace('\\', '/')) if not ext['is_builtin']: - install_code = f"""""" + install_code = f"""""" if update_available: - install_code += f"""""" + install_code += f"""""" else: install_code = f"""""" tags_text = ", ".join([f"{x}" for x in tags]) From 008b242aae5d1bf116dc1a5ff82f5562e690fa22 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 18 May 2023 15:18:31 -0400 Subject: [PATCH 170/282] update git modules --- .gitmodules | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitmodules b/.gitmodules index af04a78f8..72e023bdc 100644 --- a/.gitmodules +++ b/.gitmodules @@ -23,18 +23,24 @@ [submodule "extensions-builtin/clip-interrogator-ext"] path = extensions-builtin/clip-interrogator-ext url = https://github.com/pharmapsychotic/clip-interrogator-ext.git + ignore = dirty [submodule "extensions-builtin/sd-webui-controlnet"] path = extensions-builtin/sd-webui-controlnet url = https://github.com/Mikubill/sd-webui-controlnet + ignore = dirty [submodule "modules/lycoris"] path = modules/lycoris url = https://github.com/KohakuBlueleaf/LyCORIS + ignore = dirty [submodule "extensions-builtin/stable-diffusion-webui-rembg"] path = extensions-builtin/stable-diffusion-webui-rembg url = https://github.com/AUTOMATIC1111/stable-diffusion-webui-rembg + ignore = dirty [submodule "extensions-builtin/a1111-sd-webui-lycoris"] path = extensions-builtin/a1111-sd-webui-lycoris url = https://github.com/KohakuBlueleaf/a1111-sd-webui-lycoris + ignore = dirty [submodule "extensions-builtin/multidiffusion-upscaler-for-automatic1111"] path = extensions-builtin/multidiffusion-upscaler-for-automatic1111 url = https://github.com/pkuliyi2015/multidiffusion-upscaler-for-automatic1111 + ignore = dirty From 5aaa83d0fa5e1b0fe6571f51bb44042a7e02fb67 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 18 May 2023 15:29:50 -0400 Subject: [PATCH 171/282] update xyz grid --- scripts/xyz_grid.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py index 575e6bf04..ba901cd72 100644 --- a/scripts/xyz_grid.py +++ b/scripts/xyz_grid.py @@ -404,6 +404,7 @@ class Script(scripts.Script): fill_z_button = ToolButton(value=fill_values_symbol, elem_id="xyz_grid_fill_z_tool_button", visible=False) with gr.Row(variant="compact", elem_id="axis_options"): draw_legend = gr.Checkbox(label='Draw legend', value=True, elem_id=self.elem_id("draw_legend")) + no_fixed_seeds = gr.Checkbox(label='Keep -1 for seeds', value=False, elem_id=self.elem_id("no_fixed_seeds")) no_grid = gr.Checkbox(label='Do not create grid', value=False, elem_id=self.elem_id("no_xyz_grid")) include_lone_images = gr.Checkbox(label='Include Sub Images', value=False, elem_id=self.elem_id("include_lone_images")) include_sub_grids = gr.Checkbox(label='Include Sub Grids', value=False, elem_id=self.elem_id("include_sub_grids")) @@ -465,11 +466,12 @@ class Script(scripts.Script): (z_values_dropdown, lambda params:get_dropdown_update_from_params("Z",params)), ) - return [x_type, x_values, x_values_dropdown, y_type, y_values, y_values_dropdown, z_type, z_values, z_values_dropdown, draw_legend, include_lone_images, include_sub_grids, no_grid, margin_size] + return [x_type, x_values, x_values_dropdown, y_type, y_values, y_values_dropdown, z_type, z_values, z_values_dropdown, draw_legend, include_lone_images, include_sub_grids, no_grid, no_fixed_seeds, margin_size] - def run(self, p, x_type, x_values, x_values_dropdown, y_type, y_values, y_values_dropdown, z_type, z_values, z_values_dropdown, draw_legend, include_lone_images, include_sub_grids, no_grid, margin_size): # pylint: disable=arguments-differ + def run(self, p, x_type, x_values, x_values_dropdown, y_type, y_values, y_values_dropdown, z_type, z_values, z_values_dropdown, draw_legend, include_lone_images, include_sub_grids, no_grid, no_fixed_seeds, margin_size): # pylint: disable=arguments-differ shared.log.debug(f'xyzgrid: {x_type}|{x_values}|{x_values_dropdown}|{y_type}|{y_values}|{y_values_dropdown}|{z_type}|{z_values}|{z_values_dropdown}|{draw_legend}|{include_lone_images}|{include_sub_grids}|{no_grid}|{margin_size}') - processing.fix_seed(p) + if not no_fixed_seeds: + processing.fix_seed(p) if not shared.opts.return_grid: p.batch_size = 1 def process_axis(opt, vals, vals_dropdown): @@ -543,9 +545,10 @@ class Script(scripts.Script): else: return axis_list - xs = fix_axis_seeds(x_opt, xs) - ys = fix_axis_seeds(y_opt, ys) - zs = fix_axis_seeds(z_opt, zs) + if not no_fixed_seeds: + xs = fix_axis_seeds(x_opt, xs) + ys = fix_axis_seeds(y_opt, ys) + zs = fix_axis_seeds(z_opt, zs) if x_opt.label == 'Steps': total_steps = sum(xs) * len(ys) * len(zs) @@ -612,12 +615,12 @@ class Script(scripts.Script): if x_opt.label != 'Nothing': pc.extra_generation_params["X Type"] = x_opt.label pc.extra_generation_params["X Values"] = x_values - if x_opt.label in ["Seed", "Var. seed"]: + if x_opt.label in ["Seed", "Var. seed"] and not no_fixed_seeds: pc.extra_generation_params["Fixed X Values"] = ", ".join([str(x) for x in xs]) if y_opt.label != 'Nothing': pc.extra_generation_params["Y Type"] = y_opt.label pc.extra_generation_params["Y Values"] = y_values - if y_opt.label in ["Seed", "Var. seed"]: + if y_opt.label in ["Seed", "Var. seed"] and not no_fixed_seeds: pc.extra_generation_params["Fixed Y Values"] = ", ".join([str(y) for y in ys]) grid_infotext[subgrid_index] = processing.create_infotext(pc, pc.all_prompts, pc.all_seeds, pc.all_subseeds) # Sets main grid infotext @@ -627,7 +630,7 @@ class Script(scripts.Script): if z_opt.label != 'Nothing': pc.extra_generation_params["Z Type"] = z_opt.label pc.extra_generation_params["Z Values"] = z_values - if z_opt.label in ["Seed", "Var. seed"]: + if z_opt.label in ["Seed", "Var. seed"] and not no_fixed_seeds: pc.extra_generation_params["Fixed Z Values"] = ", ".join([str(z) for z in zs]) grid_infotext[0] = processing.create_infotext(pc, pc.all_prompts, pc.all_seeds, pc.all_subseeds) return res @@ -649,6 +652,7 @@ class Script(scripts.Script): second_axes_processed=second_axes_processed, margin_size=margin_size, no_grid=no_grid, + ) if not processed.images: From fef49279f8d835ad87cb06d97b7c4921388476e5 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 18 May 2023 15:41:52 -0400 Subject: [PATCH 172/282] update --- modules/images.py | 7 ++++--- modules/prompt_parser.py | 4 ++-- modules/shared.py | 2 +- scripts/xyz_grid.py | 1 - 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/images.py b/modules/images.py index 369418cda..7b3688412 100644 --- a/modules/images.py +++ b/modules/images.py @@ -393,6 +393,7 @@ class FilenameGenerator: res += text + str(replacement) continue res += f'{text}[{pattern}]' + res = res.split('?')[0] return res @@ -523,10 +524,10 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='jpg', i if forced_filename is None: if short_filename or seed is None: file_decoration = "" - elif shared.opts.save_to_dirs: - file_decoration = shared.opts.samples_filename_pattern or "[seed]" + if shared.opts.samples_filename_pattern and len(shared.opts.samples_filename_pattern) > 0: + file_decoration = shared.opts.samples_filename_pattern else: - file_decoration = shared.opts.samples_filename_pattern or "[seed]-[prompt_spaces]" + file_decoration = "[seed]-[prompt_spaces]" add_number = shared.opts.save_images_add_number or file_decoration == '' if file_decoration != "" and add_number: file_decoration = f"-{file_decoration}" diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py index 730a7174c..c9a4faeb6 100644 --- a/modules/prompt_parser.py +++ b/modules/prompt_parser.py @@ -337,8 +337,8 @@ def parse_prompt_attention(text): if opts.prompt_attention == 'Full parser': part = re_clean.sub("", part) part = re_whitespace.sub(" ", part).strip() - if len(part) == 0: - continue + if len(part) == 0: + continue if i > 0: res.append(["BREAK", -1]) res.append([part, 1.0]) diff --git a/modules/shared.py b/modules/shared.py index b893ad106..eaa3cbfe1 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -282,7 +282,7 @@ options_templates.update(options_section(('system-paths', "System Paths"), { options_templates.update(options_section(('saving-images', "Image options"), { "samples_save": OptionInfo(True, "Always save all generated images"), "samples_format": OptionInfo('jpg', 'File format for images'), - "samples_filename_pattern": OptionInfo("", "Images filename pattern", component_args=hide_dirs), + "samples_filename_pattern": OptionInfo("[seed]-[prompt_spaces]", "Images filename pattern", component_args=hide_dirs), "save_images_add_number": OptionInfo(True, "Add number to filename when saving", component_args=hide_dirs), "grid_save": OptionInfo(True, "Always save all generated image grids"), "grid_format": OptionInfo('jpg', 'File format for grids'), diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py index ba901cd72..94e839b08 100644 --- a/scripts/xyz_grid.py +++ b/scripts/xyz_grid.py @@ -652,7 +652,6 @@ class Script(scripts.Script): second_axes_processed=second_axes_processed, margin_size=margin_size, no_grid=no_grid, - ) if not processed.images: From e1cd374009bf7c1f9e872fc71478977fd0e09440 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 18 May 2023 18:50:31 -0400 Subject: [PATCH 173/282] fix temp file handler --- modules/ui_tempdir.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui_tempdir.py b/modules/ui_tempdir.py index db6e20e79..7e5849ba5 100644 --- a/modules/ui_tempdir.py +++ b/modules/ui_tempdir.py @@ -39,7 +39,7 @@ def save_pil_to_file(pil_image, dir=None): # pylint: disable=redefined-builtin already_saved_as = getattr(pil_image, 'already_saved_as', None) if already_saved_as and os.path.isfile(already_saved_as): register_tmp_file(shared.demo, already_saved_as) - file_obj = Savedfile(f'{already_saved_as}?{os.path.getmtime(already_saved_as)}') + file_obj = Savedfile(already_saved_as) return file_obj if shared.opts.temp_dir != "": dir = shared.opts.temp_dir From f14857fe0b903b968470b8427e4d044c493974a9 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 18 May 2023 19:00:05 -0400 Subject: [PATCH 174/282] update xyz grid --- scripts/xyz_grid.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py index 94e839b08..72afab4ad 100644 --- a/scripts/xyz_grid.py +++ b/scripts/xyz_grid.py @@ -404,7 +404,7 @@ class Script(scripts.Script): fill_z_button = ToolButton(value=fill_values_symbol, elem_id="xyz_grid_fill_z_tool_button", visible=False) with gr.Row(variant="compact", elem_id="axis_options"): draw_legend = gr.Checkbox(label='Draw legend', value=True, elem_id=self.elem_id("draw_legend")) - no_fixed_seeds = gr.Checkbox(label='Keep -1 for seeds', value=False, elem_id=self.elem_id("no_fixed_seeds")) + no_fixed_seeds = gr.Checkbox(label='Keep random for seeds', value=False, elem_id=self.elem_id("no_fixed_seeds")) no_grid = gr.Checkbox(label='Do not create grid', value=False, elem_id=self.elem_id("no_xyz_grid")) include_lone_images = gr.Checkbox(label='Include Sub Images', value=False, elem_id=self.elem_id("include_lone_images")) include_sub_grids = gr.Checkbox(label='Include Sub Grids', value=False, elem_id=self.elem_id("include_sub_grids")) @@ -466,10 +466,10 @@ class Script(scripts.Script): (z_values_dropdown, lambda params:get_dropdown_update_from_params("Z",params)), ) - return [x_type, x_values, x_values_dropdown, y_type, y_values, y_values_dropdown, z_type, z_values, z_values_dropdown, draw_legend, include_lone_images, include_sub_grids, no_grid, no_fixed_seeds, margin_size] + return [x_type, x_values, x_values_dropdown, y_type, y_values, y_values_dropdown, z_type, z_values, z_values_dropdown, draw_legend, include_lone_images, include_sub_grids, no_fixed_seeds, margin_size, no_grid] - def run(self, p, x_type, x_values, x_values_dropdown, y_type, y_values, y_values_dropdown, z_type, z_values, z_values_dropdown, draw_legend, include_lone_images, include_sub_grids, no_grid, no_fixed_seeds, margin_size): # pylint: disable=arguments-differ - shared.log.debug(f'xyzgrid: {x_type}|{x_values}|{x_values_dropdown}|{y_type}|{y_values}|{y_values_dropdown}|{z_type}|{z_values}|{z_values_dropdown}|{draw_legend}|{include_lone_images}|{include_sub_grids}|{no_grid}|{margin_size}') + def run(self, p, x_type, x_values, x_values_dropdown, y_type, y_values, y_values_dropdown, z_type, z_values, z_values_dropdown, draw_legend, include_lone_images, include_sub_grids, no_fixed_seeds, margin_size, no_grid): # pylint: disable=arguments-differ + shared.log.debug(f'xyzgrid: x_type={x_type}|x_values={x_values}|x_values_dropdown={x_values_dropdown}|y_type={y_type}|{y_values}={y_values}|{y_values_dropdown}={y_values_dropdown}|z_type={z_type}|z_values={z_values}|z_values_dropdown={z_values_dropdown}|draw_legend={draw_legend}|include_lone_images={include_lone_images}|include_sub_grids={include_sub_grids}|no_grid={no_grid}|margin_size={margin_size}') if not no_fixed_seeds: processing.fix_seed(p) if not shared.opts.return_grid: From 1c70056744b4fe1a88ec443e1a94b59b8fcc93b0 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 18 May 2023 19:09:34 -0400 Subject: [PATCH 175/282] match vae file --- modules/sd_vae.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/sd_vae.py b/modules/sd_vae.py index 7bd294c6d..0e8db42ea 100644 --- a/modules/sd_vae.py +++ b/modules/sd_vae.py @@ -96,7 +96,14 @@ def resolve_vae(checkpoint_file): if vae_near_checkpoint is not None and (shared.opts.sd_vae_as_default): return vae_near_checkpoint, 'near checkpoint' if is_automatic: - for named_vae_location in [os.path.join(vae_path, os.path.splitext(os.path.basename(checkpoint_file))[0] + ".vae.pt"), os.path.join(vae_path, os.path.splitext(os.path.basename(checkpoint_file))[0] + ".vae.ckpt"), os.path.join(vae_path, os.path.splitext(os.path.basename(checkpoint_file))[0] + ".vae.safetensors")]: + for named_vae_location in [ + os.path.join(vae_path, os.path.splitext(os.path.basename(checkpoint_file))[0] + ".pt"), + os.path.join(vae_path, os.path.splitext(os.path.basename(checkpoint_file))[0] + ".ckpt"), + os.path.join(vae_path, os.path.splitext(os.path.basename(checkpoint_file))[0] + ".safetensors"), + os.path.join(vae_path, os.path.splitext(os.path.basename(checkpoint_file))[0] + ".vae.pt"), + os.path.join(vae_path, os.path.splitext(os.path.basename(checkpoint_file))[0] + ".vae.ckpt"), + os.path.join(vae_path, os.path.splitext(os.path.basename(checkpoint_file))[0] + ".vae.safetensors"), + ]: if os.path.isfile(named_vae_location): return named_vae_location, 'in VAE dir' if shared.opts.sd_vae == "None": From 527dc0eedf209f29cf9380a8d925b520cc3d4878 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 18 May 2023 19:46:11 -0400 Subject: [PATCH 176/282] update parser --- modules/progress.py | 2 +- modules/prompt_parser.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/progress.py b/modules/progress.py index 42ed01052..09e282353 100644 --- a/modules/progress.py +++ b/modules/progress.py @@ -62,7 +62,7 @@ def progressapi(req: ProgressRequest): queued = req.id_task in pending_tasks completed = req.id_task in finished_tasks if not active: - return ProgressResponse(active=active, queued=queued, completed=completed, id_live_preview=-1, textinfo="In queue..." if queued else "Waiting...") + return ProgressResponse(active=active, queued=queued, completed=completed, id_live_preview=-1, textinfo="Queued..." if queued else "Waiting...") progress = 0 job_count, job_no = shared.state.job_count, shared.state.job_no sampling_steps, sampling_step = shared.state.sampling_steps, shared.state.sampling_step diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py index c9a4faeb6..bfcf314db 100644 --- a/modules/prompt_parser.py +++ b/modules/prompt_parser.py @@ -317,6 +317,7 @@ def parse_prompt_attention(text): for m in re_attention.finditer(text): text = m.group(0) weight = m.group(1) + if text.startswith('\\'): res.append([text[1:], 1.0]) elif text == '(': @@ -326,7 +327,8 @@ def parse_prompt_attention(text): elif weight is not None and len(round_brackets) > 0: multiply_range(round_brackets.pop(), float(weight)) elif weight is not None and len(square_brackets) > 0: - multiply_range(square_brackets.pop(), float(weight)) + if opts.prompt_attention == 'Full parser': + multiply_range(square_brackets.pop(), float(weight)) elif text == ')' and len(round_brackets) > 0: multiply_range(round_brackets.pop(), round_bracket_multiplier) elif text == ']' and len(square_brackets) > 0: From df65e8e30a584bdc88812ebcd356b1eb04a3097b Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 18 May 2023 22:16:24 -0400 Subject: [PATCH 177/282] update clip skip and attention normalization --- cli/run-benchmark.py | 1 - .../Lora/scripts/lora_script.py | 4 ---- extensions-builtin/sd-webui-controlnet | 2 +- modules/generation_parameters_copypaste.py | 1 - modules/images.py | 4 ++-- modules/img2img.py | 5 +++-- modules/processing.py | 5 +++-- modules/sd_hijack_clip.py | 20 ++++++++++--------- modules/sd_hijack_open_clip.py | 3 +-- modules/sd_vae.py | 4 ++-- modules/shared.py | 1 + modules/txt2img.py | 5 +++-- modules/ui.py | 14 ++++++------- scripts/xyz_grid.py | 5 ++--- 14 files changed, 35 insertions(+), 39 deletions(-) diff --git a/cli/run-benchmark.py b/cli/run-benchmark.py index 300820ad2..498f0cff3 100755 --- a/cli/run-benchmark.py +++ b/cli/run-benchmark.py @@ -87,7 +87,6 @@ async def main(): 'vae': opts.sd_vae, 'hypernetwork': opts.sd_hypernetwork, 'sampler': options.sampler_name, - 'clip-stop': opts.CLIP_stop_at_last_layers, 'preview': opts.show_progress_every_n_steps } }) cpu, gpu = memstats() diff --git a/extensions-builtin/Lora/scripts/lora_script.py b/extensions-builtin/Lora/scripts/lora_script.py index 7b485d97d..1f0677938 100644 --- a/extensions-builtin/Lora/scripts/lora_script.py +++ b/extensions-builtin/Lora/scripts/lora_script.py @@ -54,10 +54,6 @@ script_callbacks.on_infotext_pasted(lora.infotext_pasted) shared.options_templates.update(shared.options_section(('extra_networks', "Extra Networks"), { "sd_lora": shared.OptionInfo("None", "Add Lora to prompt", gr.Dropdown, lambda: {"choices": ["None"] + [x for x in lora.available_loras]}, refresh=lora.list_available_loras), "lora_preferred_name": shared.OptionInfo("Alias from file", "When adding to prompt, refer to lora by", gr.Radio, {"choices": ["Alias from file", "Filename"]}), -})) - - -shared.options_templates.update(shared.options_section(('compatibility', "Compatibility"), { "lora_functional": shared.OptionInfo(False, "Lora: use old method that takes longer when you have multiple Loras active and produces same results as kohya-ss/sd-webui-additional-networks extension"), })) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index d7a02838b..8d84f1f74 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit d7a02838b03cdbcf1a0c84059aa2656f5245c383 +Subproject commit 8d84f1f74f89ff29f3ef0af833d7b354b9b21da8 diff --git a/modules/generation_parameters_copypaste.py b/modules/generation_parameters_copypaste.py index 2d6c64951..6b0d4c00b 100644 --- a/modules/generation_parameters_copypaste.py +++ b/modules/generation_parameters_copypaste.py @@ -303,7 +303,6 @@ settings_map = {} infotext_to_setting_name_mapping = [ - ('Clip skip', 'CLIP_stop_at_last_layers', ), ('Conditional mask weight', 'inpainting_mask_weight'), ('Model hash', 'sd_model_checkpoint'), ('ENSD', 'eta_noise_seed_delta'), diff --git a/modules/images.py b/modules/images.py index 7b3688412..cf83106ef 100644 --- a/modules/images.py +++ b/modules/images.py @@ -287,7 +287,7 @@ def sanitize_filename_part(text, replace_spaces=True): class FilenameGenerator: replacements = { 'seed': lambda self: self.seed if self.seed is not None else '', - 'steps': lambda self: self.p and self.p.steps, + 'steps': lambda self: self.p and self.p.steps, 'cfg': lambda self: self.p and self.p.cfg_scale, 'width': lambda self: self.image.width, 'height': lambda self: self.image.height, @@ -307,7 +307,7 @@ class FilenameGenerator: 'batch_number': lambda self: NOTHING_AND_SKIP_PREVIOUS_TEXT if self.p.batch_size == 1 else self.p.batch_index + 1, 'generation_number': lambda self: NOTHING_AND_SKIP_PREVIOUS_TEXT if self.p.n_iter == 1 and self.p.batch_size == 1 else self.p.iteration * self.p.batch_size + self.p.batch_index + 1, 'hasprompt': lambda self, *args: self.hasprompt(*args), # accepts formats:[hasprompt..] - 'clip_skip': lambda self: shared.opts.data["CLIP_stop_at_last_layers"], + 'clip_skip': lambda self: self.p and self.p.clip_skip, 'denoising': lambda self: self.p.denoising_strength if self.p and self.p.denoising_strength else NOTHING_AND_SKIP_PREVIOUS_TEXT, } default_time_format = '%Y%m%d%H%M%S' diff --git a/modules/img2img.py b/modules/img2img.py index c5aa93804..9433fd899 100644 --- a/modules/img2img.py +++ b/modules/img2img.py @@ -65,12 +65,12 @@ def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args): shared.log.debug(f'Processed: {len(images)} Memory: {memory_stats()} batch') -def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_styles, init_img, sketch, init_img_with_mask, inpaint_color_sketch, inpaint_color_sketch_orig, init_img_inpaint, init_mask_inpaint, steps: int, sampler_index: int, mask_blur: int, mask_alpha: float, inpainting_fill: int, restore_faces: bool, tiling: bool, n_iter: int, batch_size: int, cfg_scale: float, image_cfg_scale: float, denoising_strength: float, seed: int, subseed: int, subseed_strength: float, seed_resize_from_h: int, seed_resize_from_w: int, seed_enable_extras: bool, selected_scale_tab: int, height: int, width: int, scale_by: float, resize_mode: int, inpaint_full_res: bool, inpaint_full_res_padding: int, inpainting_mask_invert: int, img2img_batch_input_dir: str, img2img_batch_output_dir: str, img2img_batch_inpaint_mask_dir: str, override_settings_texts, *args): # pylint: disable=unused-argument +def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_styles, init_img, sketch, init_img_with_mask, inpaint_color_sketch, inpaint_color_sketch_orig, init_img_inpaint, init_mask_inpaint, steps: int, sampler_index: int, mask_blur: int, mask_alpha: float, inpainting_fill: int, restore_faces: bool, tiling: bool, n_iter: int, batch_size: int, cfg_scale: float, image_cfg_scale: float, clip_skip: int, denoising_strength: float, seed: int, subseed: int, subseed_strength: float, seed_resize_from_h: int, seed_resize_from_w: int, seed_enable_extras: bool, selected_scale_tab: int, height: int, width: int, scale_by: float, resize_mode: int, inpaint_full_res: bool, inpaint_full_res_padding: int, inpainting_mask_invert: int, img2img_batch_input_dir: str, img2img_batch_output_dir: str, img2img_batch_inpaint_mask_dir: str, override_settings_texts, *args): # pylint: disable=unused-argument if shared.sd_model is None: shared.log.warning('Model not loaded') return - shared.log.debug(f'img2img: id_task={id_task}|mode={mode}|prompt={prompt}|negative_prompt={negative_prompt}|prompt_styles={prompt_styles}|init_img={init_img}|sketch={sketch}|init_img_with_mask={init_img_with_mask}|inpaint_color_sketch={inpaint_color_sketch}|inpaint_color_sketch_orig={inpaint_color_sketch_orig}|init_img_inpaint={init_img_inpaint}|init_mask_inpaint={init_mask_inpaint}|steps={steps}|sampler_index={sampler_index}|mask_blur={mask_blur}|mask_alpha={mask_alpha}|inpainting_fill={inpainting_fill}|restore_faces={restore_faces}|tiling={tiling}|n_iter={n_iter}|batch_size={batch_size}|cfg_scale={cfg_scale}|image_cfg_scale={image_cfg_scale}|denoising_strength={denoising_strength}|seed={seed}|subseed{subseed}|subseed_strength={subseed_strength}|seed_resize_from_h={seed_resize_from_h}|seed_resize_from_w={seed_resize_from_w}|seed_enable_extras={seed_enable_extras}|selected_scale_tab={selected_scale_tab}|height={height}|width={width}|scale_by={scale_by}|resize_mode={resize_mode}|inpaint_full_res={inpaint_full_res}|inpaint_full_res_padding={inpaint_full_res_padding}|inpainting_mask_invert={inpainting_mask_invert}|img2img_batch_input_dir={img2img_batch_input_dir}|img2img_batch_output_dir={img2img_batch_output_dir}|img2img_batch_inpaint_mask_dir={img2img_batch_inpaint_mask_dir}|override_settings_texts={override_settings_texts}|args={args}') + shared.log.debug(f'img2img: id_task={id_task}|mode={mode}|prompt={prompt}|negative_prompt={negative_prompt}|prompt_styles={prompt_styles}|init_img={init_img}|sketch={sketch}|init_img_with_mask={init_img_with_mask}|inpaint_color_sketch={inpaint_color_sketch}|inpaint_color_sketch_orig={inpaint_color_sketch_orig}|init_img_inpaint={init_img_inpaint}|init_mask_inpaint={init_mask_inpaint}|steps={steps}|sampler_index={sampler_index}|mask_blur={mask_blur}|mask_alpha={mask_alpha}|inpainting_fill={inpainting_fill}|restore_faces={restore_faces}|tiling={tiling}|n_iter={n_iter}|batch_size={batch_size}|cfg_scale={cfg_scale}|image_cfg_scale={image_cfg_scale}|clip_skip={clip_skip}|denoising_strength={denoising_strength}|seed={seed}|subseed{subseed}|subseed_strength={subseed_strength}|seed_resize_from_h={seed_resize_from_h}|seed_resize_from_w={seed_resize_from_w}|seed_enable_extras={seed_enable_extras}|selected_scale_tab={selected_scale_tab}|height={height}|width={width}|scale_by={scale_by}|resize_mode={resize_mode}|inpaint_full_res={inpaint_full_res}|inpaint_full_res_padding={inpaint_full_res_padding}|inpainting_mask_invert={inpainting_mask_invert}|img2img_batch_input_dir={img2img_batch_input_dir}|img2img_batch_output_dir={img2img_batch_output_dir}|img2img_batch_inpaint_mask_dir={img2img_batch_inpaint_mask_dir}|override_settings_texts={override_settings_texts}|args={args}') if sampler_index is None: shared.log.warning('Selected sampler is not enabled') @@ -131,6 +131,7 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s n_iter=n_iter, steps=steps, cfg_scale=cfg_scale, + clip_skip=clip_skip, width=width, height=height, restore_faces=restore_faces, diff --git a/modules/processing.py b/modules/processing.py index fdeb5cd75..69450e341 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -87,7 +87,7 @@ class StableDiffusionProcessing: """ The first set of paramaters: sd_models -> do_not_reload_embeddings represent the minimum required to create a StableDiffusionProcessing """ - def __init__(self, sd_model=None, outpath_samples=None, outpath_grids=None, prompt: str = "", styles: List[str] = None, seed: int = -1, subseed: int = -1, subseed_strength: float = 0, seed_resize_from_h: int = -1, seed_resize_from_w: int = -1, seed_enable_extras: bool = True, sampler_name: str = None, batch_size: int = 1, n_iter: int = 1, steps: int = 50, cfg_scale: float = 7.0, width: int = 512, height: int = 512, restore_faces: bool = False, tiling: bool = False, do_not_save_samples: bool = False, do_not_save_grid: bool = False, extra_generation_params: Dict[Any, Any] = None, overlay_images: Any = None, negative_prompt: str = None, eta: float = None, do_not_reload_embeddings: bool = False, denoising_strength: float = 0, ddim_discretize: str = None, s_min_uncond: float = 0.0, s_churn: float = 0.0, s_tmax: float = None, s_tmin: float = 0.0, s_noise: float = 1.0, override_settings: Dict[str, Any] = None, override_settings_restore_afterwards: bool = True, sampler_index: int = None, script_args: list = None): # pylint: disable=unused-argument + def __init__(self, sd_model=None, outpath_samples=None, outpath_grids=None, prompt: str = "", styles: List[str] = None, seed: int = -1, subseed: int = -1, subseed_strength: float = 0, seed_resize_from_h: int = -1, seed_resize_from_w: int = -1, seed_enable_extras: bool = True, sampler_name: str = None, batch_size: int = 1, n_iter: int = 1, steps: int = 50, cfg_scale: float = 7.0, clip_skip: int = 1, width: int = 512, height: int = 512, restore_faces: bool = False, tiling: bool = False, do_not_save_samples: bool = False, do_not_save_grid: bool = False, extra_generation_params: Dict[Any, Any] = None, overlay_images: Any = None, negative_prompt: str = None, eta: float = None, do_not_reload_embeddings: bool = False, denoising_strength: float = 0, ddim_discretize: str = None, s_min_uncond: float = 0.0, s_churn: float = 0.0, s_tmax: float = None, s_tmin: float = 0.0, s_noise: float = 1.0, override_settings: Dict[str, Any] = None, override_settings_restore_afterwards: bool = True, sampler_index: int = None, script_args: list = None): # pylint: disable=unused-argument self.outpath_samples: str = outpath_samples self.outpath_grids: str = outpath_grids @@ -141,9 +141,10 @@ class StableDiffusionProcessing: self.all_negative_prompts = None self.all_seeds = None self.all_subseeds = None - self.clip_skip = opts.CLIP_stop_at_last_layers + self.clip_skip = clip_skip self.iteration = 0 self.is_hr_pass = False + opts.data['clip_skip'] = clip_skip @property def sd_model(self): diff --git a/modules/sd_hijack_clip.py b/modules/sd_hijack_clip.py index fe59f976c..4d79cd3fa 100644 --- a/modules/sd_hijack_clip.py +++ b/modules/sd_hijack_clip.py @@ -203,10 +203,13 @@ class FrozenCLIPEmbedderWithCustomWordsBase(torch.nn.Module): z = self.encode_with_transformers(tokens) # restoring original mean is likely not correct, but it seems to work well to prevent artifacts that happen otherwise batch_multipliers = torch.asarray(batch_multipliers).to(devices.device) - original_mean = z.mean() - z = z * batch_multipliers.reshape(batch_multipliers.shape + (1,)).expand(z.shape) - new_mean = z.mean() - z = z * (original_mean / new_mean) + if opts.prompt_mean_norm: + original_mean = z.mean() + z = z * batch_multipliers.reshape(batch_multipliers.shape + (1,)).expand(z.shape) + new_mean = z.mean() + z = z * (original_mean / new_mean) + else: + z = z * batch_multipliers.reshape(batch_multipliers.shape + (1,)).expand(z.shape) return z @@ -240,11 +243,10 @@ class FrozenCLIPEmbedderWithCustomWords(FrozenCLIPEmbedderWithCustomWordsBase): return tokenized def encode_with_transformers(self, tokens): - if opts.CLIP_stop_at_last_layers is None: - opts.CLIP_stop_at_last_layers = 1 - outputs = self.wrapped.transformer(input_ids=tokens, output_hidden_states=-opts.CLIP_stop_at_last_layers) - if opts.CLIP_stop_at_last_layers > 1: - z = outputs.hidden_states[-opts.CLIP_stop_at_last_layers] + clip_skip = opts.data['clip_skip'] or 1 + outputs = self.wrapped.transformer(input_ids=tokens, output_hidden_states=-clip_skip) + if clip_skip > 1: + z = outputs.hidden_states[-clip_skip] z = self.wrapped.transformer.text_model.final_layer_norm(z) else: z = outputs.last_hidden_state diff --git a/modules/sd_hijack_open_clip.py b/modules/sd_hijack_open_clip.py index f76fc1f3b..5f19f6632 100644 --- a/modules/sd_hijack_open_clip.py +++ b/modules/sd_hijack_open_clip.py @@ -3,7 +3,7 @@ import torch from modules import sd_hijack_clip, devices -tokenizer = open_clip.tokenizer._tokenizer +tokenizer = open_clip.tokenizer._tokenizer # pylint: disable=protected-access class FrozenOpenCLIPEmbedderWithCustomWords(sd_hijack_clip.FrozenCLIPEmbedderWithCustomWordsBase): @@ -21,7 +21,6 @@ class FrozenOpenCLIPEmbedderWithCustomWords(sd_hijack_clip.FrozenCLIPEmbedderWit return tokenized def encode_with_transformers(self, tokens): - # set self.wrapped.layer_idx here according to opts.CLIP_stop_at_last_layers z = self.wrapped.encode_with_transformer(tokens) return z diff --git a/modules/sd_vae.py b/modules/sd_vae.py index 0e8db42ea..0c55d88f0 100644 --- a/modules/sd_vae.py +++ b/modules/sd_vae.py @@ -128,7 +128,7 @@ def load_vae(model, vae_file=None, vae_source="from unknown source"): if vae_file: if cache_enabled and vae_file in checkpoints_loaded: # use vae checkpoint cache - shared.log.info(f"Loading VAE weights {vae_source}: cached {get_filename(vae_file)}") + shared.log.info(f"Loading VAE weights: {vae_source}: cached {get_filename(vae_file)}") store_base_vae(model) _load_vae_dict(model, checkpoints_loaded[vae_file]) else: @@ -192,5 +192,5 @@ def reload_vae_weights(sd_model=None, vae_file=unspecified): script_callbacks.model_loaded_callback(sd_model) if not shared.cmd_opts.lowvram and not shared.cmd_opts.medvram: sd_model.to(devices.device) - shared.log.info("VAE weights loaded.") + shared.log.info(f"VAE weights loaded: {vae_file}") return sd_model diff --git a/modules/shared.py b/modules/shared.py index eaa3cbfe1..12f292e75 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -255,6 +255,7 @@ options_templates.update(options_section(('sd', "Stable Diffusion"), { "sub_quad_chunk_threshold": OptionInfo(80, "Sub-quadratic cross-attention percentage of VRAM chunking threshold", gr.Slider, {"minimum": 0, "maximum": 100, "step": 1}), "always_batch_cond_uncond": OptionInfo(False, "Disables cond/uncond batching that is enabled to save memory with --medvram or --lowvram"), "prompt_attention": OptionInfo("Full parser", "Prompt attention parser", gr.Radio, lambda: {"choices": ["Full parser", "Compel parser", "A1111 parser", "Fixed attention"] }), + "prompt_mean_norm": OptionInfo(True, "Prompt attention mean normalization"), })) options_templates.update(options_section(('system-paths', "System Paths"), { diff --git a/modules/txt2img.py b/modules/txt2img.py index f7a99df6b..e2e37afc5 100644 --- a/modules/txt2img.py +++ b/modules/txt2img.py @@ -7,12 +7,12 @@ from modules.ui import plaintext_to_html from modules.memstats import memory_stats -def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, steps: int, sampler_index: int, restore_faces: bool, tiling: bool, n_iter: int, batch_size: int, cfg_scale: float, seed: int, subseed: int, subseed_strength: float, seed_resize_from_h: int, seed_resize_from_w: int, seed_enable_extras: bool, height: int, width: int, enable_hr: bool, denoising_strength: float, hr_scale: float, hr_upscaler: str, hr_second_pass_steps: int, hr_resize_x: int, hr_resize_y: int, override_settings_texts, *args): # pylint: disable=unused-argument +def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, steps: int, sampler_index: int, restore_faces: bool, tiling: bool, n_iter: int, batch_size: int, cfg_scale: float, clip_skip: int, seed: int, subseed: int, subseed_strength: float, seed_resize_from_h: int, seed_resize_from_w: int, seed_enable_extras: bool, height: int, width: int, enable_hr: bool, denoising_strength: float, hr_scale: float, hr_upscaler: str, hr_second_pass_steps: int, hr_resize_x: int, hr_resize_y: int, override_settings_texts, *args): # pylint: disable=unused-argument if shared.sd_model is None: shared.log.warning('Model not loaded') return - shared.log.debug(f'txt2img: id_task={id_task}|prompt={prompt}|negative_prompt={negative_prompt}|prompt_styles={prompt_styles}|steps={steps}|sampler_index={sampler_index}|restore_faces={restore_faces}|tiling={tiling}|n_iter={n_iter}|batch_size={batch_size}|cfg_scale={cfg_scale}|seed={seed}|subseed={subseed}|subseed_strength={subseed_strength}|seed_resize_from_h={seed_resize_from_h}|seed_resize_from_w={seed_resize_from_w}|seed_enable_extras={seed_enable_extras}|height={height}|width={width}|enable_hr={enable_hr}|denoising_strength={denoising_strength}|hr_scale={hr_scale}|hr_upscaler={hr_upscaler}|hr_second_pass_steps={hr_second_pass_steps}|hr_resize_x={hr_resize_x}|hr_resize_y={hr_resize_y}|override_settings_texts={override_settings_texts}args={args}') + shared.log.debug(f'txt2img: id_task={id_task}|prompt={prompt}|negative_prompt={negative_prompt}|prompt_styles={prompt_styles}|steps={steps}|sampler_index={sampler_index}|restore_faces={restore_faces}|tiling={tiling}|n_iter={n_iter}|batch_size={batch_size}|cfg_scale={cfg_scale}|clip_skip={clip_skip}|seed={seed}|subseed={subseed}|subseed_strength={subseed_strength}|seed_resize_from_h={seed_resize_from_h}|seed_resize_from_w={seed_resize_from_w}|seed_enable_extras={seed_enable_extras}|height={height}|width={width}|enable_hr={enable_hr}|denoising_strength={denoising_strength}|hr_scale={hr_scale}|hr_upscaler={hr_upscaler}|hr_second_pass_steps={hr_second_pass_steps}|hr_resize_x={hr_resize_x}|hr_resize_y={hr_resize_y}|override_settings_texts={override_settings_texts}args={args}') if sampler_index is None: shared.log.warning('Selected sampler is not enabled') sampler_index = 0 @@ -36,6 +36,7 @@ def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, step n_iter=n_iter, steps=steps, cfg_scale=cfg_scale, + clip_skip=clip_skip, width=width, height=height, restore_faces=restore_faces, diff --git a/modules/ui.py b/modules/ui.py index cc0de9e6e..c98b201f4 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -142,10 +142,6 @@ def interrogate_deepbooru(image): return gr.update() if prompt is None else prompt -def change_clip_skip(val): - modules.shared.opts.CLIP_stop_at_last_layers = val - - def create_seed_inputs(target_interface): with FormRow(elem_id=f"{target_interface}_seed_row", variant="compact"): seed = gr.Number(label='Seed', value=-1, elem_id=f"{target_interface}_seed") @@ -369,8 +365,7 @@ def create_ui(): elif category == "cfg": with FormRow(): cfg_scale = gr.Slider(minimum=1.0, maximum=30.0, step=0.5, label='CFG Scale', value=6.0, elem_id="txt2img_cfg_scale") - clip_skip = gr.Slider(label='CLIP Skip', value=modules.shared.opts.CLIP_stop_at_last_layers, minimum=1, maximum=4, step=1, elem_id='txt2img_clip_skip', interactive=True) - clip_skip.change(fn=change_clip_skip, show_progress=False, inputs=clip_skip) + clip_skip = gr.Slider(label='CLIP skip', value=1, minimum=1, maximum=4, step=1, elem_id='txt2img_clip_skip', interactive=True) elif category == "seed": seed, reuse_seed, subseed, reuse_subseed, subseed_strength, seed_resize_from_h, seed_resize_from_w, seed_checkbox = create_seed_inputs('txt2img') elif category == "checkboxes": @@ -430,6 +425,7 @@ def create_ui(): batch_count, batch_size, cfg_scale, + clip_skip, seed, subseed, subseed_strength, seed_resize_from_h, seed_resize_from_w, seed_checkbox, # seed_enable_extras @@ -484,6 +480,7 @@ def create_ui(): (sampler_index, "Sampler"), (restore_faces, "Face restoration"), (cfg_scale, "CFG scale"), + (clip_skip, "Clip skip"), (seed, "Seed"), (width, "Size-1"), (height, "Size-2"), @@ -681,8 +678,7 @@ def create_ui(): cfg_scale = gr.Slider(minimum=1.0, maximum=30.0, step=0.5, label='CFG Scale', value=6.0, elem_id="img2img_cfg_scale") image_cfg_scale = gr.Slider(minimum=0, maximum=3.0, step=0.05, label='Image CFG Scale', value=1.5, elem_id="img2img_image_cfg_scale", visible=False) denoising_strength = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label='Denoising strength', value=0.75, elem_id="img2img_denoising_strength") - clip_skip = gr.Slider(label='CLIP Skip', value=modules.shared.opts.CLIP_stop_at_last_layers, minimum=1, maximum=4, step=1, elem_id='img2img_clip_skip', interactive=True) - clip_skip.change(fn=change_clip_skip, show_progress=False, inputs=clip_skip) + clip_skip = gr.Slider(label='CLIP skip', value=1, minimum=1, maximum=4, step=1, elem_id='img2img_clip_skip', interactive=True) elif category == "seed": seed, reuse_seed, subseed, reuse_subseed, subseed_strength, seed_resize_from_h, seed_resize_from_w, seed_checkbox = create_seed_inputs('img2img') @@ -772,6 +768,7 @@ def create_ui(): batch_size, cfg_scale, image_cfg_scale, + clip_skip, denoising_strength, seed, subseed, subseed_strength, seed_resize_from_h, seed_resize_from_w, seed_checkbox, @@ -861,6 +858,7 @@ def create_ui(): (restore_faces, "Face restoration"), (cfg_scale, "CFG scale"), (image_cfg_scale, "Image CFG scale"), + (clip_skip, "Clip skip"), (seed, "Seed"), (width, "Size-1"), (height, "Size-2"), diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py index 72afab4ad..30c8d31bd 100644 --- a/scripts/xyz_grid.py +++ b/scripts/xyz_grid.py @@ -82,7 +82,8 @@ def confirm_checkpoints(p, xs): def apply_clip_skip(p, x, xs): - shared.opts.data["CLIP_stop_at_last_layers"] = x + p.clip_skip = x + shared.opts.data["clip_skip"] = x def apply_upscale_latent_space(p, x, xs): @@ -344,7 +345,6 @@ def draw_xyz_grid(p, xs, ys, zs, x_labels, y_labels, z_labels, cell, draw_legend class SharedSettingsStackHelper(object): def __enter__(self): #Save overridden settings so they can be restored later. - self.CLIP_stop_at_last_layers = shared.opts.CLIP_stop_at_last_layers self.vae = shared.opts.sd_vae self.uni_pc_order = shared.opts.uni_pc_order self.token_merging_ratio_hr = shared.opts.token_merging_ratio_hr @@ -358,7 +358,6 @@ class SharedSettingsStackHelper(object): #Restore overriden settings after plot generation. shared.opts.data["sd_vae"] = self.vae shared.opts.data["uni_pc_order"] = self.uni_pc_order - shared.opts.data["CLIP_stop_at_last_layers"] = self.CLIP_stop_at_last_layers shared.opts.data["token_merging_ratio_hr"] = self.token_merging_ratio_hr shared.opts.data["token_merging_ratio"] = self.token_merging_ratio shared.opts.data["token_merging_random"] = self.token_merging_random From 9033499e087fcee2f04687cd66db692db08e3c88 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 19 May 2023 08:34:43 -0400 Subject: [PATCH 178/282] add manual seed --- extensions-builtin/sd-webui-controlnet | 2 +- modules/devices.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 8d84f1f74..1c994ff4f 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 8d84f1f74f89ff29f3ef0af833d7b354b9b21da8 +Subproject commit 1c994ff4f757d3d40e24d0ca367c1dfb9c717107 diff --git a/modules/devices.py b/modules/devices.py index 0acd61871..9c84d421b 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -161,6 +161,8 @@ def cond_cast_float(tensor): def randn(seed, shape): torch.manual_seed(seed) + if shared.cmd_opts.use_ipex: + torch.xpu.manual_seed_all(seed) if device.type == 'mps': return torch.randn(shape, device=cpu).to(device) return torch.randn(shape, device=device) From 42280ef8041cded41e83b1479a9f5797e4100458 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 19 May 2023 13:24:40 -0400 Subject: [PATCH 179/282] add theme mode toggle --- modules/shared.py | 3 ++- .../textual_inversion/textual_inversion.py | 8 +++---- modules/ui.py | 24 ++++++------------- 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/modules/shared.py b/modules/shared.py index 12f292e75..b7577f9b7 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -402,6 +402,7 @@ options_templates.update(options_section(('extra_networks', "Extra Networks"), { options_templates.update(options_section(('ui', "User interface"), { "gradio_theme": OptionInfo("black-orange", "UI theme", gr.Dropdown, lambda: {"choices": list_themes()}, refresh=refresh_themes), + "theme_style": OptionInfo("Auto", "Theme mode", gr.Radio, {"choices": ["Auto", "Dark", "Light"]}), "return_grid": OptionInfo(True, "Show grid in results for web"), "return_mask": OptionInfo(False, "For inpainting, include the greyscale mask in results for web"), "return_mask_composite": OptionInfo(False, "For inpainting, include masked composite in results for web"), @@ -660,7 +661,7 @@ def reload_gradio_theme(theme_name=None): except: log.error("Theme download error accessing HuggingFace") gradio_theme = gr.themes.Default(**default_font_params) - log.info(f'Loading UI theme: {theme_name}') + log.info(f'Loading UI theme: name={theme_name} style={opts.theme_style}') class TotalTQDM: diff --git a/modules/textual_inversion/textual_inversion.py b/modules/textual_inversion/textual_inversion.py index 9693730ab..e50eac586 100644 --- a/modules/textual_inversion/textual_inversion.py +++ b/modules/textual_inversion/textual_inversion.py @@ -167,7 +167,10 @@ class EmbeddingDatabase: emb = next(iter(param_dict.items()))[1] # diffuser concepts elif type(data) == dict and type(next(iter(data.values()))) == torch.Tensor: - assert len(data.keys()) == 1, 'embedding file has multiple terms in it' + if len(data.keys()) != 1: + shared.log.warning(f"Embedding file has multiple terms in it: {filename}") + shared.log.warning(f"Skipping embedding: {filename}") + return emb = next(iter(data.values())) if len(emb.shape) == 1: @@ -192,15 +195,12 @@ class EmbeddingDatabase: def load_from_dir(self, embdir): if not os.path.isdir(embdir.path): return - for root, _dirs, fns in os.walk(embdir.path, followlinks=True): for fn in fns: try: fullfn = os.path.join(root, fn) - if os.stat(fullfn).st_size == 0: continue - self.load_from_file(fullfn, fn) except Exception as e: errors.display(e, f'embedding load {fn}') diff --git a/modules/ui.py b/modules/ui.py index c98b201f4..48a112cc2 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1319,10 +1319,10 @@ def create_ui(): with gr.Blocks(analytics_enabled=False) as settings_interface: with gr.Row(): settings_submit = gr.Button(value="Apply settings", variant='primary', elem_id="settings_submit") - defaults_submit = gr.Button(value="Restore defaults", variant='primary', elem_id="defaults_submit") restart_submit = gr.Button(value="Restart server", variant='primary', elem_id="restart_submit") shutdown_submit = gr.Button(value="Shutdown server", variant='primary', elem_id="shutdown_submit") preview_theme = gr.Button(value="Preview theme", variant='primary', elem_id="settings_preview_theme") + defaults_submit = gr.Button(value="Restore defaults", variant='primary', elem_id="defaults_submit") unload_sd_model = gr.Button(value='Unload checkpoint', variant='primary', elem_id="sett_unload_sd_model") reload_sd_model = gr.Button(value='Reload checkpoint', variant='primary', elem_id="sett_reload_sd_model") # reload_script_bodies = gr.Button(value='Reload scripts', variant='primary', elem_id="settings_reload_script_bodies") @@ -1392,18 +1392,6 @@ def create_ui(): _js='function(){}' ) - """ - def reload_scripts(): - modules.scripts.reload_script_body_only() - reload_javascript() # need to refresh the html page - - reload_script_bodies.click( - fn=reload_scripts, - inputs=[], - outputs=[] - ) - """ - preview_theme.click( fn=None, _js='preview_theme', @@ -1651,11 +1639,13 @@ def html_head(): def html_body(): body = '' - # inline = f"{localization.localization_js(shared.opts.localization)};" inline = '' - if cmd_opts.theme is not None: - inline += f"set_theme('{cmd_opts.theme}');" - elif opts.gradio_theme == 'black-orange': + if opts.theme_style != 'Auto': + if opts.gradio_theme == 'black-orange': + modules.shared.log.info('Theme does not support custom mode') + else: + inline += f"set_theme('{opts.theme_style.lower()}');" + if opts.gradio_theme == 'black-orange': inline += "set_theme('dark');" body += f'\n' return body From 6221ccba4fd418252e2ff2e8df9f9c3bfafdbbe0 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 19 May 2023 14:06:46 -0400 Subject: [PATCH 180/282] change default model on download --- modules/sd_models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/sd_models.py b/modules/sd_models.py index d637e9190..ef7fea519 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -118,6 +118,7 @@ def list_models(): key = input('Download the default model? (y/N) ') if key.lower().startswith('y'): model_url = "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors" + shared.opts.data['sd_model_checkpoint'] = "v1-5-pruned-emaonly.safetensors" model_list = modelloader.load_models(model_path=model_path, model_url=model_url, command_path=shared.opts.ckpt_dir, ext_filter=[".ckpt", ".safetensors"], download_name="v1-5-pruned-emaonly.safetensors", ext_blacklist=[".vae.ckpt", ".vae.safetensors"]) for filename in sorted(model_list, key=str.lower): checkpoint_info = CheckpointInfo(filename) From 4c4e147baa81f9812d417907f29304b476f5112a Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 19 May 2023 15:23:26 -0400 Subject: [PATCH 181/282] fully localize data-dir --- modules/paths.py | 38 +++++++++++++++++++++++++------------- modules/sd_models.py | 3 ++- modules/shared.py | 3 +-- modules/styles.py | 1 + modules/ui.py | 2 +- webui.py | 2 ++ 6 files changed, 32 insertions(+), 17 deletions(-) diff --git a/modules/paths.py b/modules/paths.py index ca84d6c93..cc32bbb08 100644 --- a/modules/paths.py +++ b/modules/paths.py @@ -56,23 +56,35 @@ def create_paths(opts): if not os.path.exists(folder): try: os.makedirs(folder, exist_ok=True) - print('Creating folder:', folder) + # print('Creating folder:', folder) except: pass - create_path(opts.temp_dir) + + def fix_path(folder): + if opts.data[folder] is None or opts.data[folder] == '': + return opts.data[folder] + if os.path.isabs(opts.data[folder]): + return opts.data[folder] + if opts.data[folder].startswith(data_path): + return opts.data[folder] + opts.data[folder] = os.path.join(data_path, opts.data[folder]) + return opts.data[folder] + + create_path(fix_path('temp_dir')) create_path(extensions_dir) create_path(extensions_builtin_dir) - create_path(opts.ckpt_dir) - create_path(opts.vae_dir) - create_path(opts.embeddings_dir) - create_path(opts.outdir_samples) - create_path(opts.outdir_txt2img_samples) - create_path(opts.outdir_img2img_samples) - create_path(opts.outdir_extras_samples) - create_path(opts.outdir_grids) - create_path(opts.outdir_txt2img_grids) - create_path(opts.outdir_img2img_grids) - create_path(opts.outdir_save) + create_path(fix_path('hypernetwork_dir')) + create_path(fix_path('ckpt_dir')) + create_path(fix_path('vae_dir')) + create_path(fix_path('embeddings_dir')) + create_path(fix_path('outdir_samples')) + create_path(fix_path('outdir_txt2img_samples')) + create_path(fix_path('outdir_img2img_samples')) + create_path(fix_path('outdir_extras_samples')) + create_path(fix_path('outdir_grids')) + create_path(fix_path('outdir_txt2img_grids')) + create_path(fix_path('outdir_img2img_grids')) + create_path(fix_path('outdir_save')) class Prioritize: diff --git a/modules/sd_models.py b/modules/sd_models.py index ef7fea519..58c885ba8 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -16,6 +16,7 @@ from modules import paths, shared, modelloader, devices, script_callbacks, sd_va from modules.sd_hijack_inpainting import do_inpainting_hijack from modules.timer import Timer from modules.memstats import memory_stats +from modules.paths_internal import models_path model_dir = "Stable-diffusion" @@ -98,7 +99,7 @@ def checkpoint_tiles(): def list_models(): checkpoints_list.clear() checkpoint_aliases.clear() - model_list = modelloader.load_models(model_path=os.path.join(shared.cmd_opts.models_dir, 'Stable-diffusion'), model_url=None, command_path=shared.opts.ckpt_dir, ext_filter=[".ckpt", ".safetensors"], download_name=None, ext_blacklist=[".vae.ckpt", ".vae.safetensors"]) + model_list = modelloader.load_models(model_path=os.path.join(models_path, 'Stable-diffusion'), model_url=None, command_path=shared.opts.ckpt_dir, ext_filter=[".ckpt", ".safetensors"], download_name=None, ext_blacklist=[".vae.ckpt", ".vae.safetensors"]) if shared.cmd_opts.ckpt is not None: if not os.path.exists(shared.cmd_opts.ckpt): if shared.cmd_opts.ckpt.lower() != "none": diff --git a/modules/shared.py b/modules/shared.py index b7577f9b7..5febe410f 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -276,7 +276,7 @@ options_templates.update(options_section(('system-paths', "System Paths"), { "clip_models_path": OptionInfo(os.path.join(paths.models_path, 'CLIP'), "Path to directory with CLIP model file(s)"), "lora_dir": OptionInfo(os.path.join(paths.models_path, 'Lora'), "Path to directory with Lora network(s)"), "lyco_dir": OptionInfo(os.path.join(paths.models_path, 'LyCORIS'), "Path to directory with LyCORIS network(s)"), - "styles_dir": OptionInfo('styles.csv', "Path to user-defined styles file"), + "styles_dir": OptionInfo(os.path.join(paths.data_path, 'styles.csv'), "Path to user-defined styles file"), # "gfpgan_model": OptionInfo("", "GFPGAN model file name"), })) @@ -611,7 +611,6 @@ if os.path.exists(config_filename): opts.load(config_filename) cmd_opts = cmd_args.compatibility_args(opts, cmd_opts) -os.makedirs(opts.hypernetwork_dir, exist_ok=True) prompt_styles = modules.styles.StyleDatabase(opts.styles_dir) cmd_opts.disable_extension_access = (cmd_opts.share or cmd_opts.listen or (cmd_opts.server_name or False)) and not cmd_opts.insecure devices.device, devices.device_interrogate, devices.device_gfpgan, devices.device_esrgan, devices.device_codeformer = (devices.cpu if any(y in cmd_opts.use_cpu for y in [x, 'all']) else devices.get_optimal_device() for x in ['sd', 'interrogate', 'gfpgan', 'esrgan', 'codeformer']) diff --git a/modules/styles.py b/modules/styles.py index 22d1a7f92..bf689c0e7 100644 --- a/modules/styles.py +++ b/modules/styles.py @@ -73,6 +73,7 @@ class StyleDatabase: def save_styles(self, path: str) -> None: # Write to temporary file first, so we don't nuke the file if something goes wrong + os.makedirs(os.path.dirname(path), exist_ok=True) fd, temp_path = tempfile.mkstemp(".csv") with os.fdopen(fd, "w", encoding="utf-8-sig", newline='') as file: # _fields is actually part of the public API: typing.NamedTuple is a replacement for collections.NamedTuple, diff --git a/modules/ui.py b/modules/ui.py index 48a112cc2..e3e5f5525 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1061,7 +1061,7 @@ def create_ui(): gradient_step = gr.Number(label='Gradient accumulation steps', value=1, precision=0, elem_id="train_gradient_step") dataset_directory = gr.Textbox(label='Dataset directory', placeholder="Path to directory with input images", elem_id="train_dataset_directory") - log_directory = gr.Textbox(label='Log directory', placeholder="Path to directory where to write outputs", value="train/log/embeddings", elem_id="train_log_directory") + log_directory = gr.Textbox(label='Log directory', placeholder="Path to directory where to write outputs", value=f"{os.path.join('cmd_opts.data_dir', 'train/log/embeddings')}", elem_id="train_log_directory") with FormRow(): template_file = gr.Dropdown(label='Prompt template', value="style_filewords.txt", elem_id="train_template_file", choices=get_textual_inversion_template_names()) diff --git a/webui.py b/webui.py index 144d33cd2..f87cf3f7c 100644 --- a/webui.py +++ b/webui.py @@ -210,6 +210,8 @@ def async_policy(): def start_common(): log.debug('Entering start sequence') logging.disable(logging.NOTSET if cmd_opts.debug else logging.DEBUG) + if shared.cmd_opts.data_dir is not None or len(shared.cmd_opts.data_dir) > 0: + log.info(f'Using data path: {shared.cmd_opts.data_dir}') create_paths(opts) async_policy() initialize() From 794b23cc2bb85c6d96483c0f1a54c759d5e8b23d Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 19 May 2023 16:56:08 -0400 Subject: [PATCH 182/282] add parser to infotext --- TODO.md | 10 ++++++++++ modules/processing.py | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index 1b7df62f5..8927d7ed9 100644 --- a/TODO.md +++ b/TODO.md @@ -56,3 +56,13 @@ Tech that can be integrated as part of the core workflow... - Bunch of stuff: ### Pending Code Updates + +- tested with **torch 2.1** and **cuda 12.1** + (production remains on torch2.0.1+cuda11.8) +- fully extend support of `--data-dir` + allows multiple installations to share pretty much everything, not just models +- add dark/light theme mode toggle +- redo some `clip-skip` functionality +- better matching for vae vs model +- update to `xyz grid` to allow creation of large number of images without +- fixes...amazing how many issues were introduced by porting new a1111 code without adding almost no new functionality diff --git a/modules/processing.py b/modules/processing.py index 69450e341..42d907d0f 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -448,7 +448,8 @@ def create_infotext(p: StableDiffusionProcessing, all_prompts, all_seeds, all_su "Token merging merge cross attention": None if opts.token_merging_merge_cross_attention is False else opts.token_merging_merge_cross_attention, "Token merging merge mlp": None if opts.token_merging_merge_mlp is False else opts.token_merging_merge_mlp, "Token merging stride x": None if opts.token_merging_stride_x == 2 else opts.token_merging_stride_x, - "Token merging stride y": None if opts.token_merging_stride_y == 2 else opts.token_merging_stride_y + "Token merging stride y": None if opts.token_merging_stride_y == 2 else opts.token_merging_stride_y, + "Parser": opts.prompt_attention, } generation_params.update(p.extra_generation_params) generation_params_text = ", ".join([k if k == v else f'{k}: {generation_parameters_copypaste.quote(v)}' for k, v in generation_params.items() if v is not None]) From 2a2921c1775d29ed3577bb4590ba0647a5dd3e62 Mon Sep 17 00:00:00 2001 From: Matt Parnell Date: Fri, 19 May 2023 23:26:36 -0500 Subject: [PATCH 183/282] add missing check for empty tensor --- modules/sd_samplers_kdiffusion.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/sd_samplers_kdiffusion.py b/modules/sd_samplers_kdiffusion.py index e83850da2..1477553a4 100644 --- a/modules/sd_samplers_kdiffusion.py +++ b/modules/sd_samplers_kdiffusion.py @@ -308,9 +308,17 @@ class KDiffusionSampler: def create_noise_sampler(self, x, sigmas, p): from k_diffusion.sampling import BrownianTreeNoiseSampler - sigma_min, sigma_max = sigmas[sigmas > 0].min(), sigmas.max() - current_iter_seeds = p.all_seeds[p.iteration * p.batch_size:(p.iteration + 1) * p.batch_size] - return BrownianTreeNoiseSampler(x, sigma_min, sigma_max, seed=current_iter_seeds) + + positive_sigmas = sigmas[sigmas > 0] + + if positive_sigmas.numel() > 0: + sigma_min = positive_sigmas.min(dim=0)[0] + else: + sigma_min = 0 + + sigma_max = sigmas.max() + current_iter_seeds = p.all_seeds[p.iteration * p.batch_size:(p.iteration + 1) * p.batch_size] + return BrownianTreeNoiseSampler(x, sigma_min, sigma_max, seed=current_iter_seeds) def sample_img2img(self, p, x, noise, conditioning, unconditional_conditioning, steps=None, image_conditioning=None): steps, t_enc = sd_samplers_common.setup_img2img_steps(p, steps) From 1237782f47786a090cf9b292e74175accfeec29e Mon Sep 17 00:00:00 2001 From: Matt Parnell Date: Fri, 19 May 2023 23:45:51 -0500 Subject: [PATCH 184/282] oops --- modules/sd_samplers_kdiffusion.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/sd_samplers_kdiffusion.py b/modules/sd_samplers_kdiffusion.py index 1477553a4..3dbc9498f 100644 --- a/modules/sd_samplers_kdiffusion.py +++ b/modules/sd_samplers_kdiffusion.py @@ -316,9 +316,9 @@ class KDiffusionSampler: else: sigma_min = 0 - sigma_max = sigmas.max() - current_iter_seeds = p.all_seeds[p.iteration * p.batch_size:(p.iteration + 1) * p.batch_size] - return BrownianTreeNoiseSampler(x, sigma_min, sigma_max, seed=current_iter_seeds) + sigma_max = sigmas.max() + current_iter_seeds = p.all_seeds[p.iteration * p.batch_size:(p.iteration + 1) * p.batch_size] + return BrownianTreeNoiseSampler(x, sigma_min, sigma_max, seed=current_iter_seeds) def sample_img2img(self, p, x, noise, conditioning, unconditional_conditioning, steps=None, image_conditioning=None): steps, t_enc = sd_samplers_common.setup_img2img_steps(p, steps) From 0891b30ffe235bc17fe9a2b392f2926ac3f089c4 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 20 May 2023 08:29:02 -0400 Subject: [PATCH 185/282] update --- .gitignore | 1 + TODO.md | 1 + modules/sd_models.py | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index fe0712400..078ec543c 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ venv /*.sh /*.txt /*.mp3 +/*.lnk !webui.bat !webui.sh diff --git a/TODO.md b/TODO.md index 8927d7ed9..fa5636cf8 100644 --- a/TODO.md +++ b/TODO.md @@ -25,6 +25,7 @@ Stuff to be added... Stuff to be investigated... +- Gradio `app_kwargs`: ## Merge PRs diff --git a/modules/sd_models.py b/modules/sd_models.py index 58c885ba8..ca2b43e4f 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -223,15 +223,19 @@ def read_state_dict(checkpoint_file, map_location=None): # pylint: disable=unuse _, extension = os.path.splitext(checkpoint_file) if shared.opts.stream_load: if extension.lower() == ".safetensors": + shared.log.debug('Model weights loading: type=safetensors mode=buffered') buffer = f.read() pl_sd = safetensors.torch.load(buffer) else: + shared.log.debug('Model weights loading: type=checkpoint mode=buffered') buffer = io.BytesIO(f.read()) pl_sd = torch.load(buffer, map_location='cpu') else: if extension.lower() == ".safetensors": + shared.log.debug('Model weights loading: type=safetensors mode=mmap') pl_sd = safetensors.torch.load_file(checkpoint_file, device='cpu') else: + shared.log.debug('Model weights loading: type=checkpoint mode=direct') pl_sd = torch.load(f, map_location='cpu') sd = get_state_dict_from_checkpoint(pl_sd) del pl_sd @@ -244,7 +248,7 @@ def read_state_dict(checkpoint_file, map_location=None): # pylint: disable=unuse def get_checkpoint_state_dict(checkpoint_info: CheckpointInfo, timer): if checkpoint_info in checkpoints_loaded: # use checkpoint cache - shared.log.info("Loading weights from cache") + shared.log.info("Model weights loading: from cache") return checkpoints_loaded[checkpoint_info] res = read_state_dict(checkpoint_info.filename) timer.record("load") From 335ad42fc8aeb8eca1a691abed846abacf2e81bc Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 20 May 2023 09:35:14 -0400 Subject: [PATCH 186/282] fix segment delimiter --- extensions-builtin/sd-webui-controlnet | 2 +- modules/prompt_parser.py | 8 ++++---- modules/sd_samplers_compvis.py | 2 +- modules/shared.py | 5 +++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 1c994ff4f..ce2278d5b 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 1c994ff4f757d3d40e24d0ca367c1dfb9c717107 +Subproject commit ce2278d5bcf1801c6a2e6c3cb7bcb345c05275fe diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py index bfcf314db..59647d852 100644 --- a/modules/prompt_parser.py +++ b/modules/prompt_parser.py @@ -34,7 +34,7 @@ plain: /([^\\\[\]():|]|\\.)+/ """) re_clean = re.compile(r"^\W+", re.S) re_whitespace = re.compile(r"\s+", re.S) -re_break = re.compile(r"\s*\bBREAK\b\s*", re.S) +re_break = re.compile(r"\s*\bBREAK\b|##\s*", re.S) re_attention_v2 = re.compile(r""" \(|\[|\\\(|\\\[|\\|\\\\| :([+-]?[.\d]+)| @@ -336,13 +336,13 @@ def parse_prompt_attention(text): else: parts = re.split(re_break, text) for i, part in enumerate(parts): + if i > 0: + res.append(["BREAK", -1]) if opts.prompt_attention == 'Full parser': part = re_clean.sub("", part) part = re_whitespace.sub(" ", part).strip() if len(part) == 0: continue - if i > 0: - res.append(["BREAK", -1]) res.append([part, 1.0]) for pos in round_brackets: multiply_range(pos, round_bracket_multiplier) @@ -366,7 +366,7 @@ if __name__ == "__main__": # import sys # sys.path.append(os.path.join(os.path.dirname(__file__), '..')) # input_text = "(upzero) (upone:1.1), ((uptwo:1.2)), [downzero], [downone:0.9], [[downtwo:0.8]], this is a test" - input_text = 'a (white (lion:1.4)), cat [mouse] [tiger:0.8], (high) in a jungle' + input_text = 'a (white (lion:1.4)), cat [mouse] [tiger:0.8], ##, (high) in a jungle' output_list = parse_prompt_attention(input_text) print('INPUT', input_text) print('OUTPUT', output_list) diff --git a/modules/sd_samplers_compvis.py b/modules/sd_samplers_compvis.py index 8de719323..98b0a3614 100644 --- a/modules/sd_samplers_compvis.py +++ b/modules/sd_samplers_compvis.py @@ -162,7 +162,7 @@ class VanillaStableDiffusionSampler: num_steps = shared.opts.uni_pc_order valid_step = 999 / (1000 // num_steps) if valid_step == math.floor(valid_step): - return int(valid_step) + 1 + return min(int(valid_step) + 1, num_steps) return num_steps diff --git a/modules/shared.py b/modules/shared.py index 5febe410f..ae2fe4e10 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -7,7 +7,7 @@ import urllib.request import gradio as gr import tqdm import requests -from ldm.models.diffusion.ddpm import LatentDiffusion +# from ldm.models.diffusion.ddpm import LatentDiffusion from modules import errors, ui_components, shared_items, cmd_args 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 # pylint: disable=W0611 import modules.interrogate @@ -769,5 +769,6 @@ class Shared(sys.modules[__name__].__class__): import modules.sd_models # pylint: disable=W0621 modules.sd_models.model_data.set_sd_model(value) -sd_model: LatentDiffusion = None # this var is here just for IDE's type checking; it cannot be accessed because the class field above will be accessed instead +# sd_model: LatentDiffusion = None # this var is here just for IDE's type checking; it cannot be accessed because the class field above will be accessed instead +sd_model = None sys.modules[__name__].__class__ = Shared From e59ebe25ce6ab4daae6fae2c8ffd809a8a15d824 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 20 May 2023 10:33:31 -0400 Subject: [PATCH 187/282] fix styles path --- extensions-builtin/multidiffusion-upscaler-for-automatic1111 | 2 +- modules/styles.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 index a4d3cd4e7..dc3f50311 160000 --- a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 +++ b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 @@ -1 +1 @@ -Subproject commit a4d3cd4e7ddbe40c2d190f5b05dce59112307a4f +Subproject commit dc3f503111024bdb6c5d64d67c487f22d9ccede5 diff --git a/modules/styles.py b/modules/styles.py index bf689c0e7..74a7d2e96 100644 --- a/modules/styles.py +++ b/modules/styles.py @@ -73,7 +73,9 @@ class StyleDatabase: def save_styles(self, path: str) -> None: # Write to temporary file first, so we don't nuke the file if something goes wrong - os.makedirs(os.path.dirname(path), exist_ok=True) + basedir = os.path.dirname(path) + if basedir is not None and len(basedir) > 0: + os.makedirs(basedir, exist_ok=True) fd, temp_path = tempfile.mkstemp(".csv") with os.fdopen(fd, "w", encoding="utf-8-sig", newline='') as file: # _fields is actually part of the public API: typing.NamedTuple is a replacement for collections.NamedTuple, From f8f81f86e62aba0b7e678829fc3daf352ad9a39e Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 20 May 2023 13:12:50 -0400 Subject: [PATCH 188/282] update prompt parser and image size --- cli/nvidia-smi.py | 31 +++++++++++++++++++++++++++++++ installer.py | 1 + modules/images.py | 20 +++++++++++++------- modules/processing.py | 19 ++++++++++--------- modules/prompt_parser.py | 39 ++++++++++++++++++++++++++------------- scripts/prompt_matrix.py | 26 ++++++++++++++------------ scripts/xyz_grid.py | 4 ++-- 7 files changed, 97 insertions(+), 43 deletions(-) create mode 100644 cli/nvidia-smi.py diff --git a/cli/nvidia-smi.py b/cli/nvidia-smi.py new file mode 100644 index 000000000..349f7f50f --- /dev/null +++ b/cli/nvidia-smi.py @@ -0,0 +1,31 @@ +import os +import json +import shutil +import subprocess +import xmltodict +from rich import print # pylint: disable=redefined-builtin +from util import log, Map + +def get_nvidia_smi(output='dict'): + smi = shutil.which('nvidia-smi') + if smi is None: + log.error("nvidia-smi not found") + return None + result = subprocess.run(f'"{smi}" -q -x', shell=True, check=False, env=os.environ, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + xml = result.stdout.decode(encoding="utf8", errors="ignore") + d = xmltodict.parse(xml) + if 'nvidia_smi_log' in d: + d = d['nvidia_smi_log'] + if 'gpu' in d and 'supported_clocks' in d['gpu']: + del d['gpu']['supported_clocks'] + if output == 'dict': + return d + elif output == 'class' or output == 'map': + d = Map(d) + return d + elif output == 'json': + return json.dumps(d, indent=4) + +if __name__ == "__main__": + res = get_nvidia_smi(output='dict') + print(type(res), res) diff --git a/installer.py b/installer.py index 4c5f0ed65..316a69d9b 100644 --- a/installer.py +++ b/installer.py @@ -452,6 +452,7 @@ def install_requirements(): # set environment variables controling the behavior of various libraries def set_environment(): log.info('Setting environment tuning') + os.environ.setdefault('USE_TORCH', '1') os.environ.setdefault('TF_CPP_MIN_LOG_LEVEL', '2') os.environ.setdefault('ACCELERATE', 'True') os.environ.setdefault('FORCE_CUDA', '1') diff --git a/modules/images.py b/modules/images.py index cf83106ef..c817a22de 100644 --- a/modules/images.py +++ b/modules/images.py @@ -19,6 +19,17 @@ from modules import sd_samplers, shared, script_callbacks, errors, paths LANCZOS = (Image.Resampling.LANCZOS if hasattr(Image, 'Resampling') else Image.LANCZOS) +def check_grid_size(imgs): + mp = 0 + for img in imgs: + mp += img.width * img.height + mp = round(mp / 1000000) + ok = mp <= shared.opts.img_max_size_mp + if not ok: + shared.log.warning(f'Maximum image size exceded: size={mp} maximum={shared.opts.img_max_size_mp} MPixels') + return ok + + def image_grid(imgs, batch_size=1, rows=None): if rows is None: if shared.opts.n_rows > 0: @@ -419,10 +430,6 @@ def atomically_save_image(): Image.MAX_IMAGE_PIXELS = None # disable check in Pillow and rely on check below to allow large custom image sizes while True: image, filename, extension, params, exifinfo_data, txt_fullfn = save_queue.get() - mp = round(image.width * image.height / 1000000) - if mp > shared.opts.img_max_size_mp: - shared.log.warning(f'Maximum image size exceded: size={image.size} maximum={shared.opts.img_max_size_mp} MPixels') - return fn = filename + extension image_format = Image.registered_extensions()[extension] shared.log.debug(f'Saving image: {image_format} {fn} {image.size}') @@ -433,9 +440,6 @@ def atomically_save_image(): pnginfo_data.add_text(k, str(v)) image.save(fn, format=image_format, quality=shared.opts.jpeg_quality, pnginfo=pnginfo_data) elif image_format == 'JPEG': - if image.height > 65500 or image.width > 65500: - shared.log.warning(f'Maximum image size exceded: size={image.size} maximum=65550 pixels') - return if image.mode == 'RGBA': shared.log.warning('Saving RGBA image as JPEG: Alpha channel will be lost') image = image.convert("RGB") @@ -513,6 +517,8 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='jpg', i if image is None: shared.log.warning('Image is none') return None, None + if not check_grid_size([image]): + return None, None if path is None: # set default path to avoid errors when functions are triggered manually or via api and param is not set path = shared.opts.outdir_save if save_to_dirs is None: diff --git a/modules/processing.py b/modules/processing.py index 42d907d0f..8a7756d04 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -687,15 +687,16 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: index_of_first_image = 0 unwanted_grid_because_of_img_count = len(output_images) < 2 and opts.grid_only_if_multiple if (opts.return_grid or opts.grid_save) and not p.do_not_save_grid and not unwanted_grid_because_of_img_count: - grid = images.image_grid(output_images, p.batch_size) - if opts.return_grid: - text = infotext() - infotexts.insert(0, text) - grid.info["parameters"] = text - output_images.insert(0, grid) - index_of_first_image = 1 - if opts.grid_save: - images.save_image(grid, p.outpath_grids, "grid", p.all_seeds[0], p.all_prompts[0], opts.grid_format, info=infotext(), short_filename=not opts.grid_extended_filename, p=p, grid=True) + if images.check_grid_size(output_images): + grid = images.image_grid(output_images, p.batch_size) + if opts.return_grid: + text = infotext() + infotexts.insert(0, text) + grid.info["parameters"] = text + output_images.insert(0, grid) + index_of_first_image = 1 + if opts.grid_save: + images.save_image(grid, p.outpath_grids, "grid", p.all_seeds[0], p.all_prompts[0], opts.grid_format, info=infotext(), short_filename=not opts.grid_extended_filename, p=p, grid=True) if not p.disable_extra_networks and extra_network_data: extra_networks.deactivate(p, extra_network_data) diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py index 59647d852..2f3c8e01b 100644 --- a/modules/prompt_parser.py +++ b/modules/prompt_parser.py @@ -1,4 +1,10 @@ # pylint: disable=anomalous-backslash-in-string + +import os +import sys +from rich import print +sys.path.append(os.path.join(os.path.dirname(__file__), '..')) + import re from collections import namedtuple from typing import List @@ -16,7 +22,7 @@ from modules.shared import log, opts # [100, 'fantasy landscape with a lake and a christmas tree in background masterful'] round_bracket_multiplier = 1.1 -square_bracket_multiplier = 0.9 +square_bracket_multiplier = 1.0 / 1.1 re_AND = re.compile(r"\bAND\b") re_weight = re.compile(r"^(.*?)(?:\s*:\s*([-+]?(?:\d+\.?|\d*\.\d+)))?\s*$") ScheduledPromptConditioning = namedtuple("ScheduledPromptConditioning", ["end_at_step", "cond"]) @@ -306,7 +312,7 @@ def parse_prompt_attention(text): re_attention = re_attention_v1 whitespace = '' else: - re_attention = re_attention_v2 + re_attention = re_attention_v1 text = text.replace('\\n', ' ') whitespace = ' ' @@ -326,9 +332,6 @@ def parse_prompt_attention(text): square_brackets.append(len(res)) elif weight is not None and len(round_brackets) > 0: multiply_range(round_brackets.pop(), float(weight)) - elif weight is not None and len(square_brackets) > 0: - if opts.prompt_attention == 'Full parser': - multiply_range(square_brackets.pop(), float(weight)) elif text == ')' and len(round_brackets) > 0: multiply_range(round_brackets.pop(), round_bracket_multiplier) elif text == ']' and len(square_brackets) > 0: @@ -362,11 +365,21 @@ def parse_prompt_attention(text): return res if __name__ == "__main__": - # import os - # import sys - # sys.path.append(os.path.join(os.path.dirname(__file__), '..')) - # input_text = "(upzero) (upone:1.1), ((uptwo:1.2)), [downzero], [downone:0.9], [[downtwo:0.8]], this is a test" - input_text = 'a (white (lion:1.4)), cat [mouse] [tiger:0.8], ##, (high) in a jungle' - output_list = parse_prompt_attention(input_text) - print('INPUT', input_text) - print('OUTPUT', output_list) + input_text = '[black] [[grey]] (white) ((gray)) ((orange:1.1) yellow) ((purple) and [dark] red:1.1) [mouse:0.2] [(cat:1.1):0.5]' + print(f'Prompt: {input_text}') + schedules = get_learned_conditioning_prompt_schedules([input_text], 100)[0] + print('Schedules', schedules) + for schedule in schedules: + print('Schedule', schedule[0]) + opts.data['prompt_attention'] = 'Fixed attention' + output_list = parse_prompt_attention(schedule[1]) + print(' Fixed:', output_list) + opts.data['prompt_attention'] = 'Compel parser' + output_list = parse_prompt_attention(schedule[1]) + print(' Compel:', output_list) + opts.data['prompt_attention'] = 'A1111 parser' + output_list = parse_prompt_attention(schedule[1]) + print(' A1111:', output_list) + opts.data['prompt_attention'] = 'Full parser' + output_list = parse_prompt_attention(schedule[1]) + print(' Full :', output_list) diff --git a/scripts/prompt_matrix.py b/scripts/prompt_matrix.py index 6772074ad..8614b59d9 100644 --- a/scripts/prompt_matrix.py +++ b/scripts/prompt_matrix.py @@ -27,10 +27,12 @@ def draw_xy_grid(xs, ys, x_label, y_label, cell): res.append(processed.images[0]) - grid = images.image_grid(res, rows=len(ys)) - grid = images.draw_grid_annotations(grid, res[0].width, res[0].height, hor_texts, ver_texts) - - first_processed.images = [grid] + if images.check_grid_size(res): + grid = images.image_grid(res, rows=len(ys)) + grid = images.draw_grid_annotations(grid, res[0].width, res[0].height, hor_texts, ver_texts) + first_processed.images = [grid] + else: + first_processed.images = res return first_processed @@ -94,13 +96,13 @@ class Script(scripts.Script): p.prompt_for_display = positive_prompt processed = process_images(p) - grid = images.image_grid(processed.images, p.batch_size, rows=1 << ((len(prompt_matrix_parts) - 1) // 2)) - grid = images.draw_prompt_matrix(grid, processed.images[0].width, processed.images[0].height, prompt_matrix_parts, margin_size) - processed.images.insert(0, grid) - processed.index_of_first_image = 1 - processed.infotexts.insert(0, processed.infotexts[0]) - - if opts.grid_save: - images.save_image(processed.images[0], p.outpath_grids, "prompt_matrix", extension=opts.grid_format, prompt=original_prompt, seed=processed.seed, grid=True, p=p) + if images.check_grid_size(processed.images): + grid = images.image_grid(processed.images, p.batch_size, rows=1 << ((len(prompt_matrix_parts) - 1) // 2)) + grid = images.draw_prompt_matrix(grid, processed.images[0].width, processed.images[0].height, prompt_matrix_parts, margin_size) + processed.images.insert(0, grid) + processed.index_of_first_image = 1 + processed.infotexts.insert(0, processed.infotexts[0]) + if opts.grid_save: + images.save_image(processed.images[0], p.outpath_grids, "prompt_matrix", extension=opts.grid_format, prompt=original_prompt, seed=processed.seed, grid=True, p=p) return processed diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py index 30c8d31bd..041698ee5 100644 --- a/scripts/xyz_grid.py +++ b/scripts/xyz_grid.py @@ -322,7 +322,7 @@ def draw_xyz_grid(p, xs, ys, zs, x_labels, y_labels, z_labels, cell, draw_legend for i in range(z_count): start_index = (i * len(xs) * len(ys)) + i end_index = start_index + len(xs) * len(ys) - if not no_grid: + if not no_grid and images.check_grid_size(processed_result.images[start_index:end_index]): grid = images.image_grid(processed_result.images[start_index:end_index], rows=len(ys)) if draw_legend: grid = images.draw_grid_annotations(grid, processed_result.images[start_index].size[0], processed_result.images[start_index].size[1], hor_texts, ver_texts, margin_size) @@ -331,7 +331,7 @@ def draw_xyz_grid(p, xs, ys, zs, x_labels, y_labels, z_labels, cell, draw_legend processed_result.all_seeds.insert(i, processed_result.all_seeds[start_index]) processed_result.infotexts.insert(i, processed_result.infotexts[start_index]) sub_grid_size = processed_result.images[0].size - if not no_grid: + if not no_grid and images.check_grid_size(processed_result.images[:z_count]): z_grid = images.image_grid(processed_result.images[:z_count], rows=1) if draw_legend: z_grid = images.draw_grid_annotations(z_grid, sub_grid_size[0], sub_grid_size[1], title_texts, [[images.GridAnnotation()]]) From 2ce9852cff401bd9d9569e619dbd6fa136481bef Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 20 May 2023 13:14:04 -0400 Subject: [PATCH 189/282] update --- modules/prompt_parser.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py index 2f3c8e01b..c0d4d3d91 100644 --- a/modules/prompt_parser.py +++ b/modules/prompt_parser.py @@ -1,9 +1,11 @@ # pylint: disable=anomalous-backslash-in-string +""" import os import sys from rich import print sys.path.append(os.path.join(os.path.dirname(__file__), '..')) +""" import re from collections import namedtuple @@ -367,9 +369,9 @@ def parse_prompt_attention(text): if __name__ == "__main__": input_text = '[black] [[grey]] (white) ((gray)) ((orange:1.1) yellow) ((purple) and [dark] red:1.1) [mouse:0.2] [(cat:1.1):0.5]' print(f'Prompt: {input_text}') - schedules = get_learned_conditioning_prompt_schedules([input_text], 100)[0] - print('Schedules', schedules) - for schedule in schedules: + all_schedules = get_learned_conditioning_prompt_schedules([input_text], 100)[0] + print('Schedules', all_schedules) + for schedule in all_schedules: print('Schedule', schedule[0]) opts.data['prompt_attention'] = 'Fixed attention' output_list = parse_prompt_attention(schedule[1]) From b6289d56c744ae9d0d16aaa1f503f0ea2ff76ec1 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 20 May 2023 13:36:27 -0400 Subject: [PATCH 190/282] cleanup --- launch.py | 2 +- modules/sd_models.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/launch.py b/launch.py index 404fba472..d061afdfd 100644 --- a/launch.py +++ b/launch.py @@ -147,7 +147,7 @@ if __name__ == "__main__": alive = instance.thread.is_alive() except: alive = False - if round(time.time()) % 30 == 0: + if round(time.time()) % 120 == 0: installer.log.debug(f'Server alive: {alive} Memory {get_memory_stats()}') if not alive: if instance.wants_restart: diff --git a/modules/sd_models.py b/modules/sd_models.py index ca2b43e4f..40524dd38 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -223,19 +223,19 @@ def read_state_dict(checkpoint_file, map_location=None): # pylint: disable=unuse _, extension = os.path.splitext(checkpoint_file) if shared.opts.stream_load: if extension.lower() == ".safetensors": - shared.log.debug('Model weights loading: type=safetensors mode=buffered') + # shared.log.debug('Model weights loading: type=safetensors mode=buffered') buffer = f.read() pl_sd = safetensors.torch.load(buffer) else: - shared.log.debug('Model weights loading: type=checkpoint mode=buffered') + # shared.log.debug('Model weights loading: type=checkpoint mode=buffered') buffer = io.BytesIO(f.read()) pl_sd = torch.load(buffer, map_location='cpu') else: if extension.lower() == ".safetensors": - shared.log.debug('Model weights loading: type=safetensors mode=mmap') + # shared.log.debug('Model weights loading: type=safetensors mode=mmap') pl_sd = safetensors.torch.load_file(checkpoint_file, device='cpu') else: - shared.log.debug('Model weights loading: type=checkpoint mode=direct') + # shared.log.debug('Model weights loading: type=checkpoint mode=direct') pl_sd = torch.load(f, map_location='cpu') sd = get_state_dict_from_checkpoint(pl_sd) del pl_sd From ea0780339aefb3e17ab2e985d0e3242c99b5f844 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 21 May 2023 08:17:36 -0400 Subject: [PATCH 191/282] fixes --- TODO.md | 2 +- extensions-builtin/Lora/lora.py | 3 +-- extensions-builtin/sd-webui-controlnet | 2 +- modules/devices.py | 4 ++-- modules/processing.py | 3 +-- modules/shared.py | 12 ++++++++---- modules/ui_extensions.py | 6 +++--- 7 files changed, 17 insertions(+), 15 deletions(-) diff --git a/TODO.md b/TODO.md index fa5636cf8..f3a01489a 100644 --- a/TODO.md +++ b/TODO.md @@ -31,7 +31,7 @@ Stuff to be investigated... Pick & merge PRs from main repo... -- Merge backlog: +- Compare commits: ## Models diff --git a/extensions-builtin/Lora/lora.py b/extensions-builtin/Lora/lora.py index 9d9efd73a..5a12f1836 100644 --- a/extensions-builtin/Lora/lora.py +++ b/extensions-builtin/Lora/lora.py @@ -175,7 +175,6 @@ def load_lora(name, filename): else: print(f'Lora layer {key_diffusers} matched a layer with unsupported type: {type(sd_module).__name__}') continue - assert False, f'Lora layer {key_diffusers} matched a layer with unsupported type: {type(sd_module).__name__}' with torch.no_grad(): module.weight.copy_(weight) @@ -190,7 +189,7 @@ def load_lora(name, filename): assert False, f'Bad Lora layer name: {key_diffusers} - must end in lora_up.weight, lora_down.weight or alpha' if len(keys_failed_to_match) > 0: - print(f"Failed to match keys when loading Lora {filename}: {keys_failed_to_match}") + print(f"Failed to match keys when loading Lora {filename}: {len(keys_failed_to_match)}") return lora diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index ce2278d5b..cae889476 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit ce2278d5bcf1801c6a2e6c3cb7bcb345c05275fe +Subproject commit cae889476799e92dc3c44f73f62a0207f09ad85f diff --git a/modules/devices.py b/modules/devices.py index 9c84d421b..de806dcb1 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -63,7 +63,7 @@ def get_device_for(task): def torch_gc(force=False): if shared.opts.disable_gc and not force: return - gc.collect() + collected = gc.collect() if shared.cmd_opts.use_ipex: try: with torch.xpu.device("xpu"): @@ -77,7 +77,7 @@ def torch_gc(force=False): torch.cuda.ipc_collect() except: pass - shared.log.debug(f'gc: device={torch.device(get_optimal_device_name())} {memstats.memory_stats()}') + shared.log.debug(f'gc: collected={collected} device={torch.device(get_optimal_device_name())} {memstats.memory_stats()}') def test_fp16(): diff --git a/modules/processing.py b/modules/processing.py index 8a7756d04..0df5ede29 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -632,7 +632,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: del samples_ddim if shared.cmd_opts.lowvram or shared.cmd_opts.medvram: lowvram.send_everything_to_cpu() - devices.torch_gc() + devices.torch_gc() if p.scripts is not None: p.scripts.postprocess_batch(p, x_samples_ddim, batch_number=n) for i, x_sample in enumerate(x_samples_ddim): @@ -700,7 +700,6 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: if not p.disable_extra_networks and extra_network_data: extra_networks.deactivate(p, extra_network_data) - devices.torch_gc() res = Processed( p, images_list=output_images, diff --git a/modules/shared.py b/modules/shared.py index ae2fe4e10..b8203e356 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -538,7 +538,9 @@ class Options: return data_label.default def save(self, filename): - assert not cmd_opts.freeze, "saving settings is disabled" + if cmd_opts.freeze: + log.warning(f'Settings saving is disabled: {filename}') + return with open(filename, "w", encoding="utf8") as file: json.dump(self.data, file, indent=4) @@ -550,6 +552,10 @@ class Options: return type_x == type_y def load(self, filename): + if not os.path.isfile(filename): + log.debug(f'Created default config: {filename}') + self.save(filename) + return with open(filename, "r", encoding="utf8") as file: self.data = json.load(file) if self.data.get('quicksettings') is not None and self.data.get('quicksettings_list') is None: @@ -560,7 +566,6 @@ class Options: if info is not None and not self.same_type(info.default, v): log.error(f"Warning: bad setting value: {k}: {v} ({type(v).__name__}; expected {type(info.default).__name__})") bad_settings += 1 - if bad_settings > 0: log.error(f"Error: Bad settings found in {filename}") @@ -607,8 +612,7 @@ class Options: opts = Options() config_filename = cmd_opts.config -if os.path.exists(config_filename): - opts.load(config_filename) +opts.load(config_filename) cmd_opts = cmd_args.compatibility_args(opts, cmd_opts) prompt_styles = modules.styles.StyleDatabase(opts.styles_dir) diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py index 470a3cbf1..4c566e332 100644 --- a/modules/ui_extensions.py +++ b/modules/ui_extensions.py @@ -14,7 +14,7 @@ extensions_index = "https://vladmandic.github.io/sd-data/pages/extensions.json" hide_tags = ["localization"] extensions_list = [] sort_ordering = { - "default": (True, lambda x: x.get('sort_string', '')), + "default": (True, lambda x: x.get('sort_default', '')), "user extensions": (True, lambda x: x.get('sort_user', '')), "update avilable": (True, lambda x: x.get('sort_update', '')), "updated date": (True, lambda x: x.get('updated', '2000-01-01T00:00')), @@ -261,7 +261,7 @@ def search_extensions(search_text, sort_column): def refresh_extensions_list_from_data(search_text, sort_column): - shared.log.debug(f'Extensions manager: refresh list search={search_text} sort={sort_column}') + shared.log.debug(f'Extensions manager: refresh list search="{search_text}" sort="{sort_column}"') code = """
{html.escape(ext.name)} {"system" if ext.is_builtin else 'user'} {remote}{ext.version}{version_link}
@@ -294,6 +294,7 @@ def refresh_extensions_list_from_data(search_text, sort_column): ext['enabled'] = extension[0].enabled if len(extension) > 0 else '' ext['remote'] = extension[0].remote if len(extension) > 0 else None ext['path'] = extension[0].path if len(extension) > 0 else '' + ext['sort_default'] = f"{'1' if ext['is_builtin'] else '0'}{'1' if ext['installed'] else '0'}{ext.get('updated', '2000-01-01T00:00')}" sort_reverse, sort_function = sort_ordering[sort_column] def dt(x: str): @@ -321,7 +322,6 @@ def refresh_extensions_list_from_data(search_text, sort_column): remote = ext.get("remote", None) commit_date = ext.get("commit_date", 1577836800) or 1577836800 update_available = (remote is not None) & (installed) & (datetime.utcfromtimestamp(commit_date + 60 * 60) < datetime.fromisoformat(ext.get('updated', '2000-01-01T00:00:00.000Z')[:-1])) - ext['sort_string'] = f"{'1' if ext['is_builtin'] else '0'}{'1' if ext['installed'] else '0'}{ext.get('updated', '2000-01-01T00:00')}" ext['sort_user'] = f"{'0' if ext['is_builtin'] else '1'}{'1' if ext['installed'] else '0'}{ext.get('name', '')}" ext['sort_enabled'] = f"{'0' if ext['enabled'] else '1'}{'1' if ext['is_builtin'] else '0'}{'1' if ext['installed'] else '0'}{ext.get('updated', '2000-01-01T00:00')}" ext['sort_update'] = f"{'1' if update_available else '0'}{'1' if ext['installed'] else '0'}{ext.get('updated', '2000-01-01T00:00')}" From c3643552977989be8dce1537e29fbd2f94bfd0ab Mon Sep 17 00:00:00 2001 From: SBM Date: Sun, 21 May 2023 16:37:38 +0300 Subject: [PATCH 192/282] Don't read log if load is forced. --- installer.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/installer.py b/installer.py index 316a69d9b..0ecf09308 100644 --- a/installer.py +++ b/installer.py @@ -622,12 +622,13 @@ def parse_args(): def extensions_preload(force = False): setup_time = 0 - if os.path.isfile('setup.log'): - with open('setup.log', 'r', encoding='utf8') as f: - lines = f.readlines() - for line in lines: - if 'Setup complete without errors' in line: - setup_time = int(line.split(' ')[-1]) + if not force: + if os.path.isfile('setup.log'): + with open('setup.log', 'r', encoding='utf8') as f: + lines = f.readlines() + for line in lines: + if 'Setup complete without errors' in line: + setup_time = int(line.split(' ')[-1]) if setup_time > 0 or force: log.info('Running extension preloading') if args.safe: From d9647fd53ef7e065f8ba50cd1f6b127b45d1d773 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 21 May 2023 09:44:36 -0400 Subject: [PATCH 193/282] add training options --- cli/train/train.py | 25 ++++++++++++++++--------- modules/cmd_args.py | 1 + modules/ui.py | 2 +- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/cli/train/train.py b/cli/train/train.py index 8a3fe10a9..bbb4bdd2a 100755 --- a/cli/train/train.py +++ b/cli/train/train.py @@ -82,7 +82,7 @@ def parse_args(): parser = argparse.ArgumentParser(description = 'Train') group_main = parser.add_argument_group('Main') - group_main.add_argument('--type', type=str, choices=['embedding', 'lora', 'lycoris', 'dreambooth'], default=None, required=True, help='training type') + group_main.add_argument('--type', type=str, choices=['embedding', 'ti', 'lora', 'lyco', 'dreambooth', 'hypernetwork'], default=None, required=True, help='training type') group_main.add_argument('--model', type=str, default='', required=False, help='base model to use for training, default: current loaded model') group_main.add_argument('--name', type=str, default=None, required=True, help='output filename') group_main.add_argument('--tag', type=str, default='person', required=False, help='primary tags, default: %(default)s') @@ -97,11 +97,13 @@ def parse_args(): group_train.add_argument('--steps', type=int, default=2500, required=False, help='training steps, default: %(default)s') group_train.add_argument('--batch', type=int, default=1, required=False, help='batch size, default: %(default)s') group_train.add_argument('--lr', type=float, default=1e-04, required=False, help='model learning rate, default: %(default)s') - group_train.add_argument('--dim', type=int, default=40, required=False, help='network dimension or number of vectors, default: %(default)s') + group_train.add_argument('--dim', type=int, default=32, required=False, help='network dimension or number of vectors, default: %(default)s') # lora params group_train.add_argument('--repeats', type=int, default=10, required=False, help='number of repeats per image, default: %(default)s') - group_train.add_argument('--alpha', type=float, default=0, required=False, help='alpha for weights scaling, default: dim/2') + group_train.add_argument('--alpha', type=float, default=0, required=False, help='lora/lyco alpha for weights scaling, default: dim/2') + group_train.add_argument('--algo', type=str, default=None, choices=['locon', 'loha', 'lokr', 'ia3'], required=False, help='alternative lyco algoritm, default: %(default)s') + group_train.add_argument('--args', type=str, default=None, required=False, help='lora/lyco additional network arguments, default: %(default)s') group_other = parser.add_argument_group('Other') group_other.add_argument('--overwrite', default = False, action='store_true', help = "overwrite existing training, default: %(default)s") @@ -239,13 +241,13 @@ def train_lora(): # lora imports lora_path = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'modules', 'lora')) sys.path.append(lora_path) - if args.type == 'lycoris': + if args.type == 'lyco': lycoris_path = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, 'modules', 'lycoris')) sys.path.append(lycoris_path) log.debug('importing lora lib') import train_network train_network.train(options.lora) - if args.type == 'lycoris': + if args.type == 'lyco': log.debug('importing lycoris lib') import importlib _network_module = importlib.import_module(options.lora.network_module) @@ -262,7 +264,7 @@ def prepare_options(): log.info('train using lora style training') options.lora.output_dir = args.lora_dir options.lora.in_json = os.path.join(args.process_dir, args.name + '.json') - if args.type == 'lycoris': + if args.type == 'lyco': log.info('train using lycoris network') options.lora.output_dir = args.lyco_dir options.lora.network_module = 'lycoris.kohya' @@ -273,10 +275,15 @@ def prepare_options(): options.lora.max_train_steps = args.steps options.lora.network_dim = args.dim options.lora.network_alpha = args.dim // 2 if args.alpha == 0 else args.alpha + options.lora.netwoork_args = [] + if args.algo is not None: + options.lora.netwoork_args.append(f'algo={args.algo}') + if args.args is not None: + for net_arg in args.args: + options.lora.netwoork_args.append(net_arg) options.lora.gradient_accumulation_steps = args.gradient options.lora.learning_rate = args.lr options.lora.train_batch_size = args.batch - options.lora.network_alpha = args.dim // 2 if args.alpha == 0 else args.alpha options.lora.train_data_dir = args.process_dir # embedding specific options.embedding.embedding_name = args.name @@ -322,7 +329,7 @@ def process_inputs(): concept = args.tag.split(',')[0].strip() else: concept = step - if args.type in ['lora', 'lycoris', 'dreambooth']: + if args.type in ['lora', 'lyco', 'dreambooth']: folder = os.path.join(args.process_dir, str(args.repeats) + '_' + concept) # separate concepts per folder if args.type in ['embedding']: folder = os.path.join(args.process_dir) # everything into same folder @@ -373,7 +380,7 @@ if __name__ == '__main__': try: if args.type == 'embedding': train_embedding() - if args.type == 'lora' or args.type == 'lycoris' or args.type == 'dreambooth': + if args.type == 'lora' or args.type == 'lyco' or args.type == 'dreambooth': train_lora() except KeyboardInterrupt as e: log.error('interrupt requested') diff --git a/modules/cmd_args.py b/modules/cmd_args.py index 1bcd089e4..61219a2b1 100644 --- a/modules/cmd_args.py +++ b/modules/cmd_args.py @@ -107,6 +107,7 @@ def compatibility_args(opts, args): opts.multiple_tqdm = False opts.print_hypernet_extra = False opts.dimensions_and_batch_together = True + opts.enable_pnginfo = True args = parser.parse_args() return args diff --git a/modules/ui.py b/modules/ui.py index e3e5f5525..044b3d957 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -306,7 +306,7 @@ def create_sampler_and_steps_selection(choices, tabname): chosen_sampler_name = modules.sd_samplers.samplers[0].name sampler_index = gr.Dropdown(label='Sampling method', elem_id=f"{tabname}_sampling", choices=[x.name for x in choices], value=chosen_sampler_name if tabname == 'txt2img' else "Euler a", type="index") - steps = gr.Slider(minimum=1, maximum=150, step=1, elem_id=f"{tabname}_steps", label="Sampling steps", value=20) + steps = gr.Slider(minimum=1, maximum=99, step=1, elem_id=f"{tabname}_steps", label="Sampling steps", value=20) return steps, sampler_index From e7f8b62056b83984636845e8cb762fdb465379b4 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 21 May 2023 10:05:30 -0400 Subject: [PATCH 194/282] move onnxruntime to optional --- installer.py | 3 +++ requirements.txt | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/installer.py b/installer.py index 316a69d9b..d2339c410 100644 --- a/installer.py +++ b/installer.py @@ -114,6 +114,7 @@ def install(package, friendly: str = None, ignore: bool = False): quick_allowed = False if args.use_ipex and package == "pytorch_lightning==1.9.4": package = "pytorch_lightning==1.8.6" + def pip(arg: str): arg = arg.replace('>=', '==') log.info(f'Installing package: {arg.replace("install", "").replace("--upgrade", "").replace("--no-deps", "").replace("--force", "").replace(" ", " ").strip()}') @@ -129,6 +130,7 @@ def install(package, friendly: str = None, ignore: bool = False): log.error(f'Error running pip: {arg}') log.debug(f'Pip output: {txt}') return txt + if args.reinstall or not installed(package, friendly): pip(f"install --upgrade {package}") @@ -309,6 +311,7 @@ def install_packages(): # install(openclip_package, 'open-clip-torch') clip_package = os.environ.get('CLIP_PACKAGE', "git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1") install(clip_package, 'clip') + install('onnxruntime==1.14.0', 'onnxruntime', ignore=True) # clone required repositories diff --git a/requirements.txt b/requirements.txt index 700ccc23b..b868e9e94 100644 --- a/requirements.txt +++ b/requirements.txt @@ -62,4 +62,3 @@ transformers==4.26.1 timm==0.6.13 tomesd==0.1.2 urllib3==1.26.15 -onnxruntime==1.14.0 From d647bb5c052277ec48d5c1858a52d4b6de30e8f1 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 21 May 2023 18:49:05 -0400 Subject: [PATCH 195/282] minor updates --- .../multidiffusion-upscaler-for-automatic1111 | 2 +- extensions-builtin/sd-webui-controlnet | 2 +- modules/cmd_args.py | 1 + modules/images.py | 4 ++-- modules/prompt_parser.py | 2 +- webui.py | 8 ++++---- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 index dc3f50311..0c3ae90d2 160000 --- a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 +++ b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 @@ -1 +1 @@ -Subproject commit dc3f503111024bdb6c5d64d67c487f22d9ccede5 +Subproject commit 0c3ae90d2b15ae7f12916b07f7da7c2088059b80 diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index cae889476..06515a669 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit cae889476799e92dc3c44f73f62a0207f09ad85f +Subproject commit 06515a669d4e95fd39a6fc68df1021ec50643002 diff --git a/modules/cmd_args.py b/modules/cmd_args.py index 61219a2b1..6a395dcdb 100644 --- a/modules/cmd_args.py +++ b/modules/cmd_args.py @@ -108,6 +108,7 @@ def compatibility_args(opts, args): opts.print_hypernet_extra = False opts.dimensions_and_batch_together = True opts.enable_pnginfo = True + opts.data['clip_skip'] = 1 args = parser.parse_args() return args diff --git a/modules/images.py b/modules/images.py index c817a22de..a53a7b4de 100644 --- a/modules/images.py +++ b/modules/images.py @@ -513,7 +513,6 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='jpg', i txt_fullfn (`str` or None): If a text file is saved for this image, this will be its full path. Otherwise None. """ - namegen = FilenameGenerator(p, seed, prompt, image) if image is None: shared.log.warning('Image is none') return None, None @@ -521,9 +520,10 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='jpg', i return None, None if path is None: # set default path to avoid errors when functions are triggered manually or via api and param is not set path = shared.opts.outdir_save + namegen = FilenameGenerator(p, seed, prompt, image) if save_to_dirs is None: save_to_dirs = (grid and shared.opts.grid_save_to_dirs) or (not grid and shared.opts.save_to_dirs and not no_prompt) - if save_to_dirs: + else: dirname = namegen.apply(shared.opts.directories_filename_pattern or "[prompt_words]").lstrip(' ').rstrip('\\ /') path = os.path.join(path, dirname) os.makedirs(path, exist_ok=True) diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py index c0d4d3d91..0604e2837 100644 --- a/modules/prompt_parser.py +++ b/modules/prompt_parser.py @@ -161,7 +161,7 @@ def get_learned_conditioning(model, prompts, steps): prompt_schedules = get_learned_conditioning_prompt_schedules(prompts, steps) cache = {} for prompt, prompt_schedule in zip(prompts, prompt_schedules): - log.debug(f'Prompt schedule: {prompt_schedule}') + # log.debug(f'Prompt schedule: {prompt_schedule}') cached = cache.get(prompt, None) if cached is not None: res.append(cached) diff --git a/webui.py b/webui.py index f87cf3f7c..ccbac7b6f 100644 --- a/webui.py +++ b/webui.py @@ -111,20 +111,20 @@ def initialize(): startup_timer.record("upscalers") shared.opts.onchange("sd_vae", wrap_queued_call(lambda: modules.sd_vae.reload_vae_weights()), call=False) - # shared.opts.onchange("sd_vae_as_default", wrap_queued_call(lambda: modules.sd_vae.reload_vae_weights()), call=False) shared.opts.onchange("temp_dir", ui_tempdir.on_tmpdir_changed) shared.opts.onchange("gradio_theme", shared.reload_gradio_theme) - startup_timer.record("opts onchange") + startup_timer.record("onchange") modules.textual_inversion.textual_inversion.list_textual_inversion_templates() shared.reload_hypernetworks() + ui_extra_networks.intialize() ui_extra_networks.register_page(ui_extra_networks_hypernets.ExtraNetworksPageHypernetworks()) ui_extra_networks.register_page(ui_extra_networks_checkpoints.ExtraNetworksPageCheckpoints()) ui_extra_networks.register_page(ui_extra_networks_textual_inversion.ExtraNetworksPageTextualInversion()) extra_networks.initialize() extra_networks.register_extra_network(extra_networks_hypernet.ExtraNetworkHypernet()) - startup_timer.record("extra networks") + startup_timer.record("extra-networks") if cmd_opts.tls_keyfile is not None and cmd_opts.tls_keyfile is not None: try: @@ -137,7 +137,7 @@ def initialize(): log.error("TLS setup invalid, running webui without TLS") else: log.info("Running with TLS") - startup_timer.record("TLS") + startup_timer.record("tls") # make the program just exit at ctrl+c without waiting for anything def sigint_handler(_sig, _frame): From e129e8327621f49f40e80783dc50a79507792e37 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 22 May 2023 08:42:47 -0400 Subject: [PATCH 196/282] updatr gradio --- extensions-builtin/sd-webui-controlnet | 2 +- modules/images.py | 5 ++--- modules/lora | 2 +- modules/middleware.py | 1 + requirements.txt | 2 +- webui.py | 28 +++++++++++++------------- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 06515a669..7c674f836 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 06515a669d4e95fd39a6fc68df1021ec50643002 +Subproject commit 7c674f8364227d63e1628fc29fa8619d33c56674 diff --git a/modules/images.py b/modules/images.py index a53a7b4de..a33674cbc 100644 --- a/modules/images.py +++ b/modules/images.py @@ -521,9 +521,8 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='jpg', i if path is None: # set default path to avoid errors when functions are triggered manually or via api and param is not set path = shared.opts.outdir_save namegen = FilenameGenerator(p, seed, prompt, image) - if save_to_dirs is None: - save_to_dirs = (grid and shared.opts.grid_save_to_dirs) or (not grid and shared.opts.save_to_dirs and not no_prompt) - else: + save_to_dirs = save_to_dirs or (grid and shared.opts.grid_save_to_dirs) or (not grid and shared.opts.save_to_dirs and not no_prompt) + if save_to_dirs: dirname = namegen.apply(shared.opts.directories_filename_pattern or "[prompt_words]").lstrip(' ').rstrip('\\ /') path = os.path.join(path, dirname) os.makedirs(path, exist_ok=True) diff --git a/modules/lora b/modules/lora index c924c47f3..b6ba4cac8 160000 --- a/modules/lora +++ b/modules/lora @@ -1 +1 @@ -Subproject commit c924c47f374ac1b6e33e71f82948eb1853e2243f +Subproject commit b6ba4cac83d5c01db120ce98a50f66a16b5b0cb6 diff --git a/modules/middleware.py b/modules/middleware.py index 1ea34340e..33005c12a 100644 --- a/modules/middleware.py +++ b/modules/middleware.py @@ -16,6 +16,7 @@ import modules.errors as errors errors.install() + def setup_middleware(app: FastAPI, cmd_opts): log.info('Initializing middleware') ssl._create_default_https_context = ssl._create_unverified_context # pylint: disable=protected-access diff --git a/requirements.txt b/requirements.txt index b868e9e94..6b0763cbd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -51,7 +51,7 @@ accelerate==0.18.0 opencv-python==4.7.0.72 diffusers==0.16.1 einops==0.4.1 -gradio==3.31.0 +gradio==3.32.0 numexpr==2.8.4 numpy==1.24.3 numba==0.57.0 diff --git a/webui.py b/webui.py index ccbac7b6f..afdb03a6a 100644 --- a/webui.py +++ b/webui.py @@ -180,18 +180,6 @@ def create_api(app): return api -def monkey_patch_docs(): - def setup_with_docs(self): - self.docs_url = "/docs" - self.redoc_url = "/redoc" - self.setup_original() - - setup_original = getattr(FastAPI, "setup_original", None) - if setup_original is None: - FastAPI.setup_original = FastAPI.setup - setattr(FastAPI, "setup", setup_with_docs) - - def async_policy(): _BasePolicy = asyncio.WindowsSelectorEventLoopPolicy if sys.platform == "win32" and hasattr(asyncio, "WindowsSelectorEventLoopPolicy") else asyncio.DefaultEventLoopPolicy @@ -225,7 +213,6 @@ def start_ui(): modules.script_callbacks.before_ui_callback() startup_timer.record("scripts before_ui_callback") shared.demo = modules.ui.create_ui() - monkey_patch_docs() startup_timer.record("ui") if cmd_opts.disable_queue: log.info('Server queues disabled') @@ -241,6 +228,7 @@ def start_ui(): for line in file.readlines(): gradio_auth_creds += [x.strip() for x in line.split(',') if x.strip()] + import installer app, local_url, share_url = shared.demo.launch( share=cmd_opts.share, server_name=server_name, @@ -255,6 +243,18 @@ def start_ui(): max_threads=64, show_api=True, favicon_path='html/logo.ico', + app_kwargs={ + "version": f'0.0.{installer.git_commit}', + "title": "SD.Next", + "description": "SD.Next", + "docs_url": "/docs", + "redocs_url": "/redocs", + "swagger_ui_parameters": { + "displayOperationId": True, + "showCommonExtensions": True, + "deepLinking": False, + }, + } ) shared.log.info(f'Local URL: {local_url}') shared.log.info(f'API Docs: {local_url[:-1]}/docs') # {local_url[:-1]}?view=api @@ -271,7 +271,7 @@ def start_ui(): shared.log.info('Redirector mounted: /{cmd_opts.subpath}') cmd_opts.autolaunch = False - startup_timer.record("start") + startup_timer.record("launch") modules.progress.setup_progress_api(app) create_api(app) From a64bb4375a918675b23060e9169f8e39d1feb9f3 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 22 May 2023 10:50:59 -0400 Subject: [PATCH 197/282] minor upadtes --- .../multidiffusion-upscaler-for-automatic1111 | 2 +- extensions-builtin/sd-dynamic-thresholding | 2 +- modules/prompt_parser.py | 6 +++--- modules/textual_inversion/textual_inversion.py | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 index 0c3ae90d2..ade2c4441 160000 --- a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 +++ b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 @@ -1 +1 @@ -Subproject commit 0c3ae90d2b15ae7f12916b07f7da7c2088059b80 +Subproject commit ade2c4441988c80edc5b1d4360c3e0bc28b90a37 diff --git a/extensions-builtin/sd-dynamic-thresholding b/extensions-builtin/sd-dynamic-thresholding index c9721ab01..f02cacfc9 160000 --- a/extensions-builtin/sd-dynamic-thresholding +++ b/extensions-builtin/sd-dynamic-thresholding @@ -1 +1 @@ -Subproject commit c9721ab01af368940fbdcc0c660de8f43947b198 +Subproject commit f02cacfc923e8bbf73f25327d722d50c458d66bb diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py index 0604e2837..e2647a6f0 100644 --- a/modules/prompt_parser.py +++ b/modules/prompt_parser.py @@ -299,7 +299,7 @@ def parse_prompt_attention(text): square_brackets = [] if opts.prompt_attention == 'Fixed attention': res = [[text, 1.0]] - log.debug(f'Prompt parse-attention: {opts.prompt_attention} {res}') + # log.debug(f'Prompt parse-attention: {opts.prompt_attention} {res}') return res elif opts.prompt_attention == 'Compel parser': conjunction = Compel.parse_prompt_string(text) @@ -308,7 +308,7 @@ def parse_prompt_attention(text): res = [] for frag in conjunction.prompts[0].children: res.append([frag.text, frag.weight]) - log.debug(f'Prompt parse-attention: {opts.prompt_attention} {res}') + # log.debug(f'Prompt parse-attention: {opts.prompt_attention} {res}') return res elif opts.prompt_attention == 'A1111 parser': re_attention = re_attention_v1 @@ -363,7 +363,7 @@ def parse_prompt_attention(text): res.pop(i + 1) else: i += 1 - log.debug(f'Prompt parse-attention: {opts.prompt_attention} {res}') + # log.debug(f'Prompt parse-attention: {opts.prompt_attention} {res}') return res if __name__ == "__main__": diff --git a/modules/textual_inversion/textual_inversion.py b/modules/textual_inversion/textual_inversion.py index e50eac586..7f95292c4 100644 --- a/modules/textual_inversion/textual_inversion.py +++ b/modules/textual_inversion/textual_inversion.py @@ -349,6 +349,7 @@ def validate_train_inputs(model_name, learn_rate, batch_size, gradient_step, dat def train_embedding(id_task, embedding_name, learn_rate, batch_size, gradient_step, data_root, log_directory, training_width, training_height, varsize, steps, clip_grad_mode, clip_grad_value, shuffle_tags, tag_drop_out, latent_sampling_method, use_weight, create_image_every, save_embedding_every, template_filename, save_image_with_stored_embedding, preview_from_txt2img, preview_prompt, preview_negative_prompt, preview_steps, preview_sampler_index, preview_cfg_scale, preview_seed, preview_width, preview_height): # pylint: disable=unused-argument + shared.log.debug(f'train_embedding: embedding_name={embedding_name}|learn_rate={learn_rate}|batch_size={batch_size}|gradient_step={gradient_step}|data_root={data_root}|log_directory={log_directory}|training_width={training_width}|training_height={training_height}|varsize={varsize}|steps={steps}|clip_grad_mode={clip_grad_mode}|clip_grad_value={clip_grad_value}|shuffle_tags={shuffle_tags}|tag_drop_out={tag_drop_out}|latent_sampling_method={latent_sampling_method}|use_weight={use_weight}|create_image_every={create_image_every}|save_embedding_every={save_embedding_every}|template_filename={template_filename}|save_image_with_stored_embedding={save_image_with_stored_embedding}|preview_from_txt2img={preview_from_txt2img}|preview_prompt={preview_prompt}|preview_negative_prompt={preview_negative_prompt}|preview_steps={preview_steps}|preview_sampler_index={preview_sampler_index}|preview_cfg_scale={preview_cfg_scale}|preview_seed={preview_seed}|preview_width={preview_width}|preview_height={preview_height}') save_embedding_every = save_embedding_every or 0 create_image_every = create_image_every or 0 template_file = textual_inversion_templates.get(template_filename, None) From c103e536890a5508501f8b5daa221e4fc1435f7c Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 22 May 2023 14:31:04 -0400 Subject: [PATCH 198/282] secure api access --- cli/nvidia-smi.py | 1 + installer.py | 1 - modules/api/api.py | 9 +++++++++ modules/cmd_args.py | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) mode change 100644 => 100755 cli/nvidia-smi.py diff --git a/cli/nvidia-smi.py b/cli/nvidia-smi.py old mode 100644 new mode 100755 index 349f7f50f..f7b11311a --- a/cli/nvidia-smi.py +++ b/cli/nvidia-smi.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python import os import json import shutil diff --git a/installer.py b/installer.py index c1fa1b369..92f1e7584 100644 --- a/installer.py +++ b/installer.py @@ -599,7 +599,6 @@ def add_args(): group.add_argument('--debug', default = False, action='store_true', help = "Run installer with debug logging, default: %(default)s") group.add_argument('--reset', default = False, action='store_true', help = "Reset main repository to latest version, default: %(default)s") group.add_argument('--upgrade', default = False, action='store_true', help = "Upgrade main repository to latest version, default: %(default)s") - group.add_argument('--api-only', default = False, action='store_true', help = "Run in API only mode without starting UI") group.add_argument("--use-ipex", default = False, action='store_true', help="Use Intel OneAPI XPU backend, default: %(default)s") group.add_argument('--use-directml', default = False, action='store_true', help = "Use DirectML if no compatible GPU is detected, default: %(default)s") group.add_argument("--use-cuda", default=False, action='store_true', help="Force use nVidia CUDA backend, default: %(default)s") diff --git a/modules/api/api.py b/modules/api/api.py index a9bd608c2..f6bf7f472 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -93,6 +93,15 @@ class Api: for auth in shared.cmd_opts.api_auth.split(","): user, password = auth.split(":") self.credentials[user] = password + else: + if shared.cmd_opts.auth: + user, password = [x.strip() for x in shared.cmd_opts.auth.strip('"').replace('\n', '').split(',') if x.strip()] + self.credentials[user] = password + if shared.cmd_opts.authfile: + with open(shared.cmd_opts.authfile, 'r', encoding="utf8") as file: + for line in file.readlines(): + user, password = [x.strip() for x in line.split(',') if x.strip()] + self.credentials[user] = password self.router = APIRouter() self.app = app self.queue_lock = queue_lock diff --git a/modules/cmd_args.py b/modules/cmd_args.py index 6a395dcdb..b1541f608 100644 --- a/modules/cmd_args.py +++ b/modules/cmd_args.py @@ -25,6 +25,7 @@ group.add_argument("--freeze", action='store_true', help="Disable editing settin group.add_argument("--auth", type=str, help='Set access authentication like "user:pwd,user:pwd""', default=None) group.add_argument("--authfile", type=str, help='Set access authentication using file, default: %(default)s', default=None) group.add_argument("--autolaunch", action='store_true', help="Open the UI URL in the system's default browser upon launch", default=False) +group.add_argument('--api-only', default = False, action='store_true', help = "Run in API only mode without starting UI") group.add_argument("--api-auth", type=str, help='Set API authentication, default: %(default)s', default=None) group.add_argument("--api-log", default=False, action='store_true', help="Enable logging of all API requests, default: %(default)s") group.add_argument("--device-id", type=str, help="Select the default CUDA device to use, default: %(default)s", default=None) From beff89bad3b12fb1e114b8fd20dc4d1e4f87d72b Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 22 May 2023 15:27:20 -0400 Subject: [PATCH 199/282] api auth override --- modules/api/api.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/api/api.py b/modules/api/api.py index f6bf7f472..f44a03d9b 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -95,13 +95,19 @@ class Api: self.credentials[user] = password else: if shared.cmd_opts.auth: - user, password = [x.strip() for x in shared.cmd_opts.auth.strip('"').replace('\n', '').split(',') if x.strip()] + self.credentials = dict() + for auth in shared.cmd_opts.auth.split(","): + user, password = auth.split(":") + self.credentials[user] = password + user, password = [x.strip() for x in shared.cmd_opts.auth.strip('"').replace('\n', '').split(',') if x.strip()].split(':') self.credentials[user] = password if shared.cmd_opts.authfile: + self.credentials = dict() with open(shared.cmd_opts.authfile, 'r', encoding="utf8") as file: for line in file.readlines(): - user, password = [x.strip() for x in line.split(',') if x.strip()] + user, password = line.split(":") self.credentials[user] = password + self.router = APIRouter() self.app = app self.queue_lock = queue_lock @@ -624,4 +630,6 @@ class Api: def launch(self, server_name, port): self.app.include_router(self.router) + server_name = "0.0.0.0" if cmd_opts.listen else None + uvicorn.run(self.app, host=server_name, port=port) From d36b16d03fad7153b36fd91adf3a5e56ecf33bd0 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 23 May 2023 14:31:22 -0400 Subject: [PATCH 200/282] refactor api auth --- TODO.md | 22 ++-- cli/{train => }/latents.py | 2 +- cli/{train => }/options.py | 0 cli/{train => }/process.py | 0 cli/sdapi.py | 54 +++++++-- cli/{train => }/train.py | 9 +- cli/train/sdapi.py | 109 ------------------ cli/train/util.py | 85 -------------- cli/util.py | 8 +- .../multidiffusion-upscaler-for-automatic1111 | 2 +- extensions-builtin/sd-webui-controlnet | 2 +- extensions-builtin/sd-webui-model-converter | 2 +- installer.py | 34 ++++-- launch.py | 1 + modules/api/api.py | 34 ++---- modules/cmd_args.py | 4 +- modules/codeformer_model.py | 12 +- modules/generation_parameters_copypaste.py | 2 +- modules/images.py | 2 +- modules/processing.py | 15 ++- modules/script_loading.py | 19 ++- scripts/postprocessing_codeformer.py | 2 +- scripts/postprocessing_upscale.py | 10 +- webui.py | 4 +- 24 files changed, 152 insertions(+), 282 deletions(-) rename cli/{train => }/latents.py (98%) rename cli/{train => }/options.py (100%) rename cli/{train => }/process.py (100%) rename cli/{train => }/train.py (98%) delete mode 100644 cli/train/sdapi.py delete mode 100755 cli/train/util.py diff --git a/TODO.md b/TODO.md index f3a01489a..03761fc3e 100644 --- a/TODO.md +++ b/TODO.md @@ -59,11 +59,19 @@ Tech that can be integrated as part of the core workflow... ### Pending Code Updates - tested with **torch 2.1** and **cuda 12.1** - (production remains on torch2.0.1+cuda11.8) + (production remains on torch2.0.1+cuda11.8) - fully extend support of `--data-dir` - allows multiple installations to share pretty much everything, not just models -- add dark/light theme mode toggle -- redo some `clip-skip` functionality -- better matching for vae vs model -- update to `xyz grid` to allow creation of large number of images without -- fixes...amazing how many issues were introduced by porting new a1111 code without adding almost no new functionality + allows multiple installations to share pretty much everything, not just models +- redo api authentication + now api authentication will use same user/pwd (if specified) for ui and strictly enforce it using httpbasicauth + new authentication is also fully supported in combination with ssl for both sync and async calls + if you want to use api programatically, see examples in `cli/sdapi.py` +- add dark/light theme mode toggle +- redo some `clip-skip` functionality +- better matching for vae vs model +- update to `xyz grid` to allow creation of large number of images without +- update `gradio` (again) +- more prompt parser optimizations +- better error handling when importing image settings which are not compatible with current install + for example, when upscaler or sampler originally used is not available +- fixes...amazing how many issues were introduced by porting new a1111 code without adding almost no new functionality diff --git a/cli/train/latents.py b/cli/latents.py similarity index 98% rename from cli/train/latents.py rename to cli/latents.py index b0509f2cd..53be33527 100755 --- a/cli/train/latents.py +++ b/cli/latents.py @@ -23,7 +23,7 @@ console = Console(log_time=True, log_time_format='%H:%M:%S-%f') pretty_install(console=console) traceback_install(console=console, extra_lines=1, width=console.width, word_wrap=False, indent_guides=False) -sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'modules', 'lora')) +sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'modules', 'lora')) import library.model_util as model_util import library.train_util as train_util diff --git a/cli/train/options.py b/cli/options.py similarity index 100% rename from cli/train/options.py rename to cli/options.py diff --git a/cli/train/process.py b/cli/process.py similarity index 100% rename from cli/train/process.py rename to cli/process.py diff --git a/cli/sdapi.py b/cli/sdapi.py index 2a258955e..62edb3038 100755 --- a/cli/sdapi.py +++ b/cli/sdapi.py @@ -5,19 +5,55 @@ helper methods that creates HTTP session with managed connection pool provides async HTTP get/post methods and several helper methods """ +import os import sys +import ssl import asyncio import logging import aiohttp import requests +import urllib3 from util import Map, log -sd_url = "http://127.0.0.1:7860" # automatic1111 api url root +sd_url = os.environ.get('SDAPI_URL', "http://127.0.0.1:7860") # automatic1111 api url root + use_session = True +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) +ssl.create_default_context = ssl._create_unverified_context # pylint: disable=protected-access timeout = aiohttp.ClientTimeout(total = None, sock_connect = 10, sock_read = None) # default value is 5 minutes, we need longer for training sess = None quiet = False +BaseThreadPolicy = asyncio.WindowsSelectorEventLoopPolicy if sys.platform == "win32" and hasattr(asyncio, "WindowsSelectorEventLoopPolicy") else asyncio.DefaultEventLoopPolicy + + +class AnyThreadEventLoopPolicy(BaseThreadPolicy): + def get_event_loop(self) -> asyncio.AbstractEventLoop: + try: + return super().get_event_loop() + except (RuntimeError, AssertionError): + loop = self.new_event_loop() + self.set_event_loop(loop) + return loop + +asyncio.set_event_loop_policy(AnyThreadEventLoopPolicy()) + + +def authsync(): + sd_username = os.environ.get('SDAPI_USR', None) + sd_password = os.environ.get('SDAPI_PWD', None) + if sd_username is not None and sd_password is not None: + return requests.auth.HTTPBasicAuth(sd_username, sd_password) + return None + + +def auth(): + sd_username = os.environ.get('SDAPI_USR', None) + sd_password = os.environ.get('SDAPI_PWD', None) + if sd_username is not None and sd_password is not None: + return aiohttp.BasicAuth(sd_username, sd_password) + return None + async def result(req): @@ -60,7 +96,7 @@ async def get(endpoint: str, json: dict = None): global sess # pylint: disable=global-statement sess = sess if sess is not None else await session() try: - async with sess.get(url = endpoint, json = json) as req: + async with sess.get(url=endpoint, json=json, verify_ssl=False) as req: res = await result(req) return res except Exception as err: @@ -70,7 +106,7 @@ async def get(endpoint: str, json: dict = None): def getsync(endpoint: str, json: dict = None): try: - req = requests.get(f'{sd_url}{endpoint}', json = json) # pylint: disable=missing-timeout + req = requests.get(f'{sd_url}{endpoint}', json=json, verify=False, auth=authsync()) # pylint: disable=missing-timeout res = resultsync(req) return res except Exception as err: @@ -85,7 +121,7 @@ async def post(endpoint: str, json: dict = None): await sess.close() sess = await session() try: - async with sess.post(url = endpoint, json = json) as req: + async with sess.post(url=endpoint, json=json, verify_ssl=False) as req: res = await result(req) return res except Exception as err: @@ -94,7 +130,7 @@ async def post(endpoint: str, json: dict = None): def postsync(endpoint: str, json: dict = None): - req = requests.post(f'{sd_url}{endpoint}', json = json) # pylint: disable=missing-timeout + req = requests.post(f'{sd_url}{endpoint}', json=json, verify=False, auth=authsync()) # pylint: disable=missing-timeout res = resultsync(req) return res @@ -150,7 +186,7 @@ def shutdown(): async def session(): global sess # pylint: disable=global-statement time = aiohttp.ClientTimeout(total = None, sock_connect = 10, sock_read = None) # default value is 5 minutes, we need longer for training - sess = aiohttp.ClientSession(timeout = time, base_url = sd_url) + sess = aiohttp.ClientSession(timeout = time, base_url = sd_url, auth=auth()) log.debug({ 'sdapi': 'session created', 'endpoint': sd_url }) """ sess = await aiohttp.ClientSession(timeout = timeout).__aenter__() @@ -170,6 +206,7 @@ async def session(): async def close(): if sess is not None: await asyncio.sleep(0) + await sess.close() await sess.__aexit__(None, None, None) log.debug({ 'sdapi': 'session closed', 'endpoint': sd_url }) @@ -180,6 +217,8 @@ if __name__ == "__main__": asyncio.run(interrupt()) if 'progress' in sys.argv: asyncio.run(progress()) + if 'progresssync' in sys.argv: + progresssync() if 'options' in sys.argv: opt = options() log.debug({ 'options' }) @@ -189,4 +228,5 @@ if __name__ == "__main__": print(json.dumps(opt['flags'], indent = 2)) if 'shutdown' in sys.argv: shutdown() - asyncio.run(close()) + asyncio.run(close(), debug=True) + asyncio.run(asyncio.sleep(0.5)) diff --git a/cli/train/train.py b/cli/train.py similarity index 98% rename from cli/train/train.py rename to cli/train.py index bbb4bdd2a..a2507660b 100755 --- a/cli/train/train.py +++ b/cli/train.py @@ -17,7 +17,6 @@ import warnings warnings.filterwarnings(action="ignore", category=DeprecationWarning) warnings.filterwarnings(action="ignore", category=UserWarning) warnings.filterwarnings(action="ignore", category=FutureWarning) -sys.path.append('.') # 3rd party imports import filetype @@ -27,9 +26,9 @@ from tqdm.rich import tqdm # local imports import util import sdapi +import options import process import latents -import options # globals @@ -79,7 +78,7 @@ def mem_stats(): def parse_args(): global args # pylint: disable=global-statement - parser = argparse.ArgumentParser(description = 'Train') + parser = argparse.ArgumentParser(description = 'SD.Next Train') group_main = parser.add_argument_group('Main') group_main.add_argument('--type', type=str, choices=['embedding', 'ti', 'lora', 'lyco', 'dreambooth', 'hypernetwork'], default=None, required=True, help='training type') @@ -240,9 +239,9 @@ def train_lora(): log.info(f'{args.type} options: {options.lora}') # lora imports lora_path = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'modules', 'lora')) + lycoris_path = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'modules', 'lycoris')) sys.path.append(lora_path) if args.type == 'lyco': - lycoris_path = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, 'modules', 'lycoris')) sys.path.append(lycoris_path) log.debug('importing lora lib') import train_network @@ -368,7 +367,7 @@ def process_inputs(): if __name__ == '__main__': - log.info('train script for stable diffusion') + log.info('SD.Next train script') parse_args() setup_logging() prepare_server() diff --git a/cli/train/sdapi.py b/cli/train/sdapi.py deleted file mode 100644 index f642e1bad..000000000 --- a/cli/train/sdapi.py +++ /dev/null @@ -1,109 +0,0 @@ -import asyncio -import aiohttp -import requests -from util import Map - - -sd_url = "http://127.0.0.1:7860" # automatic1111 api url root -use_session = True -timeout = aiohttp.ClientTimeout(total = None, sock_connect = 10, sock_read = None) # default value is 5 minutes, we need longer for training -sess = None -quiet = False - - -async def result(req): - if req.status != 200: - if not use_session and sess is not None: - await sess.close() - return Map({ 'error': req.status, 'reason': req.reason, 'url': req.url }) - else: - json = await req.json() - if type(json) == list: - res = json - elif json is None: - res = {} - else: - res = Map(json) - return res - - -def resultsync(req: requests.Response): - if req.status_code != 200: - return Map({ 'error': req.status_code, 'reason': req.reason, 'url': req.url }) - else: - json = req.json() - if type(json) == list: - res = json - elif json is None: - res = {} - else: - res = Map(json) - return res - - -async def get(endpoint: str, json: dict = None): - global sess # pylint: disable=global-statement - sess = sess if sess is not None else await session() - async with sess.get(url = endpoint, json = json) as req: - res = await result(req) - return res - - -def getsync(endpoint: str, json: dict = None): - req = requests.get(f'{sd_url}{endpoint}', json = json) # pylint: disable=missing-timeout - res = resultsync(req) - return res - - -async def post(endpoint: str, json: dict = None): - global sess # pylint: disable=global-statement - # sess = sess if sess is not None else await session() - if sess and not sess.closed: - await sess.close() - sess = await session() - async with sess.post(url = endpoint, json = json) as req: - res = await result(req) - return res - - -def postsync(endpoint: str, json: dict = None): - req = requests.post(f'{sd_url}{endpoint}', json = json) # pylint: disable=missing-timeout - res = resultsync(req) - return res - - -def interrupt(): - res = getsync('/sdapi/v1/progress?skip_current_image=true') - if 'state' in res and res.state.job_count > 0: - res = postsync('/sdapi/v1/interrupt') - return res - else: - return { 'interrupt': 'idle' } - - -def progress(): - res = getsync('/sdapi/v1/progress?skip_current_image=true') - return res - - -def options(): - opt = getsync('/sdapi/v1/options') - flags = getsync('/sdapi/v1/cmd-flags') - return { 'options': opt, 'flags': flags } - - -def shutdown(): - postsync('/sdapi/v1/shutdown') - - -async def session(): - global sess # pylint: disable=global-statement - time = aiohttp.ClientTimeout(total = None, sock_connect = 10, sock_read = None) # default value is 5 minutes, we need longer for training - sess = aiohttp.ClientSession(timeout = time, base_url = sd_url) - return sess - - -async def close(): - if sess is not None: - await asyncio.sleep(0) - await sess.__aexit__(None, None, None) diff --git a/cli/train/util.py b/cli/train/util.py deleted file mode 100755 index e67b4f403..000000000 --- a/cli/train/util.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python -import os - -import transformers -transformers.logging.set_verbosity_error() - - -def get_memory(): - def gb(val: float): - return round(val / 1024 / 1024 / 1024, 2) - mem = {} - try: - import psutil - process = psutil.Process(os.getpid()) - res = process.memory_info() - ram_total = 100 * res.rss / process.memory_percent() - ram = { 'free': gb(ram_total - res.rss), 'used': gb(res.rss), 'total': gb(ram_total) } - mem.update({ 'ram': ram }) - except Exception as e: - mem.update({ 'ram': e }) - try: - import torch - if torch.cuda.is_available(): - s = torch.cuda.mem_get_info() - gpu = { 'free': gb(s[0]), 'used': gb(s[1] - s[0]), 'total': gb(s[1]) } - s = dict(torch.cuda.memory_stats('cuda')) - allocated = { 'current': gb(s['allocated_bytes.all.current']), 'peak': gb(s['allocated_bytes.all.peak']) } - reserved = { 'current': gb(s['reserved_bytes.all.current']), 'peak': gb(s['reserved_bytes.all.peak']) } - active = { 'current': gb(s['active_bytes.all.current']), 'peak': gb(s['active_bytes.all.peak']) } - inactive = { 'current': gb(s['inactive_split_bytes.all.current']), 'peak': gb(s['inactive_split_bytes.all.peak']) } - warnings = { 'retries': s['num_alloc_retries'], 'oom': s['num_ooms'] } - mem.update({ - 'gpu': gpu, - 'gpu-active': active, - 'gpu-allocated': allocated, - 'gpu-reserved': reserved, - 'gpu-inactive': inactive, - 'events': warnings, - }) - except: - pass - return Map(mem) - - -class Map(dict): # pylint: disable=C0205 - __slots__ = ('__dict__') # pylint: disable=C0325 - def __init__(self, *args, **kwargs): - super(Map, self).__init__(*args, **kwargs) - for arg in args: - if isinstance(arg, dict): - for k, v in arg.items(): - if isinstance(v, dict): - v = Map(v) - if isinstance(v, list): - self.__convert(v) - self[k] = v - if kwargs: - for k, v in kwargs.items(): - if isinstance(v, dict): - v = Map(v) - elif isinstance(v, list): - self.__convert(v) - self[k] = v - def __convert(self, v): - for elem in range(0, len(v)): # pylint: disable=consider-using-enumerate - if isinstance(v[elem], dict): - v[elem] = Map(v[elem]) - elif isinstance(v[elem], list): - self.__convert(v[elem]) - def __getattr__(self, attr): - return self.get(attr) - def __setattr__(self, key, value): - self.__setitem__(key, value) - def __setitem__(self, key, value): - super(Map, self).__setitem__(key, value) - self.__dict__.update({key: value}) - def __delattr__(self, item): - self.__delitem__(item) - def __delitem__(self, key): - super(Map, self).__delitem__(key) - del self.__dict__[key] - - -if __name__ == "__main__": - pass diff --git a/cli/util.py b/cli/util.py index c1ca29c94..0fafe664c 100755 --- a/cli/util.py +++ b/cli/util.py @@ -6,9 +6,13 @@ generic helper methods import os import string import logging +import warnings log_format = '%(asctime)s %(levelname)s: %(message)s' logging.basicConfig(level = logging.INFO, format = log_format) +warnings.filterwarnings(action="ignore", category=DeprecationWarning) +warnings.filterwarnings(action="ignore", category=FutureWarning) +warnings.filterwarnings(action="ignore", category=UserWarning) log = logging.getLogger("sd") @@ -52,14 +56,14 @@ def get_memory(): reserved = { 'current': gb(s['reserved_bytes.all.current']), 'peak': gb(s['reserved_bytes.all.peak']) } active = { 'current': gb(s['active_bytes.all.current']), 'peak': gb(s['active_bytes.all.peak']) } inactive = { 'current': gb(s['inactive_split_bytes.all.current']), 'peak': gb(s['inactive_split_bytes.all.peak']) } - warnings = { 'retries': s['num_alloc_retries'], 'oom': s['num_ooms'] } + events = { 'retries': s['num_alloc_retries'], 'oom': s['num_ooms'] } mem.update({ 'gpu': gpu, 'gpu-active': active, 'gpu-allocated': allocated, 'gpu-reserved': reserved, 'gpu-inactive': inactive, - 'events': warnings, + 'events': events, }) except: pass diff --git a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 index ade2c4441..50f5f8894 160000 --- a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 +++ b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 @@ -1 +1 @@ -Subproject commit ade2c4441988c80edc5b1d4360c3e0bc28b90a37 +Subproject commit 50f5f88944427a1f7e1321917790dbd9a5ddbed8 diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 7c674f836..2514a460a 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 7c674f8364227d63e1628fc29fa8619d33c56674 +Subproject commit 2514a460ab9e0c6db38033aed29b12c94d5f1964 diff --git a/extensions-builtin/sd-webui-model-converter b/extensions-builtin/sd-webui-model-converter index d19e28168..f6e0fa538 160000 --- a/extensions-builtin/sd-webui-model-converter +++ b/extensions-builtin/sd-webui-model-converter @@ -1 +1 @@ -Subproject commit d19e28168268b0f2f50c8a5b7a4fa0a0d9b42b8c +Subproject commit f6e0fa5386fb82ef44feac74d66958af951fcc48 diff --git a/installer.py b/installer.py index 92f1e7584..b701803c9 100644 --- a/installer.py +++ b/installer.py @@ -68,6 +68,8 @@ def setup_logging(clean=False): traceback_install(console=console, extra_lines=1, width=console.width, word_wrap=False, indent_guides=False, suppress=[]) rh = RichHandler(show_time=True, omit_repeated_times=False, show_level=True, show_path=False, markup=False, rich_tracebacks=True, log_time_format='%H:%M:%S-%f', level=logging.DEBUG if args.debug else logging.INFO, console=console) rh.set_name(logging.DEBUG if args.debug else logging.INFO) + while log.hasHandlers() and len(log.handlers) > 0: + log.removeHandler(log.handlers[0]) log.addHandler(rh) @@ -186,6 +188,7 @@ def clone(url, folder, commithash=None): git(f'checkout {commithash}', folder) return else: + log.info(f'Cloning repository: {url}') git(f'clone "{url}" "{folder}"') if commithash is not None: git(f'-C "{folder}" checkout {commithash}') @@ -309,7 +312,7 @@ def install_packages(): # openclip_package = os.environ.get('OPENCLIP_PACKAGE', "git+https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b") # install(gfpgan_package, 'gfpgan') # install(openclip_package, 'open-clip-torch') - clip_package = os.environ.get('CLIP_PACKAGE', "git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1") + clip_package = os.environ.get('CLIP_PACKAGE', "git+https://github.com/openai/CLIP.git") install(clip_package, 'clip') install('onnxruntime==1.14.0', 'onnxruntime', ignore=True) @@ -321,19 +324,24 @@ def install_repositories(): log.info('Installing repositories') os.makedirs(os.path.join(os.path.dirname(__file__), 'repositories'), exist_ok=True) stable_diffusion_repo = os.environ.get('STABLE_DIFFUSION_REPO', "https://github.com/Stability-AI/stablediffusion.git") - stable_diffusion_commit = os.environ.get('STABLE_DIFFUSION_COMMIT_HASH', "cf1d67a6fd5ea1aa600c4df58e5b47da45f6bdbf") + # stable_diffusion_commit = os.environ.get('STABLE_DIFFUSION_COMMIT_HASH', "cf1d67a6fd5ea1aa600c4df58e5b47da45f6bdbf") + stable_diffusion_commit = os.environ.get('STABLE_DIFFUSION_COMMIT_HASH', None) clone(stable_diffusion_repo, d('stable-diffusion-stability-ai'), stable_diffusion_commit) taming_transformers_repo = os.environ.get('TAMING_TRANSFORMERS_REPO', "https://github.com/CompVis/taming-transformers.git") - taming_transformers_commit = os.environ.get('TAMING_TRANSFORMERS_COMMIT_HASH', "3ba01b241669f5ade541ce990f7650a3b8f65318") + # taming_transformers_commit = os.environ.get('TAMING_TRANSFORMERS_COMMIT_HASH', "3ba01b241669f5ade541ce990f7650a3b8f65318") + taming_transformers_commit = os.environ.get('TAMING_TRANSFORMERS_COMMIT_HASH', None) clone(taming_transformers_repo, d('taming-transformers'), taming_transformers_commit) k_diffusion_repo = os.environ.get('K_DIFFUSION_REPO', 'https://github.com/crowsonkb/k-diffusion.git') - k_diffusion_commit = os.environ.get('K_DIFFUSION_COMMIT_HASH', "b43db16749d51055f813255eea2fdf1def801919") + # k_diffusion_commit = os.environ.get('K_DIFFUSION_COMMIT_HASH', "b43db16749d51055f813255eea2fdf1def801919") + k_diffusion_commit = os.environ.get('K_DIFFUSION_COMMIT_HASH', None) clone(k_diffusion_repo, d('k-diffusion'), k_diffusion_commit) codeformer_repo = os.environ.get('CODEFORMER_REPO', 'https://github.com/sczhou/CodeFormer.git') - codeformer_commit = os.environ.get('CODEFORMER_COMMIT_HASH', "c5b4593074ba6214284d6acd5f1719b6c5d739af") + # codeformer_commit = os.environ.get('CODEFORMER_COMMIT_HASH', "c5b4593074ba6214284d6acd5f1719b6c5d739af") + codeformer_commit = os.environ.get('CODEFORMER_COMMIT_HASH', "7a584fd") clone(codeformer_repo, d('CodeFormer'), codeformer_commit) blip_repo = os.environ.get('BLIP_REPO', 'https://github.com/salesforce/BLIP.git') - blip_commit = os.environ.get('BLIP_COMMIT_HASH', "48211a1594f1321b00f14c9f7a5b4813144b2fb9") + # blip_commit = os.environ.get('BLIP_COMMIT_HASH', "48211a1594f1321b00f14c9f7a5b4813144b2fb9") + blip_commit = os.environ.get('BLIP_COMMIT_HASH', None) clone(blip_repo, d('BLIP'), blip_commit) @@ -635,12 +643,14 @@ def extensions_preload(force = False): log.info('Running extension preloading') if args.safe: log.info('Running in safe mode without user extensions') - from modules.script_loading import preload_extensions - from modules.paths_internal import extensions_builtin_dir, extensions_dir - extension_folders = [extensions_builtin_dir] if args.safe else [extensions_builtin_dir, extensions_dir] - for ext_dir in extension_folders: - preload_extensions(ext_dir, parser) - + try: + from modules.script_loading import preload_extensions + from modules.paths_internal import extensions_builtin_dir, extensions_dir + extension_folders = [extensions_builtin_dir] if args.safe else [extensions_builtin_dir, extensions_dir] + for ext_dir in extension_folders: + preload_extensions(ext_dir, parser, args.debug) + except: + log.error('Error running extension preloading') def git_reset(): log.warning('Running GIT reset') diff --git a/launch.py b/launch.py index d061afdfd..2b58226a1 100644 --- a/launch.py +++ b/launch.py @@ -9,6 +9,7 @@ commandline_args = os.environ.get('COMMANDLINE_ARGS', "") sys.argv += shlex.split(commandline_args) import installer +installer.setup_logging(False) installer.add_args() installer.ensure_base_requirements() installer.parse_args() diff --git a/modules/api/api.py b/modules/api/api.py index f44a03d9b..71230abc1 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -88,25 +88,16 @@ def encode_pil_to_base64(image): class Api: def __init__(self, app: FastAPI, queue_lock: Lock): - if shared.cmd_opts.api_auth: - self.credentials = dict() - for auth in shared.cmd_opts.api_auth.split(","): + self.credentials = dict() + if shared.cmd_opts.auth: + for auth in shared.cmd_opts.auth.split(","): user, password = auth.split(":") - self.credentials[user] = password - else: - if shared.cmd_opts.auth: - self.credentials = dict() - for auth in shared.cmd_opts.auth.split(","): - user, password = auth.split(":") - self.credentials[user] = password - user, password = [x.strip() for x in shared.cmd_opts.auth.strip('"').replace('\n', '').split(',') if x.strip()].split(':') - self.credentials[user] = password - if shared.cmd_opts.authfile: - self.credentials = dict() - with open(shared.cmd_opts.authfile, 'r', encoding="utf8") as file: - for line in file.readlines(): - user, password = line.split(":") - self.credentials[user] = password + self.credentials[user.replace('"', '').strip()] = password.replace('"', '').strip() + if shared.cmd_opts.auth_file: + with open(shared.cmd_opts.auth_file, 'r', encoding="utf8") as file: + for line in file.readlines(): + user, password = line.split(":") + self.credentials[user.replace('"', '').strip()] = password.replace('"', '').strip() self.router = APIRouter() self.app = app @@ -146,7 +137,7 @@ class Api: self.default_script_arg_img2img = [] def add_api_route(self, path: str, endpoint, **kwargs): - if shared.cmd_opts.api_auth: + if shared.cmd_opts.auth or shared.cmd_opts.auth_file: return self.app.add_api_route(path, endpoint, dependencies=[Depends(self.auth)], **kwargs) return self.app.add_api_route(path, endpoint, **kwargs) @@ -154,7 +145,7 @@ class Api: if credentials.username in self.credentials: if compare_digest(credentials.password, self.credentials[credentials.username]): return True - raise HTTPException(status_code=401, detail="Incorrect username or password", headers={"WWW-Authenticate": "Basic"}) + raise HTTPException(status_code=401, detail="Unauthorized", headers={"WWW-Authenticate": "Basic"}) def get_selectable_script(self, script_name, script_runner): if script_name is None or script_name == "": @@ -630,6 +621,5 @@ class Api: def launch(self, server_name, port): self.app.include_router(self.router) - server_name = "0.0.0.0" if cmd_opts.listen else None - + server_name = "0.0.0.0" if shared.cmd_opts.listen else None uvicorn.run(self.app, host=server_name, port=port) diff --git a/modules/cmd_args.py b/modules/cmd_args.py index b1541f608..2c62342bf 100644 --- a/modules/cmd_args.py +++ b/modules/cmd_args.py @@ -23,10 +23,9 @@ group.add_argument("--listen", action='store_true', help="Launch web server usin group.add_argument("--port", type=int, default=7860, help="Launch web server with given server port, default: %(default)s") group.add_argument("--freeze", action='store_true', help="Disable editing settings", default=False) group.add_argument("--auth", type=str, help='Set access authentication like "user:pwd,user:pwd""', default=None) -group.add_argument("--authfile", type=str, help='Set access authentication using file, default: %(default)s', default=None) +group.add_argument("--auth-file", type=str, help='Set access authentication using file, default: %(default)s', default=None) group.add_argument("--autolaunch", action='store_true', help="Open the UI URL in the system's default browser upon launch", default=False) group.add_argument('--api-only', default = False, action='store_true', help = "Run in API only mode without starting UI") -group.add_argument("--api-auth", type=str, help='Set API authentication, default: %(default)s', default=None) group.add_argument("--api-log", default=False, action='store_true', help="Enable logging of all API requests, default: %(default)s") group.add_argument("--device-id", type=str, help="Select the default CUDA device to use, default: %(default)s", default=None) group.add_argument("--cors-origins", type=str, help="Allowed CORS origins as comma-separated list, default: %(default)s", default=None) @@ -57,6 +56,7 @@ group.add_argument("--disable-safe-unpickle", action='store_true', help=argparse group.add_argument("--lowram", action='store_true', help=argparse.SUPPRESS) group.add_argument("--disable-extension-access", default = False, action='store_true', help=argparse.SUPPRESS) group.add_argument("--api", help=argparse.SUPPRESS, default=True) +group.add_argument("--api-auth", type=str, help=argparse.SUPPRESS, default=None) def compatibility_args(opts, args): diff --git a/modules/codeformer_model.py b/modules/codeformer_model.py index c2b0689ba..944dedfcd 100644 --- a/modules/codeformer_model.py +++ b/modules/codeformer_model.py @@ -20,10 +20,8 @@ codeformer = None def setup_model(dirname): - global model_path if not os.path.exists(model_path): os.makedirs(model_path) - path = modules.paths.paths.get("CodeFormer", None) if path is None: return @@ -31,7 +29,7 @@ def setup_model(dirname): try: from torchvision.transforms.functional import normalize from modules.codeformer.codeformer_arch import CodeFormer - from basicsr.utils import imwrite, img2tensor, tensor2img + from basicsr.utils import img2tensor, tensor2img from facelib.utils.face_restoration_helper import FaceRestoreHelper from facelib.detection.retinaface import retinaface from modules.shared import cmd_opts @@ -74,7 +72,7 @@ def setup_model(dirname): def send_model_to(self, device): self.net.to(device) - self.face_helper.face_det.to(device) + self.face_helper.face_det.to(device) # pylint: disable=no-member self.face_helper.face_parse.to(device) def restore(self, np_image, w=None): @@ -93,7 +91,7 @@ def setup_model(dirname): self.face_helper.get_face_landmarks_5(only_center_face=False, resize=640, eye_dist_threshold=5) self.face_helper.align_warp_face() - for idx, cropped_face in enumerate(self.face_helper.cropped_faces): + for _idx, cropped_face in enumerate(self.face_helper.cropped_faces): cropped_face_t = img2tensor(cropped_face / 255., bgr2rgb=True, float32=True) normalize(cropped_face_t, (0.5, 0.5, 0.5), (0.5, 0.5, 0.5), inplace=True) cropped_face_t = cropped_face_t.unsqueeze(0).to(devices.device_codeformer) @@ -129,10 +127,10 @@ def setup_model(dirname): return restored_img - global have_codeformer + global have_codeformer # pylint: disable=global-statement have_codeformer = True - global codeformer + global codeformer # pylint: disable=global-statement codeformer = FaceRestorerCodeFormer(dirname) shared.face_restorers.append(codeformer) diff --git a/modules/generation_parameters_copypaste.py b/modules/generation_parameters_copypaste.py index 6b0d4c00b..1fb8d159a 100644 --- a/modules/generation_parameters_copypaste.py +++ b/modules/generation_parameters_copypaste.py @@ -257,7 +257,7 @@ Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 965400086, Size: 512x512, Model res["Prompt"] = prompt res["Negative prompt"] = negative_prompt for k, v in re_param.findall(lastline): - v = v[1:-1] if v[0] == '"' and v[-1] == '"' else v + v = v[1:-1] if len(v) > 0 and v[0] == '"' and v[-1] == '"' else v m = re_imagesize.match(v) if m is not None: res[f"{k}-1"] = m.group(1) diff --git a/modules/images.py b/modules/images.py index a33674cbc..7c615dd13 100644 --- a/modules/images.py +++ b/modules/images.py @@ -236,7 +236,7 @@ def resize_image(resize_mode, im, width, height, upscaler_name=None): upscalers = [x for x in shared.sd_upscalers if x.name == upscaler_name] if len(upscalers) == 0: upscaler = shared.sd_upscalers[0] - shared.log.warning(f"could not find upscaler named {upscaler_name or ''}, using {upscaler.name} as a fallback") + shared.log.warning(f"Could not find upscaler named {upscaler_name or ''}, using {upscaler.name} as a fallback") else: upscaler = upscalers[0] im = upscaler.scaler.upscale(im, scale, upscaler.data_path) diff --git a/modules/processing.py b/modules/processing.py index 0df5ede29..ad80a6dca 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -3,7 +3,6 @@ import math import os import hashlib import random -import logging from typing import Any, Dict, List import torch import numpy as np @@ -33,13 +32,13 @@ opt_f = 8 def setup_color_correction(image): - logging.info("Calibrating color correction.") + log.debug("Calibrating color correction.") correction_target = cv2.cvtColor(np.asarray(image.copy()), cv2.COLOR_RGB2LAB) return correction_target def apply_color_correction(correction, original_image): - logging.info("Applying color correction.") + log.debug("Applying color correction.") image = Image.fromarray(cv2.cvtColor(exposure.match_histograms( cv2.cvtColor(np.asarray(original_image), cv2.COLOR_RGB2LAB), correction, @@ -575,7 +574,9 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: for n in range(p.n_iter): p.iteration = n if state.skipped: + shared.log.debug(f'Process skipped: {n}/{p.n_iter}') state.skipped = False + continue if state.interrupted: shared.log.debug(f'Process interrupted: {n}/{p.n_iter}') break @@ -710,7 +711,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: index_of_first_image=index_of_first_image, infotexts=infotexts, ) - if p.scripts is not None: + if p.scripts is not None and not state.interrupted: p.scripts.postprocess(p, res) return res @@ -803,10 +804,12 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): self.sampler = sd_samplers.create_sampler(self.sampler_name, self.sd_model) latent_scale_mode = shared.latent_upscale_modes.get(self.hr_upscaler, None) if self.hr_upscaler is not None else shared.latent_upscale_modes.get(shared.latent_upscale_default_mode, "nearest") if self.enable_hr and latent_scale_mode is None: - assert len([x for x in shared.sd_upscalers if x.name == self.hr_upscaler]) > 0, f"could not find upscaler named {self.hr_upscaler}" + if len([x for x in shared.sd_upscalers if x.name == self.hr_upscaler]) == 0: + log.warning("Could not find upscaler to use with hrfix") + self.enable_hr = False x = create_random_tensors([opt_C, self.height // opt_f, self.width // opt_f], seeds=seeds, subseeds=subseeds, subseed_strength=self.subseed_strength, seed_resize_from_h=self.seed_resize_from_h, seed_resize_from_w=self.seed_resize_from_w, p=self) samples = self.sampler.sample(self, x, conditioning, unconditional_conditioning, image_conditioning=self.txt2img_image_conditioning(x)) - if not self.enable_hr: + if not self.enable_hr or state.interrupted or state.skipped: return samples self.is_hr_pass = True target_width = self.hr_upscale_to_x diff --git a/modules/script_loading.py b/modules/script_loading.py index d93fd898f..2bc9b6fda 100644 --- a/modules/script_loading.py +++ b/modules/script_loading.py @@ -3,18 +3,24 @@ import importlib.util import modules.errors as errors -def load_module(path): +preloaded = [] + + +def load_module(path, detailed=False): module_spec = importlib.util.spec_from_file_location(os.path.basename(path), path) module = importlib.util.module_from_spec(module_spec) try: module_spec.loader.exec_module(module) except Exception as e: - errors.display(e, f'Module load: {path}') + if detailed: + errors.display(e, f'Module load: {path}') + else: + errors.log.error(f'Module load: {path}') return module -preloaded = [] -def preload_extensions(extensions_dir, parser): + +def preload_extensions(extensions_dir, parser, detailed=False): if not os.path.isdir(extensions_dir): return for dirname in sorted(os.listdir(extensions_dir)): @@ -29,4 +35,7 @@ def preload_extensions(extensions_dir, parser): if hasattr(module, 'preload'): module.preload(parser) except Exception as e: - errors.display(e, f'Extension preload: {preload_script}') + if detailed: + errors.display(e, f'Extension preload: {preload_script}') + else: + errors.log.error(f'Extension preload: {preload_script}') diff --git a/scripts/postprocessing_codeformer.py b/scripts/postprocessing_codeformer.py index 251443642..822d06cfa 100644 --- a/scripts/postprocessing_codeformer.py +++ b/scripts/postprocessing_codeformer.py @@ -11,7 +11,7 @@ class ScriptPostprocessingCodeFormer(scripts_postprocessing.ScriptPostprocessing def ui(self): with FormRow(): - codeformer_visibility = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label="CodeFormer visibility", value=1.0, elem_id="extras_codeformer_visibility") + codeformer_visibility = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label="CodeFormer visibility", value=0.0, elem_id="extras_codeformer_visibility") codeformer_weight = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label="CodeFormer weight (0 = max), 1 = min)", value=0.2, elem_id="extras_codeformer_weight") return { diff --git a/scripts/postprocessing_upscale.py b/scripts/postprocessing_upscale.py index 0879e4005..e1faddeaf 100644 --- a/scripts/postprocessing_upscale.py +++ b/scripts/postprocessing_upscale.py @@ -83,16 +83,17 @@ class ScriptPostprocessingUpscale(scripts_postprocessing.ScriptPostprocessing): upscaler_1_name = None upscaler1 = next(iter([x for x in shared.sd_upscalers if x.name == upscaler_1_name]), None) - assert upscaler1 or (upscaler_1_name is None), f'could not find upscaler named {upscaler_1_name}' - if not upscaler1: + shared.log.warning(f"Could not find upscaler named {upscaler_1_name or ''}") return if upscaler_2_name == "None": upscaler_2_name = None upscaler2 = next(iter([x for x in shared.sd_upscalers if x.name == upscaler_2_name and x.name != "None"]), None) - assert upscaler2 or (upscaler_2_name is None), f'could not find upscaler named {upscaler_2_name}' + if not upscaler2 and (upscaler_2_name is not None): + shared.log.warning(f"Could not find upscaler named {upscaler_1_name or ''}") + return upscaled_image = self.upscale(pp.image, pp.info, upscaler1, upscale_mode, upscale_by, upscale_to_width, upscale_to_height, upscale_crop) pp.info["Postprocess upscaler"] = upscaler1.name @@ -128,7 +129,8 @@ class ScriptPostprocessingUpscaleSimple(ScriptPostprocessingUpscale): return upscaler1 = next(iter([x for x in shared.sd_upscalers if x.name == upscaler_name]), None) - assert upscaler1, f'could not find upscaler named {upscaler_name}' + if upscaler1 is None: + shared.log.warning(f"Could not find upscaler named {upscaler_name or ''}") pp.image = self.upscale(pp.image, pp.info, upscaler1, 0, upscale_by, 0, 0, False) pp.info["Postprocess upscaler"] = upscaler1.name diff --git a/webui.py b/webui.py index afdb03a6a..3f74568d1 100644 --- a/webui.py +++ b/webui.py @@ -223,8 +223,8 @@ def start_ui(): gradio_auth_creds = [] if cmd_opts.auth: gradio_auth_creds += [x.strip() for x in cmd_opts.auth.strip('"').replace('\n', '').split(',') if x.strip()] - if cmd_opts.authfile: - with open(cmd_opts.authfile, 'r', encoding="utf8") as file: + if cmd_opts.auth_file: + with open(cmd_opts.auth_file, 'r', encoding="utf8") as file: for line in file.readlines(): gradio_auth_creds += [x.strip() for x in line.split(',') if x.strip()] From 5c516332d79f6a9a8f20ed3bad48539acfcf8688 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 23 May 2023 18:48:37 -0400 Subject: [PATCH 201/282] bug fixes --- TODO.md | 20 -------------------- launch.py | 2 +- modules/hashes.py | 7 +++++-- modules/images.py | 5 +++-- modules/shared.py | 4 +++- scripts/postprocessing_upscale.py | 6 +++--- 6 files changed, 15 insertions(+), 29 deletions(-) diff --git a/TODO.md b/TODO.md index 03761fc3e..c9bbf8646 100644 --- a/TODO.md +++ b/TODO.md @@ -17,7 +17,6 @@ Stuff to be added... - Reload browser on server restart - Remove origin wiki - Import core repos -- Import rembg - Improve core `Stability-AI` code: - Improve core `k-Diffusion` code @@ -25,8 +24,6 @@ Stuff to be added... Stuff to be investigated... -- Gradio `app_kwargs`: - ## Merge PRs Pick & merge PRs from main repo... @@ -58,20 +55,3 @@ Tech that can be integrated as part of the core workflow... ### Pending Code Updates -- tested with **torch 2.1** and **cuda 12.1** - (production remains on torch2.0.1+cuda11.8) -- fully extend support of `--data-dir` - allows multiple installations to share pretty much everything, not just models -- redo api authentication - now api authentication will use same user/pwd (if specified) for ui and strictly enforce it using httpbasicauth - new authentication is also fully supported in combination with ssl for both sync and async calls - if you want to use api programatically, see examples in `cli/sdapi.py` -- add dark/light theme mode toggle -- redo some `clip-skip` functionality -- better matching for vae vs model -- update to `xyz grid` to allow creation of large number of images without -- update `gradio` (again) -- more prompt parser optimizations -- better error handling when importing image settings which are not compatible with current install - for example, when upscaler or sampler originally used is not available -- fixes...amazing how many issues were introduced by porting new a1111 code without adding almost no new functionality diff --git a/launch.py b/launch.py index 2b58226a1..c52096bbb 100644 --- a/launch.py +++ b/launch.py @@ -9,9 +9,9 @@ commandline_args = os.environ.get('COMMANDLINE_ARGS', "") sys.argv += shlex.split(commandline_args) import installer +installer.ensure_base_requirements() installer.setup_logging(False) installer.add_args() -installer.ensure_base_requirements() installer.parse_args() installer.extensions_preload(force=False) diff --git a/modules/hashes.py b/modules/hashes.py index 2a7c7aed3..f36291362 100644 --- a/modules/hashes.py +++ b/modules/hashes.py @@ -23,8 +23,11 @@ def cache(subsection): if not os.path.isfile(cache_filename): cache_data = {} else: - with open(cache_filename, "r", encoding="utf8") as file: - cache_data = json.load(file) + try: + with open(cache_filename, "r", encoding="utf8") as file: + cache_data = json.load(file) + except: + cache_data = None s = cache_data.get(subsection, {}) cache_data[subsection] = s return s diff --git a/modules/images.py b/modules/images.py index 7c615dd13..3065205bb 100644 --- a/modules/images.py +++ b/modules/images.py @@ -236,7 +236,7 @@ def resize_image(resize_mode, im, width, height, upscaler_name=None): upscalers = [x for x in shared.sd_upscalers if x.name == upscaler_name] if len(upscalers) == 0: upscaler = shared.sd_upscalers[0] - shared.log.warning(f"Could not find upscaler named {upscaler_name or ''}, using {upscaler.name} as a fallback") + shared.log.warning(f"Could not find upscaler: {upscaler_name or ''} using fallback: {upscaler.name}") else: upscaler = upscalers[0] im = upscaler.scaler.upscale(im, scale, upscaler.data_path) @@ -521,7 +521,8 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='jpg', i if path is None: # set default path to avoid errors when functions are triggered manually or via api and param is not set path = shared.opts.outdir_save namegen = FilenameGenerator(p, seed, prompt, image) - save_to_dirs = save_to_dirs or (grid and shared.opts.grid_save_to_dirs) or (not grid and shared.opts.save_to_dirs and not no_prompt) + if save_to_dirs is None: + save_to_dirs = (grid and shared.opts.grid_save_to_dirs) or (not grid and shared.opts.save_to_dirs and not no_prompt) if save_to_dirs: dirname = namegen.apply(shared.opts.directories_filename_pattern or "[prompt_words]").lstrip(' ').rstrip('\\ /') path = os.path.join(path, dirname) diff --git a/modules/shared.py b/modules/shared.py index b8203e356..584b848cf 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -307,7 +307,7 @@ options_templates.update(options_section(('saving-images', "Image options"), { "save_init_img": OptionInfo(False, "Save init images when using image processing"), "save_to_dirs": OptionInfo(False, "Save images to a subdirectory"), "grid_save_to_dirs": OptionInfo(False, "Save grids to a subdirectory"), - "use_save_to_dirs_for_ui": OptionInfo(False, "When using \"Save\" button, save images to a subdirectory"), + "use_save_to_dirs_for_ui": OptionInfo(False, "When using Save button, save images to a subdirectory"), "directories_filename_pattern": OptionInfo("[date]", "Directory name pattern", component_args=hide_dirs), "directories_max_prompt_words": OptionInfo(8, "Max prompt words for [prompt_words] pattern", gr.Slider, {"minimum": 1, "maximum": 20, "step": 1, **hide_dirs}), })) @@ -605,6 +605,8 @@ class Options: expected_type = type(default_value) if expected_type == bool and value == "False": value = False + elif expected_type == type(value): + pass else: value = expected_type(value) return value diff --git a/scripts/postprocessing_upscale.py b/scripts/postprocessing_upscale.py index e1faddeaf..55c43fc41 100644 --- a/scripts/postprocessing_upscale.py +++ b/scripts/postprocessing_upscale.py @@ -84,7 +84,7 @@ class ScriptPostprocessingUpscale(scripts_postprocessing.ScriptPostprocessing): upscaler1 = next(iter([x for x in shared.sd_upscalers if x.name == upscaler_1_name]), None) if not upscaler1: - shared.log.warning(f"Could not find upscaler named {upscaler_1_name or ''}") + shared.log.warning(f"Could not find upscaler: {upscaler_1_name or ''}") return if upscaler_2_name == "None": @@ -92,7 +92,7 @@ class ScriptPostprocessingUpscale(scripts_postprocessing.ScriptPostprocessing): upscaler2 = next(iter([x for x in shared.sd_upscalers if x.name == upscaler_2_name and x.name != "None"]), None) if not upscaler2 and (upscaler_2_name is not None): - shared.log.warning(f"Could not find upscaler named {upscaler_1_name or ''}") + shared.log.warning(f"Could not find upscaler: {upscaler_2_name or ''}") return upscaled_image = self.upscale(pp.image, pp.info, upscaler1, upscale_mode, upscale_by, upscale_to_width, upscale_to_height, upscale_crop) @@ -130,7 +130,7 @@ class ScriptPostprocessingUpscaleSimple(ScriptPostprocessingUpscale): upscaler1 = next(iter([x for x in shared.sd_upscalers if x.name == upscaler_name]), None) if upscaler1 is None: - shared.log.warning(f"Could not find upscaler named {upscaler_name or ''}") + shared.log.warning(f"Could not find upscaler: {upscaler_name or ''}") pp.image = self.upscale(pp.image, pp.info, upscaler1, 0, upscale_by, 0, 0, False) pp.info["Postprocess upscaler"] = upscaler1.name From 0412651a6cf583e8c30195d73c49ee7defa24c4f Mon Sep 17 00:00:00 2001 From: Disty0 Date: Wed, 24 May 2023 13:03:40 +0300 Subject: [PATCH 202/282] Send to CPU intead of XPU when unloading --- modules/sd_models.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/sd_models.py b/modules/sd_models.py index 40524dd38..71c091297 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -465,6 +465,8 @@ def reload_model_weights(sd_model=None, info=None): return if shared.cmd_opts.lowvram or shared.cmd_opts.medvram: lowvram.send_everything_to_cpu() + elif shared.cmd_opts.use_ipex: + model_data.sd_model.to("cpu") else: sd_model.to(devices.cpu) sd_hijack.model_hijack.undo_hijack(sd_model) @@ -501,7 +503,10 @@ def reload_model_weights(sd_model=None, info=None): def unload_model_weights(sd_model=None, _info=None): from modules import sd_hijack if model_data.sd_model: - model_data.sd_model.to(devices.cpu) + if shared.cmd_opts.use_ipex: + model_data.sd_model.to("cpu") + else: + model_data.sd_model.to(devices.cpu) sd_hijack.model_hijack.undo_hijack(model_data.sd_model) model_data.sd_model = None sd_model = None From 5614a4c3fd69eecd49319a37a1f6f6e78f99f0ce Mon Sep 17 00:00:00 2001 From: Disty0 Date: Wed, 24 May 2023 13:11:02 +0300 Subject: [PATCH 203/282] Fix typo --- modules/sd_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sd_models.py b/modules/sd_models.py index 71c091297..15ed0d0a8 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -466,7 +466,7 @@ def reload_model_weights(sd_model=None, info=None): if shared.cmd_opts.lowvram or shared.cmd_opts.medvram: lowvram.send_everything_to_cpu() elif shared.cmd_opts.use_ipex: - model_data.sd_model.to("cpu") + sd_model.to("cpu") else: sd_model.to(devices.cpu) sd_hijack.model_hijack.undo_hijack(sd_model) From 531544e069c412f3b6b552a1afd4648995e7ecdc Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 24 May 2023 08:17:59 -0400 Subject: [PATCH 204/282] refresh --- extensions-builtin/sd-webui-controlnet | 2 +- javascript/black-orange.css | 2 +- javascript/style.css | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 2514a460a..54f7c64b4 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 2514a460ab9e0c6db38033aed29b12c94d5f1964 +Subproject commit 54f7c64b4dc4a4206e76a152651d5f0b0fac248f diff --git a/javascript/black-orange.css b/javascript/black-orange.css index 034a352a5..dab54760b 100644 --- a/javascript/black-orange.css +++ b/javascript/black-orange.css @@ -54,7 +54,7 @@ svg.feather.feather-image, .feather .feather-image { display: none } .py-6 { padding-bottom: 0; } .rounded-lg { border-radius: 0; } .tabs { background-color: black; } -.gradio-button.tool { border-radius: 0; height: 2.0em; } +.gradio-button.tool { border-radius: 0; } .block.token-counter span { background-color: #222 !important; box-shadow: 2px 2px 2px #111; border: none !important; border-radius: 0; font-size: 0.8rem; } .tab-nav { zoom: 130%; margin-bottom: 16px; border-bottom: 2px solid #CE6400 !important; padding-bottom: 2px; } .label-wrap { margin: 16px 0px 8px 0px; } diff --git a/javascript/style.css b/javascript/style.css index 498729b83..5ac40c5d9 100644 --- a/javascript/style.css +++ b/javascript/style.css @@ -26,7 +26,7 @@ div.gradio-html.min{ min-height: 0; } .hidden{ display: none; } /* general styled components */ -.gradio-button.tool{ max-width: 2.2em; min-width: 2.2em !important; height: 2.4em; align-self: end; line-height: 1em; border-radius: 0.5em; } +.gradio-button.tool{ max-width: 2.3em; min-width: 2.3em !important; height: 2.3em; align-self: end; line-height: 1em; border-radius: 0.5em; } .gradio-button.secondary-down{ background: var(--button-secondary-background-fill); color: var(--button-secondary-text-color); } .gradio-button.secondary-down, .gradio-button.secondary-down:hover{ box-shadow: 1px 1px 1px rgba(0,0,0,0.25) inset, 0px 0px 3px rgba(0,0,0,0.15) inset; } .gradio-button.secondary-down:hover{ background: var(--button-secondary-background-fill-hover); color: var(--button-secondary-text-color-hover); } From 0acc7d3b8640b0fe57e14f9a23929376f625c896 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 24 May 2023 08:49:33 -0400 Subject: [PATCH 205/282] fix redirector --- modules/devices.py | 2 +- webui.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/devices.py b/modules/devices.py index de806dcb1..84e6da95a 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -114,7 +114,7 @@ def set_cuda_params(): pass global dtype, dtype_vae, dtype_unet, unet_needs_upcast # pylint: disable=global-statement ok = test_fp16() - if shared.cmd_opts.use_directml: # TODO + if shared.cmd_opts.use_directml: # TODO DirectML does not have full autocast capabilities shared.opts.no_half = True shared.opts.no_half_vae = True if ok and shared.opts.cuda_dtype == 'FP32': diff --git a/webui.py b/webui.py index 3f74568d1..67d2846a0 100644 --- a/webui.py +++ b/webui.py @@ -265,10 +265,8 @@ def start_ui(): setup_middleware(app, cmd_opts) if cmd_opts.subpath: - redirector = FastAPI() - redirector.get("/") - _mounted_app = gradio.mount_gradio_app(redirector, shared.demo, path=f"/{cmd_opts.subpath}") - shared.log.info('Redirector mounted: /{cmd_opts.subpath}') + _mounted_app = gradio.mount_gradio_app(app, shared.demo, path=f"/{cmd_opts.subpath}") + shared.log.info(f'Redirector mounted: /{cmd_opts.subpath}') cmd_opts.autolaunch = False startup_timer.record("launch") From 8091ef2fca9bac0271ce72fb5fb19bb0f7df945e Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 24 May 2023 12:48:08 -0400 Subject: [PATCH 206/282] update hiresfix --- CHANGELOG.md | 334 ++++++++++++++++++++++++++++++++++++++++ README.md | 218 ++++++++++---------------- javascript/hires_fix.js | 4 +- modules/ui.py | 14 +- requirements.txt | 2 +- 5 files changed, 420 insertions(+), 152 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..ef556b7c3 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,334 @@ +# Change Log for SD.Next + +## Update for 05/24/2023 + +Mostly cosmetic... + +- Updated README.md +- Created CHANGELOG.md + +## Update for 05/23/2023 + +Major internal work with perhaps not that much user-facing to show for it ;) + +- update core repos: **stability-ai**, **taming-transformers**, **k-diffusion, blip**, **codeformer** + note: to avoid disruptions, this is applicable for new installs only +- tested with **torch 2.1**, **cuda 12.1**, **cudnn 8.9** + (production remains on torch2.0.1+cuda11.8+cudnn8.8) +- fully extend support of `--data-dir` + allows multiple installations to share pretty much everything, not just models + especially useful if you want to run in a stateless container or cloud instance +- redo api authentication + now api authentication will use same user/pwd (if specified) for ui and strictly enforce it using httpbasicauth + new authentication is also fully supported in combination with ssl for both sync and async calls + if you want to use api programatically, see examples in `cli/sdapi.py` +- add dark/light theme mode toggle +- redo some `clip-skip` functionality +- better matching for vae vs model +- update to `xyz grid` to allow creation of large number of images without creating grid itself +- update `gradio` (again) +- more prompt parser optimizations +- better error handling when importing image settings which are not compatible with current install + for example, when upscaler or sampler originally used is not available +- fixes...amazing how many issues were introduced by porting a1111 v1.20 code without adding almost no new functionality + next one is v1.30 (still in dev) which does bring a lot of new features + +## Update for 05/17/2023 + +This is a massive one due to huge number of changes, +but hopefully it will go ok... + +- new **prompt parsers** + select in UI -> Settings -> Stable Diffusion + - **Full**: my new implementation + - **A1111**: for backward compatibility + - **Compel**: as used in ComfyUI and InvokeAI (a.k.a *Temporal Weighting*) + - **Fixed**: for really old backward compatibility +- monitor **extensions** install/startup and + log if they modify any packages/requirements + this is a *deep-experimental* python hack, but i think its worth it as extensions modifying requirements + is one of most common causes of issues +- added `--safe` command line flag mode which skips loading user extensions + please try to use it before opening new issue +- reintroduce `--api-only` mode to start server without ui +- port *all* upstream changes from [A1111](https://github.com/AUTOMATIC1111/stable-diffusion-webui) + up to today - commit hash `89f9faa` + +## Update for 05/15/2023 + +- major work on **prompt parsing** + this can cause some differences in results compared to what you're used to, but its all about fixes & improvements + - prompt parser was adding commas and spaces as separate words and tokens and/or prefixes + - negative prompt weight using `[word:weight]` was ignored, it was always `0.909` + - bracket matching was anything but correct. complex nested attention brackets are now working. + - btw, if you run with `--debug` flag, you'll now actually see parsed prompt & schedule +- updated all scripts in `/cli` +- add option in settings to force different **latent sampler** instead of using primary only +- add **interrupt/skip** capabilities to process images + +## Update for 05/13/2023 + +This is mostly about optimizations... + +- improved `torch-directml` support + especially interesting for **amd** users on **windows** where **torch+rocm** is not yet available + dont forget to run using `--use-directml` or default is **cpu** +- improved compatibility with **nvidia** rtx 1xxx/2xxx series gpus +- fully working `torch.compile` with **torch 2.0.1** + using `inductor` compile takes a while on first run, but does result in 5-10% performance increase +- improved memory handling + for highest performance, you can also disable aggressive **gc** in settings +- improved performance + especially *after* generate as image handling has been moved to separate thread +- allow per-extension updates in extension manager +- option to reset configuration in settings + +## Update for 05/11/2023 + +- brand new **extension manager** + this is pretty much a complete rewrite, so new issues are possible +- support for `torch` 2.0.1 + note that if you are experiencing frequent hangs, this may be a worth a try +- updated `gradio` to 3.29.0 +- added `--reinstall` flag to force reinstall of all packages +- auto-recover & re-attempt when `--upgrade` is requested but fails +- check for duplicate extensions + +## Update for 05/08/2023 + +Back online with few updates: + +- bugfixes. yup, quite a lot of those +- auto-detect some cpu/gpu capabilities on startup + this should reduce need to tweak and tune settings like no-half, no-half-vae, fp16 vs fp32, etc +- configurable order of top level tabs +- configurable order of scripts in txt2img and img2img + for both, see sections in ui-> settings -> user interface + +## Update for 05/04/2023 + +Again, few days later... + +- reviewed/ported **all** commits from **A1111** upstream + some a few are not applicable as i already have alternative implementations + and very few i choose not to implement (save/restore last-known-good-config is a bad hack) + otherwise, we're fully up to date (its doesn't show on fork status as code merges were mostly manual due to conflicts) + but...due to sheer size of the updates, this may introduce some temporary issues +- redesigned server restart function + now available and working in ui + actually, since server restart is now a true restart and not ui restart, it can be used much more flexibly +- faster model load + plus support for slower devices via stream-load function (in ui settings) +- better logging + this includes new `--debug` flag for more verbose logging when troubleshooting + +## Update for 05/01/2023 + +Been a bit quieter for last few days as changes were quite significant, but finally here we are... + +- Updated core libraries: Gradio, Diffusers, Transformers +- Added support for **Intel ARC** GPUs via Intel OneAPI IPEX (auto-detected) +- Added support for **TorchML** (set by default when running on non-compatible GPU or on CPU) +- Enhanced support for AMD GPUs with **ROCm** +- Enhanced support for Apple **M1/M2** +- Redesigned command params: run `webui --help` for details +- Redesigned API and script processing +- Experimental support for multiple **Torch compile** options +- Improved sampler support +- Google Colab: + Maintained by +- Fixes, fixes, fixes... + +To take advantage of new out-of-the-box tunings, its recommended to delete your `config.json` so new defaults are applied. Its not necessary, but otherwise you may need to play with UI Settings to get the best of Intel ARC, TorchML, ROCm or Apple M1/M2. + +## Update for 04/27/2023 + +a bit shorter list as: + +- i've been busy with buxfixing + there are a lot of them, not going to list each here. + but seems like critical issues backlog is quieting down and soon i can focus on new features development. +- i've started collaboration with couple of major projects, + hopefully this will accelerate future development. + +what's new: + +- ability to view/add/edit model description shown in extra networks cards +- add option to specify fallback sampler if primary sampler is not compatible with desired operation +- make clip skip a local parameter +- remove obsolete items from UI settings +- set defaults for AMD ROCm + if you have issues, you may want to start with a fresh install so configuration can be created from scratch +- set defaults for Apple M1/M2 + if you have issues, you may want to start with a fresh install so configuration can be created from scratch + +## Update for 04/25/2023 + +- update process image -> info +- add VAE info to metadata +- update GPU utility search paths for better GPU type detection +- update git flags for wider compatibility +- update environment tuning +- update ti training defaults +- update VAE search paths +- add compatibility opts for some old extensions +- validate script args for always-on scripts + fixes: deforum with controlnet + +## Update for 04/24/2023 + +- identify race condition where generate locks up while fetching preview +- add pulldowns to x/y/z script +- add VAE rollback feature in case of NaNs +- use samples format for live preview +- add token merging +- use **Approx NN** for live preview +- create default `styles.csv` +- fix setup not installing `tensorflow` dependencies +- update default git flags to reduce number of warnings + +## Update for 04/23/2023 + +- fix VAE dtype + should fix most issues with NaN or black images +- add built-in Gradio themes +- reduce requirements +- more AMD specific work +- initial work on Apple platform support +- additional PR merges +- handle torch cuda crashing in setup +- fix setup race conditions +- fix ui lightbox +- mark tensorflow as optional +- add additional image name templates + +## Update for 04/22/2023 + +- autodetect which system libs should be installed + this is a first pass of autoconfig for **nVidia** vs **AMD** environments +- fix parse cmd line args from extensions +- only install `xformers` if actually selected as desired cross-attention method +- do not attempt to use `xformers` or `sdp` if running on cpu +- merge tomesd token merging +- merge 23 PRs pending from a1111 backlog (!!) + +*expect shorter updates for the next few days as i'll be partically ooo* + +## Update for 04/20/2023 + +- full CUDA tuning section in UI Settings +- improve exif/pnginfo metadata parsing + it can now handle 3rd party images or images edited in external software +- optimized setup performance and logging +- improve compatibility with some 3rd party extensions + for example handle extensions that install packages directly from github urls +- fix initial model download if no models found +- fix vae not found issues +- fix multiple git issues + +note: if you previously had command line optimizations such as --no-half, those are now ignored and moved to ui settings + +## Update for 04/19/2023 + +- fix live preview +- fix model merge +- fix handling of user-defined temp folders +- fix submit benchmark +- option to override `torch` and `xformers` installer +- separate benchmark data for system-info extension +- minor css fixes +- created initial merge backlog from pending prs on a1111 repo + see #258 for details + +## Update for 04/18/2023 + +- reconnect ui to active session on browser restart + this is one of most frequently asked for items, finally figured it out + works for text and image generation, but not for process as there is no progress bar reported there to start with +- force unload `xformers` when not used + improves compatibility with AMD/M1 platforms +- add `styles.csv` to UI settings to allow customizing path +- add `--skip-git` to cmd flags for power users that want + to skip all git checks and operations and perform manual updates +- add `--disable-queue` to cmd flags that disables Gradio queues (experimental) + this forces it to use HTTP instead of WebSockets and can help on unreliable network connections +- set scripts & extensions loading priority and allow custom priorities + fixes random extension issues: + `ScuNet` upscaler dissapearing, `Additional Networks` not showing up on XYZ axis, etc. +- improve html loading order +- remove some `asserts` causing runtime errors and replace with user-friendly messages +- update README.md +- update TODO.md + +## Update for 04/17/2023 + +- **themes** are now dynamic and discovered from list of available gradio themes on huggingface + its quite a list of 30+ supported themes so far +- added option to see **theme preview** without the need to apply it or restart server +- integrated **image info** functionality into **process image** tab and removed separate **image info** tab +- more installer improvements +- fix urls +- updated github integration +- make model download as optional if no models found + +## Update for 04/16/2023 + +- support for ui themes! to to *settings* -> *user interface* -> "ui theme* + includes 12 predefined themes +- ability to restart server from ui +- updated requirements +- removed `styles.csv` from repo, its now fully under user control +- removed model-keyword extension as overly aggresive +- rewrite of the fastapi middleware handlers +- install bugfixes, hopefully new installer is now ok \ + i really want to focus on features and not troubleshooting installer + +## Update for 04/15/2023 + +- update default values +- remove `ui-config.json` from repo, its not fully under user control +- updated extensions mangager +- updated locon/lycoris plugin +- enable quick launch by default +- add multidiffusion upscaler extensions +- add model keyword extension +- enable strong linting +- fix circular imports +- fix extensions updated +- fix git update issues +- update github templates + +## Update for 04/14/2023 + +- handle duplicate extensions +- redo exception handler +- fix generate forever +- enable cmdflags compatibility +- change default css font +- fix ti previews on initial start +- enhance tracebacks +- pin transformers version to last known good version +- fix extension loader + +## Update for 04/12/2023 + +This has been pending for a while, but finally uploaded some massive changes + +- New launcher + - `webui.bat` and `webui.sh`: + Platform specific wrapper scripts that starts `launch.py` in Python virtual environment + *Note*: Server can run without virtual environment, but it is recommended to use it + This is carry-over from original repo + **If you're unsure which launcher to use, this is the one you want** + - `launch.py`: + Main startup script + Can be used directly to start server in manually activated `venv` or to run it without `venv` + - `installer.py`: + Main installer, used by `launch.py` + - `webui.py`: + Main server script +- New logger +- New exception handler +- Built-in performance profiler +- New requirements handling +- Move of most of command line flags into UI Settings diff --git a/README.md b/README.md index 5b98cde34..ff83c9235 100644 --- a/README.md +++ b/README.md @@ -3,163 +3,101 @@ ![License](https://img.shields.io/github/license/vladmandic/human?style=flat-square&svg=true) ![GitHub Status Checks](https://img.shields.io/github/checks-status/vladmandic/human/main?style=flat-square&svg=true) -# Stable Diffusion - Automatic -*Heavily opinionated custom fork of* +# SD.Next -Fork is as close as up-to-date with origin as time allows -All code changes are merged upstream whenever possible +**Stable Diffusion implementation with modern UI and advanced features** -The idea behind the fork is to enable latest technologies and advances in text-to-image generation -*Sometimes this is not the same as "as simple as possible to use"* -If you are looking an amazing simple-to-use Stable Diffusion tool, I'd suggest [InvokeAI](https://invoke-ai.github.io/InvokeAI/) specifically due to its automated installer and ease of use +This project started as a form from [Automatic1111 WebUI](https://github.com/AUTOMATIC1111/stable-diffusion-webui/) and it grew siginificantly since then, but although it diverged significanly, any substantial features to original work is ported to this repository as well -
+Individual features are not listed here, instead check [Changelog](CHANGELOG.md) for full list of changes -### Follow [Development updates](https://github.com/vladmandic/automatic/discussions/99) for daily updates on new features/fixes +## Platform support -
- -![screenshot](javascript/black-orange.jpg) - -
- -## Notes - -### Fork does differ in few things - -- New installer -- Advanced CUDA tuning - Available in UI Settings -- Advanced environment tuning -- Optimized startup and models lazy-loading -- Built-in performance profiler -- Updated libraries to latest known compatible versions -- Includes opinionated **System** and **Options** configuration -- Does not rely on `Accelerate` as it only affects distributed systems - Gradio web server will be initialized much earlier which model load is done in the background - Faster model loading plus ability to fallback on corrupt models -- Uses simplified folder structure - e.g. `/train`, `/outputs/*`, `/models/*`, etc. -- Enhanced training templates -- Built-in `LoRA`, `LyCORIS`, `Custom Diffusion`, `Dreambooth` training -- Majority of settings configurable via UI without the need for command line flags - e.g, cross-optimization methods, system folders, etc. -- New logger -- New error and exception handlers - -### Optimizations - -- Optimized for `Torch` 2.0 -- Runs with `SDP` memory attention enabled by default if supported by system - *Note*: `xFormers` and other cross-optimization methods are still available -- Auto-adjust parameters when running on **CPU** or **CUDA** - *Note:* AMD and M1 platforms are supported, but without out-of-the-box optimizations - -### Integrated Extensions - -Hand-picked list of extensions that are deeply integrated into core workflows: - -- [System Info](https://github.com/vladmandic/sd-extension-system-info) -- [ControlNet](https://github.com/Mikubill/sd-webui-controlnet) -- [Image Browser](https://github.com/AlUlkesh/stable-diffusion-webui-images-browser) -- [LORA](https://github.com/kohya-ss/sd-scripts) *(both training and inference)* -- [LyCORIS](https://github.com/KohakuBlueleaf/LyCORIS) *(both training and inference)* -- [Model Converter](https://github.com/Akegarasu/sd-webui-model-converter) -- [CLiP Interrogator](https://github.com/pharmapsychotic/clip-interrogator-ext) -- [Dynamic Thresholding](https://github.com/mcmonkeyprojects/sd-dynamic-thresholding) -- [Steps Animation](https://github.com/vladmandic/sd-extension-steps-animation) -- [Seed Travel](https://github.com/yownas/seed_travel) -- [Multi-Diffusion Upscaler](https://github.com/pkuliyi2015/multidiffusion-upscaler-for-automatic1111) - -### User Interface - -- Includes updated **UI**: reskinned and reorganized - Black and orange dark theme with fixed width options panels and larger previews -- Includes support for **Gradio themes** - *Settings* -> *User interface* -> *UI theme* - Link to themes list & previews: - -### Removed - -- Drops compatibility with older versions of `python` and requires **3.9** or **3.10** -- Drops localizations - -### Integrated CLI/API tools - -Fork adds extra functionality: - -- New skin and UI layout -- Ships with set of **CLI** tools that rely on *SD API* for execution: - e.g. `generate`, `train`, `bench`, etc. - [Full list]() - -
+- **nVidia** GPUs using **CUDA** libraries on both *Windows and Linux* +- **AMD** GPUs using **ROCm** libraries on *Linux* + Support will be extended to *Windows* once AMD releases ROCm for Windows +- Any GPU compatibile with **DirectX** on *Windows* using **DirectML** libraries + This includes support for AMD GPUs that are not supported by native ROCm libraries +- **Intel Arc** GPUs using Intel OneAPI **Ipex/XPU** libraries +- **Apple M1/M2** on *OSX* using built-in support in Torch with some platform optimizations ## Install 1. Install first: **Python** & **Git** -2. If you have nVidia GPU, install nVidia CUDA toolkit: - -3. Clone repository +2. Clone repository `git clone https://github.com/vladmandic/automatic` +3. Run launcher + `webui.bat` or `webui.sh`: + - Platform specific wrapper scripts For Windows, Linux and OSX + - Starts `launch.py` in a Python virtual environment (`venv`) + - Uses `install.py` to handle all actual requirements and dependencies + - *Note*: Server can run without virtual environment, but it is recommended to use it to avoid library version conflicts with other applications -## Run - -Run desired startup script to install dependencies and extensions and start server: - -- `webui.bat` and `webui.sh`: - Platform specific wrapper scripts For Windows, Linux and OSX - Starts `launch.py` in a Python virtual environment (venv) - *Note*: Server can run without virtual environment, but it is recommended to use it to avoid library version conflicts with other applications - **If you're unsure which launcher to use, this is the one you want** -- `launch.py`: - Main startup script - Can be used directly to start server in a manually activated `venv` or to run server without `venv` -- `setup.py`: - Main installer, used by `launch.py` - Can also be used directly to update repository or extensions - If running manually, make sure to activate `venv` first (if used) -- `webui.py`: - Main server script - -Any of the above scripts can be used with `--help` to display detailed usage information and available parameters -For example: -> webui.bat --help +*Note*: **nVidia/CUDA** and **AMD/ROCm** are auto-detected is present and available, but for any other use case specify required parameter explicitly or wrong packages may be installed as installer will assume CPU-only environment Full startup sequence is logged in `setup.log`, so if you encounter any issues, please check it first -## Update +Below is partial list of all available parameters, run `webui --help` for the full list: -The launcher can perform automatic update of main repository, requirements, extensions and submodules: + Setup options: + --use-ipex Use Intel OneAPI XPU backend, default: False + --use-directml Use DirectML if no compatible GPU is detected, default: False + --use-cuda Force use nVidia CUDA backend, default: False + --use-rocm Force use AMD ROCm backend, default: False + --skip-update Skip update of extensions and submodules, default: False + --skip-requirements Skips checking and installing requirements, default: False + --skip-extensions Skips running individual extension installers, default: False + --skip-git Skips running all GIT operations, default: False + --skip-torch Skips running Torch checks, default: False + --reinstall Force reinstallation of all requirements, default: False + --debug Run installer with debug logging, default: False + --reset Reset main repository to latest version, default: False + --upgrade Upgrade main repository to latest version, default: False + --safe Run in safe mode with no user extensions -- **Main repository**: - Update is *not* performed by default, enable with `--upgrade` flag -- **Requirements**: - Check is performed on each startup and missing requirements are auto-installed - Can be skipped with `--skip-requirements` flag -- **Extensions and submodules**: - Update is performed on each startup and installer for each extension is started - Can be skipped with `--skip-extensions` flag -- **Quick mode**: Automatically enabled if timestamp of last sucessful setup is newer than actual repository version or version of newest extension - -
- -## Other - -### Scripts - -This repository comes with a large collection of scripts that can be used to process inputs, train, generate, and benchmark models -As well as number of auxiliary scripts that do not rely on **WebUI**, but can be used for end-to-end solutions such as extract frames from videos, etc. -For full details see [Docs](cli/README.md) - -
- -### Docs - -- Scripts are in [Scripts](cli/README.md) -- Everything else is in [Wiki](https://github.com/vladmandic/automatic/wiki) -- Except my current [TODO](TODO.md) +
![screenshot](javascript/black-orange.jpg)
+ +## Notes + +### **Collab** + +- To avoid having this repo rely just on me, I'd love to have additional maintainers with full admin rights. If you're interested, ping me! +- In addition to general cross-platform code, desire is to have a lead for each of the main platforms +This should be fully cross-platform, but I would really love to have additional contibutors and/or maintainers to join and help lead the effords on different platforms + +### **Goals** + +The idea behind the fork is to enable latest technologies and advances in text-to-image generation +*Sometimes this is not the same as "as simple as possible to use"* +If you are looking an amazing simple-to-use Stable Diffusion tool, I'd suggest [InvokeAI](https://invoke-ai.github.io/InvokeAI/) specifically due to its automated installer and ease of use + +General goals: + +- Cross-platform + - Create uniform experience while automatically managing any platform specific differences +- Performance + - Enable best possible performance on all platforms +- Ease-of-Use + - Automatically handle all requirements, dependencies, flags regardless of platform + - Integrate all best options for uniform out-of-the-box experience without the need to tweak anything manually +- Look-and-Feel + - Create modern, intuitive and clean UI +- Up-to-Date + - Keep code up to date with latest advanced in text-to-image generation + +## Credits + +- Main credit goes to [Automatic1111 WebUI](https://github.com/AUTOMATIC1111/stable-diffusion-webui) +- Additional credits are listed in [Credits](https://github.com/AUTOMATIC1111/stable-diffusion-webui/#credits) +- Licenses for modules are listed in [Licenses](html/licenses.html) + +### **Docs** + +- [Radme](README.md) +- [ToDo](TODO.md) +- [Changelog](CHANGELOG.md) +- [CLI Tools](cli/README.md)
diff --git a/javascript/hires_fix.js b/javascript/hires_fix.js index b71f4ddbb..d4ae4586e 100644 --- a/javascript/hires_fix.js +++ b/javascript/hires_fix.js @@ -1,5 +1,5 @@ /* global gradioApp, opts */ -function onCalcResolutionHires(enable, width, height, hr_scale, hr_resize_x, hr_resize_y) { +function onCalcResolutionHires(enable_hr, width, height, hr_scale, hr_resize_x, hr_resize_y) { function setInactive(elem, inactive) { elem.classList.toggle('inactive', !!inactive); } @@ -10,5 +10,5 @@ function onCalcResolutionHires(enable, width, height, hr_scale, hr_resize_x, hr_ setInactive(hrUpscaleBy, opts.use_old_hires_fix_width_height || hr_resize_x > 0 || hr_resize_y > 0); setInactive(hrResizeX, opts.use_old_hires_fix_width_height || hr_resize_x == 0); setInactive(hrResizeY, opts.use_old_hires_fix_width_height || hr_resize_y == 0); - return [enable, width, height, hr_scale, hr_resize_x, hr_resize_y]; + return [enable_hr, width, height, hr_scale, hr_resize_x, hr_resize_y]; } diff --git a/modules/ui.py b/modules/ui.py index 044b3d957..6f2a762d8 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -39,6 +39,7 @@ if not cmd_opts.share and not cmd_opts.listen: def gr_show(visible=True): + print('HERE1') return {"visible": visible, "__type__": "update"} @@ -378,10 +379,11 @@ def create_ui(): with FormGroup(visible=False, elem_id="txt2img_hires_fix") as hr_options: with FormRow(elem_id="txt2img_hires_fix_row1", variant="compact"): hr_upscaler = gr.Dropdown(label="Upscaler", elem_id="txt2img_hr_upscaler", choices=[*modules.shared.latent_upscale_modes, *[x.name for x in modules.shared.sd_upscalers]], value=modules.shared.latent_upscale_default_mode) - hr_second_pass_steps = gr.Slider(minimum=0, maximum=150, step=1, label='Hires steps', value=0, elem_id="txt2img_hires_steps") - denoising_strength = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label='Denoising strength', value=0.7, elem_id="txt2img_denoising_strength") + hr_second_pass_steps = gr.Slider(minimum=0, maximum=99, step=1, label='Hires steps', value=0, elem_id="txt2img_hires_steps") with FormRow(elem_id="txt2img_hires_fix_row2", variant="compact"): + denoising_strength = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label='Denoising strength', value=0.7, elem_id="txt2img_denoising_strength") hr_scale = gr.Slider(minimum=1.0, maximum=4.0, step=0.05, label="Upscale by", value=2.0, elem_id="txt2img_hr_scale") + with FormRow(elem_id="txt2img_hires_fix_row3", variant="compact"): hr_resize_x = gr.Slider(minimum=0, maximum=2048, step=8, label="Resize width to", value=0, elem_id="txt2img_hr_resize_x") hr_resize_y = gr.Slider(minimum=0, maximum=2048, step=8, label="Resize height to", value=0, elem_id="txt2img_hr_resize_y") elif category == "override_settings": @@ -394,15 +396,9 @@ def create_ui(): for preview_input in hr_resolution_preview_inputs: preview_input.change( fn=calc_resolution_hires, - inputs=hr_resolution_preview_inputs, - outputs=[hr_final_resolution], - show_progress=False, - ) - preview_input.change( - None, _js="onCalcResolutionHires", inputs=hr_resolution_preview_inputs, - outputs=[], + outputs=[hr_final_resolution], show_progress=False, ) diff --git a/requirements.txt b/requirements.txt index 6b0763cbd..be364a4ce 100644 --- a/requirements.txt +++ b/requirements.txt @@ -53,7 +53,7 @@ diffusers==0.16.1 einops==0.4.1 gradio==3.32.0 numexpr==2.8.4 -numpy==1.24.3 +numpy==1.23.5 numba==0.57.0 pandas==1.5.3 protobuf==3.20.3 From 684851ae346181f6947415c493d0e38dd44895f0 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 24 May 2023 13:50:01 -0400 Subject: [PATCH 207/282] set default optimizer --- CHANGELOG.md | 11 +++++++++-- TODO.md | 3 --- modules/devices.py | 10 ++++++++++ modules/shared.py | 19 ++++++++++++++----- 4 files changed, 33 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef556b7c3..f545097ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,15 @@ Mostly cosmetic... -- Updated README.md -- Created CHANGELOG.md +- updated README.md +- created CHANGELOG.md +- set default cross-optimization method for each platform + applicable for new installs only + - `cpu` => Doggettx's + - `ipex` => InvokeAI's + - `directml` => Sub-quadratic + - `rocm` => Sub-quadratic + - `cuda` => Scaled-Dot-Product ## Update for 05/23/2023 diff --git a/TODO.md b/TODO.md index c9bbf8646..c4a3b4378 100644 --- a/TODO.md +++ b/TODO.md @@ -52,6 +52,3 @@ Tech that can be integrated as part of the core workflow... ## Random - Bunch of stuff: - -### Pending Code Updates - diff --git a/modules/devices.py b/modules/devices.py index 84e6da95a..85560585e 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -149,6 +149,16 @@ dtype = torch.float16 dtype_vae = torch.float16 dtype_unet = torch.float16 unet_needs_upcast = False +if args.use_ipex: + backend = 'ipex' +elif args.use_directml: + backend = 'directml' +elif torch.cuda.is_available() and torch.version.cuda: + backend = 'cuda' +elif torch.cuda.is_available() and torch.version.rocm: + backend = 'rocm' +else: + backend = 'cpu' def cond_cast_unet(tensor): diff --git a/modules/shared.py b/modules/shared.py index 584b848cf..74e5a8af8 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -26,7 +26,6 @@ parser = cmd_args.parser url = 'https://github.com/vladmandic/automatic' cmd_opts, _ = parser.parse_known_args() hide_dirs = {"visible": not cmd_opts.hide_ui_dir_config} -is_device_dml = False xformers_available = False clip_model = None interrogator = modules.interrogate.InterrogateModels("interrogate") @@ -232,6 +231,17 @@ def refresh_themes(): log.error('Exception refreshing UI themes') +if devices.backend == "cpu": + cross_attention_optimization_default = "Doggettx's" +elif devices.backend == "ipex": + cross_attention_optimization_default = "InvokeAI's" +if devices.backend == "directml": + cross_attention_optimization_default = "Sub-quadratic" +elif devices.backend == "rocm": + cross_attention_optimization_default = "Sub-quadratic" +else: # cuda + cross_attention_optimization_default ="Scaled-Dot-Product" + options_templates.update(options_section(('sd', "Stable Diffusion"), { "sd_model_checkpoint": OptionInfo(default_checkpoint, "Stable Diffusion checkpoint", gr.Dropdown, lambda: {"choices": list_checkpoint_tiles()}, refresh=refresh_checkpoints), "sd_checkpoint_cache": OptionInfo(0, "Model checkpoints to cache in RAM", gr.Slider, {"minimum": 0, "maximum": 10, "step": 1}), @@ -248,7 +258,7 @@ options_templates.update(options_section(('sd', "Stable Diffusion"), { "comma_padding_backtrack": OptionInfo(20, "Increase coherency by padding from the last comma within n tokens when using more than 75 tokens", gr.Slider, {"minimum": 0, "maximum": 74, "step": 1 }), "CLIP_stop_at_last_layers": OptionInfo(1, "Clip skip", gr.Slider, {"minimum": 1, "maximum": 8, "step": 1, "visible": False}), "upcast_attn": OptionInfo(False, "Upcast cross attention layer to FP32"), - "cross_attention_optimization": OptionInfo("Sub-quadratic" if is_device_dml else "Scaled-Dot-Product", "Cross-attention optimization method", gr.Radio, lambda: {"choices": shared_items.list_crossattention() }), + "cross_attention_optimization": OptionInfo(cross_attention_optimization_default, "Cross-attention optimization method", gr.Radio, lambda: {"choices": shared_items.list_crossattention() }), "cross_attention_options": OptionInfo([], "Cross-attention advanced options", gr.CheckboxGroup, lambda: {"choices": ['xFormers enable flash Attention', 'SDP disable memory attention']}), "sub_quad_q_chunk_size": OptionInfo(512, "Sub-quadratic cross-attention query chunk size for the layer optimization to use", gr.Slider, {"minimum": 16, "maximum": 8192, "step": 8}), "sub_quad_kv_chunk_size": OptionInfo(512, "Sub-quadratic cross-attentionkv chunk size for the sub-quadratic cross-attention layer optimization to use", gr.Slider, {"minimum": 0, "maximum": 8192, "step": 8}), @@ -328,8 +338,8 @@ options_templates.update(options_section(('cuda', "Compute Settings"), { "memmon_poll_rate": OptionInfo(2, "VRAM usage polls per second during generation", gr.Slider, {"minimum": 0, "maximum": 40, "step": 1}), "precision": OptionInfo("Autocast", "Precision type", gr.Radio, lambda: {"choices": ["Autocast", "Full"]}), "cuda_dtype": OptionInfo("FP32" if sys.platform == "darwin" else "FP16", "Device precision type", gr.Radio, lambda: {"choices": ["FP32", "FP16", "BF16"]}), - "no_half": OptionInfo(True if is_device_dml else False, "Use full precision for model (--no-half)", None, None, None), - "no_half_vae": OptionInfo(True if is_device_dml else False, "Use full precision for VAE (--no-half-vae)"), + "no_half": OptionInfo(False, "Use full precision for model (--no-half)", None, None, None), + "no_half_vae": OptionInfo(False, "Use full precision for VAE (--no-half-vae)"), "upcast_sampling": OptionInfo(True if sys.platform == "darwin" or cmd_opts.use_ipex else False, "Enable upcast sampling. Usually produces similar results to --no-half with better performance while using less memory"), "disable_nan_check": OptionInfo(True, "Do not check if produced images/latent spaces have NaN values"), "rollback_vae": OptionInfo(False, "Attempt to roll back VAE when produced NaN values, requires NaN check (experimental)"), @@ -627,7 +637,6 @@ mem_mon = modules.memmon.MemUsageMonitor("MemMon", device, opts) mem_mon.start() if device.type == 'privateuseone': import modules.dml # pylint: disable=ungrouped-imports - is_device_dml = True def reload_gradio_theme(theme_name=None): From 9e66d88e21b79b3126419267022b39aa57f6becd Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 24 May 2023 15:21:49 -0400 Subject: [PATCH 208/282] add mps defaults --- CHANGELOG.md | 18 +++++++++++------- README.md | 2 +- extensions-builtin/sd-extension-system-info | 2 +- modules/devices.py | 3 +++ modules/shared.py | 4 +++- modules/ui.py | 1 - 6 files changed, 19 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f545097ed..08aa1ee1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,15 +4,19 @@ Mostly cosmetic... -- updated README.md -- created CHANGELOG.md -- set default cross-optimization method for each platform +- updated [README](https://github.com/vladmandic/automatic/blob/master/README.md) +- created [CHANGELOG](https://github.com/vladmandic/automatic/blob/master/CHANGELOG.md) + this will be the source for all info about new things moving forward + and cross-posted to discussions #99 as well as discord [announcements](https://discord.com/channels/1101998836328697867/1109953953396957286) +- set default cross-optimization method for each platform backend applicable for new installs only - - `cpu` => Doggettx's - - `ipex` => InvokeAI's - - `directml` => Sub-quadratic - - `rocm` => Sub-quadratic - `cuda` => Scaled-Dot-Product + - `rocm` => Sub-quadratic + - `directml` => Sub-quadratic + - `ipex` => InvokeAI's + - `mps` => Doggettx's + - `cpu` => Doggettx's +- bugfixes...i don't recall when was a release with at least several of those ## Update for 05/23/2023 diff --git a/README.md b/README.md index ff83c9235..c8109a61a 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Individual features are not listed here, instead check [Changelog](CHANGELOG.md) - Any GPU compatibile with **DirectX** on *Windows* using **DirectML** libraries This includes support for AMD GPUs that are not supported by native ROCm libraries - **Intel Arc** GPUs using Intel OneAPI **Ipex/XPU** libraries -- **Apple M1/M2** on *OSX* using built-in support in Torch with some platform optimizations +- **Apple M1/M2** on *OSX* using built-in support in Torch with **MPS** optimizations ## Install diff --git a/extensions-builtin/sd-extension-system-info b/extensions-builtin/sd-extension-system-info index 79243697a..01564b77c 160000 --- a/extensions-builtin/sd-extension-system-info +++ b/extensions-builtin/sd-extension-system-info @@ -1 +1 @@ -Subproject commit 79243697a23602ff4f9e441aa35fcfdc33bf0872 +Subproject commit 01564b77c3b6277ec544072f43af766b85351a99 diff --git a/modules/devices.py b/modules/devices.py index 85560585e..3a504a4cf 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -157,10 +157,13 @@ elif torch.cuda.is_available() and torch.version.cuda: backend = 'cuda' elif torch.cuda.is_available() and torch.version.rocm: backend = 'rocm' +elif sys.platform == 'darwin': + backend = 'mps' else: backend = 'cpu' + def cond_cast_unet(tensor): return tensor.to(dtype_unet) if unet_needs_upcast else tensor diff --git a/modules/shared.py b/modules/shared.py index 74e5a8af8..67e7f4f9d 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -233,9 +233,11 @@ def refresh_themes(): if devices.backend == "cpu": cross_attention_optimization_default = "Doggettx's" +elif devices.backend == "mps": + cross_attention_optimization_default = "Doggettx's" elif devices.backend == "ipex": cross_attention_optimization_default = "InvokeAI's" -if devices.backend == "directml": +elif devices.backend == "directml": cross_attention_optimization_default = "Sub-quadratic" elif devices.backend == "rocm": cross_attention_optimization_default = "Sub-quadratic" diff --git a/modules/ui.py b/modules/ui.py index 6f2a762d8..cae271429 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -39,7 +39,6 @@ if not cmd_opts.share and not cmd_opts.listen: def gr_show(visible=True): - print('HERE1') return {"visible": visible, "__type__": "update"} From 9e22d91245ac36e5f48162cfee943b21b72aaf34 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 25 May 2023 07:41:40 -0400 Subject: [PATCH 209/282] update logging and temp file handling --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .github/ISSUE_TEMPLATE/extension_report.yml | 2 +- .gitignore | 2 +- README.md | 2 +- cli/train.py | 19 ++++++++----- extensions-builtin/sd-webui-controlnet | 2 +- installer.py | 30 ++++++++++++--------- javascript/black-orange.css | 2 +- launch.py | 3 +-- modules/ui_tempdir.py | 27 +++++++++++++------ 10 files changed, 56 insertions(+), 35 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 28fbd4296..add464bca 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -28,7 +28,7 @@ body: - type: markdown attributes: value: | - If issue is setup, installation or startup related, please check `setup.log` before reporting + If issue is setup, installation or startup related, please check `webui.log` before reporting And when posting console logs, please use code blocks ( \`\`\` ) to format them insead of uploading screenshots - type: markdown attributes: diff --git a/.github/ISSUE_TEMPLATE/extension_report.yml b/.github/ISSUE_TEMPLATE/extension_report.yml index cacdb16d3..21e95688a 100644 --- a/.github/ISSUE_TEMPLATE/extension_report.yml +++ b/.github/ISSUE_TEMPLATE/extension_report.yml @@ -29,5 +29,5 @@ body: - type: markdown attributes: value: | - If issue is extension installation or startup related, please check `setup.log` before reporting + If issue is extension installation or startup related, please check `webui.log` before reporting And when posting console logs, please use code blocks ( \`\`\` ) to format them insead of uploading screenshots diff --git a/.gitignore b/.gitignore index 078ec543c..19aed4141 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ # defaults __pycache__ -setup.log /cache.json /config.json /params.txt @@ -17,6 +16,7 @@ package-lock.json venv # all models and temp files +*.log *.bak *.ckpt *.safetensors diff --git a/README.md b/README.md index c8109a61a..10cae8fdd 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Individual features are not listed here, instead check [Changelog](CHANGELOG.md) *Note*: **nVidia/CUDA** and **AMD/ROCm** are auto-detected is present and available, but for any other use case specify required parameter explicitly or wrong packages may be installed as installer will assume CPU-only environment -Full startup sequence is logged in `setup.log`, so if you encounter any issues, please check it first +Full startup sequence is logged in `webui.log`, so if you encounter any issues, please check it first Below is partial list of all available parameters, run `webui --help` for the full list: diff --git a/cli/train.py b/cli/train.py index a2507660b..14ef28d6a 100755 --- a/cli/train.py +++ b/cli/train.py @@ -33,19 +33,19 @@ import latents # globals args = None -log = logging.getLogger(__name__) +log = logging.getLogger('train') valid_steps = ['original', 'face', 'body', 'blur', 'range', 'upscale', 'restore', 'interrogate', 'resize', 'square', 'segment'] +log_file = os.path.join(os.path.dirname(__file__), 'train.log') # methods def setup_logging(clean=False): try: - if clean and os.path.isfile('setup.log'): - os.remove('setup.log') + if clean and os.path.isfile(log_file): + os.remove(log_file) time.sleep(0.1) # prevent race condition except: pass - logging.basicConfig(level=logging.DEBUG, format='%(asctime)s | %(levelname)s | %(pathname)s | %(message)s', filename='setup.log', filemode='a', encoding='utf-8', force=True) from rich.theme import Theme from rich.logging import RichHandler from rich.console import Console @@ -56,10 +56,17 @@ def setup_logging(clean=False): "traceback.border.syntax_error": "black", "inspect.value.border": "black", })) + # logging.getLogger("urllib3").setLevel(logging.ERROR) + # logging.getLogger("httpx").setLevel(logging.ERROR) + level = logging.DEBUG if args.debug else logging.INFO + logging.basicConfig(level=logging.ERROR, format='%(asctime)s | %(name)s | %(levelname)s | %(module)s | %(message)s', filename=log_file, filemode='a', encoding='utf-8', force=True) + log.setLevel(logging.DEBUG) # log to file is always at level debug for facility `sd` pretty_install(console=console) traceback_install(console=console, extra_lines=1, width=console.width, word_wrap=False, indent_guides=False, suppress=[]) - rh = RichHandler(show_time=True, omit_repeated_times=False, show_level=True, show_path=False, markup=False, rich_tracebacks=True, log_time_format='%H:%M:%S-%f', level=logging.DEBUG if args.debug else logging.INFO, console=console) - rh.set_name(logging.DEBUG if args.debug else logging.INFO) + rh = RichHandler(show_time=True, omit_repeated_times=False, show_level=True, show_path=False, markup=False, rich_tracebacks=True, log_time_format='%H:%M:%S-%f', level=level, console=console) + rh.set_name(level) + while log.hasHandlers() and len(log.handlers) > 0: + log.removeHandler(log.handlers[0]) log.addHandler(rh) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 54f7c64b4..a8bf0c390 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 54f7c64b4dc4a4206e76a152651d5f0b0fac248f +Subproject commit a8bf0c3901c8c37f8ffc921f0345a86c922f7a58 diff --git a/installer.py b/installer.py index b701803c9..b40ac765b 100644 --- a/installer.py +++ b/installer.py @@ -20,6 +20,7 @@ class Dot(dict): # dot notation access to dictionary attributes log = logging.getLogger("sd") +log_file = os.path.join(os.path.dirname(__file__), 'webui.log') quick_allowed = True errors = 0 opts = {} @@ -48,12 +49,11 @@ git_commit = "unknown" # setup console and file logging def setup_logging(clean=False): try: - if clean and os.path.isfile('setup.log'): - os.remove('setup.log') + if clean and os.path.isfile(log_file): + os.remove(log_file) time.sleep(0.1) # prevent race condition except: pass - logging.basicConfig(level=logging.DEBUG, format='%(asctime)s | %(levelname)s | %(pathname)s | %(message)s', filename='setup.log', filemode='a', encoding='utf-8', force=True) from rich.theme import Theme from rich.logging import RichHandler from rich.console import Console @@ -64,10 +64,15 @@ def setup_logging(clean=False): "traceback.border.syntax_error": "black", "inspect.value.border": "black", })) + # logging.getLogger("urllib3").setLevel(logging.ERROR) + # logging.getLogger("httpx").setLevel(logging.ERROR) + level = logging.DEBUG if args.debug else logging.INFO + logging.basicConfig(level=logging.ERROR, format='%(asctime)s | %(name)s | %(levelname)s | %(module)s | %(message)s', filename=log_file, filemode='a', encoding='utf-8', force=True) + log.setLevel(logging.DEBUG) # log to file is always at level debug for facility `sd` pretty_install(console=console) traceback_install(console=console, extra_lines=1, width=console.width, word_wrap=False, indent_guides=False, suppress=[]) - rh = RichHandler(show_time=True, omit_repeated_times=False, show_level=True, show_path=False, markup=False, rich_tracebacks=True, log_time_format='%H:%M:%S-%f', level=logging.DEBUG if args.debug else logging.INFO, console=console) - rh.set_name(logging.DEBUG if args.debug else logging.INFO) + rh = RichHandler(show_time=True, omit_repeated_times=False, show_level=True, show_path=False, markup=False, rich_tracebacks=True, log_time_format='%H:%M:%S-%f', level=level, console=console) + rh.set_name(level) while log.hasHandlers() and len(log.handlers) > 0: log.removeHandler(log.handlers[0]) log.addHandler(rh) @@ -152,7 +157,7 @@ def git(arg: str, folder: str = None, ignore: bool = False): errors += 1 log.error(f'Error running git: {folder} / {arg}') if 'or stash them' in txt: - log.error('Local changes detected: check setup.log for details') + log.error(f'Local changes detected: check log for details: {log_file}') log.debug(f'Git output: {txt}') return txt @@ -528,7 +533,6 @@ def check_version(offline=False, reset=True): # pylint: disable=unused-argument import requests except ImportError: return - logging.getLogger("urllib3").setLevel(logging.ERROR) commits = None try: commits = requests.get('https://api.github.com/repos/vladmandic/automatic/branches/master', timeout=10).json() @@ -569,13 +573,13 @@ def update_wiki(): # check if we can run setup in quick mode def check_timestamp(): - if not quick_allowed or not os.path.isfile('setup.log'): + if not quick_allowed or not os.path.isfile(log_file): return False if args.skip_git: return True ok = True setup_time = -1 - with open('setup.log', 'r', encoding='utf8') as f: + with open(log_file, 'r', encoding='utf8') as f: lines = f.readlines() for line in lines: if 'Setup complete without errors' in line: @@ -633,8 +637,8 @@ def parse_args(): def extensions_preload(force = False): setup_time = 0 if not force: - if os.path.isfile('setup.log'): - with open('setup.log', 'r', encoding='utf8') as f: + if os.path.isfile(log_file): + with open(log_file, 'r', encoding='utf8') as f: lines = f.readlines() for line in lines: if 'Setup complete without errors' in line: @@ -672,7 +676,7 @@ def read_options(): # entry method when used as module def run_setup(): - setup_logging(args.upgrade) + # setup_logging(args.upgrade) log.info('Starting SD.Next') read_options() check_python() @@ -700,7 +704,7 @@ def run_setup(): log.debug(f'Setup complete without errors: {round(time.time())}') else: log.warning(f'Setup complete with errors: {errors}') - log.warning('See log file for more details: setup.log') + log.warning(f'See log file for more details: {log_file}') if __name__ == "__main__": diff --git a/javascript/black-orange.css b/javascript/black-orange.css index dab54760b..0feee14b3 100644 --- a/javascript/black-orange.css +++ b/javascript/black-orange.css @@ -102,7 +102,7 @@ svg.feather.feather-image, .feather .feather-image { display: none } #txt2img_seed_row { padding: 0; margin-top: 8px; } #txt2img_settings { min-width: var(--left-column); max-width: var(--left-column); background-color: #111111; padding-top: 16px; } #txt2img_subseed_row { padding: 0; margin-top: 16px; } -#txt2img_subseed_show { min-width: 74px; padding: 8px 0 0 0 } +#txt2img_subseed_show, #img2img_subseed_show { display: None } #txt2img_subseed_strength { margin-top: 0; } #txt2img_tools, #img2img_tools { margin-top: 54px; scale: 120%; margin-left: 26px; } #txtimg_hr_finalres { max-width: 200px; } diff --git a/launch.py b/launch.py index c52096bbb..d0cd53467 100644 --- a/launch.py +++ b/launch.py @@ -10,9 +10,9 @@ sys.argv += shlex.split(commandline_args) import installer installer.ensure_base_requirements() -installer.setup_logging(False) installer.add_args() installer.parse_args() +installer.setup_logging(False) installer.extensions_preload(force=False) import modules.cmd_args @@ -130,7 +130,6 @@ def start_server(immediate=True, server=None): if __name__ == "__main__": if args.version: installer.add_args() - installer.setup_logging(clean=False) installer.log.info('SD.Next version information') installer.check_python() installer.check_version() diff --git a/modules/ui_tempdir.py b/modules/ui_tempdir.py index 7e5849ba5..f8d80d63e 100644 --- a/modules/ui_tempdir.py +++ b/modules/ui_tempdir.py @@ -35,28 +35,39 @@ def check_tmp_file(gradio, filename): return ok -def save_pil_to_file(pil_image, dir=None): # pylint: disable=redefined-builtin - already_saved_as = getattr(pil_image, 'already_saved_as', None) +def pil_to_temp_file(self, img, dir: str, format="png") -> str: # pylint: disable=redefined-builtin,unused-argument + """ + # original gradio implementation + bytes_data = gr.processing_utils.encode_pil_to_bytes(img, format) + temp_dir = Path(dir) / self.hash_bytes(bytes_data) + temp_dir.mkdir(exist_ok=True, parents=True) + filename = str(temp_dir / f"image.{format}") + img.save(filename, pnginfo=gr.processing_utils.get_pil_metadata(img)) + """ + already_saved_as = getattr(img, 'already_saved_as', None) if already_saved_as and os.path.isfile(already_saved_as): register_tmp_file(shared.demo, already_saved_as) file_obj = Savedfile(already_saved_as) - return file_obj + name = file_obj.name + return name if shared.opts.temp_dir != "": dir = shared.opts.temp_dir use_metadata = False metadata = PngImagePlugin.PngInfo() - for key, value in pil_image.info.items(): + for key, value in img.info.items(): if isinstance(key, str) and isinstance(value, str): metadata.add_text(key, value) use_metadata = True file_obj = tempfile.NamedTemporaryFile(delete=False, suffix=".png", dir=dir) - pil_image.save(file_obj, pnginfo=(metadata if use_metadata else None)) - return file_obj + img.save(file_obj, pnginfo=(metadata if use_metadata else None)) + name = file_obj.name + shared.log.debug(f'Saving temp image: {name}') + return name # override save to file function so that it also writes PNG info -gr.processing_utils.save_pil_to_file = save_pil_to_file - +# gr.processing_utils.save_pil_to_file = save_pil_to_file # gradio <=3.31.0 +gr.components.IOComponent.pil_to_temp_file = pil_to_temp_file # gradio >=3.32.0 def on_tmpdir_changed(): if shared.opts.temp_dir == "": From 9285326c6d61a4830e47ae873fa500c1638e5d06 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 25 May 2023 07:53:25 -0400 Subject: [PATCH 210/282] fix tqdm --- modules/textual_inversion/preprocess.py | 2 +- modules/textual_inversion/textual_inversion.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/textual_inversion/preprocess.py b/modules/textual_inversion/preprocess.py index 7c20b7f10..10aee5a00 100644 --- a/modules/textual_inversion/preprocess.py +++ b/modules/textual_inversion/preprocess.py @@ -1,6 +1,6 @@ import os import math -from tqdm.rich import tqdm +from tqdm import tqdm from PIL import Image, ImageOps from modules import paths, shared, images, deepbooru from modules.textual_inversion import autocrop diff --git a/modules/textual_inversion/textual_inversion.py b/modules/textual_inversion/textual_inversion.py index 7f95292c4..485bf0b23 100644 --- a/modules/textual_inversion/textual_inversion.py +++ b/modules/textual_inversion/textual_inversion.py @@ -3,7 +3,7 @@ import html import csv from collections import namedtuple import torch -from tqdm.rich import tqdm +from tqdm import tqdm import safetensors.torch import numpy as np from PIL import Image, PngImagePlugin From ff54e84adf70603accb03073e1c29d6e6d451b5b Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 25 May 2023 08:04:56 -0400 Subject: [PATCH 211/282] bring back old hires fix denoising --- javascript/hires_fix.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/hires_fix.js b/javascript/hires_fix.js index d4ae4586e..6e48699df 100644 --- a/javascript/hires_fix.js +++ b/javascript/hires_fix.js @@ -6,7 +6,7 @@ function onCalcResolutionHires(enable_hr, width, height, hr_scale, hr_resize_x, const hrUpscaleBy = gradioApp().getElementById('txt2img_hr_scale'); const hrResizeX = gradioApp().getElementById('txt2img_hr_resize_x'); const hrResizeY = gradioApp().getElementById('txt2img_hr_resize_y'); - gradioApp().getElementById('txt2img_hires_fix_row2').style.display = opts.use_old_hires_fix_width_height ? 'none' : ''; + gradioApp().getElementById('txt2img_hires_fix_row3').style.display = opts.use_old_hires_fix_width_height ? 'none' : ''; setInactive(hrUpscaleBy, opts.use_old_hires_fix_width_height || hr_resize_x > 0 || hr_resize_y > 0); setInactive(hrResizeX, opts.use_old_hires_fix_width_height || hr_resize_x == 0); setInactive(hrResizeY, opts.use_old_hires_fix_width_height || hr_resize_y == 0); From fc82ea2d7e09a21c35e67be5aa0eaf92a14a3f42 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 25 May 2023 08:51:46 -0400 Subject: [PATCH 212/282] cache loaded model --- modules/sd_models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/sd_models.py b/modules/sd_models.py index 15ed0d0a8..287ce5a73 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -378,11 +378,13 @@ model_data = SdModelData() def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None): - shared.log.debug(f'Load model: info={checkpoint_info is not None} dict={already_loaded_state_dict is not None}') from modules import lowvram, sd_hijack checkpoint_info = checkpoint_info or select_checkpoint() if checkpoint_info is None: return + if model_data.sd_model is not None and (checkpoint_info.hash == model_data.sd_model.sd_checkpoint_info.hash): # trying to load the same model + return + shared.log.debug(f'Load model: name={checkpoint_info.filename} dict={already_loaded_state_dict is not None}') if timer is None: timer = Timer() current_checkpoint_info = None @@ -410,7 +412,7 @@ def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None) timer.record("config") shared.log.debug(f'Model config loaded: {memory_stats()}') sd_model = None - shared.log.debug(f'Model config: {sd_config.model.get("params", dict())}') + # shared.log.debug(f'Model config: {sd_config.model.get("params", dict())}') try: clip_is_included_into_sd = sd1_clip_weight in state_dict or sd2_clip_weight in state_dict with sd_disable_initialization.DisableInitialization(disable_clip=clip_is_included_into_sd): From f8884bc051da75f989a2c80b3fd3ff7eb626cb0a Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 25 May 2023 09:13:57 -0400 Subject: [PATCH 213/282] fix hip detection --- launch.py | 1 - modules/devices.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/launch.py b/launch.py index d0cd53467..ac3afd4d8 100644 --- a/launch.py +++ b/launch.py @@ -123,7 +123,6 @@ def start_server(immediate=True, server=None): server = server.api_only() else: server = server.webui() - installer.log.info(f'Memory {get_memory_stats()}') return server diff --git a/modules/devices.py b/modules/devices.py index 3a504a4cf..843ed4dd8 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -155,7 +155,7 @@ elif args.use_directml: backend = 'directml' elif torch.cuda.is_available() and torch.version.cuda: backend = 'cuda' -elif torch.cuda.is_available() and torch.version.rocm: +elif torch.cuda.is_available() and torch.version.hip: backend = 'rocm' elif sys.platform == 'darwin': backend = 'mps' From 84958426343f8095af04a86f9f418e1409f6a5db Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 25 May 2023 10:41:28 -0400 Subject: [PATCH 214/282] update profiling --- CHANGELOG.md | 8 +++++-- installer.py | 53 +++++++++++++++++++++++++++++++++++++++++++ launch.py | 6 +++++ modules/call_queue.py | 3 ++- modules/lora | 2 +- 5 files changed, 68 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08aa1ee1a..3de45705f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,15 @@ # Change Log for SD.Next -## Update for 05/24/2023 +## Update for 05/25/2023 -Mostly cosmetic... +Some quality-of-life improvements... - updated [README](https://github.com/vladmandic/automatic/blob/master/README.md) - created [CHANGELOG](https://github.com/vladmandic/automatic/blob/master/CHANGELOG.md) this will be the source for all info about new things moving forward and cross-posted to discussions #99 as well as discord [announcements](https://discord.com/channels/1101998836328697867/1109953953396957286) +- optimize model loading on startup + this should reduce startup time significantly - set default cross-optimization method for each platform backend applicable for new installs only - `cuda` => Scaled-Dot-Product @@ -16,6 +18,8 @@ Mostly cosmetic... - `ipex` => InvokeAI's - `mps` => Doggettx's - `cpu` => Doggettx's +- optimize logging +- optimize profiling - bugfixes...i don't recall when was a release with at least several of those ## Update for 05/23/2023 diff --git a/installer.py b/installer.py index b40ac765b..92b6c9cfd 100644 --- a/installer.py +++ b/installer.py @@ -6,6 +6,9 @@ import shutil import logging import platform import subprocess +import io +import pstats +import cProfile try: from modules.cmd_args import parser @@ -78,6 +81,21 @@ def setup_logging(clean=False): log.addHandler(rh) +def print_profile(profile: cProfile.Profile, msg: str): + try: + from rich import print # pylint: disable=redefined-builtin + except: + pass + profile.disable() + stream = io.StringIO() + ps = pstats.Stats(profile, stream=stream) + ps.sort_stats(pstats.SortKey.CUMULATIVE).print_stats(15) + profile = None + lines = stream.getvalue().split('\n') + lines = [l for l in lines if ' 0: log.warning(f'Extensions duplicates: {extensions_duplicates}') + if args.profile: + print_profile(pr, 'Extensions') # initialize and optionally update submodules def install_submodules(): + if args.profile: + pr = cProfile.Profile() + pr.enable() log.info('Installing submodules') txt = git('submodule') log.debug(f'Submodules list: {txt}') @@ -446,6 +487,8 @@ def install_submodules(): update(name) except: log.error(f'Error updating submodule: {submodule}') + if args.profile: + print_profile(pr, 'Submodule') def ensure_base_requirements(): @@ -456,6 +499,9 @@ def ensure_base_requirements(): def install_requirements(): + if args.profile: + pr = cProfile.Profile() + pr.enable() if args.skip_requirements: return log.info('Verifying requirements') @@ -463,6 +509,8 @@ def install_requirements(): lines = [line.strip() for line in f.readlines() if line.strip() != '' and not line.startswith('#') and line is not None] for line in lines: install(line) + if args.profile: + print_profile(pr, 'Requirements') # set environment variables controling the behavior of various libraries @@ -635,6 +683,9 @@ def parse_args(): def extensions_preload(force = False): + if args.profile: + pr = cProfile.Profile() + pr.enable() setup_time = 0 if not force: if os.path.isfile(log_file): @@ -655,6 +706,8 @@ def extensions_preload(force = False): preload_extensions(ext_dir, parser, args.debug) except: log.error('Error running extension preloading') + if args.profile: + print_profile(pr, 'Preload') def git_reset(): log.warning('Running GIT reset') diff --git a/launch.py b/launch.py index ac3afd4d8..b00035b39 100644 --- a/launch.py +++ b/launch.py @@ -103,6 +103,10 @@ def get_memory_stats(): def start_server(immediate=True, server=None): + if args.profile: + import cProfile + pr = cProfile.Profile() + pr.enable() import gc import importlib.util collected = 0 @@ -123,6 +127,8 @@ def start_server(immediate=True, server=None): server = server.api_only() else: server = server.webui() + if args.profile: + installer.print_profile(pr, 'WebUI') return server diff --git a/modules/call_queue.py b/modules/call_queue.py index 7fc2d4444..3cfe3c50d 100644 --- a/modules/call_queue.py +++ b/modules/call_queue.py @@ -4,6 +4,7 @@ import time import cProfile import pstats import io +from rich import print # pylint: disable=redefined-builtin from modules import shared, progress, errors queue_lock = threading.Lock() @@ -68,7 +69,7 @@ def wrap_gradio_call(func, extra_outputs=None, add_stats=False): ps.sort_stats(pstats.SortKey.CUMULATIVE) # ps.strip_dirs() ps.print_stats(15) - print('Profile:', s.getvalue()) + print('Profile Exec:', s.getvalue()) except Exception as e: errors.display(e, 'gradio call') shared.state.job = "" diff --git a/modules/lora b/modules/lora index b6ba4cac8..16e5981d3 160000 --- a/modules/lora +++ b/modules/lora @@ -1 +1 @@ -Subproject commit b6ba4cac83d5c01db120ce98a50f66a16b5b0cb6 +Subproject commit 16e5981d3153ba02c34445089b998c5002a60abc From 1362eff1a9c657da7192042ff41bc8530335e636 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 25 May 2023 11:24:14 -0400 Subject: [PATCH 215/282] lightbox --- extensions-builtin/sd-webui-controlnet | 2 +- javascript/imageviewer.js | 2 ++ javascript/style.css | 13 ++++++++----- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index a8bf0c390..cb94dda76 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit a8bf0c3901c8c37f8ffc921f0345a86c922f7a58 +Subproject commit cb94dda7678399fa21247dae28d7bc9042ca5e4a diff --git a/javascript/imageviewer.js b/javascript/imageviewer.js index cfad41ff5..acf2c2237 100644 --- a/javascript/imageviewer.js +++ b/javascript/imageviewer.js @@ -183,12 +183,14 @@ document.addEventListener('DOMContentLoaded', () => { modalSave.title = 'Save Image(s)'; modalControls.appendChild(modalSave); + /* const modalClose = document.createElement('span'); modalClose.className = 'modalClose cursor'; modalClose.innerHTML = '×'; modalClose.onclick = closeModal; modalClose.title = 'Close image viewer'; modalControls.appendChild(modalClose); + */ const modalImage = document.createElement('img'); modalImage.id = 'modalImage'; diff --git a/javascript/style.css b/javascript/style.css index 5ac40c5d9..2e1600561 100644 --- a/javascript/style.css +++ b/javascript/style.css @@ -397,6 +397,8 @@ div#extras_scale_to_tab div.form{ font-weight: bold; cursor: pointer; width: 1em; + position: absolute; + z-index: 1; } .modalControls span:hover, .modalControls span:focus{ @@ -430,12 +432,14 @@ table.settings-value-table td{ max-width: 36em; } -.modalPrev, -.modalNext { +.modalPrev, .modalNext { cursor: pointer; position: absolute; - top: 50%; + top: 0; width: auto; + height: 100vh; + line-height: 100vh; + text-align: center; padding: 16px; margin-top: -50px; color: white; @@ -452,8 +456,7 @@ table.settings-value-table td{ border-radius: 3px 0 0 3px; } -.modalPrev:hover, -.modalNext:hover { +.modalPrev:hover, .modalNext:hover { background-color: rgba(0, 0, 0, 0.8); } From 44da8cc5b8f9c7dd6c3c896149af81674a2a9ba9 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 25 May 2023 11:32:57 -0400 Subject: [PATCH 216/282] css fix --- CHANGELOG.md | 1 + javascript/black-orange.css | 2 -- javascript/style.css | 7 +++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3de45705f..969aad013 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ Some quality-of-life improvements... - `cpu` => Doggettx's - optimize logging - optimize profiling +- minor lightbox improvements - bugfixes...i don't recall when was a release with at least several of those ## Update for 05/23/2023 diff --git a/javascript/black-orange.css b/javascript/black-orange.css index 0feee14b3..69bd91674 100644 --- a/javascript/black-orange.css +++ b/javascript/black-orange.css @@ -68,7 +68,6 @@ svg.feather.feather-image, .feather .feather-image { display: none } .progressDiv .progress { border-radius: 0 !important; background: var(--highlight-color); line-height: 3rem; height: 48px; } .gallery-item { box-shadow: none !important; } .performance { color: #888; } -.modalControls { background-color: #4E1400; } /* gradio elements overrides */ #div.gradio-container.dark { overflow-x: hidden; } @@ -83,7 +82,6 @@ svg.feather.feather-image, .feather .feather-image { display: none } #refresh_sd_model_checkpoint { height: 48px; margin-left: -14px; background: #333333; box-shadow: none; } #open_folder_extras, #footer, #style_pos_col, #style_neg_col, #roll_col, #extras_upscaler_2, #extras_upscaler_2_visibility, #txt2img_seed_resize_from_w, #txt2img_seed_resize_from_h { display: none; } #refresh_txt2img_styles, #refresh_img2img_styles { height: 40px; } -#open_folder_txt2img, #open_folder_img2img { } #save-animation { border-radius: 0 !important; margin-bottom: 16px; background-color: #111111; } #script_list { padding: 4px; margin-top: 20px; margin-bottom: 20px; } #settings > div.flex-wrap { width: 15em; } diff --git a/javascript/style.css b/javascript/style.css index 2e1600561..5df2f53d7 100644 --- a/javascript/style.css +++ b/javascript/style.css @@ -387,18 +387,21 @@ div#extras_scale_to_tab div.form{ gap: 1em; padding: 1em; background-color: rgba(0,0,0,0.2); + position: absolute; + width: fit-content; + z-index: 1; } + .modalClose { margin-left: auto; } + .modalControls span{ color: white; font-size: 35px; font-weight: bold; cursor: pointer; width: 1em; - position: absolute; - z-index: 1; } .modalControls span:hover, .modalControls span:focus{ From cb62c2f6ad3add5b71bb179e9820c06649959857 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 25 May 2023 13:25:26 -0400 Subject: [PATCH 217/282] fix plms fallback --- extensions-builtin/sd-webui-controlnet | 2 +- modules/processing.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index cb94dda76..a83a26060 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit cb94dda7678399fa21247dae28d7bc9042ca5e4a +Subproject commit a83a260605fe3da01bc15993c6a7f7d1aa82865d diff --git a/modules/processing.py b/modules/processing.py index ad80a6dca..7ba5f6f20 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -859,8 +859,8 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): shared.state.nextjob() img2img_sampler_name = self.sampler_name force_latent_upscaler = shared.opts.data.get('xyz_fallback_sampler') - if self.sampler_name in ['PLMS'] or (force_latent_upscaler is not None and force_latent_upscaler != 'None'): - img2img_sampler_name = force_latent_upscaler or shared.opts.fallback_sampler # PLMS does not support img2img, use fallback instead + if self.sampler_name in ['PLMS']: + img2img_sampler_name = force_latent_upscaler if force_latent_upscaler != 'None' else shared.opts.fallback_sampler # PLMS does not support img2img, use fallback instead self.sampler = sd_samplers.create_sampler(img2img_sampler_name, self.sd_model) samples = samples[:, :, self.truncate_y//2:samples.shape[2]-(self.truncate_y+1)//2, self.truncate_x//2:samples.shape[3]-(self.truncate_x+1)//2] noise = create_random_tensors(samples.shape[1:], seeds=seeds, subseeds=subseeds, subseed_strength=subseed_strength, p=self) @@ -908,8 +908,8 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing): def init(self, all_prompts, all_seeds, all_subseeds): force_latent_upscaler = shared.opts.data.get('xyz_fallback_sampler') - if self.sampler_name in ['PLMS'] or (force_latent_upscaler is not None and force_latent_upscaler != 'None'): - self.sampler_name = force_latent_upscaler or shared.opts.fallback_sampler # PLMS does not support img2img, use fallback instead + if self.sampler_name in ['PLMS']: + self.sampler_name = force_latent_upscaler if force_latent_upscaler != 'None' else shared.opts.fallback_sampler # PLMS does not support img2img, use fallback instead self.sampler = sd_samplers.create_sampler(self.sampler_name, self.sd_model) crop_region = None image_mask = self.image_mask From 9a3a56dbb2ef14005df9047d95cfe437ee652ed2 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 25 May 2023 13:40:48 -0400 Subject: [PATCH 218/282] fix ipex device --- modules/sd_models.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/modules/sd_models.py b/modules/sd_models.py index 287ce5a73..c9f518256 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -467,8 +467,6 @@ def reload_model_weights(sd_model=None, info=None): return if shared.cmd_opts.lowvram or shared.cmd_opts.medvram: lowvram.send_everything_to_cpu() - elif shared.cmd_opts.use_ipex: - sd_model.to("cpu") else: sd_model.to(devices.cpu) sd_hijack.model_hijack.undo_hijack(sd_model) @@ -505,10 +503,7 @@ def reload_model_weights(sd_model=None, info=None): def unload_model_weights(sd_model=None, _info=None): from modules import sd_hijack if model_data.sd_model: - if shared.cmd_opts.use_ipex: - model_data.sd_model.to("cpu") - else: - model_data.sd_model.to(devices.cpu) + model_data.sd_model.to(devices.cpu) sd_hijack.model_hijack.undo_hijack(model_data.sd_model) model_data.sd_model = None sd_model = None From 1e07e871fb0354fe9ab6096d1d679300332d180b Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 25 May 2023 13:59:57 -0400 Subject: [PATCH 219/282] add get version method --- modules/shared.py | 25 +++++++++++++++++++++++++ webui.py | 2 ++ 2 files changed, 27 insertions(+) diff --git a/modules/shared.py b/modules/shared.py index 67e7f4f9d..a24fb3631 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -771,6 +771,31 @@ def html(filename): return file.read() return "" + +def get_version(): + version = None + if version is None: + try: + import subprocess + res = subprocess.run('git log --pretty=format:"%h %ad" -1 --date=short', stdout = subprocess.PIPE, stderr = subprocess.PIPE, shell=True, check=True) + ver = res.stdout.decode(encoding = 'utf8', errors='ignore') if len(res.stdout) > 0 else '' + githash, updated = ver.split(' ') + res = subprocess.run('git remote get-url origin', stdout = subprocess.PIPE, stderr = subprocess.PIPE, shell=True, check=True) + origin = res.stdout.decode(encoding = 'utf8', errors='ignore') if len(res.stdout) > 0 else '' + res = subprocess.run('git branch --show-current', stdout = subprocess.PIPE, stderr = subprocess.PIPE, shell=True, check=True) + branch = res.stdout.decode(encoding = 'utf8', errors='ignore') if len(res.stdout) > 0 else '' + version = { + 'app': 'sd.next', + 'updated': updated, + 'hash': githash, + 'url': origin.replace('\n', '') + '/tree/' + branch.replace('\n', '') + } + except: + version = { 'app': 'sd.next' } + pass + return version + + class Shared(sys.modules[__name__].__class__): # this class is here to provide sd_model field as a property, so that it can be created and loaded on demand rather than at program startup. sd_model_val = None diff --git a/webui.py b/webui.py index 67d2846a0..dee75fa4e 100644 --- a/webui.py +++ b/webui.py @@ -197,6 +197,8 @@ def async_policy(): def start_common(): log.debug('Entering start sequence') + if cmd_opts.debug and hasattr(shared, 'get_version'): + log.debug(f'Version: {shared.get_version()}') logging.disable(logging.NOTSET if cmd_opts.debug else logging.DEBUG) if shared.cmd_opts.data_dir is not None or len(shared.cmd_opts.data_dir) > 0: log.info(f'Using data path: {shared.cmd_opts.data_dir}') From ab6874578798ca9d78056173664c425f4ae71fe0 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 25 May 2023 14:00:53 -0400 Subject: [PATCH 220/282] update --- extensions-builtin/sd-extension-system-info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions-builtin/sd-extension-system-info b/extensions-builtin/sd-extension-system-info index 01564b77c..4915b9857 160000 --- a/extensions-builtin/sd-extension-system-info +++ b/extensions-builtin/sd-extension-system-info @@ -1 +1 @@ -Subproject commit 01564b77c3b6277ec544072f43af766b85351a99 +Subproject commit 4915b98576426f3fa77eec7b51965260736a5060 From f9a71a1afe0ad5ea6b09261041890d0e68d4720d Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 25 May 2023 14:38:34 -0400 Subject: [PATCH 221/282] update todo --- TODO.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/TODO.md b/TODO.md index c4a3b4378..dff1f03a4 100644 --- a/TODO.md +++ b/TODO.md @@ -9,13 +9,9 @@ Stuff to be fixed... Stuff to be added... -- Update `README.md` - Update `Wiki` -- Add `Gradio` theme maker - Create new `GitHub` hooks/actions for CI/CD -- Monitor file changes for misbehaving extensions - Reload browser on server restart -- Remove origin wiki - Import core repos - Improve core `Stability-AI` code: - Improve core `k-Diffusion` code From e04867997e8903b9f44b75d073ef0be8c3159c12 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Fri, 26 May 2023 00:13:56 +0300 Subject: [PATCH 222/282] Use ipexrun when using --use-ipex --- webui.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/webui.sh b/webui.sh index ff9c58b4d..2119e4890 100755 --- a/webui.sh +++ b/webui.sh @@ -81,10 +81,20 @@ else exit 1 fi +if [[ "$@" == *"--use-ipex"* ]] +then + echo "Setting OneAPI enviroment" + source /opt/intel/oneapi/setvars.sh +fi + if [[ ! -z "${ACCELERATE}" ]] && [ ${ACCELERATE}="True" ] && [ -x "$(command -v accelerate)" ] then echo "Accelerating launch.py..." exec accelerate launch --num_cpu_threads_per_process=6 launch.py "$@" +elif [[ -z "${first_launch}" ]] && [ -x "$(command -v ipexrun)" ] && [[ "$@" == *"--use-ipex"* ]] +then + echo "Ipexrun'ning launch.py..." + exec ipexrun launch.py "$@" else echo "Launching launch.py..." exec "${python_cmd}" launch.py "$@" From 46d7d2f01bd7e565eb5c8f72e0733f9e9d5814f7 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Fri, 26 May 2023 23:12:00 +0300 Subject: [PATCH 223/282] Check numactl before using ipexrun --- webui.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webui.sh b/webui.sh index 2119e4890..d35908cca 100755 --- a/webui.sh +++ b/webui.sh @@ -91,7 +91,7 @@ if [[ ! -z "${ACCELERATE}" ]] && [ ${ACCELERATE}="True" ] && [ -x "$(command -v then echo "Accelerating launch.py..." exec accelerate launch --num_cpu_threads_per_process=6 launch.py "$@" -elif [[ -z "${first_launch}" ]] && [ -x "$(command -v ipexrun)" ] && [[ "$@" == *"--use-ipex"* ]] +elif [[ -z "${first_launch}" ]] && [ -x "$(command -v ipexrun)" ] && [ -x "$(command -v numactl)" ] && [[ "$@" == *"--use-ipex"* ]] then echo "Ipexrun'ning launch.py..." exec ipexrun launch.py "$@" From 8022de74640ab62c27edefca0dd9875d041f36a3 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Fri, 26 May 2023 23:43:37 +0300 Subject: [PATCH 224/282] Fix AVX512 error when using low or med vram with ipex --- modules/sd_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sd_models.py b/modules/sd_models.py index c9f518256..cc460fb52 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -434,7 +434,7 @@ def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None) sd_hijack.model_hijack.hijack(sd_model) timer.record("hijack") sd_model.eval() - if shared.cmd_opts.use_ipex: + if shared.cmd_opts.use_ipex and not (shared.cmd_opts.lowvram or shared.cmd_opts.medvram): sd_model = torch.xpu.optimize(sd_model, dtype=devices.dtype) shared.log.info("Applied IPEX Optimize") model_data.sd_model = sd_model From efd38108602fae27e45b6b15e663ea75d58a1e2e Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 26 May 2023 22:41:59 -0400 Subject: [PATCH 225/282] diffusers merge --- .../multidiffusion-upscaler-for-automatic1111 | 2 +- extensions-builtin/sd-webui-controlnet | 2 +- .../stable-diffusion-webui-images-browser | 2 +- javascript/ui.js | 18 +++ modules/call_queue.py | 5 +- modules/errors.py | 2 +- modules/images.py | 19 ++- modules/img2img.py | 3 + modules/modelloader.py | 65 ++++---- modules/processing.py | 140 +++++++++++------- modules/script_loading.py | 12 +- modules/sd_hijack_clip.py | 1 - modules/sd_models.py | 58 +++++++- modules/sd_samplers.py | 27 +++- modules/sd_samplers_diffusors.py | 45 ++++++ modules/sd_samplers_kdiffusion.py | 2 +- modules/shared.py | 41 ++--- .../textual_inversion/textual_inversion.py | 2 + modules/ui.py | 24 +-- scripts/postprocessing_upscale.py | 22 ++- webui.py | 12 -- 21 files changed, 336 insertions(+), 168 deletions(-) create mode 100644 modules/sd_samplers_diffusors.py diff --git a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 index 50f5f8894..2473d6b00 160000 --- a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 +++ b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 @@ -1 +1 @@ -Subproject commit 50f5f88944427a1f7e1321917790dbd9a5ddbed8 +Subproject commit 2473d6b005a516fb4bd51b331abd04b0289fdf07 diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index a83a26060..0d1c252ca 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit a83a260605fe3da01bc15993c6a7f7d1aa82865d +Subproject commit 0d1c252cad9c37a75e839d52f9ea8207adb8aa46 diff --git a/extensions-builtin/stable-diffusion-webui-images-browser b/extensions-builtin/stable-diffusion-webui-images-browser index 7da8aec62..c61fae964 160000 --- a/extensions-builtin/stable-diffusion-webui-images-browser +++ b/extensions-builtin/stable-diffusion-webui-images-browser @@ -1 +1 @@ -Subproject commit 7da8aec62bc263acd47d76ec9cabdb658b01fc91 +Subproject commit c61fae964ac94bc369fd0e346805e3e2885c69b4 diff --git a/javascript/ui.js b/javascript/ui.js index 7035f7497..9313c75c6 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -1,6 +1,7 @@ /* global gradioApp, onUiUpdate, opts */ window.opts = {}; +window.localization = {}; let tabSelected = ''; function set_theme(theme) { @@ -192,6 +193,22 @@ function recalculate_prompts_inpaint(...args) { return args_to_array(args); } +function register_drag_drop() { + const qs = gradioApp().getElementById('quicksettings'); + if (!qs) return; + qs.addEventListener('dragover', (evt) => { + evt.preventDefault(); + evt.dataTransfer.dropEffect = 'copy'; + }); + qs.addEventListener('drop', (evt) => { + evt.preventDefault(); + evt.dataTransfer.dropEffect = 'copy'; + for (const f of evt.dataTransfer.files) { + console.log('QuickSettingsDrop', f); + } + }); +} + onUiUpdate(() => { sort_ui_elements(); if (Object.keys(opts).length !== 0) return; @@ -202,6 +219,7 @@ onUiUpdate(() => { const jsdata = textarea.value; opts = JSON.parse(jsdata); executeCallbacks(optionsChangedCallbacks); + register_drag_drop(); Object.defineProperty(textarea, 'value', { set(newValue) { diff --git a/modules/call_queue.py b/modules/call_queue.py index 3cfe3c50d..0de523f66 100644 --- a/modules/call_queue.py +++ b/modules/call_queue.py @@ -65,10 +65,7 @@ def wrap_gradio_call(func, extra_outputs=None, add_stats=False): if shared.cmd_opts.profile: pr.disable() s = io.StringIO() - ps = pstats.Stats(pr, stream=s) - ps.sort_stats(pstats.SortKey.CUMULATIVE) - # ps.strip_dirs() - ps.print_stats(15) + pstats.Stats(pr, stream=s).sort_stats(pstats.SortKey.CUMULATIVE).print_stats(15) print('Profile Exec:', s.getvalue()) except Exception as e: errors.display(e, 'gradio call') diff --git a/modules/errors.py b/modules/errors.py index 6b1efabc7..067cccdb7 100644 --- a/modules/errors.py +++ b/modules/errors.py @@ -34,7 +34,7 @@ def print_error_explanation(message): def display(e: Exception, task, suppress=[]): log.error(f"{task or 'error'}: {type(e).__name__}") - console.print_exception(show_locals=False, max_frames=2, extra_lines=1, suppress=suppress, theme="ansi_dark", word_wrap=False, width=min([console.width, 200])) + console.print_exception(show_locals=False, max_frames=5, extra_lines=1, suppress=suppress, theme="ansi_dark", word_wrap=False, width=min([console.width, 200])) def display_once(e: Exception, task): diff --git a/modules/images.py b/modules/images.py index 3065205bb..40c369652 100644 --- a/modules/images.py +++ b/modules/images.py @@ -642,18 +642,27 @@ Steps: {json_info["steps"]}, Sampler: {sampler}, CFG scale: {json_info["scale"]} def image_data(data): import gradio as gr + if data is None: + return gr.update(), None + err1 = None + err2 = None try: image = Image.open(io.BytesIO(data)) + errors.log.debug(f'Decoded object: image={image}') textinfo, _ = read_info_from_image(image) return textinfo, None - except Exception: - pass + except Exception as e: + err1 = e try: + if len(data) > 1024 * 10: + errors.log.warning(f'Error decoding object: data too long: {len(data)}') + return gr.update(), None text = data.decode('utf8') - assert len(text) < 10000 + errors.log.debug(f'Decoded object: size={len(text)}') return text, None - except Exception: - pass + except Exception as e: + err2 = e + errors.log.error(f'Error decoding object: {err1 or err2}') return gr.update(), None diff --git a/modules/img2img.py b/modules/img2img.py index 9433fd899..9a6370760 100644 --- a/modules/img2img.py +++ b/modules/img2img.py @@ -70,6 +70,9 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s if shared.sd_model is None: shared.log.warning('Model not loaded') return + if init_img is None: + shared.log.warning('Init image not set') + return shared.log.debug(f'img2img: id_task={id_task}|mode={mode}|prompt={prompt}|negative_prompt={negative_prompt}|prompt_styles={prompt_styles}|init_img={init_img}|sketch={sketch}|init_img_with_mask={init_img_with_mask}|inpaint_color_sketch={inpaint_color_sketch}|inpaint_color_sketch_orig={inpaint_color_sketch_orig}|init_img_inpaint={init_img_inpaint}|init_mask_inpaint={init_mask_inpaint}|steps={steps}|sampler_index={sampler_index}|mask_blur={mask_blur}|mask_alpha={mask_alpha}|inpainting_fill={inpainting_fill}|restore_faces={restore_faces}|tiling={tiling}|n_iter={n_iter}|batch_size={batch_size}|cfg_scale={cfg_scale}|image_cfg_scale={image_cfg_scale}|clip_skip={clip_skip}|denoising_strength={denoising_strength}|seed={seed}|subseed{subseed}|subseed_strength={subseed_strength}|seed_resize_from_h={seed_resize_from_h}|seed_resize_from_w={seed_resize_from_w}|seed_enable_extras={seed_enable_extras}|selected_scale_tab={selected_scale_tab}|height={height}|width={width}|scale_by={scale_by}|resize_mode={resize_mode}|inpaint_full_res={inpaint_full_res}|inpaint_full_res_padding={inpaint_full_res_padding}|inpainting_mask_invert={inpainting_mask_invert}|img2img_batch_input_dir={img2img_batch_input_dir}|img2img_batch_output_dir={img2img_batch_output_dir}|img2img_batch_inpaint_mask_dir={img2img_batch_inpaint_mask_dir}|override_settings_texts={override_settings_texts}|args={args}') if sampler_index is None: diff --git a/modules/modelloader.py b/modules/modelloader.py index 09a3a3f3e..fc8dc7ab4 100644 --- a/modules/modelloader.py +++ b/modules/modelloader.py @@ -8,7 +8,7 @@ from modules.upscaler import Upscaler, UpscalerLanczos, UpscalerNearest, Upscale from modules.paths import script_path, models_path -def load_models(model_path: str, model_url: str = None, command_path: str = None, ext_filter=None, download_name=None, ext_blacklist=None) -> list: +def load_models(model_path: str, model_url: str = None, command_path: str = None, ext_filter=None, download_name=None, ext_blacklist=None, diffusors=False) -> list: """ A one-and done loader to try finding the desired models in specified directories. @@ -19,32 +19,45 @@ def load_models(model_path: str, model_url: str = None, command_path: str = None @param ext_filter: An optional list of filename extensions to filter by @return: A list of paths containing the desired model(s) """ - output = [] - try: - places = [] - places.append(model_path) - if command_path is not None and command_path != model_path and os.path.isdir(command_path): - places.append(command_path) - for place in places: - for full_path in shared.walk_files(place, allowed_extensions=ext_filter): - if os.path.islink(full_path) and not os.path.exists(full_path): - print(f"Skipping broken symlink: {full_path}") - continue - if ext_blacklist is not None and any([full_path.endswith(x) for x in ext_blacklist]): - continue - if full_path not in output: - output.append(full_path) - if model_url is not None and len(output) == 0: - if download_name is not None: - from basicsr.utils.download_util import load_file_from_url - dl = load_file_from_url(model_url, model_path, True, download_name) - output.append(dl) - else: - output.append(model_url) - except Exception: - pass + places = [] + places.append(model_path) + if command_path is not None and command_path != model_path and os.path.isdir(command_path): + places.append(command_path) - return output + def get_checkpoints(): + output = [] + try: + for place in places: + for full_path in shared.walk_files(place, allowed_extensions=ext_filter): + if os.path.islink(full_path) and not os.path.exists(full_path): + print(f"Skipping broken symlink: {full_path}") + continue + if ext_blacklist is not None and any([full_path.endswith(x) for x in ext_blacklist]): + continue + if full_path not in output: + output.append(full_path) + if model_url is not None and len(output) == 0: + if download_name is not None: + from basicsr.utils.download_util import load_file_from_url + dl = load_file_from_url(model_url, model_path, True, download_name) + output.append(dl) + else: + output.append(model_url) + except Exception: + pass + return output + + def get_diffusors(): + output = [] + for place in places: + output = os.listdir(place) + output = [os.path.join(place, x) for x in output] + return output + + if not diffusors: + return get_checkpoints() + else: + return get_diffusors() def friendly_name(file: str): diff --git a/modules/processing.py b/modules/processing.py index 7ba5f6f20..f46eb65fe 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -3,11 +3,13 @@ import math import os import hashlib import random +from contextlib import nullcontext from typing import Any, Dict, List import torch import numpy as np from PIL import Image, ImageFilter, ImageOps import cv2 +import tomesd from skimage import exposure from ldm.data.util import AddMiDaS from ldm.models.diffusion.ddpm import LatentDepth2ImageDiffusion @@ -25,7 +27,7 @@ import modules.images as images import modules.styles import modules.sd_models as sd_models import modules.sd_vae as sd_vae -import tomesd # pylint: disable=wrong-import-order + opt_C = 4 opt_f = 8 @@ -218,6 +220,8 @@ class StableDiffusionProcessing: source_image = devices.cond_cast_float(source_image) # HACK: Using introspection as the Depth2Image model doesn't appear to uniquely # identify itself with a field common to all models. The conditioning_key is also hybrid. + if opts.sd_backend == 'Diffusers': # TODO: img2img_image_conditioning + return latent_image.new_zeros(latent_image.shape[0], 5, 1, 1) if isinstance(self.sd_model, LatentDepth2ImageDiffusion): return self.depth2img_image_conditioning(source_image) if self.sd_model.cond_stage_key == "edit": @@ -456,9 +460,19 @@ def create_infotext(p: StableDiffusionProcessing, all_prompts, all_seeds, all_su return f"{all_prompts[index]}{negative_prompt_text}\n{generation_params_text}".strip() +def print_profile(profile, msg: str): + try: + from rich import print # pylint: disable=redefined-builtin + except: + pass + lines = profile.key_averages().table(sort_by="cuda_time_total", row_limit=20) + lines = lines.split('\n') + lines = [l for l in lines if '/profiler' not in l] + print(f'Profile {msg}:', '\n'.join(lines)) + + def process_images(p: StableDiffusionProcessing) -> Processed: stored_opts = {k: opts.data[k] for k in p.override_settings.keys()} - try: # if no checkpoint override or the override checkpoint can't be found, remove override entry and load opts checkpoint if p.override_settings.get('sd_model_checkpoint', None) is not None and sd_models.checkpoint_aliases.get(p.override_settings.get('sd_model_checkpoint')) is None: @@ -471,28 +485,24 @@ def process_images(p: StableDiffusionProcessing) -> Processed: if k == 'sd_vae': sd_vae.reload_vae_weights() - """ - import torch.profiler - with torch.profiler.profile(activities=[torch.profiler.ProfilerActivity.CPU, torch.profiler.ProfilerActivity.CUDA], record_shapes=True, with_modules=True) as prof: - with torch.profiler.record_function("process_images"): - res = process_images_inner(p) - print(prof.key_averages().table(sort_by="cuda_time_total", row_limit=15)) - """ - if (opts.token_merging or cmd_opts.token_merging) and not opts.token_merging_hr_only: sd_models.apply_token_merging(sd_model=p.sd_model, hr=False) log.debug('Token merging applied') - res = process_images_inner(p) - + if cmd_opts.profile: + import torch.profiler # pylint: disable=redefined-outer-name + # activities=[torch.profiler.ProfilerActivity.CPU, torch.profiler.ProfilerActivity.CUDA] + with torch.profiler.profile(profile_memory=True, with_modules=True) as prof: + with torch.profiler.record_function("process_images"): + res = process_images_inner(p) + print_profile(prof, 'process_images') + else: + res = process_images_inner(p) finally: - # undo model optimizations made by tomesd if opts.token_merging or cmd_opts.token_merging: tomesd.remove_patch(p.sd_model) log.debug('Token merging model optimizations removed') - - # restore opts to original state - if p.override_settings_restore_afterwards: + if p.override_settings_restore_afterwards: # restore opts to original state for k, v in stored_opts.items(): setattr(opts, k, v) if k == 'sd_model_checkpoint': @@ -500,7 +510,6 @@ def process_images(p: StableDiffusionProcessing) -> Processed: if k == 'sd_vae': sd_vae.reload_vae_weights() - return res @@ -513,8 +522,9 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: assert p.prompt is not None seed = get_fixed_seed(p.seed) subseed = get_fixed_seed(p.subseed) - modules.sd_hijack.model_hijack.apply_circular(p.tiling) - modules.sd_hijack.model_hijack.clear_comments() + if opts.sd_backend == 'Original': + modules.sd_hijack.model_hijack.apply_circular(p.tiling) + modules.sd_hijack.model_hijack.clear_comments() comments = {} if type(p.prompt) == list: p.all_prompts = [shared.prompt_styles.apply_styles_to_prompt(x, p.styles) for x in p.prompt] @@ -563,10 +573,11 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: cache[0] = (required_prompts, steps) return cache[1] - with torch.no_grad(), p.sd_model.ema_scope(): + ema_scope_context = p.sd_model.ema_scope if opts.sd_backend == 'Original' else nullcontext + with torch.no_grad(), ema_scope_context(): with devices.autocast(): p.init(p.all_prompts, p.all_seeds, p.all_subseeds) - if shared.opts.live_previews_enable and opts.show_progress_type == "Approx NN": + if shared.opts.live_previews_enable and opts.show_progress_type == "Approx NN" and opts.sd_backend == 'Original': sd_vae_approx.model() if state.job_count == -1: state.job_count = p.n_iter @@ -604,42 +615,67 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: step_multiplier = 2 if sd_samplers.all_samplers_map.get(p.sampler_name).aliases[0] in ['k_dpmpp_2s_a', 'k_dpmpp_2s_a_ka', 'k_dpmpp_sde', 'k_dpmpp_sde_ka', 'k_dpm_2', 'k_dpm_2_a', 'k_heun'] else 1 except: pass - uc = get_conds_with_caching(prompt_parser.get_learned_conditioning, negative_prompts, p.steps * step_multiplier, cached_uc) - c = get_conds_with_caching(prompt_parser.get_multicond_learned_conditioning, prompts, p.steps * step_multiplier, cached_c) - if len(model_hijack.comments) > 0: - for comment in model_hijack.comments: - comments[comment] = 1 if p.n_iter > 1: shared.state.job = f"Batch {n+1} out of {p.n_iter}" - with devices.without_autocast() if devices.unet_needs_upcast else devices.autocast(): - samples_ddim = p.sample(conditioning=c, unconditional_conditioning=uc, seeds=seeds, subseeds=subseeds, subseed_strength=p.subseed_strength, prompts=prompts) - x_samples_ddim = [decode_first_stage(p.sd_model, samples_ddim[i:i+1].to(dtype=devices.dtype_vae))[0].cpu() for i in range(samples_ddim.size(0))] - try: - for x in x_samples_ddim: - devices.test_for_nans(x, "vae") - except devices.NansException as e: - if not shared.opts.no_half and not shared.opts.no_half_vae and shared.cmd_opts.rollback_vae: - log.warning('Tensor with all NaNs was produced in VAE') - devices.dtype_vae = torch.bfloat16 - vae_file, vae_source = sd_vae.resolve_vae(p.sd_model.sd_model_checkpoint) - sd_vae.load_vae(p.sd_model, vae_file, vae_source) - x_samples_ddim = [decode_first_stage(p.sd_model, samples_ddim[i:i+1].to(dtype=devices.dtype_vae))[0].cpu() for i in range(samples_ddim.size(0))] + + if opts.sd_backend == 'Original': + uc = get_conds_with_caching(prompt_parser.get_learned_conditioning, negative_prompts, p.steps * step_multiplier, cached_uc) + c = get_conds_with_caching(prompt_parser.get_multicond_learned_conditioning, prompts, p.steps * step_multiplier, cached_c) + if len(model_hijack.comments) > 0: + for comment in model_hijack.comments: + comments[comment] = 1 + with devices.without_autocast() if devices.unet_needs_upcast else devices.autocast(): + samples_ddim = p.sample(conditioning=c, unconditional_conditioning=uc, seeds=seeds, subseeds=subseeds, subseed_strength=p.subseed_strength, prompts=prompts) + x_samples_ddim = [decode_first_stage(p.sd_model, samples_ddim[i:i+1].to(dtype=devices.dtype_vae))[0].cpu() for i in range(samples_ddim.size(0))] + try: for x in x_samples_ddim: devices.test_for_nans(x, "vae") - else: - raise e - x_samples_ddim = torch.stack(x_samples_ddim).float() - x_samples_ddim = torch.clamp((x_samples_ddim + 1.0) / 2.0, min=0.0, max=1.0) - del samples_ddim - if shared.cmd_opts.lowvram or shared.cmd_opts.medvram: - lowvram.send_everything_to_cpu() - devices.torch_gc() - if p.scripts is not None: - p.scripts.postprocess_batch(p, x_samples_ddim, batch_number=n) + except devices.NansException as e: + if not shared.opts.no_half and not shared.opts.no_half_vae and shared.cmd_opts.rollback_vae: + log.warning('Tensor with all NaNs was produced in VAE') + devices.dtype_vae = torch.bfloat16 + vae_file, vae_source = sd_vae.resolve_vae(p.sd_model.sd_model_checkpoint) + sd_vae.load_vae(p.sd_model, vae_file, vae_source) + x_samples_ddim = [decode_first_stage(p.sd_model, samples_ddim[i:i+1].to(dtype=devices.dtype_vae))[0].cpu() for i in range(samples_ddim.size(0))] + for x in x_samples_ddim: + devices.test_for_nans(x, "vae") + else: + raise e + x_samples_ddim = torch.stack(x_samples_ddim).float() + x_samples_ddim = torch.clamp((x_samples_ddim + 1.0) / 2.0, min=0.0, max=1.0) + del samples_ddim + if shared.cmd_opts.lowvram or shared.cmd_opts.medvram: + lowvram.send_everything_to_cpu() + devices.torch_gc() + if p.scripts is not None: + p.scripts.postprocess_batch(p, x_samples_ddim, batch_number=n) + else: # TODO Diffusers + generator = [torch.Generator(device="cpu").manual_seed(s) for s in seeds] + if shared.sd_model.scheduler.name != p.sampler_name: + sampler = sd_samplers.all_samplers_map.get(p.sampler_name, None) + if sampler is None: + sampler = sd_samplers.all_samplers_map.get("UniPC") + scheduler = sampler.constructor(shared.sd_model.sd_checkpoint_info.filename) + shared.sd_model.scheduler = scheduler.sampler + output = shared.sd_model( + prompt=prompts, + negative_prompt=negative_prompts, + num_inference_steps=p.steps, + guidance_scale=p.cfg_scale, + height=p.height, + width=p.width, + generator=generator, + output_type="np", + ) + x_samples_ddim = output.images + for i, x_sample in enumerate(x_samples_ddim): p.batch_index = i - x_sample = 255. * np.moveaxis(x_sample.cpu().numpy(), 0, 2) - x_sample = x_sample.astype(np.uint8) + if opts.sd_backend == 'Original': + x_sample = 255. * np.moveaxis(x_sample.cpu().numpy(), 0, 2) + x_sample = x_sample.astype(np.uint8) + else: + x_sample = (255. * x_sample).astype(np.uint8) if p.restore_faces: if opts.save and not p.do_not_save_samples and opts.save_images_before_face_restoration: orig = p.restore_faces @@ -891,7 +927,7 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing): self.init_images = init_images self.resize_mode: int = resize_mode self.denoising_strength: float = denoising_strength - self.image_cfg_scale: float = image_cfg_scale if shared.sd_model.cond_stage_key == "edit" else None + self.image_cfg_scale: float = image_cfg_scale if (shared.sd_model is not None) and hasattr(shared.sd_model, 'cond_stage_key') and (shared.sd_model.cond_stage_key == "edit") else None self.init_latent = None self.image_mask = mask self.latent_mask = None diff --git a/modules/script_loading.py b/modules/script_loading.py index 2bc9b6fda..6827515fc 100644 --- a/modules/script_loading.py +++ b/modules/script_loading.py @@ -12,10 +12,7 @@ def load_module(path, detailed=False): try: module_spec.loader.exec_module(module) except Exception as e: - if detailed: - errors.display(e, f'Module load: {path}') - else: - errors.log.error(f'Module load: {path}') + errors.display(e, f'Module load: {path}') return module @@ -31,11 +28,8 @@ def preload_extensions(extensions_dir, parser, detailed=False): if not os.path.isfile(preload_script): continue try: - module = load_module(preload_script) + module = load_module(preload_script, detailed) if hasattr(module, 'preload'): module.preload(parser) except Exception as e: - if detailed: - errors.display(e, f'Extension preload: {preload_script}') - else: - errors.log.error(f'Extension preload: {preload_script}') + errors.display(e, f'Extension preload: {preload_script}') diff --git a/modules/sd_hijack_clip.py b/modules/sd_hijack_clip.py index 4d79cd3fa..aa38c3f77 100644 --- a/modules/sd_hijack_clip.py +++ b/modules/sd_hijack_clip.py @@ -136,7 +136,6 @@ class FrozenCLIPEmbedderWithCustomWordsBase(torch.nn.Module): position += embedding_length_in_tokens if len(chunk.tokens) > 0 or len(chunks) == 0: next_chunk(is_last=True) - # print('CHUNKS', [vars(c) for c in chunks]) # TODO return chunks, token_count def process_texts(self, texts): diff --git a/modules/sd_models.py b/modules/sd_models.py index cc460fb52..bfbb7eb82 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -27,7 +27,7 @@ checkpoints_loaded = collections.OrderedDict() skip_next_load = False -class CheckpointInfo: +class CheckpointInfo: # TODO Diffusers def __init__(self, filename): self.filename = filename abspath = os.path.abspath(filename) @@ -42,8 +42,13 @@ class CheckpointInfo: self.name = name self.name_for_extra = os.path.splitext(os.path.basename(filename))[0] self.model_name = os.path.splitext(name.replace("/", "_").replace("\\", "_"))[0] - self.hash = model_hash(filename) - self.sha256 = hashes.sha256_from_cache(self.filename, f"checkpoint/{name}") + if shared.opts.sd_backend == 'Original': + self.hash = model_hash(self.filename) + self.sha256 = hashes.sha256_from_cache(self.filename, f"checkpoint/{name}") + else: # TODO Diffusers calculate hash + # sd_model.unet.config._name_or_path.split("/")[-2] + self.hash = 'ABCDEFGH' + self.sha256 = 'ABCDEFGH' self.shorthash = self.sha256[0:10] if self.sha256 else None self.title = name if self.shorthash is None else f'{name} [{self.shorthash}]' self.ids = [self.hash, self.model_name, self.title, name, f'{name} [{self.hash}]'] + ([self.shorthash, self.sha256, f'{self.name} [{self.shorthash}]'] if self.shorthash else []) @@ -99,9 +104,12 @@ def checkpoint_tiles(): def list_models(): checkpoints_list.clear() checkpoint_aliases.clear() - model_list = modelloader.load_models(model_path=os.path.join(models_path, 'Stable-diffusion'), model_url=None, command_path=shared.opts.ckpt_dir, ext_filter=[".ckpt", ".safetensors"], download_name=None, ext_blacklist=[".vae.ckpt", ".vae.safetensors"]) + if shared.opts.sd_backend == 'Original': + model_list = modelloader.load_models(model_path=os.path.join(models_path, 'Stable-diffusion'), model_url=None, command_path=shared.opts.ckpt_dir, ext_filter=[".ckpt", ".safetensors"], download_name=None, ext_blacklist=[".vae.ckpt", ".vae.safetensors"]) + else: + model_list = modelloader.load_models(model_path=os.path.join(models_path, 'Diffusers'), model_url=None, command_path=shared.opts.diffusers_dir, ext_filter=[".ckpt", ".safetensors"], download_name=None, ext_blacklist=[".vae.ckpt", ".vae.safetensors"]) if shared.cmd_opts.ckpt is not None: - if not os.path.exists(shared.cmd_opts.ckpt): + if not os.path.exists(shared.cmd_opts.ckpt) and shared.opts.sd_backend == 'Original': if shared.cmd_opts.ckpt.lower() != "none": shared.log.warning(f"Requested checkpoint not found: {shared.cmd_opts.ckpt}") else: @@ -363,7 +371,12 @@ class SdModelData: if self.sd_model is None: with self.lock: try: - load_model() + if shared.opts.sd_backend == 'Original': + load_model() + elif shared.opts.sd_backend == 'Diffusers': + load_diffusers() + else: + shared.log.error(f"Unknown Stable Diffusion backend: {shared.opts.sd_backend}") except Exception as e: shared.log.error("Failed to load stable diffusion model") errors.display(e, "loading stable diffusion model") @@ -377,6 +390,39 @@ class SdModelData: model_data = SdModelData() +def load_diffusers(checkpoint_info=None, already_loaded_state_dict=None, timer=None): + if timer is None: + timer = Timer() + import diffusers + timer.record("diffusers") + diffusor_config = { + "force_download": False, + "safety_checker": None, + "resume_download": True, + "low_cpu_mem_usage": True, + "use_safetensors": True, + "cache_dir": shared.opts.diffusers_dir, + "torch_dtype": devices.dtype, + } + shared.log.warning("Using experimental Diffusers backend for Stable Diffusion") + if shared.opts.data['sd_model_checkpoint'] == 'model.ckpt': + shared.opts.data['sd_model_checkpoint'] = "runwayml/stable-diffusion-v1-5" + sd_model = None + try: + checkpoint_info = checkpoint_info or select_checkpoint() + scheduler = diffusers.UniPCMultistepScheduler.from_pretrained(checkpoint_info.filename, subfolder="scheduler") + scheduler.name = 'UniPC' + sd_model = diffusers.DiffusionPipeline.from_pretrained(checkpoint_info.filename, scheduler=scheduler, **diffusor_config) + sd_model.to(devices.device) + sd_model.sd_checkpoint_info = checkpoint_info + sd_model.sd_model_hash = checkpoint_info.hash + except Exception as e: + shared.log.error("Failed to load diffusers model") + errors.display(e, "loading Diffusers model") + shared.sd_model = sd_model + timer.record("load") + + def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None): from modules import lowvram, sd_hijack checkpoint_info = checkpoint_info or select_checkpoint() diff --git a/modules/sd_samplers.py b/modules/sd_samplers.py index bc82371c8..2a13f5030 100644 --- a/modules/sd_samplers.py +++ b/modules/sd_samplers.py @@ -1,10 +1,16 @@ -from modules import sd_samplers_compvis, sd_samplers_kdiffusion, shared +from modules import sd_samplers_compvis, sd_samplers_kdiffusion, sd_samplers_diffusors, shared from modules.sd_samplers_common import samples_to_image_grid, sample_to_image # pylint: disable=unused-import +from modules.shared import opts -all_samplers = [ - *sd_samplers_kdiffusion.samplers_data_k_diffusion, - *sd_samplers_compvis.samplers_data_compvis, -] +if opts.sd_backend == 'Original': + all_samplers = [ + *sd_samplers_kdiffusion.samplers_data_k_diffusion, + *sd_samplers_compvis.samplers_data_compvis, + ] +else: + all_samplers = [ + *sd_samplers_diffusors.samplers_data_diffusors, + ] all_samplers_map = {x.name: x for x in all_samplers} samplers = all_samplers samplers_for_img2img = all_samplers @@ -17,9 +23,14 @@ def create_sampler(name, model): else: config = all_samplers[0] assert config is not None, f'bad sampler name: {name}' - sampler = config.constructor(model) - sampler.config = config - return sampler + if opts.sd_backend == 'Original': + sampler = config.constructor(model) + sampler.config = config + return sampler + else: + sampler = config.constructor(model.sd_checkpoint_info.filename) + model.scheduler = sampler.sampler + return sampler.sampler def set_samplers(): diff --git a/modules/sd_samplers_diffusors.py b/modules/sd_samplers_diffusors.py new file mode 100644 index 000000000..3d102dca4 --- /dev/null +++ b/modules/sd_samplers_diffusors.py @@ -0,0 +1,45 @@ +from diffusers import ( + DDIMScheduler, + DDPMScheduler, + DEISMultistepScheduler, + DPMSolverMultistepScheduler, + EulerAncestralDiscreteScheduler, + EulerDiscreteScheduler, + HeunDiscreteScheduler, + IPNDMScheduler, + KDPM2AncestralDiscreteScheduler, + PNDMScheduler, + UniPCMultistepScheduler, + # KarrasVeScheduler, + # RePaintScheduler, + # ScoreSdeVeScheduler, + # UnCLIPScheduler, + # VQDiffusionScheduler, +) +from modules import sd_samplers_common + # scheduler = diffusers.UniPCMultistepScheduler.from_pretrained(shared.cmd_opts.ckpt, subfolder="scheduler") + +samplers_data_diffusors = [ + sd_samplers_common.SamplerData('UniPC', lambda model: DiffusionSampler('UniPC', UniPCMultistepScheduler, model), [], {}), + sd_samplers_common.SamplerData('DDIM', lambda model: DiffusionSampler('DDIM', DDIMScheduler, model), [], {}), + sd_samplers_common.SamplerData('DDPMS', lambda model: DiffusionSampler('DDPMS', DDPMScheduler, model), [], {}), + sd_samplers_common.SamplerData('DEIS', lambda model: DiffusionSampler('DEIS', DEISMultistepScheduler, model), [], {}), + sd_samplers_common.SamplerData('DPMSolver', lambda model: DiffusionSampler('DPMSolver', DPMSolverMultistepScheduler, model), [], {}), + sd_samplers_common.SamplerData('Euler', lambda model: DiffusionSampler('Euler', EulerDiscreteScheduler, model), [], {}), + sd_samplers_common.SamplerData('EulerAncestral', lambda model: DiffusionSampler('EulerAncestral', EulerAncestralDiscreteScheduler, model), [], {}), + sd_samplers_common.SamplerData('Heun', lambda model: DiffusionSampler('Heun', HeunDiscreteScheduler, model), [], {}), + sd_samplers_common.SamplerData('IPNDM', lambda model: DiffusionSampler('IPNDM', IPNDMScheduler, model), [], {}), + sd_samplers_common.SamplerData('KDPM2Ancestral', lambda model: DiffusionSampler('KDPM2Ancestral', KDPM2AncestralDiscreteScheduler, model), [], {}), + sd_samplers_common.SamplerData('PNDMS', lambda model: DiffusionSampler('PNDMS', PNDMScheduler, model), [], {}), + # sd_samplers_common.SamplerData('KarrasVe', lambda model: DiffusionSampler('KarrasVe', KarrasVeScheduler, model), [], {}), + # sd_samplers_common.SamplerData('RePaint', lambda model: DiffusionSampler('RePaint', RePaintScheduler, model), [], {}), + # sd_samplers_common.SamplerData('ScoreSdeVe', lambda model: DiffusionSampler('ScoreSdeVe', ScoreSdeVeScheduler, model), [], {}), + # sd_samplers_common.SamplerData('UnCLIP', lambda model: DiffusionSampler('UnCLIP', UnCLIPScheduler, model), [], {}), + # sd_samplers_common.SamplerData('VQDiffusion', lambda model: DiffusionSampler('VQDiffusion', VQDiffusionScheduler, model), [], {}), +] + + +class DiffusionSampler: + def __init__(self, name, constructor, sd_model): + self.sampler = constructor.from_pretrained(sd_model, subfolder="scheduler") + self.sampler.name = name diff --git a/modules/sd_samplers_kdiffusion.py b/modules/sd_samplers_kdiffusion.py index 3dbc9498f..bb8ad4d06 100644 --- a/modules/sd_samplers_kdiffusion.py +++ b/modules/sd_samplers_kdiffusion.py @@ -82,7 +82,7 @@ class CFGDenoiser(torch.nn.Module): # at self.image_cfg_scale == 1.0 produced results for edit model are the same as with normal sampling, # so is_edit_model is set to False to support AND composition. - is_edit_model = shared.sd_model.cond_stage_key == "edit" and self.image_cfg_scale is not None and self.image_cfg_scale != 1.0 + is_edit_model = (shared.sd_model is not None) and hasattr(shared.sd_model, 'cond_stage_key') and (shared.sd_model.cond_stage_key == "edit") and (self.image_cfg_scale is not None) and (self.image_cfg_scale != 1.0) conds_list, tensor = prompt_parser.reconstruct_multicond_batch(cond, self.step) uncond = prompt_parser.reconstruct_cond_batch(uncond, self.step) diff --git a/modules/shared.py b/modules/shared.py index a24fb3631..40f7e6a8d 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -192,6 +192,7 @@ def list_checkpoint_tiles(): import modules.sd_models # pylint: disable=W0621 return modules.sd_models.checkpoint_tiles() + default_checkpoint = list_checkpoint_tiles()[0] if len(list_checkpoint_tiles()) > 0 else "model.ckpt" @@ -251,29 +252,24 @@ options_templates.update(options_section(('sd', "Stable Diffusion"), { "sd_vae": OptionInfo("Automatic", "Select VAE", gr.Dropdown, lambda: {"choices": shared_items.sd_vae_items()}, refresh=shared_items.refresh_vae_list), "stream_load": OptionInfo(False, "When loading models attempt stream loading optimized for slow or network storage"), "model_reuse_dict": OptionInfo(False, "When loading models attempt to reuse previous model dictionary"), - "inpainting_mask_weight": OptionInfo(1.0, "Inpainting conditioning mask strength", gr.Slider, {"minimum": 0.0, "maximum": 1.0, "step": 0.01}), - "initial_noise_multiplier": OptionInfo(1.0, "Noise multiplier for img2img", gr.Slider, {"minimum": 0.1, "maximum": 1.5, "step": 0.01}), - "img2img_color_correction": OptionInfo(False, "Apply color correction to img2img results to match original colors"), - "img2img_fix_steps": OptionInfo(False, "For image processing do exactly the amount of steps as specified"), - "img2img_background_color": OptionInfo("#ffffff", "With img2img fill image's transparent parts with this color", ui_components.FormColorPicker, {}), - "enable_quantization": OptionInfo(True, "Enable quantization in K samplers for sharper and cleaner results"), - "comma_padding_backtrack": OptionInfo(20, "Increase coherency by padding from the last comma within n tokens when using more than 75 tokens", gr.Slider, {"minimum": 0, "maximum": 74, "step": 1 }), - "CLIP_stop_at_last_layers": OptionInfo(1, "Clip skip", gr.Slider, {"minimum": 1, "maximum": 8, "step": 1, "visible": False}), - "upcast_attn": OptionInfo(False, "Upcast cross attention layer to FP32"), "cross_attention_optimization": OptionInfo(cross_attention_optimization_default, "Cross-attention optimization method", gr.Radio, lambda: {"choices": shared_items.list_crossattention() }), "cross_attention_options": OptionInfo([], "Cross-attention advanced options", gr.CheckboxGroup, lambda: {"choices": ['xFormers enable flash Attention', 'SDP disable memory attention']}), "sub_quad_q_chunk_size": OptionInfo(512, "Sub-quadratic cross-attention query chunk size for the layer optimization to use", gr.Slider, {"minimum": 16, "maximum": 8192, "step": 8}), "sub_quad_kv_chunk_size": OptionInfo(512, "Sub-quadratic cross-attentionkv chunk size for the sub-quadratic cross-attention layer optimization to use", gr.Slider, {"minimum": 0, "maximum": 8192, "step": 8}), "sub_quad_chunk_threshold": OptionInfo(80, "Sub-quadratic cross-attention percentage of VRAM chunking threshold", gr.Slider, {"minimum": 0, "maximum": 100, "step": 1}), - "always_batch_cond_uncond": OptionInfo(False, "Disables cond/uncond batching that is enabled to save memory with --medvram or --lowvram"), "prompt_attention": OptionInfo("Full parser", "Prompt attention parser", gr.Radio, lambda: {"choices": ["Full parser", "Compel parser", "A1111 parser", "Fixed attention"] }), "prompt_mean_norm": OptionInfo(True, "Prompt attention mean normalization"), + "always_batch_cond_uncond": OptionInfo(False, "Disables cond/uncond batching that is enabled to save memory with --medvram or --lowvram"), + "enable_quantization": OptionInfo(True, "Enable quantization in K samplers for sharper and cleaner results"), + "comma_padding_backtrack": OptionInfo(20, "Increase coherency by padding from the last comma within n tokens when using more than 75 tokens", gr.Slider, {"minimum": 0, "maximum": 74, "step": 1 }), + "sd_backend": OptionInfo("Original", "Stable Diffusion backend (experimental)", gr.Radio, lambda: {"choices": ["Original", "Diffusers"] }), })) options_templates.update(options_section(('system-paths', "System Paths"), { - "temp_dir": OptionInfo("", "Directory for temporary images; leave empty for default"), + "temp_dir": OptionInfo("", "Directory for temporary images; leave empty for default"), "clean_temp_dir_at_start": OptionInfo(True, "Cleanup non-default temporary directory when starting webui"), "ckpt_dir": OptionInfo(os.path.join(paths.models_path, 'Stable-diffusion'), "Path to directory with stable diffusion checkpoints"), + "diffusers_dir": OptionInfo(os.path.join(paths.models_path, 'Diffusers'), "Path to directory with stable diffusion diffusers"), "vae_dir": OptionInfo(os.path.join(paths.models_path, 'VAE'), "Path to directory with VAE files"), "embeddings_dir": OptionInfo(os.path.join(paths.models_path, 'embeddings'), "Embeddings directory for textual inversion"), "hypernetwork_dir": OptionInfo(os.path.join(paths.models_path, 'hypernetworks'), "Hypernetwork directory"), @@ -289,10 +285,9 @@ options_templates.update(options_section(('system-paths', "System Paths"), { "lora_dir": OptionInfo(os.path.join(paths.models_path, 'Lora'), "Path to directory with Lora network(s)"), "lyco_dir": OptionInfo(os.path.join(paths.models_path, 'LyCORIS'), "Path to directory with LyCORIS network(s)"), "styles_dir": OptionInfo(os.path.join(paths.data_path, 'styles.csv'), "Path to user-defined styles file"), - # "gfpgan_model": OptionInfo("", "GFPGAN model file name"), })) -options_templates.update(options_section(('saving-images', "Image options"), { +options_templates.update(options_section(('saving-images', "Image Options"), { "samples_save": OptionInfo(True, "Always save all generated images"), "samples_format": OptionInfo('jpg', 'File format for images'), "samples_filename_pattern": OptionInfo("[seed]-[prompt_spaces]", "Images filename pattern", component_args=hide_dirs), @@ -324,6 +319,16 @@ options_templates.update(options_section(('saving-images', "Image options"), { "directories_max_prompt_words": OptionInfo(8, "Max prompt words for [prompt_words] pattern", gr.Slider, {"minimum": 1, "maximum": 20, "step": 1, **hide_dirs}), })) +options_templates.update(options_section(('image-processing', "Image Processing"), { + "img2img_color_correction": OptionInfo(False, "Apply color correction to img2img results to match original colors"), + "img2img_fix_steps": OptionInfo(False, "For image processing do exactly the amount of steps as specified"), + "img2img_background_color": OptionInfo("#ffffff", "With img2img fill image's transparent parts with this color", ui_components.FormColorPicker, {}), + "inpainting_mask_weight": OptionInfo(1.0, "Inpainting conditioning mask strength", gr.Slider, {"minimum": 0.0, "maximum": 1.0, "step": 0.01}), + "initial_noise_multiplier": OptionInfo(1.0, "Noise multiplier for img2img", gr.Slider, {"minimum": 0.1, "maximum": 1.5, "step": 0.01}), + "CLIP_stop_at_last_layers": OptionInfo(1, "Clip skip", gr.Slider, {"minimum": 1, "maximum": 8, "step": 1, "visible": False}), +})) + + options_templates.update(options_section(('saving-paths', "Image Paths"), { "outdir_samples": OptionInfo("", "Output directory for images; if empty, defaults to three directories below", component_args=hide_dirs), "outdir_txt2img_samples": OptionInfo("outputs/text", 'Output directory for txt2img images', component_args=hide_dirs), @@ -342,11 +347,12 @@ options_templates.update(options_section(('cuda', "Compute Settings"), { "cuda_dtype": OptionInfo("FP32" if sys.platform == "darwin" else "FP16", "Device precision type", gr.Radio, lambda: {"choices": ["FP32", "FP16", "BF16"]}), "no_half": OptionInfo(False, "Use full precision for model (--no-half)", None, None, None), "no_half_vae": OptionInfo(False, "Use full precision for VAE (--no-half-vae)"), - "upcast_sampling": OptionInfo(True if sys.platform == "darwin" or cmd_opts.use_ipex else False, "Enable upcast sampling. Usually produces similar results to --no-half with better performance while using less memory"), - "disable_nan_check": OptionInfo(True, "Do not check if produced images/latent spaces have NaN values"), + "upcast_sampling": OptionInfo(True if sys.platform == "darwin" or cmd_opts.use_ipex else False, "Enable upcast sampling"), + "upcast_attn": OptionInfo(False, "Enable upcast cross attention layer"), + "disable_nan_check": OptionInfo(True, "Disable NaN check in produced images/latent spaces"), "rollback_vae": OptionInfo(False, "Attempt to roll back VAE when produced NaN values, requires NaN check (experimental)"), "opt_channelslast": OptionInfo(False, "Use channels last as torch memory format "), - "cudnn_benchmark": OptionInfo(False, "Enable cuDNN benchmark feature"), + "cudnn_benchmark": OptionInfo(False, "Enable full-depth cuDNN benchmark feature"), "cuda_allow_tf32": OptionInfo(True, "Allow TF32 math ops"), "cuda_allow_tf16_reduced": OptionInfo(True, "Allow TF16 reduced precision math ops"), "cuda_compile": OptionInfo(False, "Enable model compile (experimental)"), @@ -778,7 +784,7 @@ def get_version(): try: import subprocess res = subprocess.run('git log --pretty=format:"%h %ad" -1 --date=short', stdout = subprocess.PIPE, stderr = subprocess.PIPE, shell=True, check=True) - ver = res.stdout.decode(encoding = 'utf8', errors='ignore') if len(res.stdout) > 0 else '' + ver = res.stdout.decode(encoding = 'utf8', errors='ignore') if len(res.stdout) > 0 else ' ' githash, updated = ver.split(' ') res = subprocess.run('git remote get-url origin', stdout = subprocess.PIPE, stderr = subprocess.PIPE, shell=True, check=True) origin = res.stdout.decode(encoding = 'utf8', errors='ignore') if len(res.stdout) > 0 else '' @@ -792,7 +798,6 @@ def get_version(): } except: version = { 'app': 'sd.next' } - pass return version diff --git a/modules/textual_inversion/textual_inversion.py b/modules/textual_inversion/textual_inversion.py index 485bf0b23..137309d4d 100644 --- a/modules/textual_inversion/textual_inversion.py +++ b/modules/textual_inversion/textual_inversion.py @@ -207,6 +207,8 @@ class EmbeddingDatabase: continue def load_textual_inversion_embeddings(self, force_reload=False): + if shared.opts.sd_backend == 'Diffusers': # TODO Diffusers + return if not force_reload: need_reload = False for _path, embdir in self.embedding_dirs.items(): diff --git a/modules/ui.py b/modules/ui.py index cae271429..5b61ae83b 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -28,6 +28,7 @@ import modules.textual_inversion.ui import modules.sd_samplers from modules.textual_inversion import textual_inversion + modules.errors.install() mimetypes.init() mimetypes.add_type('application/javascript', '.js') @@ -203,7 +204,13 @@ def update_token_counter(text, steps): prompt_schedules = [[[steps, text]]] flat_prompts = reduce(lambda list1, list2: list1+list2, prompt_schedules) prompts = [prompt_text for step, prompt_text in flat_prompts] - token_count, max_length = max([sd_hijack.model_hijack.get_prompt_lengths(prompt) for prompt in prompts], key=lambda args: args[0]) + if opts.sd_backend == 'Original': + token_count, max_length = max([sd_hijack.model_hijack.get_prompt_lengths(prompt) for prompt in prompts], key=lambda args: args[0]) + else: + tokenizer = modules.shared.sd_model.tokenizer + has_bos_token, has_eos_token = tokenizer.bos_token_id is not None, tokenizer.eos_token_id is not None + token_count = max([len(modules.shared.sd_model.tokenizer(prompt)) for prompt in prompts]) - int(has_bos_token) - int(has_eos_token) + max_length = tokenizer.model_max_length - int(has_bos_token) - int(has_eos_token) return f"{token_count}/{max_length}" @@ -299,13 +306,12 @@ def create_output_panel(tabname, outdir): def create_sampler_and_steps_selection(choices, tabname): with FormRow(elem_id=f"sampler_selection_{tabname}"): if 'UniPC' in [sampler.name for sampler in choices]: - chosen_sampler_name = 'UniPC' + default_sampler_name = 'UniPC' elif 'Euler a' in [sampler.name for sampler in choices]: - chosen_sampler_name = 'Euler a' + default_sampler_name = 'Euler a' else: - chosen_sampler_name = modules.sd_samplers.samplers[0].name - - sampler_index = gr.Dropdown(label='Sampling method', elem_id=f"{tabname}_sampling", choices=[x.name for x in choices], value=chosen_sampler_name if tabname == 'txt2img' else "Euler a", type="index") + default_sampler_name = modules.sd_samplers.samplers[0].name + sampler_index = gr.Dropdown(label='Sampling method', elem_id=f"{tabname}_sampling", choices=[x.name for x in choices], value=default_sampler_name, type="index") steps = gr.Slider(minimum=1, maximum=99, step=1, elem_id=f"{tabname}_steps", label="Sampling steps", value=20) return steps, sampler_index @@ -1452,9 +1458,9 @@ def create_ui(): show_progress=info.refresh is not None, ) - update_image_cfg_scale_visibility = lambda: gr.update(visible=modules.shared.sd_model and modules.shared.sd_model.cond_stage_key == "edit") # pylint: disable=unnecessary-lambda-assignment - text_settings.change(fn=update_image_cfg_scale_visibility, inputs=[], outputs=[image_cfg_scale]) - demo.load(fn=update_image_cfg_scale_visibility, inputs=[], outputs=[image_cfg_scale]) + image_cfg_scale_visibility = (modules.shared.sd_model is not None) and hasattr(modules.shared.sd_model, 'cond_stage_key') and (modules.shared.sd_model.cond_stage_key == "edit") # pix2pix + text_settings.change(fn=lambda: gr.update(visible=image_cfg_scale_visibility), inputs=[], outputs=[image_cfg_scale]) + demo.load(fn=lambda: gr.update(visible=image_cfg_scale_visibility), inputs=[], outputs=[image_cfg_scale]) button_set_checkpoint = gr.Button('Change checkpoint', elem_id='change_checkpoint', visible=False) button_set_checkpoint.click( diff --git a/scripts/postprocessing_upscale.py b/scripts/postprocessing_upscale.py index 55c43fc41..fd9ccd893 100644 --- a/scripts/postprocessing_upscale.py +++ b/scripts/postprocessing_upscale.py @@ -79,29 +79,25 @@ class ScriptPostprocessingUpscale(scripts_postprocessing.ScriptPostprocessing): return image def process(self, pp: scripts_postprocessing.PostprocessedImage, upscale_mode=1, upscale_by=2.0, upscale_to_width=None, upscale_to_height=None, upscale_crop=False, upscaler_1_name=None, upscaler_2_name=None, upscaler_2_visibility=0.0): # pylint: disable=arguments-differ + if upscaler_1_name == "None": upscaler_1_name = None - upscaler1 = next(iter([x for x in shared.sd_upscalers if x.name == upscaler_1_name]), None) if not upscaler1: - shared.log.warning(f"Could not find upscaler: {upscaler_1_name or ''}") + if upscaler_1_name is not None: + shared.log.warning(f"Could not find upscaler: {upscaler_1_name or ''}") return - - if upscaler_2_name == "None": - upscaler_2_name = None - - upscaler2 = next(iter([x for x in shared.sd_upscalers if x.name == upscaler_2_name and x.name != "None"]), None) - if not upscaler2 and (upscaler_2_name is not None): - shared.log.warning(f"Could not find upscaler: {upscaler_2_name or ''}") - return - upscaled_image = self.upscale(pp.image, pp.info, upscaler1, upscale_mode, upscale_by, upscale_to_width, upscale_to_height, upscale_crop) pp.info["Postprocess upscaler"] = upscaler1.name + if upscaler_2_name == "None": + upscaler_2_name = None + upscaler2 = next(iter([x for x in shared.sd_upscalers if x.name == upscaler_2_name and x.name != "None"]), None) + if not upscaler2 and (upscaler_2_name is not None): + shared.log.warning(f"Could not find upscaler: {upscaler_2_name or ''}") if upscaler2 and upscaler_2_visibility > 0: second_upscale = self.upscale(pp.image, pp.info, upscaler2, upscale_mode, upscale_by, upscale_to_width, upscale_to_height, upscale_crop) upscaled_image = Image.blend(upscaled_image, second_upscale, upscaler_2_visibility) - pp.info["Postprocess upscaler 2"] = upscaler2.name pp.image = upscaled_image @@ -130,7 +126,7 @@ class ScriptPostprocessingUpscaleSimple(ScriptPostprocessingUpscale): upscaler1 = next(iter([x for x in shared.sd_upscalers if x.name == upscaler_name]), None) if upscaler1 is None: - shared.log.warning(f"Could not find upscaler: {upscaler_name or ''}") + shared.log.debug(f"Upscaler not found: {upscaler_name}") pp.image = self.upscale(pp.image, pp.info, upscaler1, 0, upscale_by, 0, 0, False) pp.info["Postprocess upscaler"] = upscaler1.name diff --git a/webui.py b/webui.py index dee75fa4e..89f1b13a9 100644 --- a/webui.py +++ b/webui.py @@ -150,25 +150,13 @@ def initialize(): def load_model(): shared.state.begin() shared.state.job = 'load model' - - """ - try: - modules.sd_models.load_model() - modules.sd_models.skip_next_load = True - except Exception as e: - errors.display(e, "loading stable diffusion model") - log.error("Stable diffusion model failed to load") - exit(1) - """ Thread(target=lambda: shared.sd_model).start() - if shared.sd_model is None: log.warning("No stable diffusion model loaded") # exit(1) else: shared.opts.data["sd_model_checkpoint"] = shared.sd_model.sd_checkpoint_info.title shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights()), call=False) - shared.state.end() startup_timer.record("checkpoint") From 1da0503de1aabd60cee01a6071c4bf28ee675ff4 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 26 May 2023 22:52:05 -0400 Subject: [PATCH 226/282] update changelog --- CHANGELOG.md | 17 +++++++++++------ extensions-builtin/sd-webui-controlnet | 2 +- webui.sh | 4 ++-- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 969aad013..44a6975c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,13 @@ # Change Log for SD.Next -## Update for 05/25/2023 +## Update for 05/26/2023 Some quality-of-life improvements... - updated [README](https://github.com/vladmandic/automatic/blob/master/README.md) - created [CHANGELOG](https://github.com/vladmandic/automatic/blob/master/CHANGELOG.md) this will be the source for all info about new things moving forward - and cross-posted to discussions #99 as well as discord [announcements](https://discord.com/channels/1101998836328697867/1109953953396957286) + and cross-posted to [Discussions#99](https://github.com/vladmandic/automatic/discussions/99) as well as discord [announcements](https://discord.com/channels/1101998836328697867/1109953953396957286) - optimize model loading on startup this should reduce startup time significantly - set default cross-optimization method for each platform backend @@ -18,10 +18,15 @@ Some quality-of-life improvements... - `ipex` => InvokeAI's - `mps` => Doggettx's - `cpu` => Doggettx's -- optimize logging -- optimize profiling -- minor lightbox improvements -- bugfixes...i don't recall when was a release with at least several of those +- optimize logging +- optimize profiling + now includes startup profiling as well as `cuda` profiling during generate +- minor lightbox improvements +- bugfixes...i don't recall when was a release with at least several of those + +other than that - first stage of [Diffusers](https://github.com/huggingface/diffusers) integration is now in master branch +i don't recommend anyone to try it (and dont even think reporting issues for it) +but if anyone wants to contribute, take a look at [project page](https://github.com/users/vladmandic/projects/1/views/1) ## Update for 05/23/2023 diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 0d1c252ca..dc2d91316 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 0d1c252cad9c37a75e839d52f9ea8207adb8aa46 +Subproject commit dc2d91316307b6d6af83983f3a71f8ba66749609 diff --git a/webui.sh b/webui.sh index d35908cca..5e4df3f5b 100755 --- a/webui.sh +++ b/webui.sh @@ -89,11 +89,11 @@ fi if [[ ! -z "${ACCELERATE}" ]] && [ ${ACCELERATE}="True" ] && [ -x "$(command -v accelerate)" ] then - echo "Accelerating launch.py..." + echo "Launching accelerate launch.py..." exec accelerate launch --num_cpu_threads_per_process=6 launch.py "$@" elif [[ -z "${first_launch}" ]] && [ -x "$(command -v ipexrun)" ] && [ -x "$(command -v numactl)" ] && [[ "$@" == *"--use-ipex"* ]] then - echo "Ipexrun'ning launch.py..." + echo "Launching ipexrun launch.py..." exec ipexrun launch.py "$@" else echo "Launching launch.py..." From 95242ca7d6e8da8dde4361fe78abfa9679d72d4e Mon Sep 17 00:00:00 2001 From: Disty0 Date: Sat, 27 May 2023 09:46:20 +0300 Subject: [PATCH 227/282] Remove broken ipex auto detection --- installer.py | 2 +- webui.sh | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/installer.py b/installer.py index 92b6c9cfd..25a6e18c2 100644 --- a/installer.py +++ b/installer.py @@ -261,7 +261,7 @@ def check_torch(): os.environ.setdefault('PYTORCH_HIP_ALLOC_CONF', 'garbage_collection_threshold:0.9,max_split_size_mb:512') torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.0.0 torchvision==0.15.1 --index-url https://download.pytorch.org/whl/rocm5.4.2') xformers_package = os.environ.get('XFORMERS_PACKAGE', 'none') - elif allow_ipex and (shutil.which('sycl-ls') is not None or os.path.exists('/opt/intel/oneapi') or args.use_ipex): + elif allow_ipex and args.use_ipex and shutil.which('sycl-ls') is not None: log.info('Intel OneAPI Toolkit detected') torch_command = os.environ.get('TORCH_COMMAND', 'torch==1.13.0a0 torchvision==0.14.1a0 intel_extension_for_pytorch==1.13.120+xpu -f https://developer.intel.com/ipex-whl-stable-xpu') xformers_package = os.environ.get('XFORMERS_PACKAGE', 'none') diff --git a/webui.sh b/webui.sh index 5e4df3f5b..2abf44a67 100755 --- a/webui.sh +++ b/webui.sh @@ -81,10 +81,15 @@ else exit 1 fi -if [[ "$@" == *"--use-ipex"* ]] +#Set OneAPI environmet if it's not set by the user +if [[ "$@" == *"--use-ipex"* ]] && ! [ -x "$(command -v sycl-ls)" ] then - echo "Setting OneAPI enviroment" - source /opt/intel/oneapi/setvars.sh + echo "Setting OneAPI environment" + if [[ -z "$ONEAPI_ROOT" ]] + then + ONEAPI_ROOT=/opt/intel/oneapi + fi + source $ONEAPI_ROOT/setvars.sh fi if [[ ! -z "${ACCELERATE}" ]] && [ ${ACCELERATE}="True" ] && [ -x "$(command -v accelerate)" ] From 421db2c0464c98b9c7097496be023e1b5418697b Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 27 May 2023 07:37:25 -0400 Subject: [PATCH 228/282] reorder hires --- extensions-builtin/sd-webui-controlnet | 2 +- modules/ui.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index dc2d91316..cdba83b6e 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit dc2d91316307b6d6af83983f3a71f8ba66749609 +Subproject commit cdba83b6e1a59f3b59bbcf5f0a6e0a585d666a01 diff --git a/modules/ui.py b/modules/ui.py index 5b61ae83b..3e74fe4c0 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -383,10 +383,10 @@ def create_ui(): elif category == "hires_fix": with FormGroup(visible=False, elem_id="txt2img_hires_fix") as hr_options: with FormRow(elem_id="txt2img_hires_fix_row1", variant="compact"): - hr_upscaler = gr.Dropdown(label="Upscaler", elem_id="txt2img_hr_upscaler", choices=[*modules.shared.latent_upscale_modes, *[x.name for x in modules.shared.sd_upscalers]], value=modules.shared.latent_upscale_default_mode) + denoising_strength = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label='Denoising strength', value=0.7, elem_id="txt2img_denoising_strength") hr_second_pass_steps = gr.Slider(minimum=0, maximum=99, step=1, label='Hires steps', value=0, elem_id="txt2img_hires_steps") with FormRow(elem_id="txt2img_hires_fix_row2", variant="compact"): - denoising_strength = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label='Denoising strength', value=0.7, elem_id="txt2img_denoising_strength") + hr_upscaler = gr.Dropdown(label="Upscaler", elem_id="txt2img_hr_upscaler", choices=[*modules.shared.latent_upscale_modes, *[x.name for x in modules.shared.sd_upscalers]], value=modules.shared.latent_upscale_default_mode) hr_scale = gr.Slider(minimum=1.0, maximum=4.0, step=0.05, label="Upscale by", value=2.0, elem_id="txt2img_hr_scale") with FormRow(elem_id="txt2img_hires_fix_row3", variant="compact"): hr_resize_x = gr.Slider(minimum=0, maximum=2048, step=8, label="Resize width to", value=0, elem_id="txt2img_hr_resize_x") From 24d8570bcb5664d35f41f077c08b9d619ca91902 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 27 May 2023 09:29:57 -0400 Subject: [PATCH 229/282] update model merge --- javascript/style.css | 2 ++ modules/extras.py | 6 +++--- modules/img2img.py | 4 ++-- modules/ui.py | 42 +++++++++++++++++++----------------------- 4 files changed, 26 insertions(+), 28 deletions(-) diff --git a/javascript/style.css b/javascript/style.css index 5df2f53d7..f060604cc 100644 --- a/javascript/style.css +++ b/javascript/style.css @@ -675,3 +675,5 @@ footer { #extras_generate, #extras_interrupt, #extras_skip { display: block !important; position: relative; height: 36px; } #extras_upscale { margin-top: 10px } + +#modelmerger_interp_description { margin-top: 1em; margin-bottom: 1em; } diff --git a/modules/extras.py b/modules/extras.py index 1db100dec..683064661 100644 --- a/modules/extras.py +++ b/modules/extras.py @@ -98,13 +98,13 @@ def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_ } filename_generator, theta_func1, theta_func2 = theta_funcs[interp_method] shared.state.job_count = (1 if theta_func1 else 0) + (1 if theta_func2 else 0) - if not primary_model_name: + if not primary_model_name or primary_model_name == 'None': return fail("Failed: Merging requires a primary model.") primary_model_info = sd_models.checkpoints_list[primary_model_name] - if theta_func2 and not secondary_model_name: + if theta_func2 and (not secondary_model_name or secondary_model_name == 'None'): return fail("Failed: Merging requires a secondary model.") secondary_model_info = sd_models.checkpoints_list[secondary_model_name] if theta_func2 else None - if theta_func1 and not tertiary_model_name: + if theta_func1 and (not tertiary_model_name or tertiary_model_name == 'None'): return fail(f"Failed: Interpolation method ({interp_method}) requires a tertiary model.") tertiary_model_info = sd_models.checkpoints_list[tertiary_model_name] if theta_func1 else None result_is_inpainting_model = False diff --git a/modules/img2img.py b/modules/img2img.py index 9a6370760..dda82dfcd 100644 --- a/modules/img2img.py +++ b/modules/img2img.py @@ -71,8 +71,8 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s shared.log.warning('Model not loaded') return if init_img is None: - shared.log.warning('Init image not set') - return + shared.log.debug('Init image not set') + shared.log.debug(f'img2img: id_task={id_task}|mode={mode}|prompt={prompt}|negative_prompt={negative_prompt}|prompt_styles={prompt_styles}|init_img={init_img}|sketch={sketch}|init_img_with_mask={init_img_with_mask}|inpaint_color_sketch={inpaint_color_sketch}|inpaint_color_sketch_orig={inpaint_color_sketch_orig}|init_img_inpaint={init_img_inpaint}|init_mask_inpaint={init_mask_inpaint}|steps={steps}|sampler_index={sampler_index}|mask_blur={mask_blur}|mask_alpha={mask_alpha}|inpainting_fill={inpainting_fill}|restore_faces={restore_faces}|tiling={tiling}|n_iter={n_iter}|batch_size={batch_size}|cfg_scale={cfg_scale}|image_cfg_scale={image_cfg_scale}|clip_skip={clip_skip}|denoising_strength={denoising_strength}|seed={seed}|subseed{subseed}|subseed_strength={subseed_strength}|seed_resize_from_h={seed_resize_from_h}|seed_resize_from_w={seed_resize_from_w}|seed_enable_extras={seed_enable_extras}|selected_scale_tab={selected_scale_tab}|height={height}|width={width}|scale_by={scale_by}|resize_mode={resize_mode}|inpaint_full_res={inpaint_full_res}|inpaint_full_res_padding={inpaint_full_res_padding}|inpainting_mask_invert={inpainting_mask_invert}|img2img_batch_input_dir={img2img_batch_input_dir}|img2img_batch_output_dir={img2img_batch_output_dir}|img2img_batch_inpaint_mask_dir={img2img_batch_inpaint_mask_dir}|override_settings_texts={override_settings_texts}|args={args}') if sampler_index is None: diff --git a/modules/ui.py b/modules/ui.py index 3e74fe4c0..33e4dcffd 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -898,40 +898,36 @@ def create_ui(): with gr.Tab(label="Merge models") as modelmerger_interface: with gr.Row().style(equal_height=False): with gr.Column(variant='compact'): - interp_description = gr.HTML(value=update_interp_description("Weighted sum"), elem_id="modelmerger_interp_description") - with FormRow(elem_id="modelmerger_models"): - primary_model_name = gr.Dropdown(modules.sd_models.checkpoint_tiles(), elem_id="modelmerger_primary_model_name", label="Primary model (A)") - create_refresh_button(primary_model_name, modules.sd_models.list_models, lambda: {"choices": modules.sd_models.checkpoint_tiles()}, "refresh_checkpoint_A") - - secondary_model_name = gr.Dropdown(modules.sd_models.checkpoint_tiles(), elem_id="modelmerger_secondary_model_name", label="Secondary model (B)") - create_refresh_button(secondary_model_name, modules.sd_models.list_models, lambda: {"choices": modules.sd_models.checkpoint_tiles()}, "refresh_checkpoint_B") - - tertiary_model_name = gr.Dropdown(modules.sd_models.checkpoint_tiles(), elem_id="modelmerger_tertiary_model_name", label="Tertiary model (C)") - create_refresh_button(tertiary_model_name, modules.sd_models.list_models, lambda: {"choices": modules.sd_models.checkpoint_tiles()}, "refresh_checkpoint_C") - - custom_name = gr.Textbox(label="Custom Name (Optional)", elem_id="modelmerger_custom_name") - interp_amount = gr.Slider(minimum=0.0, maximum=1.0, step=0.05, label='Multiplier (M) - set to 0 to get model A', value=0.3, elem_id="modelmerger_interp_amount") - interp_method = gr.Radio(choices=["No interpolation", "Weighted sum", "Add difference"], value="Weighted sum", label="Interpolation Method", elem_id="modelmerger_interp_method") - interp_method.change(fn=update_interp_description, inputs=[interp_method], outputs=[interp_description]) - + def sd_model_choices(): + return ['None'] + modules.sd_models.checkpoint_tiles() + primary_model_name = gr.Dropdown(sd_model_choices(), elem_id="modelmerger_primary_model_name", label="Primary model", value="None") + create_refresh_button(primary_model_name, modules.sd_models.list_models, lambda: {"choices": sd_model_choices()}, "refresh_checkpoint_A") + secondary_model_name = gr.Dropdown(sd_model_choices(), elem_id="modelmerger_secondary_model_name", label="Secondary model", value="None") + create_refresh_button(secondary_model_name, modules.sd_models.list_models, lambda: {"choices": sd_model_choices()}, "refresh_checkpoint_B") + tertiary_model_name = gr.Dropdown(sd_model_choices(), elem_id="modelmerger_tertiary_model_name", label="Tertiary model", value="None") + create_refresh_button(tertiary_model_name, modules.sd_models.list_models, lambda: {"choices": sd_model_choices()}, "refresh_checkpoint_C") + custom_name = gr.Textbox(label="New model name", elem_id="modelmerger_custom_name") + with FormRow(): + interp_description = gr.HTML(value=update_interp_description("Weighted sum"), elem_id="modelmerger_interp_description") + with FormRow(): + interp_method = gr.Radio(choices=["No interpolation", "Weighted sum", "Add difference"], value="Weighted sum", label="Interpolation Method", elem_id="modelmerger_interp_method") + interp_method.change(fn=update_interp_description, inputs=[interp_method], outputs=[interp_description]) + interp_amount = gr.Slider(minimum=0.0, maximum=1.0, step=0.05, label='Interpolation ratio from Primary to Secondary', value=0.5, elem_id="modelmerger_interp_amount") with FormRow(): checkpoint_format = gr.Radio(choices=["ckpt", "safetensors"], value="safetensors", label="Checkpoint format", elem_id="modelmerger_checkpoint_format") - save_as_half = gr.Checkbox(value=False, label="Save as float16", elem_id="modelmerger_save_as_half") - save_metadata = gr.Checkbox(value=True, label="Save metadata (.safetensors only)", elem_id="modelmerger_save_metadata") - + with gr.Box(): + save_as_half = gr.Checkbox(value=True, label="Use FP16", elem_id="modelmerger_save_as_half") + save_metadata = gr.Checkbox(value=True, label="Save metadata", elem_id="modelmerger_save_metadata") with FormRow(): with gr.Column(): - config_source = gr.Radio(choices=["A, B or C", "B", "C", "Don't"], value="A, B or C", label="Copy config from", type="index", elem_id="modelmerger_config_method") - + config_source = gr.Radio(choices=["Primary", "Secondary", "Tertiary", "None"], value="Primary", label="Model configuration", type="index", elem_id="modelmerger_config_method") with gr.Column(): with FormRow(): bake_in_vae = gr.Dropdown(choices=["None"] + list(sd_vae.vae_dict), value="None", label="Bake in VAE", elem_id="modelmerger_bake_in_vae") create_refresh_button(bake_in_vae, sd_vae.refresh_vae_list, lambda: {"choices": ["None"] + list(sd_vae.vae_dict)}, "modelmerger_refresh_bake_in_vae") - with FormRow(): discard_weights = gr.Textbox(value="", label="Discard weights with matching name", elem_id="modelmerger_discard_weights") - with gr.Row(): modelmerger_merge = gr.Button(elem_id="modelmerger_merge", value="Merge", variant='primary') From 851d129680f8ea94f8668574eabe79b1e1894827 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 27 May 2023 15:49:54 -0400 Subject: [PATCH 230/282] more diffusers work --- .../multidiffusion-upscaler-for-automatic1111 | 2 +- modules/hf_hub.py | 17 +++ modules/modelloader.py | 98 +++++++++------ modules/models/diffusion/uni_pc/sampler.py | 1 - modules/sd_models.py | 115 +++++++++++------- modules/sd_samplers_kdiffusion.py | 3 + 6 files changed, 155 insertions(+), 81 deletions(-) create mode 100644 modules/hf_hub.py diff --git a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 index 2473d6b00..51cb83ce2 160000 --- a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 +++ b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 @@ -1 +1 @@ -Subproject commit 2473d6b005a516fb4bd51b331abd04b0289fdf07 +Subproject commit 51cb83ce2a53bf147a9091ed5269dcce8f1662d7 diff --git a/modules/hf_hub.py b/modules/hf_hub.py new file mode 100644 index 000000000..b0fc9040c --- /dev/null +++ b/modules/hf_hub.py @@ -0,0 +1,17 @@ +import sys +import huggingface_hub as hf +from rich import print # pylint: disable=redefined-builtin + +if __name__ == "__main__": + sys.argv.pop(0) + keyword = sys.argv[0] if len(sys.argv) > 0 else '' + hf_api = hf.HfApi() + model_filter = hf.ModelFilter( + model_name=keyword, + task='text-to-image', + tags='stable-diffusion', + library=['diffusers', 'stable-diffusion'], + ) + res = hf_api.list_models(filter=model_filter, full=True, limit=50, sort="downloads", direction=-1) + models = [{ 'name': m.modelId, 'downloads': m.downloads, 'mtime': m.lastModified, 'url': f'https://huggingface.co/{m.modelId}' } for m in res] + print('Online', models) diff --git a/modules/modelloader.py b/modules/modelloader.py index fc8dc7ab4..188ee6db2 100644 --- a/modules/modelloader.py +++ b/modules/modelloader.py @@ -7,8 +7,50 @@ from modules import shared from modules.upscaler import Upscaler, UpscalerLanczos, UpscalerNearest, UpscalerNone from modules.paths import script_path, models_path +diffuser_repos = [] -def load_models(model_path: str, model_url: str = None, command_path: str = None, ext_filter=None, download_name=None, ext_blacklist=None, diffusors=False) -> list: +def load_diffusers(model_path: str, command_path: str = None): + import huggingface_hub as hf + places = [] + places.append(model_path) + if command_path is not None and command_path != model_path and os.path.isdir(command_path): + places.append(command_path) + diffuser_repos.clear() + output = [] + try: + for place in places: + res = hf.scan_cache_dir(cache_dir=place) + for r in list(res.repos): + diffuser_repos.append({ 'name': r.repo_id, 'filename': r.repo_id, 'path': str(r.repo_path), 'size': r.size_on_disk, 'mtime': r.last_modified, 'hash': list(r.revisions)[-1].commit_hash }) + output.append(str(r.repo_id)) + except Exception as e: + shared.log.error(f"Error listing diffusers: {place} {e}") + shared.log.debug(f'Scanning diffusers cache: {len(output)} {model_path} {command_path}') + return output + + +def find_diffuser(name: str): + import huggingface_hub as hf + + if name in diffuser_repos: + return name + if shared.cmd_opts.no_download: + return None + api = hf.HfApi() + filt = hf.ModelFilter( + model_name=name, + task='text-to-image', + tags='stable-diffusion', + library=['diffusers', 'stable-diffusion'], + ) + models = list(api.list_models(filter=filt, full=True, limit=50, sort="downloads", direction=-1)) + shared.log.debug(f'Searching diffusers models: {name} {len(models) > 0}') + if len(models) > 0: + return models[0].modelId + return None + + +def load_models(model_path: str, model_url: str = None, command_path: str = None, ext_filter=None, download_name=None, ext_blacklist=None) -> list: """ A one-and done loader to try finding the desired models in specified directories. @@ -23,41 +65,27 @@ def load_models(model_path: str, model_url: str = None, command_path: str = None places.append(model_path) if command_path is not None and command_path != model_path and os.path.isdir(command_path): places.append(command_path) - - def get_checkpoints(): - output = [] - try: - for place in places: - for full_path in shared.walk_files(place, allowed_extensions=ext_filter): - if os.path.islink(full_path) and not os.path.exists(full_path): - print(f"Skipping broken symlink: {full_path}") - continue - if ext_blacklist is not None and any([full_path.endswith(x) for x in ext_blacklist]): - continue - if full_path not in output: - output.append(full_path) - if model_url is not None and len(output) == 0: - if download_name is not None: - from basicsr.utils.download_util import load_file_from_url - dl = load_file_from_url(model_url, model_path, True, download_name) - output.append(dl) - else: - output.append(model_url) - except Exception: - pass - return output - - def get_diffusors(): - output = [] + output = [] + try: for place in places: - output = os.listdir(place) - output = [os.path.join(place, x) for x in output] - return output - - if not diffusors: - return get_checkpoints() - else: - return get_diffusors() + for full_path in shared.walk_files(place, allowed_extensions=ext_filter): + if os.path.islink(full_path) and not os.path.exists(full_path): + print(f"Skipping broken symlink: {full_path}") + continue + if ext_blacklist is not None and any([full_path.endswith(x) for x in ext_blacklist]): + continue + if full_path not in output: + output.append(full_path) + if model_url is not None and len(output) == 0: + if download_name is not None: + from basicsr.utils.download_util import load_file_from_url + dl = load_file_from_url(model_url, model_path, True, download_name) + output.append(dl) + else: + output.append(model_url) + except Exception as e: + shared.log.error(f"Error listing models: {places} {e}") + return output def friendly_name(file: str): diff --git a/modules/models/diffusion/uni_pc/sampler.py b/modules/models/diffusion/uni_pc/sampler.py index e46befd06..b46848183 100644 --- a/modules/models/diffusion/uni_pc/sampler.py +++ b/modules/models/diffusion/uni_pc/sampler.py @@ -1,6 +1,5 @@ """SAMPLING ONLY.""" -import numpy as np import torch from .uni_pc import NoiseScheduleVP, model_wrapper, UniPC, get_time_steps diff --git a/modules/sd_models.py b/modules/sd_models.py index bfbb7eb82..80626abde 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -10,6 +10,7 @@ import torch import safetensors.torch from omegaconf import OmegaConf import tomesd +from transformers import logging as transformers_logging import ldm.modules.midas as midas from ldm.util import instantiate_from_config from modules import paths, shared, modelloader, devices, script_callbacks, sd_vae, sd_disable_initialization, errors, hashes, sd_models_config @@ -18,7 +19,7 @@ from modules.timer import Timer from modules.memstats import memory_stats from modules.paths_internal import models_path - +transformers_logging.set_verbosity_error() model_dir = "Stable-diffusion" model_path = os.path.abspath(os.path.join(paths.models_path, model_dir)) checkpoints_list = {} @@ -29,29 +30,37 @@ skip_next_load = False class CheckpointInfo: # TODO Diffusers def __init__(self, filename): + name = '' + self.name = None + self.hash = None self.filename = filename abspath = os.path.abspath(filename) - if shared.opts.ckpt_dir is not None and abspath.startswith(shared.opts.ckpt_dir): - name = abspath.replace(shared.opts.ckpt_dir, '') - elif abspath.startswith(model_path): - name = abspath.replace(model_path, '') - else: - name = os.path.basename(filename) - if name.startswith("\\") or name.startswith("/"): - name = name[1:] - self.name = name - self.name_for_extra = os.path.splitext(os.path.basename(filename))[0] - self.model_name = os.path.splitext(name.replace("/", "_").replace("\\", "_"))[0] if shared.opts.sd_backend == 'Original': + if shared.opts.ckpt_dir is not None and abspath.startswith(shared.opts.ckpt_dir): + name = abspath.replace(shared.opts.ckpt_dir, '') + elif abspath.startswith(model_path): + name = abspath.replace(model_path, '') + else: + name = os.path.basename(filename) + if name.startswith("\\") or name.startswith("/"): + name = name[1:] + self.name = name self.hash = model_hash(self.filename) self.sha256 = hashes.sha256_from_cache(self.filename, f"checkpoint/{name}") - else: # TODO Diffusers calculate hash + else: # TODO Diffusers # sd_model.unet.config._name_or_path.split("/")[-2] - self.hash = 'ABCDEFGH' - self.sha256 = 'ABCDEFGH' + repo = [r for r in modelloader.diffuser_repos if filename == r['filename']] + if len(repo) == 0: + shared.log.error(f'Cannot find diffuser model: {filename}') + return + self.name = repo[0]['name'] + self.hash = repo[0]['hash'][:8] + self.sha256 = repo[0]['hash'] + self.name_for_extra = os.path.splitext(os.path.basename(filename))[0] + self.model_name = os.path.splitext(name.replace("/", "_").replace("\\", "_"))[0] self.shorthash = self.sha256[0:10] if self.sha256 else None - self.title = name if self.shorthash is None else f'{name} [{self.shorthash}]' - self.ids = [self.hash, self.model_name, self.title, name, f'{name} [{self.hash}]'] + ([self.shorthash, self.sha256, f'{self.name} [{self.shorthash}]'] if self.shorthash else []) + self.title = self.name if self.shorthash is None else f'{self.name} [{self.shorthash}]' + self.ids = [self.hash, self.model_name, self.title, self.name, f'{self.name} [{self.hash}]'] + ([self.shorthash, self.sha256, f'{self.name} [{self.shorthash}]'] if self.shorthash else []) self.metadata = {} _, ext = os.path.splitext(self.filename) if ext.lower() == ".safetensors": @@ -78,14 +87,6 @@ class CheckpointInfo: # TODO Diffusers return self.shorthash -try: - # this silences the annoying "Some weights of the model checkpoint were not used when initializing..." message at start. - from transformers import logging - logging.set_verbosity_error() -except Exception: - pass - - def setup_model(): if not os.path.exists(model_path): os.makedirs(model_path) @@ -107,20 +108,22 @@ def list_models(): if shared.opts.sd_backend == 'Original': model_list = modelloader.load_models(model_path=os.path.join(models_path, 'Stable-diffusion'), model_url=None, command_path=shared.opts.ckpt_dir, ext_filter=[".ckpt", ".safetensors"], download_name=None, ext_blacklist=[".vae.ckpt", ".vae.safetensors"]) else: - model_list = modelloader.load_models(model_path=os.path.join(models_path, 'Diffusers'), model_url=None, command_path=shared.opts.diffusers_dir, ext_filter=[".ckpt", ".safetensors"], download_name=None, ext_blacklist=[".vae.ckpt", ".vae.safetensors"]) + model_list = modelloader.load_diffusers(model_path=os.path.join(models_path, 'Diffusers'), command_path=shared.opts.diffusers_dir) + for filename in sorted(model_list, key=str.lower): + checkpoint_info = CheckpointInfo(filename) + if checkpoint_info.name is not None: + checkpoint_info.register() if shared.cmd_opts.ckpt is not None: if not os.path.exists(shared.cmd_opts.ckpt) and shared.opts.sd_backend == 'Original': if shared.cmd_opts.ckpt.lower() != "none": shared.log.warning(f"Requested checkpoint not found: {shared.cmd_opts.ckpt}") else: checkpoint_info = CheckpointInfo(shared.cmd_opts.ckpt) - checkpoint_info.register() - shared.opts.data['sd_model_checkpoint'] = checkpoint_info.title + if checkpoint_info.name is not None: + checkpoint_info.register() + shared.opts.data['sd_model_checkpoint'] = checkpoint_info.title elif shared.cmd_opts.ckpt != shared.default_sd_model_file and shared.cmd_opts.ckpt is not None: shared.log.warning(f"Checkpoint not found: {shared.cmd_opts.ckpt}") - for filename in sorted(model_list, key=str.lower): - checkpoint_info = CheckpointInfo(filename) - checkpoint_info.register() shared.log.info(f'Available models: {shared.opts.ckpt_dir} {len(checkpoints_list)}') if len(checkpoints_list) == 0: if not shared.cmd_opts.no_download: @@ -162,7 +165,7 @@ def model_hash(filename): def select_checkpoint(): model_checkpoint = shared.opts.sd_model_checkpoint checkpoint_info = checkpoint_aliases.get(model_checkpoint, None) - if checkpoint_info is not None or shared.cmd_opts.ckpt is not None: + if checkpoint_info is not None: shared.log.debug(f'Select checkpoint: {checkpoint_info.title if checkpoint_info is not None else None}') return checkpoint_info if len(checkpoints_list) == 0: @@ -171,7 +174,7 @@ def select_checkpoint(): exit(1) checkpoint_info = next(iter(checkpoints_list.values())) if model_checkpoint is not None: - shared.log.warning(f"Default checkpoint not found: {model_checkpoint}") + shared.log.warning(f"Selected checkpoint not found: {model_checkpoint}") shared.log.warning(f"Loading fallback checkpoint: {checkpoint_info.title}") shared.log.debug(f'Select checkpoint: {checkpoint_info.title if checkpoint_info is not None else None}') return checkpoint_info @@ -225,6 +228,8 @@ def read_metadata_from_safetensors(filename): def read_state_dict(checkpoint_file, map_location=None): # pylint: disable=unused-argument + if shared.opts.sd_backend == 'Diffusers': + return None try: pl_sd = None with progress.open(checkpoint_file, 'rb', description=f'Loading weights: [cyan]{checkpoint_file}', auto_refresh=True) as f: @@ -365,6 +370,7 @@ sd2_clip_weight = 'cond_stage_model.model.transformer.resblocks.0.attn.in_proj_w class SdModelData: def __init__(self): self.sd_model = None + self.initial = True self.lock = threading.Lock() def get_sd_model(self): @@ -374,9 +380,10 @@ class SdModelData: if shared.opts.sd_backend == 'Original': load_model() elif shared.opts.sd_backend == 'Diffusers': - load_diffusers() + load_diffuser() else: shared.log.error(f"Unknown Stable Diffusion backend: {shared.opts.sd_backend}") + self.initial = False except Exception as e: shared.log.error("Failed to load stable diffusion model") errors.display(e, "loading stable diffusion model") @@ -390,10 +397,12 @@ class SdModelData: model_data = SdModelData() -def load_diffusers(checkpoint_info=None, already_loaded_state_dict=None, timer=None): +def load_diffuser(checkpoint_info=None, already_loaded_state_dict=None, timer=None): # pylint: disable=unused-argument if timer is None: timer = Timer() import diffusers + import logging + logging.getLogger("diffusers").setLevel(logging.ERROR) timer.record("diffusers") diffusor_config = { "force_download": False, @@ -404,23 +413,37 @@ def load_diffusers(checkpoint_info=None, already_loaded_state_dict=None, timer=N "cache_dir": shared.opts.diffusers_dir, "torch_dtype": devices.dtype, } - shared.log.warning("Using experimental Diffusers backend for Stable Diffusion") if shared.opts.data['sd_model_checkpoint'] == 'model.ckpt': shared.opts.data['sd_model_checkpoint'] = "runwayml/stable-diffusion-v1-5" sd_model = None try: - checkpoint_info = checkpoint_info or select_checkpoint() - scheduler = diffusers.UniPCMultistepScheduler.from_pretrained(checkpoint_info.filename, subfolder="scheduler") - scheduler.name = 'UniPC' - sd_model = diffusers.DiffusionPipeline.from_pretrained(checkpoint_info.filename, scheduler=scheduler, **diffusor_config) - sd_model.to(devices.device) + if shared.cmd_opts.ckpt is not None and model_data.initial: # initial load + model_name = modelloader.find_diffuser(shared.cmd_opts.ckpt) + if model_name is not None: + shared.log.info(f'Loading diffuser model: {model_name}') + scheduler = diffusers.UniPCMultistepScheduler.from_pretrained(model_name, subfolder="scheduler") + sd_model = diffusers.DiffusionPipeline.from_pretrained(model_name, scheduler=scheduler, **diffusor_config) + list_models() # rescan for downloaded model + checkpoint_info = CheckpointInfo(model_name) + if sd_model is None: + checkpoint_info = checkpoint_info or select_checkpoint() + shared.log.info(f'Loading diffuser model: {checkpoint_info.filename}') + scheduler = diffusers.UniPCMultistepScheduler.from_pretrained(checkpoint_info.filename, subfolder="scheduler") + sd_model = diffusers.DiffusionPipeline.from_pretrained(checkpoint_info.filename, scheduler=scheduler, **diffusor_config) sd_model.sd_checkpoint_info = checkpoint_info + sd_model.sd_model_checkpoint = checkpoint_info.filename sd_model.sd_model_hash = checkpoint_info.hash + scheduler.name = 'UniPC' + sd_model.to(devices.device) except Exception as e: shared.log.error("Failed to load diffusers model") errors.display(e, "loading Diffusers model") shared.sd_model = sd_model timer.record("load") + shared.log.info(f"Model loaded in {timer.summary()}") + devices.torch_gc(force=True) + shared.log.info(f'Model load finished: {memory_stats()}') + def load_model(checkpoint_info=None, already_loaded_state_dict=None, timer=None): @@ -515,9 +538,9 @@ def reload_model_weights(sd_model=None, info=None): lowvram.send_everything_to_cpu() else: sd_model.to(devices.cpu) - sd_hijack.model_hijack.undo_hijack(sd_model) if shared.opts.model_reuse_dict and sd_model is not None: shared.log.info('Reusing previous model dictionary') + sd_hijack.model_hijack.undo_hijack(sd_model) # TODO double undo hijack else: unload_model_weights() sd_model = None @@ -528,7 +551,10 @@ def reload_model_weights(sd_model=None, info=None): if sd_model is None or checkpoint_config != sd_model.used_config: del sd_model checkpoints_loaded.clear() - load_model(checkpoint_info, already_loaded_state_dict=state_dict, timer=timer) + if shared.opts.sd_backend == 'Original': + load_model(checkpoint_info, already_loaded_state_dict=state_dict, timer=timer) + else: + load_diffuser(checkpoint_info, already_loaded_state_dict=state_dict, timer=timer) return model_data.sd_model try: load_model_weights(sd_model, checkpoint_info, state_dict, timer) @@ -550,7 +576,8 @@ def unload_model_weights(sd_model=None, _info=None): from modules import sd_hijack if model_data.sd_model: model_data.sd_model.to(devices.cpu) - sd_hijack.model_hijack.undo_hijack(model_data.sd_model) + if shared.opts.sd_backend == 'Original': + sd_hijack.model_hijack.undo_hijack(model_data.sd_model) model_data.sd_model = None sd_model = None devices.torch_gc(force=True) diff --git a/modules/sd_samplers_kdiffusion.py b/modules/sd_samplers_kdiffusion.py index bb8ad4d06..0928b8ee1 100644 --- a/modules/sd_samplers_kdiffusion.py +++ b/modules/sd_samplers_kdiffusion.py @@ -10,6 +10,9 @@ from modules.script_callbacks import CFGDenoiserParams, cfg_denoiser_callback from modules.script_callbacks import CFGDenoisedParams, cfg_denoised_callback from modules.script_callbacks import AfterCFGCallbackParams, cfg_after_cfg_callback +# from tqdm.rich import trange +# k_diffusion.sampling.trange = trange + samplers_k_diffusion = [ ('Euler a', 'sample_euler_ancestral', ['k_euler_a', 'k_euler_ancestral'], {}), ('Euler', 'sample_euler', ['k_euler'], {}), From 030011d6f2f0afc870000c13c678a11c9dc597a1 Mon Sep 17 00:00:00 2001 From: Alexander Brown Date: Sat, 27 May 2023 13:47:06 -0700 Subject: [PATCH 231/282] Style the controlnet controls Mainly just aligns the radio buttons vertically. --- javascript/style.css | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/javascript/style.css b/javascript/style.css index 5df2f53d7..dc9b07208 100644 --- a/javascript/style.css +++ b/javascript/style.css @@ -675,3 +675,24 @@ footer { #extras_generate, #extras_interrupt, #extras_skip { display: block !important; position: relative; height: 36px; } #extras_upscale { margin-top: 10px } + +#controlnet_control_type .controlnet_control_type_filter_group .wrap:last-of-type { + display: grid; + grid-auto-flow: row; + grid-template-columns: repeat(4, minmax(0, 1fr)); +} + +#controlnet_preprocessor_model { + display: grid; + grid-auto-flow: row; + grid-template-columns: 1fr max-content; +} + +#controlnet_preprocessor_model button.gradio-button { + align-self: center; +} + +.controlnet_resize_mode_radio .wrap:last-of-type, +.controlnet_control_mode_radio .wrap:last-of-type { + flex-direction: column; +} From 9bf0b1ae1f8137fec76ffec84ef6b4e132d1b262 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 28 May 2023 07:46:47 -0400 Subject: [PATCH 232/282] allow experimental to override precision --- extensions-builtin/multidiffusion-upscaler-for-automatic1111 | 2 +- modules/devices.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 index 51cb83ce2..70b3c5ea3 160000 --- a/extensions-builtin/multidiffusion-upscaler-for-automatic1111 +++ b/extensions-builtin/multidiffusion-upscaler-for-automatic1111 @@ -1 +1 @@ -Subproject commit 51cb83ce2a53bf147a9091ed5269dcce8f1662d7 +Subproject commit 70b3c5ea3c9f684d04e7ff59167565974415735c diff --git a/modules/devices.py b/modules/devices.py index 843ed4dd8..b49745bd3 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -81,6 +81,8 @@ def torch_gc(force=False): def test_fp16(): + if shared.cmd_opts.experimental: + return True try: x = torch.tensor([[1.5,.0,.0,.0]]).to(device).half() layerNorm = torch.nn.LayerNorm(4, eps=0.00001, elementwise_affine=True, dtype=torch.float16, device=device) @@ -114,7 +116,7 @@ def set_cuda_params(): pass global dtype, dtype_vae, dtype_unet, unet_needs_upcast # pylint: disable=global-statement ok = test_fp16() - if shared.cmd_opts.use_directml: # TODO DirectML does not have full autocast capabilities + if shared.cmd_opts.use_directml and not shared.cmd_opts.experimental: # TODO DirectML does not have full autocast capabilities shared.opts.no_half = True shared.opts.no_half_vae = True if ok and shared.opts.cuda_dtype == 'FP32': From 7254925dcab94cfaf5db4b57ee1cc7be6e524c8d Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 28 May 2023 11:46:48 -0400 Subject: [PATCH 233/282] add settings search --- extensions-builtin/sd-webui-controlnet | 2 +- javascript/ui.js | 13 +++++++++++++ modules/shared.py | 2 +- modules/ui.py | 3 ++- modules/ui_extensions.py | 2 +- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index cdba83b6e..2e0dc37d2 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit cdba83b6e1a59f3b59bbcf5f0a6e0a585d666a01 +Subproject commit 2e0dc37d222aaba355a71dac0eda4bb7ca54f05f diff --git a/javascript/ui.js b/javascript/ui.js index 9313c75c6..14eff9927 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -260,6 +260,19 @@ onUiUpdate(() => { }); }; } + const settings_search = gradioApp().querySelectorAll('#settings_search > label > textarea')[0]; + settings_search.oninput = (e) => { + gradioApp().querySelectorAll('#settings > div').forEach((elem) => { + elem.style.display = 'block'; + }); + gradioApp().querySelectorAll('#tab_settings .tabitem').forEach((section) => { + section.querySelectorAll('.block').forEach((setting) => { + const visible = setting.innerText.toLowerCase().includes(e.target.value.toLowerCase()) || setting.id.toLowerCase().includes(e.target.value.toLowerCase()); + const el = setting.parentElement.classList.contains('form') ? setting.parentElement : setting; // if parent is form use that instead + el.style.display = visible ? 'block' : 'none'; + }); + }); + }; }); onOptionsChanged(() => { diff --git a/modules/shared.py b/modules/shared.py index 40f7e6a8d..7050ddde7 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -444,7 +444,7 @@ options_templates.update(options_section(('ui', "Live previews"), { "live_previews_enable": OptionInfo(True, "Show live previews of the created image"), "show_progress_grid": OptionInfo(True, "Show previews of all images generated in a batch as a grid"), "notification_audio_enable": OptionInfo(False, "Play a sound when images are finished generating"), - "notification_audio_path": OptionInfo("html/notification.mp3","Path to notification sound",component_args=hide_dirs), + "notification_audio_path": OptionInfo("html/notification.mp3","Path to notification sound", component_args=hide_dirs), "show_progress_every_n_steps": OptionInfo(1, "Show new live preview image every N sampling steps. Set to -1 to show after completion of batch.", gr.Slider, {"minimum": -1, "maximum": 32, "step": 1}), "show_progress_type": OptionInfo("Approx NN", "Image creation progress preview mode", gr.Radio, {"choices": ["Full", "Approx NN", "Approx cheap"]}), "live_preview_content": OptionInfo("Combined", "Live preview subject", gr.Radio, {"choices": ["Combined", "Prompt", "Negative prompt"]}), diff --git a/modules/ui.py b/modules/ui.py index 33e4dcffd..1b2c6c836 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1323,9 +1323,10 @@ def create_ui(): unload_sd_model = gr.Button(value='Unload checkpoint', variant='primary', elem_id="sett_unload_sd_model") reload_sd_model = gr.Button(value='Reload checkpoint', variant='primary', elem_id="sett_reload_sd_model") # reload_script_bodies = gr.Button(value='Reload scripts', variant='primary', elem_id="settings_reload_script_bodies") + with gr.Row(): + _settings_search = gr.Text(label="Search", elem_id="settings_search") # TODO settings search result = gr.HTML(elem_id="settings_result") - quicksettings_names = opts.quicksettings_list quicksettings_names = {x: i for i, x in enumerate(quicksettings_names) if x != 'quicksettings'} quicksettings_list = [] diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py index 4c566e332..9be1c3400 100644 --- a/modules/ui_extensions.py +++ b/modules/ui_extensions.py @@ -18,7 +18,7 @@ sort_ordering = { "user extensions": (True, lambda x: x.get('sort_user', '')), "update avilable": (True, lambda x: x.get('sort_update', '')), "updated date": (True, lambda x: x.get('updated', '2000-01-01T00:00')), - "created date": (False, lambda x: x.get('created', '2000-01-01T00:00')), + "created date": (True, lambda x: x.get('created', '2000-01-01T00:00')), "name": (False, lambda x: x.get('name', '').lower()), "enabled": (False, lambda x: x.get('sort_enabled', '').lower()), "size": (True, lambda x: x.get('size', 0)), From 09141ee1a8f51df7ef0a4b0c2ffbd053a3628b74 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Sun, 28 May 2023 20:00:03 +0300 Subject: [PATCH 234/282] Fix int64 with UniPC && Add OneAPI version logging --- installer.py | 3 ++- modules/sd_samplers_compvis.py | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/installer.py b/installer.py index 25a6e18c2..8a36342d3 100644 --- a/installer.py +++ b/installer.py @@ -289,7 +289,8 @@ def check_torch(): log.info(f'Torch {torch.__version__}') if args.use_ipex and allow_ipex: import intel_extension_for_pytorch as ipex # pylint: disable=import-error, unused-import - log.info(f'Torch backend: Intel OneAPI {torch.__version__}') + log.info(f'Torch backend: Intel IPEX {ipex.__version__}') + log.info(f'{os.popen("icpx --version").read().rstrip()}') log.info(f'Torch detected GPU: {torch.xpu.get_device_name("xpu")} VRAM {round(torch.xpu.get_device_properties("xpu").total_memory / 1024 / 1024)}') elif torch.cuda.is_available() and (allow_cuda or allow_rocm): if torch.version.cuda and allow_cuda: diff --git a/modules/sd_samplers_compvis.py b/modules/sd_samplers_compvis.py index 98b0a3614..0fb411111 100644 --- a/modules/sd_samplers_compvis.py +++ b/modules/sd_samplers_compvis.py @@ -97,7 +97,10 @@ class VanillaStableDiffusionSampler: unconditional_conditioning = unconditional_conditioning[:, :cond.shape[1]] if self.mask is not None: - img_orig = self.sampler.model.q_sample(self.init_latent, ts) + if shared.cmd_opts.use_ipex: + img_orig = self.sampler.model.q_sample(self.init_latent, ts.type(torch.int64)) + else: + img_orig = self.sampler.model.q_sample(self.init_latent, ts) x = img_orig * self.mask + self.nmask * x # Wrap the image conditioning back up since the DDIM code can accept the dict directly. From d818ed5ea419ccaf7b342fcf01092500c12aab0c Mon Sep 17 00:00:00 2001 From: Alexander Brown Date: Sun, 28 May 2023 11:26:12 -0700 Subject: [PATCH 235/282] classes, not ids --- javascript/style.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/javascript/style.css b/javascript/style.css index fab461254..523e50aba 100644 --- a/javascript/style.css +++ b/javascript/style.css @@ -676,19 +676,19 @@ footer { #extras_generate, #extras_interrupt, #extras_skip { display: block !important; position: relative; height: 36px; } #extras_upscale { margin-top: 10px } -#controlnet_control_type .controlnet_control_type_filter_group .wrap:last-of-type { +.controlnet_control_type .controlnet_control_type_filter_group .wrap:last-of-type { display: grid; grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); } -#controlnet_preprocessor_model { +.controlnet_preprocessor_model { display: grid; grid-auto-flow: row; grid-template-columns: 1fr max-content; } -#controlnet_preprocessor_model button.gradio-button { +.controlnet_preprocessor_model button.gradio-button { align-self: center; } From 094fc50d4591c327b834eb0d8282a057c5e0b476 Mon Sep 17 00:00:00 2001 From: Alexander Brown Date: Sun, 28 May 2023 12:44:46 -0700 Subject: [PATCH 236/282] Add weight/steps styling Increase specificity for preprocessor/model now that they're class selectors --- javascript/style.css | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/javascript/style.css b/javascript/style.css index 523e50aba..b3f27cac9 100644 --- a/javascript/style.css +++ b/javascript/style.css @@ -682,19 +682,28 @@ footer { grid-template-columns: repeat(4, minmax(0, 1fr)); } -.controlnet_preprocessor_model { +div.controlnet_preprocessor_model { display: grid; grid-auto-flow: row; grid-template-columns: 1fr max-content; } -.controlnet_preprocessor_model button.gradio-button { +div.controlnet_preprocessor_model button.gradio-button { align-self: center; } -.controlnet_resize_mode_radio .wrap:last-of-type, -.controlnet_control_mode_radio .wrap:last-of-type { +fieldset.controlnet_resize_mode_radio .wrap:last-of-type, +fieldset.controlnet_control_mode_radio .wrap:last-of-type { flex-direction: column; } +div.controlnet_weight_steps > div.form { + display: grid; + grid-template: repeat(2, 1fr) / repeat(2, 1fr); +} + +div.controlnet_weight_steps .controlnet_control_weight_slider { + grid-column: 1 / 3; +} + #modelmerger_interp_description { margin-top: 1em; margin-bottom: 1em; } From 2ee38ccd0eb98f42177679105c8e9b96ea7ff1c1 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 28 May 2023 16:07:10 -0400 Subject: [PATCH 237/282] update --- CHANGELOG.md | 5 +++++ modules/hf_hub.py => cli/hfsearch.py | 0 extensions-builtin/sd-extension-system-info | 2 +- installer.py | 5 +++-- javascript/ui.js | 21 ++++++++++++--------- 5 files changed, 21 insertions(+), 12 deletions(-) rename modules/hf_hub.py => cli/hfsearch.py (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44a6975c8..c7c38970d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log for SD.Next +## Update for 05/28/2023 + +- settings search option +- system info live gpu memory and load graphs + ## Update for 05/26/2023 Some quality-of-life improvements... diff --git a/modules/hf_hub.py b/cli/hfsearch.py similarity index 100% rename from modules/hf_hub.py rename to cli/hfsearch.py diff --git a/extensions-builtin/sd-extension-system-info b/extensions-builtin/sd-extension-system-info index 4915b9857..46386f93d 160000 --- a/extensions-builtin/sd-extension-system-info +++ b/extensions-builtin/sd-extension-system-info @@ -1 +1 @@ -Subproject commit 4915b98576426f3fa77eec7b51965260736a5060 +Subproject commit 46386f93de0a9614ef94cf75acb0909e59859274 diff --git a/installer.py b/installer.py index 8a36342d3..2e13c515f 100644 --- a/installer.py +++ b/installer.py @@ -258,7 +258,7 @@ def check_torch(): elif allow_rocm and (shutil.which('rocminfo') is not None or os.path.exists('/opt/rocm/bin/rocminfo') or os.path.exists('/dev/kfd')): log.info('AMD ROCm toolkit detected') os.environ.setdefault('HSA_OVERRIDE_GFX_VERSION', '10.3.0') - os.environ.setdefault('PYTORCH_HIP_ALLOC_CONF', 'garbage_collection_threshold:0.9,max_split_size_mb:512') + os.environ.setdefault('PYTORCH_HIP_ALLOC_CONF', 'garbage_collection_threshold:0.8,max_split_size_mb:512') torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.0.0 torchvision==0.15.1 --index-url https://download.pytorch.org/whl/rocm5.4.2') xformers_package = os.environ.get('XFORMERS_PACKAGE', 'none') elif allow_ipex and args.use_ipex and shutil.which('sycl-ls') is not None: @@ -293,6 +293,7 @@ def check_torch(): log.info(f'{os.popen("icpx --version").read().rstrip()}') log.info(f'Torch detected GPU: {torch.xpu.get_device_name("xpu")} VRAM {round(torch.xpu.get_device_properties("xpu").total_memory / 1024 / 1024)}') elif torch.cuda.is_available() and (allow_cuda or allow_rocm): + log.debug(f'Torch allocator: {torch.cuda.get_allocator_backend()}') if torch.version.cuda and allow_cuda: log.info(f'Torch backend: nVidia CUDA {torch.version.cuda} cuDNN {torch.backends.cudnn.version() if torch.backends.cudnn.is_available() else "N/A"}') elif torch.version.hip and allow_rocm: @@ -522,7 +523,7 @@ def set_environment(): os.environ.setdefault('ACCELERATE', 'True') os.environ.setdefault('FORCE_CUDA', '1') os.environ.setdefault('ATTN_PRECISION', 'fp16') - os.environ.setdefault('PYTORCH_CUDA_ALLOC_CONF', 'garbage_collection_threshold:0.9,max_split_size_mb:512') + os.environ.setdefault('PYTORCH_CUDA_ALLOC_CONF', 'garbage_collection_threshold:0.8,max_split_size_mb:512') os.environ.setdefault('CUDA_LAUNCH_BLOCKING', '0') os.environ.setdefault('CUDA_CACHE_DISABLE', '0') os.environ.setdefault('CUDA_AUTO_BOOST', '1') diff --git a/javascript/ui.js b/javascript/ui.js index 14eff9927..7a2bd837d 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -262,16 +262,19 @@ onUiUpdate(() => { } const settings_search = gradioApp().querySelectorAll('#settings_search > label > textarea')[0]; settings_search.oninput = (e) => { - gradioApp().querySelectorAll('#settings > div').forEach((elem) => { - elem.style.display = 'block'; - }); - gradioApp().querySelectorAll('#tab_settings .tabitem').forEach((section) => { - section.querySelectorAll('.block').forEach((setting) => { - const visible = setting.innerText.toLowerCase().includes(e.target.value.toLowerCase()) || setting.id.toLowerCase().includes(e.target.value.toLowerCase()); - const el = setting.parentElement.classList.contains('form') ? setting.parentElement : setting; // if parent is form use that instead - el.style.display = visible ? 'block' : 'none'; + setTimeout(() => { + gradioApp().querySelectorAll('#settings > div').forEach((elem) => { + if (elem.id === 'settings_tab_licenses') return; + elem.style.display = 'block'; }); - }); + gradioApp().querySelectorAll('#tab_settings .tabitem').forEach((section) => { + section.querySelectorAll('.block').forEach((setting) => { + const visible = setting.innerText.toLowerCase().includes(e.target.value.toLowerCase()) || setting.id.toLowerCase().includes(e.target.value.toLowerCase()); + if (setting.parentElement.classList.contains('form')) setting.parentElement.style.display = visible ? 'flex' : 'none'; + else setting.style.display = visible ? 'block' : 'none'; + }); + }); + }, 50); }; }); From 54257dd2268d1bebbc25346cca859c610c05b04e Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 28 May 2023 17:09:58 -0400 Subject: [PATCH 238/282] refactoring for pylint --- installer.py | 2 +- modules/deepbooru_model.py | 2 +- modules/esrgan_model.py | 6 +- modules/gfpgan_model.py | 14 +- modules/localization.py | 6 +- modules/lowvram.py | 4 +- modules/masking.py | 3 +- modules/processing.py | 4 +- modules/prompt_parser.py | 2 +- modules/script_loading.py | 6 +- modules/scripts_postprocessing.py | 12 +- modules/sd_disable_initialization.py | 25 +- modules/sd_hijack_checkpoint.py | 7 +- modules/sd_hijack_clip_old.py | 2 +- modules/sd_hijack_inpainting.py | 8 +- modules/sd_hijack_optimizations.py | 18 +- modules/sd_hijack_unet.py | 16 +- modules/sd_models.py | 5 +- modules/sd_samplers_compvis.py | 4 +- modules/sd_samplers_kdiffusion.py | 4 +- modules/sd_vae_approx.py | 2 +- modules/sub_quadratic_attention.py | 11 +- modules/ui.py | 2 +- modules/ui_extensions.py | 890 ++++++++++++------------- modules/ui_extra_networks_hypernets.py | 2 +- 25 files changed, 522 insertions(+), 535 deletions(-) diff --git a/installer.py b/installer.py index 2e13c515f..0b3a9de6b 100644 --- a/installer.py +++ b/installer.py @@ -705,7 +705,7 @@ def extensions_preload(force = False): from modules.paths_internal import extensions_builtin_dir, extensions_dir extension_folders = [extensions_builtin_dir] if args.safe else [extensions_builtin_dir, extensions_dir] for ext_dir in extension_folders: - preload_extensions(ext_dir, parser, args.debug) + preload_extensions(ext_dir, parser) except: log.error('Error running extension preloading') if args.profile: diff --git a/modules/deepbooru_model.py b/modules/deepbooru_model.py index c2c77cd25..33e24396d 100644 --- a/modules/deepbooru_model.py +++ b/modules/deepbooru_model.py @@ -671,7 +671,7 @@ class DeepDanbooruModel(nn.Module): t_771 = torch.sigmoid(t_770) return t_771 - def load_state_dict(self, state_dict, **kwargs): + def load_state_dict(self, state_dict, **kwargs): # pylint: disable=arguments-differ,unused-argument self.tags = state_dict.get('tags', []) super(DeepDanbooruModel, self).load_state_dict({k: v for k, v in state_dict.items() if k != 'tags'}) diff --git a/modules/esrgan_model.py b/modules/esrgan_model.py index f2565ca47..b685711ef 100644 --- a/modules/esrgan_model.py +++ b/modules/esrgan_model.py @@ -17,7 +17,7 @@ def mod2normal(state_dict): if 'conv_first.weight' in state_dict: crt_net = {} items = [] - for k, v in state_dict.items(): + for k, _v in state_dict.items(): items.append(k) crt_net['model.0.weight'] = state_dict['conv_first.weight'] @@ -53,7 +53,7 @@ def resrgan2normal(state_dict, nb=23): re8x = 0 crt_net = {} items = [] - for k, v in state_dict.items(): + for k, _v in state_dict.items(): items.append(k) crt_net['model.0.weight'] = state_dict['conv_first.weight'] @@ -186,7 +186,7 @@ class UpscalerESRGAN(Upscaler): elif "conv_first.weight" in state_dict: state_dict = mod2normal(state_dict) elif "model.0.weight" not in state_dict: - raise Exception("The file is not a recognized ESRGAN model.") + raise TypeError("The file is not a recognized ESRGAN model.") in_nc, out_nc, nf, nb, plus, mscale = infer_params(state_dict) diff --git a/modules/gfpgan_model.py b/modules/gfpgan_model.py index 9f332a730..728df70bf 100644 --- a/modules/gfpgan_model.py +++ b/modules/gfpgan_model.py @@ -13,9 +13,8 @@ loaded_gfpgan_model = None def gfpgann(): import facexlib - import gfpgan - global loaded_gfpgan_model - global model_path + import gfpgan # pylint: disable=unused-import + global loaded_gfpgan_model # pylint: disable=global-statement if loaded_gfpgan_model is not None: loaded_gfpgan_model.gfpgan.to(devices.device_gfpgan) return loaded_gfpgan_model @@ -54,7 +53,7 @@ def gfpgan_fix_faces(np_image): send_model_to(model, devices.device_gfpgan) np_image_bgr = np_image[:, :, ::-1] - cropped_faces, restored_faces, gfpgan_output_bgr = model.enhance(np_image_bgr, has_aligned=False, only_center_face=False, paste_back=True) + _cropped_faces, _restored_faces, gfpgan_output_bgr = model.enhance(np_image_bgr, has_aligned=False, only_center_face=False, paste_back=True) np_image = gfpgan_output_bgr[:, :, ::-1] model.face_helper.clean_all() @@ -69,7 +68,6 @@ gfpgan_constructor = None def setup_model(dirname): - global model_path if not os.path.exists(model_path): os.makedirs(model_path) @@ -77,9 +75,9 @@ def setup_model(dirname): import gfpgan import facexlib - global user_path - global have_gfpgan - global gfpgan_constructor + global user_path # pylint: disable=global-statement + global have_gfpgan # pylint: disable=global-statement + global gfpgan_constructor # pylint: disable=global-statement load_file_from_url_orig = gfpgan.utils.load_file_from_url facex_load_file_from_url_orig = facexlib.detection.load_file_from_url diff --git a/modules/localization.py b/modules/localization.py index 5b58f9e8c..d18d5137b 100644 --- a/modules/localization.py +++ b/modules/localization.py @@ -1,5 +1,4 @@ import json -import os import sys import modules.errors as errors @@ -7,9 +6,8 @@ import modules.errors as errors localizations = {} -def list_localizations(dirname): +def list_localizations(dirname): # pylint: disable=unused-argument localizations.clear() - return localizations """ for file in os.listdir(dirname): fn, ext = os.path.splitext(file) @@ -23,6 +21,8 @@ def list_localizations(dirname): fn, ext = os.path.splitext(file.filename) localizations[fn] = file.path """ + return localizations + def localization_js(current_localization_name): fn = localizations.get(current_localization_name, None) diff --git a/modules/lowvram.py b/modules/lowvram.py index e254cc131..cb684acd2 100644 --- a/modules/lowvram.py +++ b/modules/lowvram.py @@ -6,7 +6,7 @@ cpu = torch.device("cpu") def send_everything_to_cpu(): - global module_in_gpu + global module_in_gpu # pylint: disable=global-statement if module_in_gpu is not None: module_in_gpu.to(cpu) @@ -22,7 +22,7 @@ def setup_for_low_vram(sd_model, use_medvram): we add this as forward_pre_hook to a lot of modules and this way all but one of them will be in CPU """ - global module_in_gpu + global module_in_gpu # pylint: disable=global-statement module = parents.get(module, module) diff --git a/modules/masking.py b/modules/masking.py index a5c4d2da5..484650530 100644 --- a/modules/masking.py +++ b/modules/masking.py @@ -4,7 +4,7 @@ from PIL import Image, ImageFilter, ImageOps def get_crop_region(mask, pad=0): """finds a rectangular region that contains all masked ares in an image. Returns (x1, y1, x2, y2) coordinates of the rectangle. For example, if a user has painted the top-right part of a 512x512 image", the result may be (256, 0, 512, 256)""" - + h, w = mask.shape crop_left = 0 @@ -96,4 +96,3 @@ def fill(image, mask): image_mod.alpha_composite(blurred) return image_mod.convert("RGB") - diff --git a/modules/processing.py b/modules/processing.py index f46eb65fe..4c3cca1db 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -220,7 +220,7 @@ class StableDiffusionProcessing: source_image = devices.cond_cast_float(source_image) # HACK: Using introspection as the Depth2Image model doesn't appear to uniquely # identify itself with a field common to all models. The conditioning_key is also hybrid. - if opts.sd_backend == 'Diffusers': # TODO: img2img_image_conditioning + if opts.sd_backend == 'Diffusers': # TODO: Diffusers img2img_image_conditioning return latent_image.new_zeros(latent_image.shape[0], 5, 1, 1) if isinstance(self.sd_model, LatentDepth2ImageDiffusion): return self.depth2img_image_conditioning(source_image) @@ -649,7 +649,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: devices.torch_gc() if p.scripts is not None: p.scripts.postprocess_batch(p, x_samples_ddim, batch_number=n) - else: # TODO Diffusers + else: # TODO Diffusers main processing generator = [torch.Generator(device="cpu").manual_seed(s) for s in seeds] if shared.sd_model.scheduler.name != p.sampler_name: sampler = sd_samplers.all_samplers_map.get(p.sampler_name, None) diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py index e2647a6f0..1474e69d3 100644 --- a/modules/prompt_parser.py +++ b/modules/prompt_parser.py @@ -13,7 +13,7 @@ from typing import List import lark import torch from compel import Compel -from modules.shared import log, opts +from modules.shared import opts # a prompt like this: "fantasy landscape with a [mountain:lake:0.25] and [an oak:a christmas tree:0.75][ in foreground::0.6][ in background:0.25] [shoddy:masterful:0.5]" # will be represented with prompt_schedule like this (assuming steps=100): diff --git a/modules/script_loading.py b/modules/script_loading.py index 6827515fc..b28f6b65d 100644 --- a/modules/script_loading.py +++ b/modules/script_loading.py @@ -6,7 +6,7 @@ import modules.errors as errors preloaded = [] -def load_module(path, detailed=False): +def load_module(path): module_spec = importlib.util.spec_from_file_location(os.path.basename(path), path) module = importlib.util.module_from_spec(module_spec) try: @@ -17,7 +17,7 @@ def load_module(path, detailed=False): -def preload_extensions(extensions_dir, parser, detailed=False): +def preload_extensions(extensions_dir, parser): if not os.path.isdir(extensions_dir): return for dirname in sorted(os.listdir(extensions_dir)): @@ -28,7 +28,7 @@ def preload_extensions(extensions_dir, parser, detailed=False): if not os.path.isfile(preload_script): continue try: - module = load_module(preload_script, detailed) + module = load_module(preload_script) if hasattr(module, 'preload'): module.preload(parser) except Exception as e: diff --git a/modules/scripts_postprocessing.py b/modules/scripts_postprocessing.py index 64563ab62..7baa4c738 100644 --- a/modules/scripts_postprocessing.py +++ b/modules/scripts_postprocessing.py @@ -31,23 +31,19 @@ class ScriptPostprocessing: The return value should be a dictionary that maps parameter names to components used in processing. Values of those components will be passed to process() function. """ - - pass + pass # pylint: disable=unnecessary-pass def process(self, pp: PostprocessedImage, **args): """ This function is called to postprocess the image. args contains a dictionary with all values returned by components from ui() """ - - pass + pass # pylint: disable=unnecessary-pass def image_changed(self): pass - - def wrap_call(func, filename, funcname, *args, default=None, **kwargs): try: res = func(*args, **kwargs) @@ -66,7 +62,7 @@ class ScriptPostprocessingRunner: def initialize_scripts(self, scripts_data): self.scripts = [] - for script_class, path, basedir, script_module in scripts_data: + for script_class, path, _basedir, _script_module in scripts_data: script: ScriptPostprocessing = script_class() script.filename = path @@ -124,7 +120,7 @@ class ScriptPostprocessingRunner: script_args = args[script.args_from:script.args_to] process_args = {} - for (name, component), value in zip(script.controls.items(), script_args): + for (name, _component), value in zip(script.controls.items(), script_args): process_args[name] = value script.process(pp, **process_args) diff --git a/modules/sd_disable_initialization.py b/modules/sd_disable_initialization.py index c4a09d15d..c30525c30 100644 --- a/modules/sd_disable_initialization.py +++ b/modules/sd_disable_initialization.py @@ -35,10 +35,10 @@ class DisableInitialization: return original def __enter__(self): - def do_nothing(*args, **kwargs): + def do_nothing(*args, **kwargs): # pylint: disable=unused-argument pass - def create_model_and_transforms_without_pretrained(*args, pretrained=None, **kwargs): + def create_model_and_transforms_without_pretrained(*args, pretrained=None, **kwargs): # pylint: disable=unused-argument return self.create_model_and_transforms(*args, pretrained=None, **kwargs) def CLIPTextModel_from_pretrained(pretrained_model_name_or_path, *model_args, **kwargs): @@ -61,16 +61,16 @@ class DisableInitialization: if res is None: res = original(url, *args, local_files_only=False, **kwargs) return res - except Exception as e: + except Exception: return original(url, *args, local_files_only=False, **kwargs) - def transformers_utils_hub_get_from_cache(url, *args, local_files_only=False, **kwargs): + def transformers_utils_hub_get_from_cache(url, *args, local_files_only=False, **kwargs): # pylint: disable=unused-argument return transformers_utils_hub_get_file_from_cache(self.transformers_utils_hub_get_from_cache, url, *args, **kwargs) - def transformers_tokenization_utils_base_cached_file(url, *args, local_files_only=False, **kwargs): + def transformers_tokenization_utils_base_cached_file(url, *args, local_files_only=False, **kwargs): # pylint: disable=unused-argument return transformers_utils_hub_get_file_from_cache(self.transformers_tokenization_utils_base_cached_file, url, *args, **kwargs) - def transformers_configuration_utils_cached_file(url, *args, local_files_only=False, **kwargs): + def transformers_configuration_utils_cached_file(url, *args, local_files_only=False, **kwargs): # pylint: disable=unused-argument return transformers_utils_hub_get_file_from_cache(self.transformers_configuration_utils_cached_file, url, *args, **kwargs) self.replace(torch.nn.init, 'kaiming_uniform_', do_nothing) @@ -78,16 +78,15 @@ class DisableInitialization: self.replace(torch.nn.init, '_no_grad_uniform_', do_nothing) if self.disable_clip: - self.create_model_and_transforms = self.replace(open_clip, 'create_model_and_transforms', create_model_and_transforms_without_pretrained) - self.CLIPTextModel_from_pretrained = self.replace(ldm.modules.encoders.modules.CLIPTextModel, 'from_pretrained', CLIPTextModel_from_pretrained) - self.transformers_modeling_utils_load_pretrained_model = self.replace(transformers.modeling_utils.PreTrainedModel, '_load_pretrained_model', transformers_modeling_utils_load_pretrained_model) - self.transformers_tokenization_utils_base_cached_file = self.replace(transformers.tokenization_utils_base, 'cached_file', transformers_tokenization_utils_base_cached_file) - self.transformers_configuration_utils_cached_file = self.replace(transformers.configuration_utils, 'cached_file', transformers_configuration_utils_cached_file) - self.transformers_utils_hub_get_from_cache = self.replace(transformers.utils.hub, 'get_from_cache', transformers_utils_hub_get_from_cache) + self.create_model_and_transforms = self.replace(open_clip, 'create_model_and_transforms', create_model_and_transforms_without_pretrained) # pylint: disable=attribute-defined-outside-init + self.CLIPTextModel_from_pretrained = self.replace(ldm.modules.encoders.modules.CLIPTextModel, 'from_pretrained', CLIPTextModel_from_pretrained) # pylint: disable=attribute-defined-outside-init + self.transformers_modeling_utils_load_pretrained_model = self.replace(transformers.modeling_utils.PreTrainedModel, '_load_pretrained_model', transformers_modeling_utils_load_pretrained_model) # pylint: disable=attribute-defined-outside-init + self.transformers_tokenization_utils_base_cached_file = self.replace(transformers.tokenization_utils_base, 'cached_file', transformers_tokenization_utils_base_cached_file) # pylint: disable=attribute-defined-outside-init + self.transformers_configuration_utils_cached_file = self.replace(transformers.configuration_utils, 'cached_file', transformers_configuration_utils_cached_file) # pylint: disable=attribute-defined-outside-init + self.transformers_utils_hub_get_from_cache = self.replace(transformers.utils.hub, 'get_from_cache', transformers_utils_hub_get_from_cache) # pylint: disable=attribute-defined-outside-init def __exit__(self, exc_type, exc_val, exc_tb): for obj, field, original in self.replaced: setattr(obj, field, original) self.replaced.clear() - diff --git a/modules/sd_hijack_checkpoint.py b/modules/sd_hijack_checkpoint.py index 2604d969f..6146c19a6 100644 --- a/modules/sd_hijack_checkpoint.py +++ b/modules/sd_hijack_checkpoint.py @@ -5,15 +5,15 @@ import ldm.modules.diffusionmodules.openaimodel def BasicTransformerBlock_forward(self, x, context=None): - return checkpoint(self._forward, x, context) + return checkpoint(self._forward, x, context) # pylint: disable=protected-access def AttentionBlock_forward(self, x): - return checkpoint(self._forward, x) + return checkpoint(self._forward, x) # pylint: disable=protected-access def ResBlock_forward(self, x, emb): - return checkpoint(self._forward, x, emb) + return checkpoint(self._forward, x, emb) # pylint: disable=protected-access stored = [] @@ -43,4 +43,3 @@ def remove(): ldm.modules.diffusionmodules.openaimodel.AttentionBlock.forward = stored[2] stored.clear() - diff --git a/modules/sd_hijack_clip_old.py b/modules/sd_hijack_clip_old.py index a3476e956..21af997e9 100644 --- a/modules/sd_hijack_clip_old.py +++ b/modules/sd_hijack_clip_old.py @@ -70,7 +70,7 @@ def process_text_old(self: sd_hijack_clip.FrozenCLIPEmbedderWithCustomWordsBase, def forward_old(self: sd_hijack_clip.FrozenCLIPEmbedderWithCustomWordsBase, texts): - batch_multipliers, remade_batch_tokens, used_custom_terms, hijack_comments, hijack_fixes, token_count = process_text_old(self, texts) + batch_multipliers, remade_batch_tokens, used_custom_terms, hijack_comments, hijack_fixes, _token_count = process_text_old(self, texts) self.hijack.comments += hijack_comments diff --git a/modules/sd_hijack_inpainting.py b/modules/sd_hijack_inpainting.py index 4b23c132d..02691b705 100644 --- a/modules/sd_hijack_inpainting.py +++ b/modules/sd_hijack_inpainting.py @@ -4,12 +4,11 @@ import ldm.models.diffusion.ddpm import ldm.models.diffusion.ddim import ldm.models.diffusion.plms -from ldm.models.diffusion.ddpm import LatentDiffusion -from ldm.models.diffusion.plms import PLMSSampler -from ldm.models.diffusion.ddim import DDIMSampler, noise_like +from ldm.models.diffusion.ddpm import LatentDiffusion # pylint: disable=unused-import +from ldm.models.diffusion.plms import PLMSSampler # pylint: disable=unused-import +from ldm.models.diffusion.ddim import DDIMSampler, noise_like # pylint: disable=unused-import from ldm.models.diffusion.sampling_util import norm_thresholding - @torch.no_grad() def p_sample_plms(self, x, c, t, index, repeat_noise=False, use_original_steps=False, quantize_denoised=False, temperature=1., noise_dropout=0., score_corrector=None, corrector_kwargs=None, @@ -63,7 +62,6 @@ def p_sample_plms(self, x, c, t, index, repeat_noise=False, use_original_steps=F if quantize_denoised: pred_x0, _, *_ = self.model.first_stage_model.quantize(pred_x0) if dynamic_threshold is not None: - from ldm.models.diffusion.sampling_util import norm_thresholding pred_x0 = norm_thresholding(pred_x0, dynamic_threshold) # direction pointing to x_t dir_xt = (1. - a_prev - sigma_t**2).sqrt() * e_t diff --git a/modules/sd_hijack_optimizations.py b/modules/sd_hijack_optimizations.py index e8c8ce763..ef02ccc35 100644 --- a/modules/sd_hijack_optimizations.py +++ b/modules/sd_hijack_optimizations.py @@ -51,7 +51,7 @@ def get_available_vram(): # see https://github.com/basujindal/stable-diffusion/pull/117 for discussion -def split_cross_attention_forward_v1(self, x, context=None, mask=None): +def split_cross_attention_forward_v1(self, x, context=None, mask=None): # pylint: disable=unused-argument h = self.heads q_in = self.to_q(x) @@ -90,7 +90,7 @@ def split_cross_attention_forward_v1(self, x, context=None, mask=None): # taken from https://github.com/Doggettx/stable-diffusion and modified -def split_cross_attention_forward(self, x, context=None, mask=None): +def split_cross_attention_forward(self, x, context=None, mask=None): # pylint: disable=unused-argument h = self.heads q_in = self.to_q(x) context = default(context, x) @@ -231,7 +231,7 @@ def einsum_op(q, k, v): # Tested on i7 with 8MB L3 cache. return einsum_op_tensor_mem(q, k, v, 32) -def split_cross_attention_forward_invokeAI(self, x, context=None, mask=None): +def split_cross_attention_forward_invokeAI(self, x, context=None, mask=None): # pylint: disable=unused-argument h = self.heads q = self.to_q(x) @@ -315,7 +315,7 @@ def sub_quad_attention(q, k, v, q_chunk_size=1024, kv_chunk_size=None, kv_chunk_ if chunk_threshold_bytes is not None and qk_matmul_size_bytes <= chunk_threshold_bytes: # the big matmul fits into our memory limit; do everything in 1 chunk, # i.e. send it down the unchunked fast-path - query_chunk_size = q_tokens + query_chunk_size = q_tokens # pylint: disable=unused-variable kv_chunk_size = k_tokens with devices.without_autocast(disable=q.dtype == v.dtype): @@ -336,7 +336,7 @@ def get_xformers_flash_attention_op(q, k, v): try: flash_attention_op = xformers.ops.MemoryEfficientAttentionFlashAttentionOp - fw, bw = flash_attention_op + fw, _bw = flash_attention_op if fw.supports(xformers.ops.fmha.Inputs(query=q, key=k, value=v, attn_bias=None)): return flash_attention_op except Exception as e: @@ -345,7 +345,7 @@ def get_xformers_flash_attention_op(q, k, v): return None -def xformers_attention_forward(self, x, context=None, mask=None): +def xformers_attention_forward(self, x, context=None, mask=None): # pylint: disable=unused-argument h = self.heads q_in = self.to_q(x) context = default(context, x) @@ -481,7 +481,7 @@ def xformers_attnblock_forward(self, x): q = self.q(h_) k = self.k(h_) v = self.v(h_) - b, c, h, w = q.shape + b, c, h, w = q.shape # pylint: disable=unused-variable q, k, v = map(lambda t: rearrange(t, 'b c h w -> b (h w) c'), (q, k, v)) dtype = q.dtype if shared.opts.upcast_attn: @@ -503,7 +503,7 @@ def sdp_attnblock_forward(self, x): q = self.q(h_) k = self.k(h_) v = self.v(h_) - b, c, h, w = q.shape + b, c, h, w = q.shape # pylint: disable=unused-variable q, k, v = map(lambda t: rearrange(t, 'b c h w -> b (h w) c'), (q, k, v)) dtype = q.dtype if shared.opts.upcast_attn: @@ -531,7 +531,7 @@ def sub_quad_attnblock_forward(self, x): q = self.q(h_) k = self.k(h_) v = self.v(h_) - b, c, h, w = q.shape + b, c, h, w = q.shape # pylint: disable=unused-variable q, k, v = map(lambda t: rearrange(t, 'b c h w -> b (h w) c'), (q, k, v)) q = q.contiguous() k = k.contiguous() diff --git a/modules/sd_hijack_unet.py b/modules/sd_hijack_unet.py index 252e8e5fc..c7fee64b5 100644 --- a/modules/sd_hijack_unet.py +++ b/modules/sd_hijack_unet.py @@ -47,25 +47,25 @@ def apply_model(orig_func, self, x_noisy, t, cond, **kwargs): class GELUHijack(torch.nn.GELU, torch.nn.Module): - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs): # pylint: disable=super-init-not-called torch.nn.GELU.__init__(self, *args, **kwargs) - def forward(self, x): + def forward(self, input): # pylint: disable=redefined-builtin if devices.unet_needs_upcast: - return torch.nn.GELU.forward(self.float(), x.float()).to(devices.dtype_unet) + return torch.nn.GELU.forward(self.float(), input.float()).to(devices.dtype_unet) else: - return torch.nn.GELU.forward(self, x) + return torch.nn.GELU.forward(self, input) ddpm_edit_hijack = None def hijack_ddpm_edit(): - global ddpm_edit_hijack + global ddpm_edit_hijack # pylint: disable=global-statement if not ddpm_edit_hijack: CondFunc('modules.models.diffusion.ddpm_edit.LatentDiffusion.decode_first_stage', first_stage_sub, first_stage_cond) CondFunc('modules.models.diffusion.ddpm_edit.LatentDiffusion.encode_first_stage', first_stage_sub, first_stage_cond) ddpm_edit_hijack = CondFunc('modules.models.diffusion.ddpm_edit.LatentDiffusion.apply_model', apply_model, unet_needs_upcast) -unet_needs_upcast = lambda *args, **kwargs: devices.unet_needs_upcast +unet_needs_upcast = lambda *args, **kwargs: devices.unet_needs_upcast # pylint: disable=unnecessary-lambda-assignment CondFunc('ldm.models.diffusion.ddpm.LatentDiffusion.apply_model', apply_model, unet_needs_upcast) CondFunc('ldm.modules.diffusionmodules.openaimodel.timestep_embedding', lambda orig_func, timesteps, *args, **kwargs: orig_func(timesteps, *args, **kwargs).to(torch.float32 if timesteps.dtype == torch.int64 else devices.dtype_unet), unet_needs_upcast) if version.parse(torch.__version__) <= version.parse("1.13.2") or torch.cuda.is_available() or shared.cmd_opts.use_ipex: @@ -73,8 +73,8 @@ if version.parse(torch.__version__) <= version.parse("1.13.2") or torch.cuda.is_ CondFunc('ldm.modules.attention.GEGLU.forward', lambda orig_func, self, x: orig_func(self.float(), x.float()).to(devices.dtype_unet), unet_needs_upcast) CondFunc('open_clip.transformer.ResidualAttentionBlock.__init__', lambda orig_func, *args, **kwargs: kwargs.update({'act_layer': GELUHijack}) and False or orig_func(*args, **kwargs), lambda _, *args, **kwargs: kwargs.get('act_layer') is None or kwargs['act_layer'] == torch.nn.GELU) -first_stage_cond = lambda _, self, *args, **kwargs: devices.unet_needs_upcast and self.model.diffusion_model.dtype == torch.float16 -first_stage_sub = lambda orig_func, self, x, **kwargs: orig_func(self, x.to(devices.dtype_vae), **kwargs) +first_stage_cond = lambda _, self, *args, **kwargs: devices.unet_needs_upcast and self.model.diffusion_model.dtype == torch.float16 # pylint: disable=unnecessary-lambda-assignment +first_stage_sub = lambda orig_func, self, x, **kwargs: orig_func(self, x.to(devices.dtype_vae), **kwargs) # pylint: disable=unnecessary-lambda-assignment CondFunc('ldm.models.diffusion.ddpm.LatentDiffusion.decode_first_stage', first_stage_sub, first_stage_cond) CondFunc('ldm.models.diffusion.ddpm.LatentDiffusion.encode_first_stage', first_stage_sub, first_stage_cond) CondFunc('ldm.models.diffusion.ddpm.LatentDiffusion.get_first_stage_encoding', lambda orig_func, *args, **kwargs: orig_func(*args, **kwargs).float(), first_stage_cond) diff --git a/modules/sd_models.py b/modules/sd_models.py index 80626abde..e33465be0 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -28,7 +28,7 @@ checkpoints_loaded = collections.OrderedDict() skip_next_load = False -class CheckpointInfo: # TODO Diffusers +class CheckpointInfo: def __init__(self, filename): name = '' self.name = None @@ -48,7 +48,6 @@ class CheckpointInfo: # TODO Diffusers self.hash = model_hash(self.filename) self.sha256 = hashes.sha256_from_cache(self.filename, f"checkpoint/{name}") else: # TODO Diffusers - # sd_model.unet.config._name_or_path.split("/")[-2] repo = [r for r in modelloader.diffuser_repos if filename == r['filename']] if len(repo) == 0: shared.log.error(f'Cannot find diffuser model: {filename}') @@ -540,7 +539,7 @@ def reload_model_weights(sd_model=None, info=None): sd_model.to(devices.cpu) if shared.opts.model_reuse_dict and sd_model is not None: shared.log.info('Reusing previous model dictionary') - sd_hijack.model_hijack.undo_hijack(sd_model) # TODO double undo hijack + sd_hijack.model_hijack.undo_hijack(sd_model) else: unload_model_weights() sd_model = None diff --git a/modules/sd_samplers_compvis.py b/modules/sd_samplers_compvis.py index 0fb411111..5f5544479 100644 --- a/modules/sd_samplers_compvis.py +++ b/modules/sd_samplers_compvis.py @@ -40,7 +40,7 @@ class VanillaStableDiffusionSampler: self.conditioning_key = sd_model.model.conditioning_key - def number_of_needed_noises(self, p): + def number_of_needed_noises(self, p): # pylint: disable=unused-argument return 0 def launch_sampling(self, steps, func): @@ -128,7 +128,7 @@ class VanillaStableDiffusionSampler: self.update_step(res[1]) return x, ts, cond, uncond, res - def unipc_after_update(self, x, model_x): + def unipc_after_update(self, x, model_x): # pylint: disable=unused-argument self.update_step(x) def initialize(self, p): diff --git a/modules/sd_samplers_kdiffusion.py b/modules/sd_samplers_kdiffusion.py index 0928b8ee1..8622c0b9c 100644 --- a/modules/sd_samplers_kdiffusion.py +++ b/modules/sd_samplers_kdiffusion.py @@ -97,10 +97,10 @@ class CFGDenoiser(torch.nn.Module): if shared.sd_model.model.conditioning_key == "crossattn-adm": image_uncond = torch.zeros_like(image_cond) - make_condition_dict = lambda c_crossattn, c_adm: {"c_crossattn": c_crossattn, "c_adm": c_adm} + make_condition_dict = lambda c_crossattn, c_adm: {"c_crossattn": c_crossattn, "c_adm": c_adm} # pylint: disable=unnecessary-lambda-assignment else: image_uncond = image_cond - make_condition_dict = lambda c_crossattn, c_concat: {"c_crossattn": c_crossattn, "c_concat": [c_concat]} + make_condition_dict = lambda c_crossattn, c_concat: {"c_crossattn": c_crossattn, "c_concat": [c_concat]} # pylint: disable=unnecessary-lambda-assignment if not is_edit_model: x_in = torch.cat([torch.stack([x[i] for _ in range(n)]) for i, n in enumerate(repeats)] + [x]) diff --git a/modules/sd_vae_approx.py b/modules/sd_vae_approx.py index e2f004683..20e337255 100644 --- a/modules/sd_vae_approx.py +++ b/modules/sd_vae_approx.py @@ -32,7 +32,7 @@ class VAEApprox(nn.Module): def model(): - global sd_vae_approx_model + global sd_vae_approx_model # pylint: disable=global-statement if sd_vae_approx_model is None: model_path = os.path.join(paths.models_path, "VAE-approx", "model.pt") diff --git a/modules/sub_quadratic_attention.py b/modules/sub_quadratic_attention.py index 87c18a38d..bab11d411 100644 --- a/modules/sub_quadratic_attention.py +++ b/modules/sub_quadratic_attention.py @@ -19,7 +19,7 @@ from torch.utils.checkpoint import checkpoint def narrow_trunc( - input: Tensor, + input: Tensor, # pylint: disable=redefined-builtin dim: int, start: int, length: int @@ -79,8 +79,8 @@ def _query_chunk_attention( summarize_chunk: SummarizeChunk, kv_chunk_size: int, ) -> Tensor: - batch_x_heads, k_tokens, k_channels_per_head = key.shape - _, _, v_channels_per_head = value.shape + _batch_x_heads, k_tokens, _k_channels_per_head = key.shape + _, _, _v_channels_per_head = value.shape def chunk_scanner(chunk_idx: int) -> AttnChunk: key_chunk = narrow_trunc( @@ -113,7 +113,6 @@ def _query_chunk_attention( return all_values / all_weights -# TODO: refactor CrossAttention#get_attention_scores to share code with this def _get_attention_scores_no_kv_chunking( query: Tensor, key: Tensor, @@ -164,7 +163,7 @@ def efficient_dot_product_attention( Returns: Output of shape `[batch * num_heads, query_tokens, channels_per_head]`. """ - batch_x_heads, q_tokens, q_channels_per_head = query.shape + _batch_x_heads, q_tokens, q_channels_per_head = query.shape _, k_tokens, _ = key.shape scale = q_channels_per_head ** -0.5 @@ -202,7 +201,7 @@ def efficient_dot_product_attention( value=value, ) - # TODO: maybe we should use torch.empty_like(query) to allocate storage in-advance, + # maybe we should use torch.empty_like(query) to allocate storage in-advance, # and pass slices to be mutated, instead of torch.cat()ing the returned slices res = torch.cat([ compute_query_chunk_attn( diff --git a/modules/ui.py b/modules/ui.py index 1b2c6c836..0e79e983d 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1324,7 +1324,7 @@ def create_ui(): reload_sd_model = gr.Button(value='Reload checkpoint', variant='primary', elem_id="sett_reload_sd_model") # reload_script_bodies = gr.Button(value='Reload scripts', variant='primary', elem_id="settings_reload_script_bodies") with gr.Row(): - _settings_search = gr.Text(label="Search", elem_id="settings_search") # TODO settings search + _settings_search = gr.Text(label="Search", elem_id="settings_search") result = gr.HTML(elem_id="settings_result") quicksettings_names = opts.quicksettings_list diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py index 9be1c3400..dc3298fe8 100644 --- a/modules/ui_extensions.py +++ b/modules/ui_extensions.py @@ -1,445 +1,445 @@ -import json -import os.path -import shutil -import errno -import html -from datetime import datetime -import git -import gradio as gr -from modules import extensions, shared, paths, errors -from modules.call_queue import wrap_gradio_gpu_call - - -extensions_index = "https://vladmandic.github.io/sd-data/pages/extensions.json" -hide_tags = ["localization"] -extensions_list = [] -sort_ordering = { - "default": (True, lambda x: x.get('sort_default', '')), - "user extensions": (True, lambda x: x.get('sort_user', '')), - "update avilable": (True, lambda x: x.get('sort_update', '')), - "updated date": (True, lambda x: x.get('updated', '2000-01-01T00:00')), - "created date": (True, lambda x: x.get('created', '2000-01-01T00:00')), - "name": (False, lambda x: x.get('name', '').lower()), - "enabled": (False, lambda x: x.get('sort_enabled', '').lower()), - "size": (True, lambda x: x.get('size', 0)), - "stars": (True, lambda x: x.get('stars', 0)), - "commits": (True, lambda x: x.get('commits', 0)), - "issues": (True, lambda x: x.get('issues', 0)), -} - - -def update_extension_list(): - global extensions_list # pylint: disable=global-statement - try: - with open(os.path.join(paths.script_path, "html", "extensions.json"), "r", encoding="utf-8") as f: - extensions_list = json.loads(f.read()) - shared.log.debug(f'Extensions list loaded: {os.path.join(paths.script_path, "html", "extensions.json")}') - except: - shared.log.debug(f'Extensions list failed to load: {os.path.join(paths.script_path, "html", "extensions.json")}') - found = [] - for ext in extensions.extensions: - ext.read_info_from_repo() - for ext in extensions_list: - installed = [extension for extension in extensions.extensions - if extension.git_name == ext['name'] - or extension.name == ext['name'] - or (extension.remote or '').startswith(ext['url'].replace('.git', ''))] - if len(installed) > 0: - found.append(installed[0]) - not_matched = [extension for extension in extensions.extensions if extension not in found] - for ext in not_matched: - entry = { - "name": ext.name or "", - "description": ext.description or "", - "url": ext.remote or "", - "tags": [], - "stars": 0, - "issues": 0, - "commits": 0, - "size": 0, - "long": ext.git_name or ext.name or "", - "added": ext.ctime, - "created": ext.ctime, - "updated": ext.mtime, - } - extensions_list.append(entry) - - -def check_access(): - assert not shared.cmd_opts.disable_extension_access, "extension access disabled because of command line flags" - - -def apply_and_restart(disable_list, update_list, disable_all): - check_access() - shared.log.debug(f'Extensions apply: disable={disable_list} update={update_list}') - disabled = json.loads(disable_list) - assert type(disabled) == list, f"wrong disable_list data for apply_and_restart: {disable_list}" - update = json.loads(update_list) - assert type(update) == list, f"wrong update_list data for apply_and_restart: {update_list}" - update = set(update) - for ext in extensions.extensions: - if ext.name not in update: - continue - try: - ext.fetch_and_reset_hard() - except Exception as e: - errors.display(e, f'extensions apply update: {ext.name}') - shared.opts.disabled_extensions = disabled - shared.opts.disable_all_extensions = disable_all - shared.opts.save(shared.config_filename) - shared.restart_server(restart=True) - - -def check_updates(_id_task, disable_list, search_text, sort_column): - check_access() - disabled = json.loads(disable_list) - assert type(disabled) == list, f"wrong disable_list data for apply_and_restart: {disable_list}" - exts = [ext for ext in extensions.extensions if ext.remote is not None and ext.name not in disabled] - shared.log.info(f'Extensions update check: update={len(exts)} disabled={len(disable_list)}') - shared.state.job_count = len(exts) - for ext in exts: - shared.state.textinfo = ext.name - try: - ext.check_updates() - if ext.can_update: - ext.fetch_and_reset_hard() - ext.read_info_from_repo() - commit_date = ext.commit_date or 1577836800 - shared.log.info(f'Extensions updated: {ext.name} {ext.commit_hash[:8]} {datetime.utcfromtimestamp(commit_date)}') - else: - commit_date = ext.commit_date or 1577836800 - shared.log.debug(f'Extensions no update available: {ext.name} {ext.commit_hash[:8]} {datetime.utcfromtimestamp(commit_date)}') - except FileNotFoundError as e: - if 'FETCH_HEAD' not in str(e): - raise - except Exception: - errors.display(e, f'extensions check update: {ext.name}') - shared.state.nextjob() - return refresh_extensions_list_from_data(search_text, sort_column), "Extension update complete | Restart required" - - -def make_commit_link(commit_hash, remote, text=None): - if text is None: - text = commit_hash[:8] - if remote.startswith("https://github.com/"): - href = os.path.join(remote, "commit", commit_hash) - return f'{text}' - else: - return text - - -def normalize_git_url(url): - if url is None: - return "" - url = url.replace(".git", "") - return url - - -def install_extension_from_url(dirname, url, branch_name, search_text, sort_column): - check_access() - assert url, 'No URL specified' - if dirname is None or dirname == "": - *parts, last_part = url.split('/') # pylint: disable=unused-variable - last_part = normalize_git_url(last_part) - dirname = last_part - target_dir = os.path.join(extensions.extensions_dir, dirname) - shared.log.info(f'Installing extension: {url} into {target_dir}') - assert not os.path.exists(target_dir), f'Extension directory already exists: {target_dir}' - normalized_url = normalize_git_url(url) - assert len([x for x in extensions.extensions if normalize_git_url(x.remote) == normalized_url]) == 0, 'Extension with this URL is already installed' - tmpdir = os.path.join(paths.data_path, "tmp", dirname) - try: - shutil.rmtree(tmpdir, True) - if not branch_name: - # if no branch is specified, use the default branch - with git.Repo.clone_from(url, tmpdir) as repo: - repo.remote().fetch() - for submodule in repo.submodules: - submodule.update() - else: - with git.Repo.clone_from(url, tmpdir, branch=branch_name) as repo: - repo.remote().fetch() - for submodule in repo.submodules: - submodule.update() - try: - os.rename(tmpdir, target_dir) - except OSError as err: - if err.errno == errno.EXDEV: - shutil.move(tmpdir, target_dir) - else: - raise err - from launch import run_extension_installer - run_extension_installer(target_dir) - extensions.list_extensions() - return [refresh_extensions_list_from_data(search_text, sort_column), html.escape(f"Extension installed: {target_dir} | Restart required")] - finally: - shutil.rmtree(tmpdir, True) - - -def install_extension(extension_to_install, search_text, sort_column): - shared.log.info(f'Extension install: {extension_to_install}') - code, message = install_extension_from_url(None, extension_to_install, None, search_text, sort_column) - return code, message - - -def uninstall_extension(extension_path, search_text, sort_column): - def errorRemoveReadonly(func, path, exc): - import stat - excvalue = exc[1] - shared.log.debug(f'Exception during cleanup: {func} {path} {excvalue.strerror}') - if func in (os.rmdir, os.remove, os.unlink) and excvalue.errno == errno.EACCES: - shared.log.debug(f'Retrying cleanup: {path}') - os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO) - func(path) - - ext = [extension for extension in extensions.extensions if os.path.abspath(extension.path) == os.path.abspath(extension_path)] - if len(ext) > 0 and os.path.isdir(extension_path): - found = ext[0] - try: - shutil.rmtree(found.path, ignore_errors=False, onerror=errorRemoveReadonly) - except Exception as e: - shared.log.warning(f'Extension uninstall failed: {found.path} {e}') - extensions.extensions = [extension for extension in extensions.extensions if os.path.abspath(found.path) != os.path.abspath(extension_path)] - update_extension_list() - code = refresh_extensions_list_from_data(search_text, sort_column) - shared.log.info(f'Extension uninstalled: {found.path}') - return code, f"Extension uninstalled: {found.path} | Restart required" - else: - shared.log.warning(f'Extension uninstall cannot find extension: {extension_path}') - code = refresh_extensions_list_from_data(search_text, sort_column) - return code, f"Extension uninstalled failed: {extension_path}" - - -def update_extension(extension_path, search_text, sort_column): - exts = [extension for extension in extensions.extensions if os.path.abspath(extension.path) == os.path.abspath(extension_path)] - shared.state.job_count = len(exts) - for ext in exts: - shared.log.debug(f'Extensions update start: {ext.name} {ext.commit_hash} {ext.commit_date}') - shared.state.textinfo = ext.name - try: - ext.check_updates() - if ext.can_update: - ext.fetch_and_reset_hard() - ext.read_info_from_repo() - commit_date = ext.commit_date or 1577836800 - shared.log.info(f'Extensions updated: {ext.name} {ext.commit_hash[:8]} {datetime.utcfromtimestamp(commit_date)}') - else: - commit_date = ext.commit_date or 1577836800 - shared.log.info(f'Extensions no update available: {ext.name} {ext.commit_hash[:8]} {datetime.utcfromtimestamp(commit_date)}') - except FileNotFoundError as e: - if 'FETCH_HEAD' not in str(e): - raise - except Exception as e: - shared.log.error(f'Extensions update failed: {ext.name}') - errors.display(e, f'extensions check update: {ext.name}') - shared.log.debug(f'Extensions update finish: {ext.name} {ext.commit_hash} {ext.commit_date}') - shared.state.nextjob() - return refresh_extensions_list_from_data(search_text, sort_column), f"Extension updated | {extension_path} | Restart required" - - -def refresh_extensions_list(search_text, sort_column): - global extensions_list # pylint: disable=global-statement - import urllib.request - try: - with urllib.request.urlopen(extensions_index) as response: - text = response.read() - extensions_list = json.loads(text) - with open(os.path.join(paths.script_path, "html", "extensions.json"), "w", encoding="utf-8") as outfile: - json_object = json.dumps(extensions_list, indent=2) - outfile.write(json_object) - shared.log.debug(f'Updated extensions list: {len(extensions_list)} {extensions_index} {outfile}') - except Exception as e: - shared.log.warning(f'Updated extensions list failed: {extensions_index} {e}') - update_extension_list() - code = refresh_extensions_list_from_data(search_text, sort_column) - return code, f'Extensions | {len(extensions.extensions)} registered | {len(extensions_list)} available' - - -def search_extensions(search_text, sort_column): - code = refresh_extensions_list_from_data(search_text, sort_column) - return code, f'Search | {search_text} | {sort_column}' - - -def refresh_extensions_list_from_data(search_text, sort_column): - shared.log.debug(f'Extensions manager: refresh list search="{search_text}" sort="{sort_column}"') - code = """ -
- - - - - - - - - - - - - - - - - - - """ - for ext in extensions_list: - extension = [extension for extension in extensions.extensions if extension.git_name == ext['name'] or extension.name == ext['name']] - if len(extension) > 0: - extension[0].read_info_from_repo() - ext['installed'] = len(extension) > 0 - ext['commit_date'] = extension[0].commit_date if len(extension) > 0 else 1577836800 - ext['is_builtin'] = extension[0].is_builtin if len(extension) > 0 else False - ext['version'] = extension[0].version if len(extension) > 0 else '' - ext['enabled'] = extension[0].enabled if len(extension) > 0 else '' - ext['remote'] = extension[0].remote if len(extension) > 0 else None - ext['path'] = extension[0].path if len(extension) > 0 else '' - ext['sort_default'] = f"{'1' if ext['is_builtin'] else '0'}{'1' if ext['installed'] else '0'}{ext.get('updated', '2000-01-01T00:00')}" - sort_reverse, sort_function = sort_ordering[sort_column] - - def dt(x: str): - val = ext.get(x, None) - if val is not None: - return datetime.fromisoformat(val[:-1]).strftime('%a %b%d %Y %H:%M') - else: - return "N/A" - - for ext in sorted(extensions_list, key=sort_function, reverse=sort_reverse): - name = ext.get("name", "unknown") - added = dt('added') - created = dt('created') - pushed = dt('pushed') - updated = dt('updated') - url = ext.get('url', None) - size = ext.get('size', 0) - stars = ext.get('stars', 0) - issues = ext.get('issues', 0) - commits = ext.get('commits', 0) - description = ext.get("description", "") - installed = ext.get("installed", False) - enabled = ext.get("enabled", False) - path = ext.get("path", "") - remote = ext.get("remote", None) - commit_date = ext.get("commit_date", 1577836800) or 1577836800 - update_available = (remote is not None) & (installed) & (datetime.utcfromtimestamp(commit_date + 60 * 60) < datetime.fromisoformat(ext.get('updated', '2000-01-01T00:00:00.000Z')[:-1])) - ext['sort_user'] = f"{'0' if ext['is_builtin'] else '1'}{'1' if ext['installed'] else '0'}{ext.get('name', '')}" - ext['sort_enabled'] = f"{'0' if ext['enabled'] else '1'}{'1' if ext['is_builtin'] else '0'}{'1' if ext['installed'] else '0'}{ext.get('updated', '2000-01-01T00:00')}" - ext['sort_update'] = f"{'1' if update_available else '0'}{'1' if ext['installed'] else '0'}{ext.get('updated', '2000-01-01T00:00')}" - tags = ext.get("tags", []) - tags_string = ' '.join(tags) - tags = tags + ["installed"] if installed else tags - if len([x for x in tags if x in hide_tags]) > 0: - continue - if search_text and search_text.strip(): - if search_text.lower() not in html.escape(name).lower() and search_text.lower() not in html.escape(description).lower() and search_text.lower() not in html.escape(tags_string).lower(): - continue - version_code = '' - type_code = '' - install_code = '' - enabled_code = '' - if installed: - type_code = f"""
{"SYSTEM" if ext['is_builtin'] else 'USER'}
""" - version_code = f"""
{ext['version']}
""" - enabled_code = f"""""" - masked_path = html.escape(path.replace('\\', '/')) - if not ext['is_builtin']: - install_code = f"""""" - if update_available: - install_code += f"""""" - else: - install_code = f"""""" - tags_text = ", ".join([f"{x}" for x in tags]) - code += f""" -
- {enabled_code} - - - - - - """ - code += "
EnabledExtensionDescriptionTypeCurrent version
{html.escape(name)}
{tags_text}
{html.escape(description)} -

Created {html.escape(created)} | Added {html.escape(added)} | Pushed {html.escape(pushed)} | Updated {html.escape(updated)}

-

Stars {html.escape(str(stars))} | Size {html.escape(str(size))} | Commits {html.escape(str(commits))} | Issues {html.escape(str(issues))}

-
{type_code}{version_code}{install_code}
" - return code - - -def create_ui(): - import modules.ui - with gr.Blocks(analytics_enabled=False) as ui: - extensions_disable_all = gr.Radio(label="Disable all extensions", choices=["none", "user", "all"], value=shared.opts.disable_all_extensions, elem_id="extensions_disable_all", visible=False) - extensions_disabled_list = gr.Text(elem_id="extensions_disabled_list", visible=False).style(container=False) - extensions_update_list = gr.Text(elem_id="extensions_update_list", visible=False).style(container=False) - with gr.Tabs(elem_id="tabs_extensions"): - with gr.TabItem("Manage Extensions", id="manage"): - with gr.Row(elem_id="extensions_installed_top"): - extension_to_install = gr.Text(elem_id="extension_to_install", visible=False) - install_extension_button = gr.Button(elem_id="install_extension_button", visible=False) - uninstall_extension_button = gr.Button(elem_id="uninstall_extension_button", visible=False) - update_extension_button = gr.Button(elem_id="update_extension_button", visible=False) - with gr.Column(scale=4): - search_text = gr.Text(label="Search") - info = gr.HTML('Note: After any operation such as install/uninstall or enable/disable, please restart the server') - with gr.Column(scale=1): - sort_column = gr.Dropdown(value="default", label="Sort by", choices=list(sort_ordering.keys()), multiselect=False) - with gr.Column(scale=1): - refresh_extensions_button = gr.Button(value="Refresh extension list", variant="primary") - check = gr.Button(value="Update installed extensions", variant="primary") - apply = gr.Button(value="Apply changes & restart server", variant="primary") - update_extension_list() - extensions_table = gr.HTML(refresh_extensions_list_from_data(search_text.value, sort_column.value)) - check.click( - fn=wrap_gradio_gpu_call(check_updates, extra_outputs=[gr.update()]), - _js="extensions_check", - inputs=[info, extensions_disabled_list, search_text, sort_column], - outputs=[extensions_table, info], - ) - apply.click( - fn=apply_and_restart, - _js="extensions_apply", - inputs=[extensions_disabled_list, extensions_update_list, extensions_disable_all], - outputs=[], - ) - refresh_extensions_button.click( - fn=modules.ui.wrap_gradio_call(refresh_extensions_list, extra_outputs=[gr.update(), gr.update()]), - inputs=[search_text, sort_column], - outputs=[extensions_table, info], - ) - install_extension_button.click( - fn=modules.ui.wrap_gradio_call(install_extension, extra_outputs=[gr.update(), gr.update(), gr.update()]), - inputs=[extension_to_install, search_text, sort_column], - outputs=[extensions_table, info], - ) - uninstall_extension_button.click( - fn=modules.ui.wrap_gradio_call(uninstall_extension, extra_outputs=[gr.update(), gr.update(), gr.update()]), - inputs=[extension_to_install, search_text, sort_column], - outputs=[extensions_table, info], - ) - update_extension_button.click( - fn=modules.ui.wrap_gradio_call(update_extension, extra_outputs=[gr.update(), gr.update(), gr.update()]), - inputs=[extension_to_install, search_text, sort_column], - outputs=[extensions_table, info], - ) - search_text.change( - fn=modules.ui.wrap_gradio_call(search_extensions, extra_outputs=[gr.update(), gr.update()]), - inputs=[search_text, sort_column], - outputs=[extensions_table, info], - ) - sort_column.change( - fn=modules.ui.wrap_gradio_call(search_extensions, extra_outputs=[gr.update(), gr.update()]), - inputs=[search_text, sort_column], - outputs=[extensions_table, info], - ) - with gr.TabItem("Manual install", id="install_from_url"): - install_url = gr.Text(label="URL for extension's git repository") - install_branch = gr.Text(label="Specific branch name", placeholder="Leave empty for default main branch") - install_dirname = gr.Text(label="Local directory name", placeholder="Leave empty for auto") - install_button = gr.Button(value="Install", variant="primary") - info = gr.HTML(elem_id="extension_info") - install_button.click( - fn=modules.ui.wrap_gradio_call(install_extension_from_url, extra_outputs=[gr.update()]), - inputs=[install_dirname, install_url, install_branch, search_text, sort_column], - outputs=[extensions_table, info], - ) - return ui +import json +import os.path +import shutil +import errno +import html +from datetime import datetime +import git +import gradio as gr +from modules import extensions, shared, paths, errors +from modules.call_queue import wrap_gradio_gpu_call + + +extensions_index = "https://vladmandic.github.io/sd-data/pages/extensions.json" +hide_tags = ["localization"] +extensions_list = [] +sort_ordering = { + "default": (True, lambda x: x.get('sort_default', '')), + "user extensions": (True, lambda x: x.get('sort_user', '')), + "update avilable": (True, lambda x: x.get('sort_update', '')), + "updated date": (True, lambda x: x.get('updated', '2000-01-01T00:00')), + "created date": (True, lambda x: x.get('created', '2000-01-01T00:00')), + "name": (False, lambda x: x.get('name', '').lower()), + "enabled": (False, lambda x: x.get('sort_enabled', '').lower()), + "size": (True, lambda x: x.get('size', 0)), + "stars": (True, lambda x: x.get('stars', 0)), + "commits": (True, lambda x: x.get('commits', 0)), + "issues": (True, lambda x: x.get('issues', 0)), +} + + +def update_extension_list(): + global extensions_list # pylint: disable=global-statement + try: + with open(os.path.join(paths.script_path, "html", "extensions.json"), "r", encoding="utf-8") as f: + extensions_list = json.loads(f.read()) + shared.log.debug(f'Extensions list loaded: {os.path.join(paths.script_path, "html", "extensions.json")}') + except: + shared.log.debug(f'Extensions list failed to load: {os.path.join(paths.script_path, "html", "extensions.json")}') + found = [] + for ext in extensions.extensions: + ext.read_info_from_repo() + for ext in extensions_list: + installed = [extension for extension in extensions.extensions + if extension.git_name == ext['name'] + or extension.name == ext['name'] + or (extension.remote or '').startswith(ext['url'].replace('.git', ''))] + if len(installed) > 0: + found.append(installed[0]) + not_matched = [extension for extension in extensions.extensions if extension not in found] + for ext in not_matched: + entry = { + "name": ext.name or "", + "description": ext.description or "", + "url": ext.remote or "", + "tags": [], + "stars": 0, + "issues": 0, + "commits": 0, + "size": 0, + "long": ext.git_name or ext.name or "", + "added": ext.ctime, + "created": ext.ctime, + "updated": ext.mtime, + } + extensions_list.append(entry) + + +def check_access(): + assert not shared.cmd_opts.disable_extension_access, "extension access disabled because of command line flags" + + +def apply_and_restart(disable_list, update_list, disable_all): + check_access() + shared.log.debug(f'Extensions apply: disable={disable_list} update={update_list}') + disabled = json.loads(disable_list) + assert type(disabled) == list, f"wrong disable_list data for apply_and_restart: {disable_list}" + update = json.loads(update_list) + assert type(update) == list, f"wrong update_list data for apply_and_restart: {update_list}" + update = set(update) + for ext in extensions.extensions: + if ext.name not in update: + continue + try: + ext.fetch_and_reset_hard() + except Exception as e: + errors.display(e, f'extensions apply update: {ext.name}') + shared.opts.disabled_extensions = disabled + shared.opts.disable_all_extensions = disable_all + shared.opts.save(shared.config_filename) + shared.restart_server(restart=True) + + +def check_updates(_id_task, disable_list, search_text, sort_column): + check_access() + disabled = json.loads(disable_list) + assert type(disabled) == list, f"wrong disable_list data for apply_and_restart: {disable_list}" + exts = [ext for ext in extensions.extensions if ext.remote is not None and ext.name not in disabled] + shared.log.info(f'Extensions update check: update={len(exts)} disabled={len(disable_list)}') + shared.state.job_count = len(exts) + for ext in exts: + shared.state.textinfo = ext.name + try: + ext.check_updates() + if ext.can_update: + ext.fetch_and_reset_hard() + ext.read_info_from_repo() + commit_date = ext.commit_date or 1577836800 + shared.log.info(f'Extensions updated: {ext.name} {ext.commit_hash[:8]} {datetime.utcfromtimestamp(commit_date)}') + else: + commit_date = ext.commit_date or 1577836800 + shared.log.debug(f'Extensions no update available: {ext.name} {ext.commit_hash[:8]} {datetime.utcfromtimestamp(commit_date)}') + except FileNotFoundError as e: + if 'FETCH_HEAD' not in str(e): + raise + except Exception: + errors.display(e, f'extensions check update: {ext.name}') + shared.state.nextjob() + return refresh_extensions_list_from_data(search_text, sort_column), "Extension update complete | Restart required" + + +def make_commit_link(commit_hash, remote, text=None): + if text is None: + text = commit_hash[:8] + if remote.startswith("https://github.com/"): + href = os.path.join(remote, "commit", commit_hash) + return f'{text}' + else: + return text + + +def normalize_git_url(url): + if url is None: + return "" + url = url.replace(".git", "") + return url + + +def install_extension_from_url(dirname, url, branch_name, search_text, sort_column): + check_access() + assert url, 'No URL specified' + if dirname is None or dirname == "": + *parts, last_part = url.split('/') # pylint: disable=unused-variable + last_part = normalize_git_url(last_part) + dirname = last_part + target_dir = os.path.join(extensions.extensions_dir, dirname) + shared.log.info(f'Installing extension: {url} into {target_dir}') + assert not os.path.exists(target_dir), f'Extension directory already exists: {target_dir}' + normalized_url = normalize_git_url(url) + assert len([x for x in extensions.extensions if normalize_git_url(x.remote) == normalized_url]) == 0, 'Extension with this URL is already installed' + tmpdir = os.path.join(paths.data_path, "tmp", dirname) + try: + shutil.rmtree(tmpdir, True) + if not branch_name: + # if no branch is specified, use the default branch + with git.Repo.clone_from(url, tmpdir) as repo: + repo.remote().fetch() + for submodule in repo.submodules: + submodule.update() + else: + with git.Repo.clone_from(url, tmpdir, branch=branch_name) as repo: + repo.remote().fetch() + for submodule in repo.submodules: + submodule.update() + try: + os.rename(tmpdir, target_dir) + except OSError as err: + if err.errno == errno.EXDEV: + shutil.move(tmpdir, target_dir) + else: + raise err + from launch import run_extension_installer + run_extension_installer(target_dir) + extensions.list_extensions() + return [refresh_extensions_list_from_data(search_text, sort_column), html.escape(f"Extension installed: {target_dir} | Restart required")] + finally: + shutil.rmtree(tmpdir, True) + + +def install_extension(extension_to_install, search_text, sort_column): + shared.log.info(f'Extension install: {extension_to_install}') + code, message = install_extension_from_url(None, extension_to_install, None, search_text, sort_column) + return code, message + + +def uninstall_extension(extension_path, search_text, sort_column): + def errorRemoveReadonly(func, path, exc): + import stat + excvalue = exc[1] + shared.log.debug(f'Exception during cleanup: {func} {path} {excvalue.strerror}') + if func in (os.rmdir, os.remove, os.unlink) and excvalue.errno == errno.EACCES: + shared.log.debug(f'Retrying cleanup: {path}') + os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO) + func(path) + + ext = [extension for extension in extensions.extensions if os.path.abspath(extension.path) == os.path.abspath(extension_path)] + if len(ext) > 0 and os.path.isdir(extension_path): + found = ext[0] + try: + shutil.rmtree(found.path, ignore_errors=False, onerror=errorRemoveReadonly) + except Exception as e: + shared.log.warning(f'Extension uninstall failed: {found.path} {e}') + extensions.extensions = [extension for extension in extensions.extensions if os.path.abspath(found.path) != os.path.abspath(extension_path)] + update_extension_list() + code = refresh_extensions_list_from_data(search_text, sort_column) + shared.log.info(f'Extension uninstalled: {found.path}') + return code, f"Extension uninstalled: {found.path} | Restart required" + else: + shared.log.warning(f'Extension uninstall cannot find extension: {extension_path}') + code = refresh_extensions_list_from_data(search_text, sort_column) + return code, f"Extension uninstalled failed: {extension_path}" + + +def update_extension(extension_path, search_text, sort_column): + exts = [extension for extension in extensions.extensions if os.path.abspath(extension.path) == os.path.abspath(extension_path)] + shared.state.job_count = len(exts) + for ext in exts: + shared.log.debug(f'Extensions update start: {ext.name} {ext.commit_hash} {ext.commit_date}') + shared.state.textinfo = ext.name + try: + ext.check_updates() + if ext.can_update: + ext.fetch_and_reset_hard() + ext.read_info_from_repo() + commit_date = ext.commit_date or 1577836800 + shared.log.info(f'Extensions updated: {ext.name} {ext.commit_hash[:8]} {datetime.utcfromtimestamp(commit_date)}') + else: + commit_date = ext.commit_date or 1577836800 + shared.log.info(f'Extensions no update available: {ext.name} {ext.commit_hash[:8]} {datetime.utcfromtimestamp(commit_date)}') + except FileNotFoundError as e: + if 'FETCH_HEAD' not in str(e): + raise + except Exception as e: + shared.log.error(f'Extensions update failed: {ext.name}') + errors.display(e, f'extensions check update: {ext.name}') + shared.log.debug(f'Extensions update finish: {ext.name} {ext.commit_hash} {ext.commit_date}') + shared.state.nextjob() + return refresh_extensions_list_from_data(search_text, sort_column), f"Extension updated | {extension_path} | Restart required" + + +def refresh_extensions_list(search_text, sort_column): + global extensions_list # pylint: disable=global-statement + import urllib.request + try: + with urllib.request.urlopen(extensions_index) as response: + text = response.read() + extensions_list = json.loads(text) + with open(os.path.join(paths.script_path, "html", "extensions.json"), "w", encoding="utf-8") as outfile: + json_object = json.dumps(extensions_list, indent=2) + outfile.write(json_object) + shared.log.debug(f'Updated extensions list: {len(extensions_list)} {extensions_index} {outfile}') + except Exception as e: + shared.log.warning(f'Updated extensions list failed: {extensions_index} {e}') + update_extension_list() + code = refresh_extensions_list_from_data(search_text, sort_column) + return code, f'Extensions | {len(extensions.extensions)} registered | {len(extensions_list)} available' + + +def search_extensions(search_text, sort_column): + code = refresh_extensions_list_from_data(search_text, sort_column) + return code, f'Search | {search_text} | {sort_column}' + + +def refresh_extensions_list_from_data(search_text, sort_column): + shared.log.debug(f'Extensions manager: refresh list search="{search_text}" sort="{sort_column}"') + code = """ + + + + + + + + + + + + + + + + + + + + """ + for ext in extensions_list: + extension = [extension for extension in extensions.extensions if extension.git_name == ext['name'] or extension.name == ext['name']] + if len(extension) > 0: + extension[0].read_info_from_repo() + ext['installed'] = len(extension) > 0 + ext['commit_date'] = extension[0].commit_date if len(extension) > 0 else 1577836800 + ext['is_builtin'] = extension[0].is_builtin if len(extension) > 0 else False + ext['version'] = extension[0].version if len(extension) > 0 else '' + ext['enabled'] = extension[0].enabled if len(extension) > 0 else '' + ext['remote'] = extension[0].remote if len(extension) > 0 else None + ext['path'] = extension[0].path if len(extension) > 0 else '' + ext['sort_default'] = f"{'1' if ext['is_builtin'] else '0'}{'1' if ext['installed'] else '0'}{ext.get('updated', '2000-01-01T00:00')}" + sort_reverse, sort_function = sort_ordering[sort_column] + + def dt(x: str): + val = ext.get(x, None) + if val is not None: + return datetime.fromisoformat(val[:-1]).strftime('%a %b%d %Y %H:%M') + else: + return "N/A" + + for ext in sorted(extensions_list, key=sort_function, reverse=sort_reverse): + name = ext.get("name", "unknown") + added = dt('added') + created = dt('created') + pushed = dt('pushed') + updated = dt('updated') + url = ext.get('url', None) + size = ext.get('size', 0) + stars = ext.get('stars', 0) + issues = ext.get('issues', 0) + commits = ext.get('commits', 0) + description = ext.get("description", "") + installed = ext.get("installed", False) + enabled = ext.get("enabled", False) + path = ext.get("path", "") + remote = ext.get("remote", None) + commit_date = ext.get("commit_date", 1577836800) or 1577836800 + update_available = (remote is not None) & (installed) & (datetime.utcfromtimestamp(commit_date + 60 * 60) < datetime.fromisoformat(ext.get('updated', '2000-01-01T00:00:00.000Z')[:-1])) + ext['sort_user'] = f"{'0' if ext['is_builtin'] else '1'}{'1' if ext['installed'] else '0'}{ext.get('name', '')}" + ext['sort_enabled'] = f"{'0' if ext['enabled'] else '1'}{'1' if ext['is_builtin'] else '0'}{'1' if ext['installed'] else '0'}{ext.get('updated', '2000-01-01T00:00')}" + ext['sort_update'] = f"{'1' if update_available else '0'}{'1' if ext['installed'] else '0'}{ext.get('updated', '2000-01-01T00:00')}" + tags = ext.get("tags", []) + tags_string = ' '.join(tags) + tags = tags + ["installed"] if installed else tags + if len([x for x in tags if x in hide_tags]) > 0: + continue + if search_text and search_text.strip(): + if search_text.lower() not in html.escape(name).lower() and search_text.lower() not in html.escape(description).lower() and search_text.lower() not in html.escape(tags_string).lower(): + continue + version_code = '' + type_code = '' + install_code = '' + enabled_code = '' + if installed: + type_code = f"""
{"SYSTEM" if ext['is_builtin'] else 'USER'}
""" + version_code = f"""
{ext['version']}
""" + enabled_code = f"""""" + masked_path = html.escape(path.replace('\\', '/')) + if not ext['is_builtin']: + install_code = f"""""" + if update_available: + install_code += f"""""" + else: + install_code = f"""""" + tags_text = ", ".join([f"{x}" for x in tags]) + code += f""" + + {enabled_code} + + + + + + """ + code += "
EnabledExtensionDescriptionTypeCurrent version
{html.escape(name)}
{tags_text}
{html.escape(description)} +

Created {html.escape(created)} | Added {html.escape(added)} | Pushed {html.escape(pushed)} | Updated {html.escape(updated)}

+

Stars {html.escape(str(stars))} | Size {html.escape(str(size))} | Commits {html.escape(str(commits))} | Issues {html.escape(str(issues))}

+
{type_code}{version_code}{install_code}
" + return code + + +def create_ui(): + import modules.ui + with gr.Blocks(analytics_enabled=False) as ui: + extensions_disable_all = gr.Radio(label="Disable all extensions", choices=["none", "user", "all"], value=shared.opts.disable_all_extensions, elem_id="extensions_disable_all", visible=False) + extensions_disabled_list = gr.Text(elem_id="extensions_disabled_list", visible=False).style(container=False) + extensions_update_list = gr.Text(elem_id="extensions_update_list", visible=False).style(container=False) + with gr.Tabs(elem_id="tabs_extensions"): + with gr.TabItem("Manage Extensions", id="manage"): + with gr.Row(elem_id="extensions_installed_top"): + extension_to_install = gr.Text(elem_id="extension_to_install", visible=False) + install_extension_button = gr.Button(elem_id="install_extension_button", visible=False) + uninstall_extension_button = gr.Button(elem_id="uninstall_extension_button", visible=False) + update_extension_button = gr.Button(elem_id="update_extension_button", visible=False) + with gr.Column(scale=4): + search_text = gr.Text(label="Search") + info = gr.HTML('Note: After any operation such as install/uninstall or enable/disable, please restart the server') + with gr.Column(scale=1): + sort_column = gr.Dropdown(value="default", label="Sort by", choices=list(sort_ordering.keys()), multiselect=False) + with gr.Column(scale=1): + refresh_extensions_button = gr.Button(value="Refresh extension list", variant="primary") + check = gr.Button(value="Update installed extensions", variant="primary") + apply = gr.Button(value="Apply changes & restart server", variant="primary") + update_extension_list() + extensions_table = gr.HTML(refresh_extensions_list_from_data(search_text.value, sort_column.value)) + check.click( + fn=wrap_gradio_gpu_call(check_updates, extra_outputs=[gr.update()]), + _js="extensions_check", + inputs=[info, extensions_disabled_list, search_text, sort_column], + outputs=[extensions_table, info], + ) + apply.click( + fn=apply_and_restart, + _js="extensions_apply", + inputs=[extensions_disabled_list, extensions_update_list, extensions_disable_all], + outputs=[], + ) + refresh_extensions_button.click( + fn=modules.ui.wrap_gradio_call(refresh_extensions_list, extra_outputs=[gr.update(), gr.update()]), + inputs=[search_text, sort_column], + outputs=[extensions_table, info], + ) + install_extension_button.click( + fn=modules.ui.wrap_gradio_call(install_extension, extra_outputs=[gr.update(), gr.update(), gr.update()]), + inputs=[extension_to_install, search_text, sort_column], + outputs=[extensions_table, info], + ) + uninstall_extension_button.click( + fn=modules.ui.wrap_gradio_call(uninstall_extension, extra_outputs=[gr.update(), gr.update(), gr.update()]), + inputs=[extension_to_install, search_text, sort_column], + outputs=[extensions_table, info], + ) + update_extension_button.click( + fn=modules.ui.wrap_gradio_call(update_extension, extra_outputs=[gr.update(), gr.update(), gr.update()]), + inputs=[extension_to_install, search_text, sort_column], + outputs=[extensions_table, info], + ) + search_text.change( + fn=modules.ui.wrap_gradio_call(search_extensions, extra_outputs=[gr.update(), gr.update()]), + inputs=[search_text, sort_column], + outputs=[extensions_table, info], + ) + sort_column.change( + fn=modules.ui.wrap_gradio_call(search_extensions, extra_outputs=[gr.update(), gr.update()]), + inputs=[search_text, sort_column], + outputs=[extensions_table, info], + ) + with gr.TabItem("Manual install", id="install_from_url"): + install_url = gr.Text(label="URL for extension's git repository") + install_branch = gr.Text(label="Specific branch name", placeholder="Leave empty for default main branch") + install_dirname = gr.Text(label="Local directory name", placeholder="Leave empty for auto") + install_button = gr.Button(value="Install", variant="primary") + info = gr.HTML(elem_id="extension_info") + install_button.click( + fn=modules.ui.wrap_gradio_call(install_extension_from_url, extra_outputs=[gr.update()]), + inputs=[install_dirname, install_url, install_branch, search_text, sort_column], + outputs=[extensions_table, info], + ) + return ui diff --git a/modules/ui_extra_networks_hypernets.py b/modules/ui_extra_networks_hypernets.py index 545898486..d29863212 100644 --- a/modules/ui_extra_networks_hypernets.py +++ b/modules/ui_extra_networks_hypernets.py @@ -12,7 +12,7 @@ class ExtraNetworksPageHypernetworks(ui_extra_networks.ExtraNetworksPage): def list_items(self): for name, path in shared.hypernetworks.items(): - path, ext = os.path.splitext(path) + path, _ext = os.path.splitext(path) yield { "name": name, "filename": path, From 9dbe8bc6e4c708d92eae8cd61c6b1063eb9cd100 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Mon, 29 May 2023 00:34:31 +0300 Subject: [PATCH 239/282] Fix cuda with ipex on memmon.py --- modules/memmon.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/modules/memmon.py b/modules/memmon.py index 66fd9a8d4..1ea110f51 100644 --- a/modules/memmon.py +++ b/modules/memmon.py @@ -24,17 +24,13 @@ class MemUsageMonitor(threading.Thread): #torch.cuda.is_available() reports False when using IPEX. if shared.cmd_opts.use_ipex: self.cuda_mem_get_info() - torch.cuda.memory_stats("xpu") + torch.xpu.memory_stats("xpu") else: self.disabled = True else: try: - if shared.cmd_opts.use_ipex: - self.cuda_mem_get_info() - torch.cuda.memory_stats("xpu") - else: - self.cuda_mem_get_info() - torch.cuda.memory_stats(self.device) + self.cuda_mem_get_info() + torch.cuda.memory_stats(self.device) except Exception: self.disabled = True From 813f6fdc23736a2ac90f01406fa100e224d0f9f8 Mon Sep 17 00:00:00 2001 From: Alexander Brown Date: Sun, 28 May 2023 15:49:11 -0700 Subject: [PATCH 240/282] Styling for the upper controls --- javascript/style.css | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/javascript/style.css b/javascript/style.css index b3f27cac9..2f99669ea 100644 --- a/javascript/style.css +++ b/javascript/style.css @@ -703,7 +703,25 @@ div.controlnet_weight_steps > div.form { } div.controlnet_weight_steps .controlnet_control_weight_slider { - grid-column: 1 / 3; + grid-column: 1 / -1; +} +div.controlnet_image_controls { + display: grid; + grid-template-columns: repeat(4, 1fr); +} + +div.controlnet_image_controls .controlnet_invert_warning { + grid-column: 1 / -1; +} + +div.controlnet_image_controls button { + justify-self: center; +} + +div.controlnet_main_options { + display: grid; + grid-template-columns: 1fr 1fr; + grid-auto-flow: row; } #modelmerger_interp_description { margin-top: 1em; margin-bottom: 1em; } From 6013ab39606f681b3880ca10f72fe1c945d11938 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 28 May 2023 21:26:09 -0400 Subject: [PATCH 241/282] remove allocator info --- installer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer.py b/installer.py index 0b3a9de6b..d5b464156 100644 --- a/installer.py +++ b/installer.py @@ -293,7 +293,7 @@ def check_torch(): log.info(f'{os.popen("icpx --version").read().rstrip()}') log.info(f'Torch detected GPU: {torch.xpu.get_device_name("xpu")} VRAM {round(torch.xpu.get_device_properties("xpu").total_memory / 1024 / 1024)}') elif torch.cuda.is_available() and (allow_cuda or allow_rocm): - log.debug(f'Torch allocator: {torch.cuda.get_allocator_backend()}') + # log.debug(f'Torch allocator: {torch.cuda.get_allocator_backend()}') if torch.version.cuda and allow_cuda: log.info(f'Torch backend: nVidia CUDA {torch.version.cuda} cuDNN {torch.backends.cudnn.version() if torch.backends.cudnn.is_available() else "N/A"}') elif torch.version.hip and allow_rocm: From b2c3bc5aaa9522ddcf2bce55a3746293dd9cef72 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 28 May 2023 21:26:29 -0400 Subject: [PATCH 242/282] update extensions --- extensions-builtin/sd-extension-system-info | 2 +- extensions-builtin/stable-diffusion-webui-images-browser | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions-builtin/sd-extension-system-info b/extensions-builtin/sd-extension-system-info index 46386f93d..2a811ca0c 160000 --- a/extensions-builtin/sd-extension-system-info +++ b/extensions-builtin/sd-extension-system-info @@ -1 +1 @@ -Subproject commit 46386f93de0a9614ef94cf75acb0909e59859274 +Subproject commit 2a811ca0c8b6913a1a2732bf459287addc9cb4f2 diff --git a/extensions-builtin/stable-diffusion-webui-images-browser b/extensions-builtin/stable-diffusion-webui-images-browser index c61fae964..75af6d0c3 160000 --- a/extensions-builtin/stable-diffusion-webui-images-browser +++ b/extensions-builtin/stable-diffusion-webui-images-browser @@ -1 +1 @@ -Subproject commit c61fae964ac94bc369fd0e346805e3e2885c69b4 +Subproject commit 75af6d0c32b72350b2f140f186cd8ce0e24dda10 From 5f1fd7bd665a78b879e5b371945207de42c2d058 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 29 May 2023 13:43:03 -0400 Subject: [PATCH 243/282] update common ui --- TODO.md | 1 + extensions-builtin/sd-extension-system-info | 2 +- extensions-builtin/sd-webui-controlnet | 2 +- modules/cmd_args.py | 2 + modules/extras.py | 3 - modules/img2img.py | 4 +- modules/postprocessing.py | 8 +- modules/processing.py | 14 +- modules/sd_models.py | 22 +- modules/sd_samplers.py | 6 +- modules/shared.py | 14 +- .../textual_inversion/textual_inversion.py | 2 +- modules/txt2img.py | 4 +- modules/ui.py | 8 +- modules/ui_common.py | 203 +++++++++--------- modules/ui_postprocessing.py | 45 ++-- 16 files changed, 180 insertions(+), 160 deletions(-) diff --git a/TODO.md b/TODO.md index dff1f03a4..d1ff57730 100644 --- a/TODO.md +++ b/TODO.md @@ -48,3 +48,4 @@ Tech that can be integrated as part of the core workflow... ## Random - Bunch of stuff: +- diff --git a/extensions-builtin/sd-extension-system-info b/extensions-builtin/sd-extension-system-info index 2a811ca0c..8046b1544 160000 --- a/extensions-builtin/sd-extension-system-info +++ b/extensions-builtin/sd-extension-system-info @@ -1 +1 @@ -Subproject commit 2a811ca0c8b6913a1a2732bf459287addc9cb4f2 +Subproject commit 8046b1544513cea06d1c41748c22727c930323ab diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 2e0dc37d2..09cb9a32d 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 2e0dc37d222aaba355a71dac0eda4bb7ca54f05f +Subproject commit 09cb9a32d1051aa827f1bb092cf17fcbf996ed7f diff --git a/modules/cmd_args.py b/modules/cmd_args.py index 2c62342bf..6e658f6c9 100644 --- a/modules/cmd_args.py +++ b/modules/cmd_args.py @@ -44,6 +44,8 @@ group.add_argument('--use-directml', default = False, action='store_true', help group.add_argument("--use-cuda", default=False, action='store_true', help="Force use nVidia CUDA backend, default: %(default)s") group.add_argument("--use-rocm", default=False, action='store_true', help="Force use AMD ROCm backend, default: %(default)s") group.add_argument('--subpath', type=str, help='Customize the URL subpath for usage with reverse proxy') +group.add_argument('--backend', type=str, choices=[None, 'original', 'diffusers'], default=None, required=False, help='force backend type') + # removed args are added here as hidden in fixed format for compatbility reasons group.add_argument("-f", action='store_true', help=argparse.SUPPRESS) # allows running as root; implemented outside of webui diff --git a/modules/extras.py b/modules/extras.py index 683064661..3247c27a0 100644 --- a/modules/extras.py +++ b/modules/extras.py @@ -24,9 +24,6 @@ def run_pnginfo(image): for key, text in items.items(): if key != 'UserComment': info += f"
{html.escape(str(key))}: {html.escape(str(text))}
" - if len(info) == 0: - message = "Nothing found in the image." - info = f"

{message}

" return '', geninfo, info diff --git a/modules/img2img.py b/modules/img2img.py index dda82dfcd..0e0b9bf8c 100644 --- a/modules/img2img.py +++ b/modules/img2img.py @@ -5,7 +5,7 @@ import modules.scripts from modules import sd_samplers, shared from modules.generation_parameters_copypaste import create_override_settings_dict from modules.processing import Processed, StableDiffusionProcessingImg2Img, process_images -from modules.ui import plaintext_to_html +from modules.ui import plaintext_to_html, infotext_to_html import modules.processing as processing from modules.memstats import memory_stats @@ -165,4 +165,4 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s p.close() generation_info_js = processed.js() shared.log.debug(f'Processed: {len(processed.images)} Memory: {memory_stats()} img') - return processed.images, generation_info_js, plaintext_to_html(processed.info), plaintext_to_html(processed.comments) + return processed.images, generation_info_js, infotext_to_html(processed.info), plaintext_to_html(processed.comments) diff --git a/modules/postprocessing.py b/modules/postprocessing.py index b880d6749..63d0f359e 100644 --- a/modules/postprocessing.py +++ b/modules/postprocessing.py @@ -48,8 +48,8 @@ def run_postprocessing(extras_mode, image, image_folder: List[tempfile.NamedTemp outpath = output_dir else: outpath = opts.outdir_samples or opts.outdir_extras_samples - infotext = '' for image, name, ext in zip(image_data, image_names, image_ext): + infotext = '' if shared.state.interrupted: shared.log.debug('Postprocess interrupted') break @@ -62,10 +62,12 @@ def run_postprocessing(extras_mode, image, image_folder: List[tempfile.NamedTemp basename = os.path.splitext(os.path.basename(name))[0] else: basename = '' - infotext = ", ".join([k if k == v else f'{k}: {generation_parameters_copypaste.quote(v)}' for k, v in pp.info.items() if v is not None]) _geninfo, items = images.read_info_from_image(image) for k, v in items.items(): pp.image.info[k] = v + if 'parameters' in items: + infotext = items['parameters'] + ', ' + infotext = infotext + ", ".join([k if k == v else f'{k}: {generation_parameters_copypaste.quote(v)}' for k, v in pp.info.items() if v is not None]) pp.image.info["postprocessing"] = infotext if save_output: images.save_image(pp.image, path=outpath, basename=basename, seed=None, prompt=None, extension=ext or opts.samples_format, info=infotext, short_filename=True, no_prompt=True, grid=False, pnginfo_section_name="extras", existing_info=pp.image.info, forced_filename=None) @@ -73,7 +75,7 @@ def run_postprocessing(extras_mode, image, image_folder: List[tempfile.NamedTemp outputs.append(pp.image) devices.torch_gc() - return outputs, ui_common.plaintext_to_html(infotext), '' + return outputs, ui_common.infotext_to_html(infotext), pp.image.info def run_extras(extras_mode, resize_mode, image, image_folder, input_dir, output_dir, show_extras_results, gfpgan_visibility, codeformer_visibility, codeformer_weight, upscaling_resize, upscaling_resize_w, upscaling_resize_h, upscaling_crop, extras_upscaler_1, extras_upscaler_2, extras_upscaler_2_visibility, upscale_first: bool, save_output: bool = True): #pylint: disable=unused-argument diff --git a/modules/processing.py b/modules/processing.py index 4c3cca1db..9e7e7c742 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -19,7 +19,7 @@ from installer import git_commit import modules.sd_hijack from modules import devices, prompt_parser, masking, sd_samplers, lowvram, generation_parameters_copypaste, script_callbacks, extra_networks, sd_vae_approx, scripts # pylint: disable=unused-import from modules.sd_hijack import model_hijack -from modules.shared import opts, cmd_opts, state, log +from modules.shared import opts, cmd_opts, state, log, backend, Backend import modules.shared as shared import modules.paths as paths import modules.face_restoration @@ -220,7 +220,7 @@ class StableDiffusionProcessing: source_image = devices.cond_cast_float(source_image) # HACK: Using introspection as the Depth2Image model doesn't appear to uniquely # identify itself with a field common to all models. The conditioning_key is also hybrid. - if opts.sd_backend == 'Diffusers': # TODO: Diffusers img2img_image_conditioning + if backend == Backend.DIFFUSERS: # TODO: Diffusers img2img_image_conditioning return latent_image.new_zeros(latent_image.shape[0], 5, 1, 1) if isinstance(self.sd_model, LatentDepth2ImageDiffusion): return self.depth2img_image_conditioning(source_image) @@ -522,7 +522,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: assert p.prompt is not None seed = get_fixed_seed(p.seed) subseed = get_fixed_seed(p.subseed) - if opts.sd_backend == 'Original': + if backend == Backend.ORIGINAL: modules.sd_hijack.model_hijack.apply_circular(p.tiling) modules.sd_hijack.model_hijack.clear_comments() comments = {} @@ -573,11 +573,11 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: cache[0] = (required_prompts, steps) return cache[1] - ema_scope_context = p.sd_model.ema_scope if opts.sd_backend == 'Original' else nullcontext + ema_scope_context = p.sd_model.ema_scope if backend == Backend.ORIGINAL else nullcontext with torch.no_grad(), ema_scope_context(): with devices.autocast(): p.init(p.all_prompts, p.all_seeds, p.all_subseeds) - if shared.opts.live_previews_enable and opts.show_progress_type == "Approx NN" and opts.sd_backend == 'Original': + if shared.opts.live_previews_enable and opts.show_progress_type == "Approx NN" and backend == Backend.ORIGINAL: sd_vae_approx.model() if state.job_count == -1: state.job_count = p.n_iter @@ -618,7 +618,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: if p.n_iter > 1: shared.state.job = f"Batch {n+1} out of {p.n_iter}" - if opts.sd_backend == 'Original': + if backend == Backend.ORIGINAL: uc = get_conds_with_caching(prompt_parser.get_learned_conditioning, negative_prompts, p.steps * step_multiplier, cached_uc) c = get_conds_with_caching(prompt_parser.get_multicond_learned_conditioning, prompts, p.steps * step_multiplier, cached_c) if len(model_hijack.comments) > 0: @@ -671,7 +671,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: for i, x_sample in enumerate(x_samples_ddim): p.batch_index = i - if opts.sd_backend == 'Original': + if backend == Backend.ORIGINAL: x_sample = 255. * np.moveaxis(x_sample.cpu().numpy(), 0, 2) x_sample = x_sample.astype(np.uint8) else: diff --git a/modules/sd_models.py b/modules/sd_models.py index e33465be0..7b1444e6a 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -35,7 +35,7 @@ class CheckpointInfo: self.hash = None self.filename = filename abspath = os.path.abspath(filename) - if shared.opts.sd_backend == 'Original': + if shared.backend == shared.Backend.ORIGINAL: if shared.opts.ckpt_dir is not None and abspath.startswith(shared.opts.ckpt_dir): name = abspath.replace(shared.opts.ckpt_dir, '') elif abspath.startswith(model_path): @@ -104,7 +104,7 @@ def checkpoint_tiles(): def list_models(): checkpoints_list.clear() checkpoint_aliases.clear() - if shared.opts.sd_backend == 'Original': + if shared.backend == shared.Backend.ORIGINAL: model_list = modelloader.load_models(model_path=os.path.join(models_path, 'Stable-diffusion'), model_url=None, command_path=shared.opts.ckpt_dir, ext_filter=[".ckpt", ".safetensors"], download_name=None, ext_blacklist=[".vae.ckpt", ".vae.safetensors"]) else: model_list = modelloader.load_diffusers(model_path=os.path.join(models_path, 'Diffusers'), command_path=shared.opts.diffusers_dir) @@ -113,7 +113,7 @@ def list_models(): if checkpoint_info.name is not None: checkpoint_info.register() if shared.cmd_opts.ckpt is not None: - if not os.path.exists(shared.cmd_opts.ckpt) and shared.opts.sd_backend == 'Original': + if not os.path.exists(shared.cmd_opts.ckpt) and shared.backend == shared.Backend.ORIGINAL: if shared.cmd_opts.ckpt.lower() != "none": shared.log.warning(f"Requested checkpoint not found: {shared.cmd_opts.ckpt}") else: @@ -227,7 +227,7 @@ def read_metadata_from_safetensors(filename): def read_state_dict(checkpoint_file, map_location=None): # pylint: disable=unused-argument - if shared.opts.sd_backend == 'Diffusers': + if shared.backend == shared.Backend.DIFFUSERS: return None try: pl_sd = None @@ -376,9 +376,9 @@ class SdModelData: if self.sd_model is None: with self.lock: try: - if shared.opts.sd_backend == 'Original': + if shared.backend == shared.Backend.ORIGINAL: load_model() - elif shared.opts.sd_backend == 'Diffusers': + elif shared.backend == shared.Backend.DIFFUSERS: load_diffuser() else: shared.log.error(f"Unknown Stable Diffusion backend: {shared.opts.sd_backend}") @@ -429,6 +429,12 @@ def load_diffuser(checkpoint_info=None, already_loaded_state_dict=None, timer=No shared.log.info(f'Loading diffuser model: {checkpoint_info.filename}') scheduler = diffusers.UniPCMultistepScheduler.from_pretrained(checkpoint_info.filename, subfolder="scheduler") sd_model = diffusers.DiffusionPipeline.from_pretrained(checkpoint_info.filename, scheduler=scheduler, **diffusor_config) + if shared.cmd_opts.medvram: + sd_model.enable_model_cpu_offload() + if shared.cmd_opts.lowvram: + sd_model.enable_sequential_cpu_offload() + if shared.opts.cross_attention_optimization == "xFormers": + sd_model.enable_xformers_memory_efficient_attention() sd_model.sd_checkpoint_info = checkpoint_info sd_model.sd_model_checkpoint = checkpoint_info.filename sd_model.sd_model_hash = checkpoint_info.hash @@ -550,7 +556,7 @@ def reload_model_weights(sd_model=None, info=None): if sd_model is None or checkpoint_config != sd_model.used_config: del sd_model checkpoints_loaded.clear() - if shared.opts.sd_backend == 'Original': + if shared.backend == shared.Backend.ORIGINAL: load_model(checkpoint_info, already_loaded_state_dict=state_dict, timer=timer) else: load_diffuser(checkpoint_info, already_loaded_state_dict=state_dict, timer=timer) @@ -575,7 +581,7 @@ def unload_model_weights(sd_model=None, _info=None): from modules import sd_hijack if model_data.sd_model: model_data.sd_model.to(devices.cpu) - if shared.opts.sd_backend == 'Original': + if shared.backend == shared.Backend.ORIGINAL: sd_hijack.model_hijack.undo_hijack(model_data.sd_model) model_data.sd_model = None sd_model = None diff --git a/modules/sd_samplers.py b/modules/sd_samplers.py index 2a13f5030..8ac3f46ef 100644 --- a/modules/sd_samplers.py +++ b/modules/sd_samplers.py @@ -1,8 +1,8 @@ from modules import sd_samplers_compvis, sd_samplers_kdiffusion, sd_samplers_diffusors, shared from modules.sd_samplers_common import samples_to_image_grid, sample_to_image # pylint: disable=unused-import -from modules.shared import opts +from modules.shared import backend, Backend -if opts.sd_backend == 'Original': +if backend == Backend.ORIGINAL: all_samplers = [ *sd_samplers_kdiffusion.samplers_data_k_diffusion, *sd_samplers_compvis.samplers_data_compvis, @@ -23,7 +23,7 @@ def create_sampler(name, model): else: config = all_samplers[0] assert config is not None, f'bad sampler name: {name}' - if opts.sd_backend == 'Original': + if backend == Backend.ORIGINAL: sampler = config.constructor(model) sampler.config = config return sampler diff --git a/modules/shared.py b/modules/shared.py index 7050ddde7..a1fce4156 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -4,10 +4,10 @@ import time import json import datetime import urllib.request +from enum import Enum import gradio as gr import tqdm import requests -# from ldm.models.diffusion.ddpm import LatentDiffusion from modules import errors, ui_components, shared_items, cmd_args 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 # pylint: disable=W0611 import modules.interrogate @@ -72,6 +72,11 @@ ui_reorder_categories = [ ] +class Backend(Enum): + ORIGINAL = 1 + DIFFUSERS = 2 + + def reload_hypernetworks(): from modules.hypernetworks import hypernetwork global hypernetworks # pylint: disable=W0603 @@ -634,6 +639,13 @@ opts = Options() config_filename = cmd_opts.config opts.load(config_filename) cmd_opts = cmd_args.compatibility_args(opts, cmd_opts) +if cmd_opts.backend == 'diffusers': + log.info('Overriding backend to Diffusers') + opts.data['sd_backend'] = 'Diffusers' +if cmd_opts.backend == 'original': + log.info('Overriding backend to Diffusers') + opts.data['sd_backend'] = 'Original' +backend = Backend.DIFFUSERS if opts.sd_backend == 'Diffusers' else Backend.ORIGINAL prompt_styles = modules.styles.StyleDatabase(opts.styles_dir) cmd_opts.disable_extension_access = (cmd_opts.share or cmd_opts.listen or (cmd_opts.server_name or False)) and not cmd_opts.insecure diff --git a/modules/textual_inversion/textual_inversion.py b/modules/textual_inversion/textual_inversion.py index 137309d4d..722593525 100644 --- a/modules/textual_inversion/textual_inversion.py +++ b/modules/textual_inversion/textual_inversion.py @@ -207,7 +207,7 @@ class EmbeddingDatabase: continue def load_textual_inversion_embeddings(self, force_reload=False): - if shared.opts.sd_backend == 'Diffusers': # TODO Diffusers + if shared.backend == shared.Backend.DIFFUSERS: # TODO Diffusers return if not force_reload: need_reload = False diff --git a/modules/txt2img.py b/modules/txt2img.py index e2e37afc5..5b0d3309e 100644 --- a/modules/txt2img.py +++ b/modules/txt2img.py @@ -3,7 +3,7 @@ from modules import sd_samplers, shared from modules.generation_parameters_copypaste import create_override_settings_dict from modules.processing import StableDiffusionProcessingTxt2Img, process_images # from modules.shared import opts, sd_model, debug -from modules.ui import plaintext_to_html +from modules.ui import plaintext_to_html, infotext_to_html from modules.memstats import memory_stats @@ -58,4 +58,4 @@ def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, step p.close() generation_info_js = processed.js() shared.log.debug(f'Processed: {len(processed.images)} Memory: {memory_stats()} txt') - return processed.images, generation_info_js, plaintext_to_html(processed.info), plaintext_to_html(processed.comments) + return processed.images, generation_info_js, infotext_to_html(processed.info), plaintext_to_html(processed.comments) diff --git a/modules/ui.py b/modules/ui.py index 0e79e983d..66d01be55 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -13,7 +13,7 @@ from modules.call_queue import wrap_gradio_gpu_call, wrap_queued_call, wrap_grad from modules import sd_hijack, sd_models, script_callbacks, ui_extensions, deepbooru, sd_vae, extra_networks, ui_common, ui_postprocessing from modules.ui_components import FormRow, FormColumn, FormGroup, ToolButton, FormHTML # pylint: disable=unused-import from modules.paths import script_path, data_path -from modules.shared import opts, cmd_opts +from modules.shared import opts, cmd_opts, backend, Backend from modules import prompt_parser import modules.codeformer_model import modules.generation_parameters_copypaste as parameters_copypaste @@ -63,6 +63,10 @@ def plaintext_to_html(text): return ui_common.plaintext_to_html(text) +def infotext_to_html(text): + return ui_common.infotext_to_html(text) + + def send_gradio_gallery_to_image(x): if len(x) == 0: return None @@ -204,7 +208,7 @@ def update_token_counter(text, steps): prompt_schedules = [[[steps, text]]] flat_prompts = reduce(lambda list1, list2: list1+list2, prompt_schedules) prompts = [prompt_text for step, prompt_text in flat_prompts] - if opts.sd_backend == 'Original': + if backend == Backend.ORIGINAL: token_count, max_length = max([sd_hijack.model_hijack.get_prompt_lengths(prompt) for prompt in prompts], key=lambda args: args[0]) else: tokenizer = modules.shared.sd_model.tokenizer diff --git a/modules/ui_common.py b/modules/ui_common.py index 5f51f9bf2..cfd9e6ee9 100644 --- a/modules/ui_common.py +++ b/modules/ui_common.py @@ -1,6 +1,7 @@ import json import html import os +import shutil import platform import subprocess import gradio as gr @@ -8,6 +9,7 @@ from modules import call_queue, shared from modules.generation_parameters_copypaste import image_from_url_text import modules.images + folder_symbol = '\U0001f4c2' # 📂 @@ -16,60 +18,99 @@ def update_generation_info(generation_info, html_info, img_index): generation_info = json.loads(generation_info) if img_index < 0 or img_index >= len(generation_info["infotexts"]): return html_info, gr.update() - return plaintext_to_html(generation_info["infotexts"][img_index]), gr.update() + html_text = infotext_to_html(generation_info["infotexts"][img_index]) + return html_text, gr.update() except Exception: pass - # if the json parse or anything else fails, just return the old html_info return html_info, gr.update() def plaintext_to_html(text): - text = "

" + "
\n".join([f"{html.escape(x)}" for x in text.split('\n')]) + "

" - return text + res = '

' + "
\n".join([f"{html.escape(x)}" for x in text.split('\n')]) + '

' + return res + + +def infotext_to_html(text): + res = '

Prompt: ' + html.escape(text).replace('\n', '
') + '

' + sections = res.split('Steps:') # before and after prompt+negprompt' + if len(sections) > 1: + res = sections[0] + '
Steps: ' + sections[1].strip().replace(', ', ' | ') + res = res.replace('

', '
') + return res + + +def delete_files(js_data, images, _do_make_zip, index): + try: + data = json.loads(js_data) + except Exception: + data = { 'index_of_first_image': 0 } + start_index = 0 + if index > -1 and shared.opts.save_selected_only and (index >= data['index_of_first_image']): + images = [images[index]] + start_index = index + filenames = [] + filenames = [] + fullfns = [] + for _image_index, filedata in enumerate(images, start_index): + if 'name' in filedata and os.path.isfile(filedata['name']): + fullfn = filedata['name'] + filenames.append(os.path.basename(fullfn)) + try: + os.remove(fullfn) + fullfns.append(fullfn) + shared.log.info(f"Deleting image: {fullfn}") + except Exception as e: + shared.log.error(f'Error deleting file: {fullfn} {e}') + images = [image for image in images if image['name'] not in fullfns] + return images, plaintext_to_html(f"Deleted: {filenames[0] if len(filenames) > 0 else 'none'}") def save_files(js_data, images, do_make_zip, index): - if js_data is None or len(js_data) == 0: - return - filenames = [] - fullfns = [] + os.makedirs(shared.opts.outdir_save, exist_ok=True) - #quick dictionary to class object conversion. Its necessary due apply_filename_pattern requiring it - class MyObject: + class MyObject: #quick dictionary to class object conversion. Its necessary due apply_filename_pattern requiring it def __init__(self, d=None): if d is not None: for key, value in d.items(): setattr(self, key, value) - data = json.loads(js_data) + try: + data = json.loads(js_data) + except Exception: + data = { 'index_of_first_image': 0 } p = MyObject(data) - path = shared.opts.outdir_save - save_to_dirs = shared.opts.use_save_to_dirs_for_ui - extension: str = shared.opts.samples_format start_index = 0 - if index > -1 and shared.opts.save_selected_only and (index >= data["index_of_first_image"]): # ensures we are looking at a specific non-grid picture, and we have save_selected_only + if index > -1 and shared.opts.save_selected_only and (index >= data['index_of_first_image']): # ensures we are looking at a specific non-grid picture, and we have save_selected_only # pylint: disable=no-member images = [images[index]] start_index = index - os.makedirs(shared.opts.outdir_save, exist_ok=True) + filenames = [] + fullfns = [] for image_index, filedata in enumerate(images, start_index): - image = image_from_url_text(filedata) - is_grid = image_index < p.index_of_first_image # pylint: disable=no-member - i = 0 if is_grid else (image_index - p.index_of_first_image) # pylint: disable=no-member - if len(p.all_seeds) <= i: # pylint: disable=no-member - p.all_seeds.append(p.seed) # pylint: disable=no-member - if len(p.all_prompts) <= i: # pylint: disable=no-member - p.all_prompts.append(p.prompt) # pylint: disable=no-member - fullfn, txt_fullfn = modules.images.save_image(image, path, "", seed=p.all_seeds[i], prompt=p.all_prompts[i], extension=extension, info=p.infotexts[image_index], grid=is_grid, p=p, save_to_dirs=save_to_dirs) # pylint: disable=no-member - if fullfn is None: - continue - filename = os.path.relpath(fullfn, path) - filenames.append(filename) - fullfns.append(fullfn) - if txt_fullfn: - filenames.append(os.path.basename(txt_fullfn)) - fullfns.append(txt_fullfn) + if 'name' in filedata and os.path.isfile(filedata['name']): + fullfn = filedata['name'] + filenames.append(os.path.basename(fullfn)) + fullfns.append(fullfn) + shutil.copy(fullfn, shared.opts.outdir_save) + shared.log.info(f"Copying image: {fullfn} -> {shared.opts.outdir_save}") + else: + image = image_from_url_text(filedata) + is_grid = image_index < p.index_of_first_image # pylint: disable=no-member + i = 0 if is_grid else (image_index - p.index_of_first_image) # pylint: disable=no-member + if len(p.all_seeds) <= i: # pylint: disable=no-member + p.all_seeds.append(p.seed) # pylint: disable=no-member + if len(p.all_prompts) <= i: # pylint: disable=no-member + p.all_prompts.append(p.prompt) # pylint: disable=no-member + fullfn, txt_fullfn = modules.images.save_image(image, shared.opts.outdir_save, "", seed=p.all_seeds[i], prompt=p.all_prompts[i], extension=shared.opts.samples_format, info=p.infotexts[image_index], grid=is_grid, p=p, save_to_dirs=shared.opts.use_save_to_dirs_for_ui) # pylint: disable=no-member + if fullfn is None: + continue + filename = os.path.relpath(fullfn, shared.opts.outdir_save) + filenames.append(filename) + fullfns.append(fullfn) + if txt_fullfn: + filenames.append(os.path.basename(txt_fullfn)) + fullfns.append(txt_fullfn) if do_make_zip: - zip_filepath = os.path.join(path, "images.zip") + zip_filepath = os.path.join(shared.opts.outdir_save, "images.zip") from zipfile import ZipFile with ZipFile(zip_filepath, "w") as zip_file: for i in range(len(fullfns)): @@ -105,87 +146,47 @@ def create_output_panel(tabname, outdir): with gr.Group(elem_id=f"{tabname}_gallery_container"): result_gallery = gr.Gallery(value=['html/logo.png'], label='Output', show_label=False, elem_id=f"{tabname}_gallery").style(preview=False, container=False, columns=[1,2,3,4,5,6]) # <576px, <768px, <992px, <1200px, <1400px, >1400px - generation_info = None with gr.Column(): with gr.Row(elem_id=f"image_buttons_{tabname}", elem_classes="image-buttons"): open_folder_button = gr.Button('show', visible=not shared.cmd_opts.hide_ui_dir_config) - - if tabname != "extras": - save = gr.Button('save', elem_id=f'save_{tabname}') - save_zip = gr.Button('zip', elem_id=f'save_zip_{tabname}') - + save = gr.Button('save', elem_id=f'save_{tabname}') + save_zip = gr.Button('zip', elem_id=f'save_zip_{tabname}') + delete = gr.Button('delete', elem_id=f'delete_{tabname}') buttons = parameters_copypaste.create_buttons(["img2img", "inpaint", "extras"]) - open_folder_button.click( - fn=lambda: open_folder(shared.opts.outdir_samples or outdir), - inputs=[], - outputs=[], - ) - - if tabname != "extras": - download_files = gr.File(None, file_count="multiple", interactive=False, show_label=False, visible=False, elem_id=f'download_files_{tabname}') - - with gr.Group(): - html_info = gr.HTML(elem_id=f'html_info_{tabname}', elem_classes="infotext") - html_log = gr.HTML(elem_id=f'html_log_{tabname}') - - generation_info = gr.Textbox(visible=False, elem_id=f'generation_info_{tabname}') - if tabname == 'txt2img' or tabname == 'img2img': - generation_info_button = gr.Button(visible=False, elem_id=f"{tabname}_generation_info_button") - generation_info_button.click( - fn=update_generation_info, - _js="function(x, y, z){ return [x, y, selected_gallery_index()] }", - inputs=[generation_info, html_info, html_info], - outputs=[html_info, html_info], - show_progress=False, - ) - - save.click( - fn=call_queue.wrap_gradio_call(save_files), - _js="(x, y, z, w) => [x, y, false, selected_gallery_index()]", - inputs=[ - generation_info, - result_gallery, - html_info, - html_info, - ], - outputs=[ - download_files, - html_log, - ], - show_progress=False, - ) - - save_zip.click( - fn=call_queue.wrap_gradio_call(save_files), - _js="(x, y, z, w) => [x, y, true, selected_gallery_index()]", - inputs=[ - generation_info, - result_gallery, - html_info, - html_info, - ], - outputs=[ - download_files, - html_log, - ] - ) - - else: - html_info_x = gr.HTML(elem_id=f'html_info_x_{tabname}') + open_folder_button.click(fn=lambda: open_folder(shared.opts.outdir_samples or outdir), inputs=[], outputs=[]) + download_files = gr.File(None, file_count="multiple", interactive=False, show_label=False, visible=False, elem_id=f'download_files_{tabname}') + with gr.Group(): html_info = gr.HTML(elem_id=f'html_info_{tabname}', elem_classes="infotext") html_log = gr.HTML(elem_id=f'html_log_{tabname}') + generation_info = gr.Textbox(visible=False, elem_id=f'generation_info_{tabname}') + generation_info_button = gr.Button(visible=False, elem_id=f"{tabname}_generation_info_button") + generation_info_button.click(fn=update_generation_info, _js="function(x, y, z){ return [x, y, selected_gallery_index()] }", show_progress=False, + inputs=[generation_info, html_info, html_info], + outputs=[html_info, html_info], + ) + save.click(fn=call_queue.wrap_gradio_call(save_files), _js="(x, y, z, w) => [x, y, false, selected_gallery_index()]", show_progress=False, + inputs=[generation_info, result_gallery, html_info, html_info], + outputs=[download_files, html_log], + ) + save_zip.click(fn=call_queue.wrap_gradio_call(save_files), _js="(x, y, z, w) => [x, y, true, selected_gallery_index()]", + inputs=[generation_info, result_gallery, html_info, html_info], + outputs=[download_files, html_log], + ) + delete.click(fn=call_queue.wrap_gradio_call(delete_files), _js="(x, y, z, w) => [x, y, true, selected_gallery_index()]", + inputs=[generation_info, result_gallery, html_info, html_info], + outputs=[result_gallery, html_log], + ) - paste_field_names = [] if tabname == "txt2img": paste_field_names = modules.scripts.scripts_txt2img.paste_field_names elif tabname == "img2img": paste_field_names = modules.scripts.scripts_img2img.paste_field_names - + else: + paste_field_names = [] for paste_tabname, paste_button in buttons.items(): parameters_copypaste.register_paste_params_button(parameters_copypaste.ParamBinding( - paste_button=paste_button, tabname=paste_tabname, source_tabname="txt2img" if tabname == "txt2img" else None, source_image_component=result_gallery, + paste_button=paste_button, tabname=paste_tabname, source_tabname=("txt2img" if tabname == "txt2img" else None), source_image_component=result_gallery, paste_field_names=paste_field_names )) - - return result_gallery, generation_info if tabname != "extras" else html_info_x, html_info, html_log + return result_gallery, generation_info, html_info, html_log diff --git a/modules/ui_postprocessing.py b/modules/ui_postprocessing.py index 9a56d26e8..860316e49 100644 --- a/modules/ui_postprocessing.py +++ b/modules/ui_postprocessing.py @@ -3,13 +3,18 @@ from modules import scripts_postprocessing, scripts, shared, gfpgan_model, codef import modules.generation_parameters_copypaste as parameters_copypaste from modules.call_queue import wrap_gradio_gpu_call, wrap_queued_call, wrap_gradio_call # pylint: disable=unused-import from modules.extras import run_pnginfo +from modules.ui_common import infotext_to_html + + +def wrap_pnginfo(image): + _, geninfo, info = run_pnginfo(image) + return '', infotext_to_html(geninfo), info def submit_click(tab_index, extras_image, image_batch, extras_batch_input_dir, extras_batch_output_dir, show_extras_results, *script_inputs): - result_images, html_info_x, html_info = postprocessing.run_postprocessing(tab_index, extras_image, image_batch, extras_batch_input_dir, extras_batch_output_dir, show_extras_results, *script_inputs) - if result_images is not None and len(result_images) > 0: - _html_info, _generation_info, html_info_x = run_pnginfo(result_images[0]) - return result_images, html_info_x, html_info + + result_images, geninfo, _js_info = postprocessing.run_postprocessing(tab_index, extras_image, image_batch, extras_batch_input_dir, extras_batch_output_dir, show_extras_results, *script_inputs) + return result_images, geninfo, '{}', '' def create_ui(): @@ -37,32 +42,21 @@ def create_ui(): skip = gr.Button('Skip', elem_id=f"{id_part}_skip", variant='secondary') skip.click(fn=lambda: shared.state.skip(), inputs=[], outputs=[]) interrupt.click(fn=lambda: shared.state.interrupt(), inputs=[], outputs=[]) - result_images, html_info_x, html_info, _html_log = ui_common.create_output_panel("extras", shared.opts.outdir_extras_samples) - html_info = gr.HTML(elem_id="pnginfo_html_info") - generation_info = gr.Textbox(elem_id="pnginfo_generation_info", label="Parameters", visible=False) - generation_info_pretty = gr.Textbox(elem_id="pnginfo_generation_info_pretty", label="Parameters") - gr.HTML('Full metadata') - html2_info = gr.HTML(elem_id="pnginfo_html2_info") + result_images, generation_info, html_info, html_log = ui_common.create_output_panel("extras", shared.opts.outdir_extras_samples) + gr.HTML('File metadata') + exif_info = gr.HTML(elem_id="pnginfo_html_info") for tabname, button in buttons.items(): - parameters_copypaste.register_paste_params_button(parameters_copypaste.ParamBinding(paste_button=button, tabname=tabname, source_text_component=generation_info, source_image_component=extras_image)) - - def pretty_geninfo(generation_info: str): - if generation_info is None: - return '' - sections = generation_info.split('Steps:') - if len(sections) > 1: - param = sections[0].strip() + '\nSteps:' + sections[1].strip().replace(', ', '\n') - return param - return generation_info + parameters_copypaste.register_paste_params_button(parameters_copypaste.ParamBinding(paste_button=button, tabname=tabname, source_text_component=html_info, source_image_component=extras_image)) tab_single.select(fn=lambda: 0, inputs=[], outputs=[tab_index]) tab_batch.select(fn=lambda: 1, inputs=[], outputs=[tab_index]) tab_batch_dir.select(fn=lambda: 2, inputs=[], outputs=[tab_index]) - generation_info.change(fn=pretty_geninfo, inputs=[generation_info], outputs=[generation_info_pretty]) + # html_info.change(fn=pretty_geninfo, inputs=[html_info], outputs=[html_info_pretty]) + _dummy = gr.HTML(visible=False) extras_image.change( - fn=wrap_gradio_call(run_pnginfo), + fn=wrap_gradio_call(wrap_pnginfo), inputs=[extras_image], - outputs=[html_info, generation_info, html2_info], + outputs=[_dummy, html_info, exif_info], ) submit.click( fn=call_queue.wrap_gradio_gpu_call(submit_click, extra_outputs=[None, '']), @@ -73,12 +67,13 @@ def create_ui(): extras_batch_input_dir, extras_batch_output_dir, show_extras_results, - *script_inputs + *script_inputs, ], outputs=[ result_images, - html_info_x, html_info, + generation_info, + html_log, ] ) From 8354b7c6d95c8c447ad7179ed5d7d63e1a02bf34 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 29 May 2023 15:42:24 -0400 Subject: [PATCH 244/282] style changes --- CHANGELOG.md | 4 +++- javascript/black-orange.css | 6 +++--- javascript/style.css | 6 ++++++ modules/ui.py | 12 ++++++------ 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7c38970d..a463e9d35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,9 @@ ## Update for 05/28/2023 - settings search option -- system info live gpu memory and load graphs +- fully common save/zip/delete (new) options in all tabs +- system info live gpu memory and load graphs for nvidia gpus +- minor style changes ## Update for 05/26/2023 diff --git a/javascript/black-orange.css b/javascript/black-orange.css index 69bd91674..7a18eeecf 100644 --- a/javascript/black-orange.css +++ b/javascript/black-orange.css @@ -81,12 +81,12 @@ svg.feather.feather-image, .feather .feather-image { display: none } #quicksettings > div, #quicksettings > fieldset { min-width: 24em; max-width: 26em; line-height: 2em; } #refresh_sd_model_checkpoint { height: 48px; margin-left: -14px; background: #333333; box-shadow: none; } #open_folder_extras, #footer, #style_pos_col, #style_neg_col, #roll_col, #extras_upscaler_2, #extras_upscaler_2_visibility, #txt2img_seed_resize_from_w, #txt2img_seed_resize_from_h { display: none; } -#refresh_txt2img_styles, #refresh_img2img_styles { height: 40px; } +#refresh_txt2img_styles, #refresh_img2img_styles { height: 40px; margin-left: -8px; } #save-animation { border-radius: 0 !important; margin-bottom: 16px; background-color: #111111; } #script_list { padding: 4px; margin-top: 20px; margin-bottom: 20px; } #settings > div.flex-wrap { width: 15em; } #tab_extensions table { background-color: #222222; } -#txt2img_actions_column, #img2img_actions_column { min-width: 260px !important; max-width: 260px !important; } +#txt2img_actions_column, #img2img_actions_column { min-width: 280px !important; max-width: 280px !important; gap: 0.6em } #txt2img_cfg_scale { min-width: 200px; } #txt2img_checkboxes, #img2img_checkboxes { background-color: transparent; } #txt2img_checkboxes, #img2img_checkboxes { margin-bottom: 0.2em; } @@ -102,7 +102,7 @@ svg.feather.feather-image, .feather .feather-image { display: none } #txt2img_subseed_row { padding: 0; margin-top: 16px; } #txt2img_subseed_show, #img2img_subseed_show { display: None } #txt2img_subseed_strength { margin-top: 0; } -#txt2img_tools, #img2img_tools { margin-top: 54px; scale: 120%; margin-left: 26px; } +#txt2img_tools, #img2img_tools { margin-top: 54px; scale: 120%; margin-left: 40px; filter: hue-rotate(180deg) saturate(0.5); } #txtimg_hr_finalres { max-width: 200px; } #pnginfo_html2_info { margin-top: -18px; background-color: var(--input-background-fill); padding: var(--input-padding) } #txt2img_extra_refresh, #txt2img_extra_close { height: 1.7em; } diff --git a/javascript/style.css b/javascript/style.css index f060604cc..f11bd9d31 100644 --- a/javascript/style.css +++ b/javascript/style.css @@ -115,6 +115,8 @@ a{ #txt2img_gallery img, #img2img_gallery img, #extras_gallery img{ object-fit: scale-down; + width: -webkit-fill-available !important; + height: -webkit-fill-available !important; } #txt2img_actions_column, #img2img_actions_column { gap: 0.5em; @@ -677,3 +679,7 @@ footer { #extras_upscale { margin-top: 10px } #modelmerger_interp_description { margin-top: 1em; margin-bottom: 1em; } + +.thumbnail-item > img { + +} \ No newline at end of file diff --git a/modules/ui.py b/modules/ui.py index 66d01be55..e6dfc2fb3 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -50,12 +50,12 @@ sample_img2img = sample_img2img if os.path.exists(sample_img2img) else None # Important that they exactly match script.js for tooltip to work. random_symbol = '\U0001f3b2\ufe0f' # 🎲️ reuse_symbol = '\u267b\ufe0f' # ♻️ -paste_symbol = '\u2199\ufe0f' # ↙ -refresh_symbol = '\U0001f504' # 🔄 -save_style_symbol = '\U0001f4be' # 💾 -apply_style_symbol = '\U0001f4cb' # 📋 -clear_prompt_symbol = '\U0001f5d1\ufe0f' # 🗑️ -extra_networks_symbol = '\U0001F3B4' # 🎴 +paste_symbol = '\U0001F4D8' # '\u2199\ufe0f' # ↙ +refresh_symbol = '\U0001F504' # 🔄 +save_style_symbol = '\U0001F6C5' # '\U0001f4be' # 💾 +apply_style_symbol = '\U0001F9F3' # '\U0001f4cb' # 📋 +clear_prompt_symbol = '\U0001F6AE' # '\U0001f5d1\ufe0f' # 🗑️ +extra_networks_symbol = '\U0001F310' # '\U0001F3B4' # 🎴 switch_values_symbol = '\U000021C5' # ⇅ From 24bbe045a77e040b99908876ba0c7783c992a22d Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 29 May 2023 20:55:33 -0400 Subject: [PATCH 245/282] fix paste --- javascript/black-orange.css | 2 +- javascript/style.css | 3 ++- modules/generation_parameters_copypaste.py | 2 ++ modules/ui_common.py | 7 +++---- modules/ui_postprocessing.py | 8 ++++---- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/javascript/black-orange.css b/javascript/black-orange.css index 7a18eeecf..1d8e5523b 100644 --- a/javascript/black-orange.css +++ b/javascript/black-orange.css @@ -81,7 +81,7 @@ svg.feather.feather-image, .feather .feather-image { display: none } #quicksettings > div, #quicksettings > fieldset { min-width: 24em; max-width: 26em; line-height: 2em; } #refresh_sd_model_checkpoint { height: 48px; margin-left: -14px; background: #333333; box-shadow: none; } #open_folder_extras, #footer, #style_pos_col, #style_neg_col, #roll_col, #extras_upscaler_2, #extras_upscaler_2_visibility, #txt2img_seed_resize_from_w, #txt2img_seed_resize_from_h { display: none; } -#refresh_txt2img_styles, #refresh_img2img_styles { height: 40px; margin-left: -8px; } +#refresh_txt2img_styles, #refresh_img2img_styles { height: 45px; margin-left: -8px; } #save-animation { border-radius: 0 !important; margin-bottom: 16px; background-color: #111111; } #script_list { padding: 4px; margin-top: 20px; margin-bottom: 20px; } #settings > div.flex-wrap { width: 15em; } diff --git a/javascript/style.css b/javascript/style.css index f11bd9d31..02781546f 100644 --- a/javascript/style.css +++ b/javascript/style.css @@ -92,6 +92,7 @@ button.custom-button{ .performance p{ display: inline-block; + color: var(--primary-100) !important } .performance .time { @@ -116,7 +117,7 @@ a{ #txt2img_gallery img, #img2img_gallery img, #extras_gallery img{ object-fit: scale-down; width: -webkit-fill-available !important; - height: -webkit-fill-available !important; + height: inherit !important; } #txt2img_actions_column, #img2img_actions_column { gap: 0.5em; diff --git a/modules/generation_parameters_copypaste.py b/modules/generation_parameters_copypaste.py index 1fb8d159a..1ea0e24cb 100644 --- a/modules/generation_parameters_copypaste.py +++ b/modules/generation_parameters_copypaste.py @@ -350,7 +350,9 @@ def create_override_settings_dict(text_pairs): def connect_paste(button, local_paste_fields, input_comp, override_settings_component, tabname): + def paste_func(prompt): + shared.log.debug(f'paste prompt: {prompt}') if prompt is not None and 'Negative prompt' not in prompt and 'Steps' not in prompt: prompt = None if not prompt and not shared.cmd_opts.hide_ui_dir_config: diff --git a/modules/ui_common.py b/modules/ui_common.py index cfd9e6ee9..e5582086d 100644 --- a/modules/ui_common.py +++ b/modules/ui_common.py @@ -31,7 +31,7 @@ def plaintext_to_html(text): def infotext_to_html(text): - res = '

Prompt: ' + html.escape(text).replace('\n', '
') + '

' + res = '

Prompt: ' + html.escape(text or '').replace('\n', '
') + '

' sections = res.split('Steps:') # before and after prompt+negprompt' if len(sections) > 1: res = sections[0] + '
Steps: ' + sections[1].strip().replace(', ', ' | ') @@ -86,7 +86,7 @@ def save_files(js_data, images, do_make_zip, index): filenames = [] fullfns = [] for image_index, filedata in enumerate(images, start_index): - if 'name' in filedata and os.path.isfile(filedata['name']): + if 'name' in filedata and ('tmp' not in filedata['name']) and os.path.isfile(filedata['name']): fullfn = filedata['name'] filenames.append(os.path.basename(fullfn)) fullfns.append(fullfn) @@ -186,7 +186,6 @@ def create_output_panel(tabname, outdir): paste_field_names = [] for paste_tabname, paste_button in buttons.items(): parameters_copypaste.register_paste_params_button(parameters_copypaste.ParamBinding( - paste_button=paste_button, tabname=paste_tabname, source_tabname=("txt2img" if tabname == "txt2img" else None), source_image_component=result_gallery, - paste_field_names=paste_field_names + paste_button=paste_button, tabname=paste_tabname, source_tabname=("txt2img" if tabname == "txt2img" else None), source_image_component=result_gallery, paste_field_names=paste_field_names )) return result_gallery, generation_info, html_info, html_log diff --git a/modules/ui_postprocessing.py b/modules/ui_postprocessing.py index 860316e49..bd928e277 100644 --- a/modules/ui_postprocessing.py +++ b/modules/ui_postprocessing.py @@ -8,7 +8,7 @@ from modules.ui_common import infotext_to_html def wrap_pnginfo(image): _, geninfo, info = run_pnginfo(image) - return '', infotext_to_html(geninfo), info + return '', infotext_to_html(geninfo), info, geninfo def submit_click(tab_index, extras_image, image_batch, extras_batch_input_dir, extras_batch_output_dir, show_extras_results, *script_inputs): @@ -45,18 +45,18 @@ def create_ui(): result_images, generation_info, html_info, html_log = ui_common.create_output_panel("extras", shared.opts.outdir_extras_samples) gr.HTML('File metadata') exif_info = gr.HTML(elem_id="pnginfo_html_info") + gen_info = gr.Text(elem_id="pnginfo_gen_info", visible=False) for tabname, button in buttons.items(): - parameters_copypaste.register_paste_params_button(parameters_copypaste.ParamBinding(paste_button=button, tabname=tabname, source_text_component=html_info, source_image_component=extras_image)) + parameters_copypaste.register_paste_params_button(parameters_copypaste.ParamBinding(paste_button=button, tabname=tabname, source_text_component=gen_info, source_image_component=extras_image)) tab_single.select(fn=lambda: 0, inputs=[], outputs=[tab_index]) tab_batch.select(fn=lambda: 1, inputs=[], outputs=[tab_index]) tab_batch_dir.select(fn=lambda: 2, inputs=[], outputs=[tab_index]) - # html_info.change(fn=pretty_geninfo, inputs=[html_info], outputs=[html_info_pretty]) _dummy = gr.HTML(visible=False) extras_image.change( fn=wrap_gradio_call(wrap_pnginfo), inputs=[extras_image], - outputs=[_dummy, html_info, exif_info], + outputs=[_dummy, html_info, exif_info, gen_info], ) submit.click( fn=call_queue.wrap_gradio_gpu_call(submit_click, extra_outputs=[None, '']), From b66499163344de3a1cdae195523928889d31bd1f Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 30 May 2023 12:18:22 -0400 Subject: [PATCH 246/282] update samplers --- extensions-builtin/sd-webui-controlnet | 2 +- javascript/style.css | 3 +-- modules/api/api.py | 2 ++ modules/processing.py | 29 ++++++++++++++++++++++++-- modules/sd_samplers_kdiffusion.py | 4 +--- requirements.txt | 2 +- 6 files changed, 33 insertions(+), 9 deletions(-) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 09cb9a32d..7b707dc1f 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 09cb9a32d1051aa827f1bb092cf17fcbf996ed7f +Subproject commit 7b707dc1f03c3070f8a506ff70a2b68173d57bb5 diff --git a/javascript/style.css b/javascript/style.css index 02781546f..179e113b4 100644 --- a/javascript/style.css +++ b/javascript/style.css @@ -114,10 +114,9 @@ a{ cursor: pointer; } -#txt2img_gallery img, #img2img_gallery img, #extras_gallery img{ +#txt2img_gallery img, #img2img_gallery img, #extras_gallery img { object-fit: scale-down; width: -webkit-fill-available !important; - height: inherit !important; } #txt2img_actions_column, #img2img_actions_column { gap: 0.5em; diff --git a/modules/api/api.py b/modules/api/api.py index 71230abc1..38a43c63f 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -176,6 +176,8 @@ class Api: script_args[0] = 0 # get default values + if gr is None: + return script_args with gr.Blocks(): # will throw errors calling ui function without this for script in script_runner.scripts: if script.ui(script.is_img2img): diff --git a/modules/processing.py b/modules/processing.py index 9e7e7c742..22a504c1d 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -460,6 +460,7 @@ def create_infotext(p: StableDiffusionProcessing, all_prompts, all_seeds, all_su return f"{all_prompts[index]}{negative_prompt_text}\n{generation_params_text}".strip() +""" def print_profile(profile, msg: str): try: from rich import print # pylint: disable=redefined-builtin @@ -469,6 +470,24 @@ def print_profile(profile, msg: str): lines = lines.split('\n') lines = [l for l in lines if '/profiler' not in l] print(f'Profile {msg}:', '\n'.join(lines)) +""" + + +def print_profile(profile, msg: str): + import io + import pstats + try: + from rich import print # pylint: disable=redefined-builtin + except: + pass + profile.disable() + stream = io.StringIO() + ps = pstats.Stats(profile, stream=stream) + ps.sort_stats(pstats.SortKey.CUMULATIVE).print_stats(15) + profile = None + lines = stream.getvalue().split('\n') + lines = [l for l in lines if ' Processed: @@ -490,12 +509,18 @@ def process_images(p: StableDiffusionProcessing) -> Processed: log.debug('Token merging applied') if cmd_opts.profile: + """ import torch.profiler # pylint: disable=redefined-outer-name - # activities=[torch.profiler.ProfilerActivity.CPU, torch.profiler.ProfilerActivity.CUDA] with torch.profiler.profile(profile_memory=True, with_modules=True) as prof: with torch.profiler.record_function("process_images"): res = process_images_inner(p) print_profile(prof, 'process_images') + """ + import cProfile + pr = cProfile.Profile() + pr.enable() + res = process_images_inner(p) + print_profile(pr, 'Torch') else: res = process_images_inner(p) finally: @@ -836,7 +861,7 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): if self.hr_upscaler is not None: self.extra_generation_params["Hires upscaler"] = self.hr_upscaler - def sample(self, conditioning, unconditional_conditioning, seeds, subseeds, subseed_strength, prompts): + def sample(self, conditioning, unconditional_conditioning, seeds, subseeds, subseed_strength, prompts): # TODO this is majority of processing time self.sampler = sd_samplers.create_sampler(self.sampler_name, self.sd_model) latent_scale_mode = shared.latent_upscale_modes.get(self.hr_upscaler, None) if self.hr_upscaler is not None else shared.latent_upscale_modes.get(shared.latent_upscale_default_mode, "nearest") if self.enable_hr and latent_scale_mode is None: diff --git a/modules/sd_samplers_kdiffusion.py b/modules/sd_samplers_kdiffusion.py index 8622c0b9c..fbaa26873 100644 --- a/modules/sd_samplers_kdiffusion.py +++ b/modules/sd_samplers_kdiffusion.py @@ -10,9 +10,6 @@ from modules.script_callbacks import CFGDenoiserParams, cfg_denoiser_callback from modules.script_callbacks import CFGDenoisedParams, cfg_denoised_callback from modules.script_callbacks import AfterCFGCallbackParams, cfg_after_cfg_callback -# from tqdm.rich import trange -# k_diffusion.sampling.trange = trange - samplers_k_diffusion = [ ('Euler a', 'sample_euler_ancestral', ['k_euler_a', 'k_euler_ancestral'], {}), ('Euler', 'sample_euler', ['k_euler'], {}), @@ -31,6 +28,7 @@ samplers_k_diffusion = [ ('DPM++ 2S a Karras', 'sample_dpmpp_2s_ancestral', ['k_dpmpp_2s_a_ka'], {'scheduler': 'karras'}), ('DPM++ 2M Karras', 'sample_dpmpp_2m', ['k_dpmpp_2m_ka'], {'scheduler': 'karras'}), ('DPM++ SDE Karras', 'sample_dpmpp_sde', ['k_dpmpp_sde_ka'], {'scheduler': 'karras'}), + ('DPM++ 2M SDE', 'sample_dpmpp_2m_sde', ['k_dpmpp_2m_sde'], {}), ] samplers_data_k_diffusion = [ diff --git a/requirements.txt b/requirements.txt index be364a4ce..a0184f3d9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -45,7 +45,7 @@ yapf scikit-image basicsr compel -requests==2.30.0 +requests==2.31.0 tqdm==4.65.0 accelerate==0.18.0 opencv-python==4.7.0.72 From 89a7d8296a1e3e8424f14c6ee59053ba0372724d Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 30 May 2023 12:37:09 -0400 Subject: [PATCH 247/282] update changelog --- CHANGELOG.md | 5 ++++- TODO.md | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a463e9d35..7684d64e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,12 @@ ## Update for 05/28/2023 - settings search option -- fully common save/zip/delete (new) options in all tabs +- fully common save/zip/delete (new) options in all tabs + which (again) meant as rework of process image tab - system info live gpu memory and load graphs for nvidia gpus +- better controlnet interface - minor style changes +- add new k-diffusion sampler ## Update for 05/26/2023 diff --git a/TODO.md b/TODO.md index d1ff57730..89ed1a102 100644 --- a/TODO.md +++ b/TODO.md @@ -11,10 +11,8 @@ Stuff to be added... - Update `Wiki` - Create new `GitHub` hooks/actions for CI/CD -- Reload browser on server restart - Import core repos - Improve core `Stability-AI` code: -- Improve core `k-Diffusion` code ## Investigate From 873371f1e5c26457f87871c576737664fe58b5e0 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 30 May 2023 14:13:29 -0400 Subject: [PATCH 248/282] merge stage one --- .eslintignore | 4 + .eslintrc.json | 89 +++++++++++++++++++ CHANGELOG.md | 16 ++-- extensions-builtin/LDSR/ldsr_model_arch.py | 15 ++-- extensions-builtin/LDSR/preload.py | 6 ++ extensions-builtin/LDSR/scripts/ldsr_model.py | 7 +- .../LDSR/sd_hijack_autoencoder.py | 28 +++--- extensions-builtin/LDSR/sd_hijack_ddpm_v1.py | 66 +++++++------- .../Lora/extra_networks_lora.py | 18 ++++ extensions-builtin/Lora/lora.py | 81 +++++++++++++---- .../Lora/scripts/lora_script.py | 43 ++++++++- .../Lora/ui_extra_networks_lora.py | 8 +- extensions-builtin/ScuNET/preload.py | 6 ++ .../ScuNET/scripts/scunet_model.py | 19 ++-- .../ScuNET/scunet_model_arch.py | 11 ++- extensions-builtin/SwinIR/preload.py | 6 ++ .../SwinIR/scripts/swinir_model.py | 33 ++++--- .../SwinIR/swinir_model_arch.py | 6 +- .../SwinIR/swinir_model_arch_v2.py | 58 ++++++------ .../javascript/prompt-bracket-checker.js | 52 +++++------ html/licenses.html | 26 ++++++ installer.py | 2 +- javascript/.eslintrc.json | 22 ----- javascript/hints.js | 7 ++ modules/hashes.py | 43 ++++++--- modules/sd_samplers.py | 7 +- modules/sd_samplers_common.py | 31 +++++-- modules/sd_samplers_compvis.py | 11 ++- modules/sd_samplers_kdiffusion.py | 79 ++++++++-------- modules/sd_vae_taesd.py | 88 ++++++++++++++++++ modules/shared.py | 26 +++++- 31 files changed, 647 insertions(+), 267 deletions(-) create mode 100644 .eslintignore create mode 100644 .eslintrc.json create mode 100644 extensions-builtin/LDSR/preload.py create mode 100644 extensions-builtin/ScuNET/preload.py create mode 100644 extensions-builtin/SwinIR/preload.py delete mode 100644 javascript/.eslintrc.json create mode 100644 modules/sd_vae_taesd.py diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..c098feaa7 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,4 @@ +extensions +extensions-disabled +repositories +venv diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000000000..2958fbc79 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,89 @@ +{ + "env": { + "browser": true, + "commonjs": false, + "node": false, + "jquery": false, + "es2020": true + }, + "parserOptions": { "ecmaVersion": 2020 }, + "plugins": [], + "extends": ["eslint:recommended", "airbnb-base"], + "rules": { + "arrow-spacing": "error", + "block-spacing": "error", + "brace-style": "error", + "comma-dangle": ["error", "only-multiline"], + "comma-spacing": "error", + "comma-style": ["error", "last"], + "curly": ["error", "multi-line", "consistent"], + "eol-last": "error", + "func-call-spacing": "error", + "function-call-argument-newline": ["error", "consistent"], + "function-paren-newline": ["error", "consistent"], + "indent": ["error", 4], + "key-spacing": "error", + "keyword-spacing": "error", + "linebreak-style": ["error", "unix"], + "no-extra-semi": "error", + "no-mixed-spaces-and-tabs": "error", + "no-multi-spaces": "error", + "no-redeclare": ["error", { "builtinGlobals": false }], + "no-trailing-spaces": "error", + "no-unused-vars": "off", + "no-whitespace-before-property": "error", + "object-curly-newline": ["error", { "consistent": true, "multiline": true }], + "object-curly-spacing": ["error", "never"], + "operator-linebreak": ["error", "after"], + "quote-props": ["error", "consistent-as-needed"], + "semi": ["error", "always"], + "semi-spacing": "error", + "semi-style": ["error", "last"], + "space-before-blocks": "error", + "space-before-function-paren": ["error", "never"], + "space-in-parens": ["error", "never"], + "space-infix-ops": "error", + "space-unary-ops": "error", + "switch-colon-spacing": "error", + "template-curly-spacing": ["error", "never"], + "unicode-bom": "error" + }, + "globals": { + //script.js + "gradioApp": "readonly", + "onUiLoaded": "readonly", + "onUiUpdate": "readonly", + "onOptionsChanged": "readonly", + "uiCurrentTab": "writable", + "uiElementIsVisible": "readonly", + "uiElementInSight": "readonly", + "executeCallbacks": "readonly", + //ui.js + "opts": "writable", + "all_gallery_buttons": "readonly", + "selected_gallery_button": "readonly", + "selected_gallery_index": "readonly", + "switch_to_txt2img": "readonly", + "switch_to_img2img_tab": "readonly", + "switch_to_img2img": "readonly", + "switch_to_sketch": "readonly", + "switch_to_inpaint": "readonly", + "witch_to_inpaint_sketch": "readonly", + "switch_to_extras": "readonly", + "get_tab_index": "readonly", + "create_submit_args": "readonly", + "restart_reload": "readonly", + "updateInput": "readonly", + //extraNetworks.js + "requestGet": "readonly", + "popup": "readonly", + // from python + "localization": "readonly", + // progrssbar.js + "randomId": "readonly", + "requestProgress": "readonly", + // imageviewer.js + "modalPrevImage": "readonly", + "modalNextImage": "readonly" + } +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 7684d64e4..67e92961b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,18 @@ # Change Log for SD.Next -## Update for 05/28/2023 +## Update for 05/30/2023 -- settings search option +- new live preview mode: taesd + i really like this one, so its enabled as default for new installs +- settings search feature +- new sampler: sde++ 2m sde - fully common save/zip/delete (new) options in all tabs which (again) meant as rework of process image tab -- system info live gpu memory and load graphs for nvidia gpus -- better controlnet interface -- minor style changes -- add new k-diffusion sampler +- system info tab: live gpu utilization/memory graphs for nvidia gpus +- updated controlnet interface +- minor style changes +- updated lora, swinir, scunet and ldsr code from upstream +- start of merge from a1111 v1.3 ## Update for 05/26/2023 diff --git a/extensions-builtin/LDSR/ldsr_model_arch.py b/extensions-builtin/LDSR/ldsr_model_arch.py index c776fc720..7f450086f 100644 --- a/extensions-builtin/LDSR/ldsr_model_arch.py +++ b/extensions-builtin/LDSR/ldsr_model_arch.py @@ -40,7 +40,7 @@ class LDSR: model = model.to(shared.device) if half_attention: model = model.half() - if shared.opts.opt_channelslast: + if shared.cmd_opts.opt_channelslast: model = model.to(memory_format=torch.channels_last) sd_hijack.model_hijack.hijack(model) # apply optimization @@ -88,7 +88,7 @@ class LDSR: x_t = None logs = None - for n in range(n_runs): + for _ in range(n_runs): if custom_shape is not None: x_t = torch.randn(1, custom_shape[1], custom_shape[2], custom_shape[3]).to(model.device) x_t = repeat(x_t, '1 c h w -> b c h w', b=custom_shape[0]) @@ -110,7 +110,6 @@ class LDSR: diffusion_steps = int(steps) eta = 1.0 - down_sample_method = 'Lanczos' gc.collect() if torch.cuda.is_available: @@ -131,11 +130,11 @@ class LDSR: im_og = im_og.resize((width_downsampled_pre, height_downsampled_pre), Image.LANCZOS) else: print(f"Down sample rate is 1 from {target_scale} / 4 (Not downsampling)") - + # pad width and height to multiples of 64, pads with the edge values of image to avoid artifacts pad_w, pad_h = np.max(((2, 2), np.ceil(np.array(im_og.size) / 64).astype(int)), axis=0) * 64 - im_og.size im_padded = Image.fromarray(np.pad(np.array(im_og), ((0, pad_h), (0, pad_w), (0, 0)), mode='edge')) - + logs = self.run(model["model"], im_padded, diffusion_steps, eta) sample = logs["sample"] @@ -158,7 +157,7 @@ class LDSR: def get_cond(selected_path): - example = dict() + example = {} up_f = 4 c = selected_path.convert('RGB') c = torch.unsqueeze(torchvision.transforms.ToTensor()(c), 0) @@ -196,7 +195,7 @@ def convsample_ddim(model, cond, steps, shape, eta=1.0, callback=None, normals_s @torch.no_grad() def make_convolutional_sample(batch, model, custom_steps=None, eta=1.0, quantize_x0=False, custom_shape=None, temperature=1., noise_dropout=0., corrector=None, corrector_kwargs=None, x_T=None, ddim_use_x0_pred=False): - log = dict() + log = {} z, c, x, xrec, xc = model.get_input(batch, model.first_stage_key, return_first_stage_outputs=True, @@ -244,7 +243,7 @@ def make_convolutional_sample(batch, model, custom_steps=None, eta=1.0, quantize x_sample_noquant = model.decode_first_stage(sample, force_not_quantize=True) log["sample_noquant"] = x_sample_noquant log["sample_diff"] = torch.abs(x_sample_noquant - x_sample) - except: + except Exception: pass log["sample"] = x_sample diff --git a/extensions-builtin/LDSR/preload.py b/extensions-builtin/LDSR/preload.py new file mode 100644 index 000000000..cfd478d54 --- /dev/null +++ b/extensions-builtin/LDSR/preload.py @@ -0,0 +1,6 @@ +import os +from modules import paths + + +def preload(parser): + parser.add_argument("--ldsr-models-path", type=str, help="Path to directory with LDSR model file(s).", default=os.path.join(paths.models_path, 'LDSR')) diff --git a/extensions-builtin/LDSR/scripts/ldsr_model.py b/extensions-builtin/LDSR/scripts/ldsr_model.py index da19cff12..c4da79f31 100644 --- a/extensions-builtin/LDSR/scripts/ldsr_model.py +++ b/extensions-builtin/LDSR/scripts/ldsr_model.py @@ -7,7 +7,8 @@ from basicsr.utils.download_util import load_file_from_url from modules.upscaler import Upscaler, UpscalerData from ldsr_model_arch import LDSR from modules import shared, script_callbacks -import sd_hijack_autoencoder, sd_hijack_ddpm_v1 +import sd_hijack_autoencoder # noqa: F401 +import sd_hijack_ddpm_v1 # noqa: F401 class UpscalerLDSR(Upscaler): @@ -44,9 +45,9 @@ class UpscalerLDSR(Upscaler): if local_safetensors_path is not None and os.path.exists(local_safetensors_path): model = local_safetensors_path else: - model = local_ckpt_path if local_ckpt_path is not None else load_file_from_url(url=self.model_url, model_dir=self.model_path, file_name="model.ckpt", progress=True) + model = local_ckpt_path if local_ckpt_path is not None else load_file_from_url(url=self.model_url, model_dir=self.model_download_path, file_name="model.ckpt", progress=True) - yaml = local_yaml_path if local_yaml_path is not None else load_file_from_url(url=self.yaml_url, model_dir=self.model_path, file_name="project.yaml", progress=True) + yaml = local_yaml_path if local_yaml_path is not None else load_file_from_url(url=self.yaml_url, model_dir=self.model_download_path, file_name="project.yaml", progress=True) try: return LDSR(model, yaml) diff --git a/extensions-builtin/LDSR/sd_hijack_autoencoder.py b/extensions-builtin/LDSR/sd_hijack_autoencoder.py index 8e03c7f89..81c5101b7 100644 --- a/extensions-builtin/LDSR/sd_hijack_autoencoder.py +++ b/extensions-builtin/LDSR/sd_hijack_autoencoder.py @@ -1,16 +1,21 @@ # The content of this file comes from the ldm/models/autoencoder.py file of the compvis/stable-diffusion repo # The VQModel & VQModelInterface were subsequently removed from ldm/models/autoencoder.py when we moved to the stability-ai/stablediffusion repo # As the LDSR upscaler relies on VQModel & VQModelInterface, the hijack aims to put them back into the ldm.models.autoencoder - +import numpy as np import torch import pytorch_lightning as pl import torch.nn.functional as F from contextlib import contextmanager + +from torch.optim.lr_scheduler import LambdaLR + +from ldm.modules.ema import LitEma from taming.modules.vqvae.quantize import VectorQuantizer2 as VectorQuantizer from ldm.modules.diffusionmodules.model import Encoder, Decoder from ldm.util import instantiate_from_config import ldm.models.autoencoder +from packaging import version class VQModel(pl.LightningModule): def __init__(self, @@ -19,7 +24,7 @@ class VQModel(pl.LightningModule): n_embed, embed_dim, ckpt_path=None, - ignore_keys=[], + ignore_keys=None, image_key="image", colorize_nlabels=None, monitor=None, @@ -57,7 +62,7 @@ class VQModel(pl.LightningModule): print(f"Keeping EMAs of {len(list(self.model_ema.buffers()))}.") if ckpt_path is not None: - self.init_from_ckpt(ckpt_path, ignore_keys=ignore_keys) + self.init_from_ckpt(ckpt_path, ignore_keys=ignore_keys or []) self.scheduler_config = scheduler_config self.lr_g_factor = lr_g_factor @@ -76,11 +81,11 @@ class VQModel(pl.LightningModule): if context is not None: print(f"{context}: Restored training weights") - def init_from_ckpt(self, path, ignore_keys=list()): + def init_from_ckpt(self, path, ignore_keys=None): sd = torch.load(path, map_location="cpu")["state_dict"] keys = list(sd.keys()) for k in keys: - for ik in ignore_keys: + for ik in ignore_keys or []: if k.startswith(ik): print("Deleting key {} from state_dict.".format(k)) del sd[k] @@ -165,7 +170,7 @@ class VQModel(pl.LightningModule): def validation_step(self, batch, batch_idx): log_dict = self._validation_step(batch, batch_idx) with self.ema_scope(): - log_dict_ema = self._validation_step(batch, batch_idx, suffix="_ema") + self._validation_step(batch, batch_idx, suffix="_ema") return log_dict def _validation_step(self, batch, batch_idx, suffix=""): @@ -232,7 +237,7 @@ class VQModel(pl.LightningModule): return self.decoder.conv_out.weight def log_images(self, batch, only_inputs=False, plot_ema=False, **kwargs): - log = dict() + log = {} x = self.get_input(batch, self.image_key) x = x.to(self.device) if only_inputs: @@ -249,7 +254,8 @@ class VQModel(pl.LightningModule): if plot_ema: with self.ema_scope(): xrec_ema, _ = self(x) - if x.shape[1] > 3: xrec_ema = self.to_rgb(xrec_ema) + if x.shape[1] > 3: + xrec_ema = self.to_rgb(xrec_ema) log["reconstructions_ema"] = xrec_ema return log @@ -264,7 +270,7 @@ class VQModel(pl.LightningModule): class VQModelInterface(VQModel): def __init__(self, embed_dim, *args, **kwargs): - super().__init__(embed_dim=embed_dim, *args, **kwargs) + super().__init__(*args, embed_dim=embed_dim, **kwargs) self.embed_dim = embed_dim def encode(self, x): @@ -282,5 +288,5 @@ class VQModelInterface(VQModel): dec = self.decoder(quant) return dec -setattr(ldm.models.autoencoder, "VQModel", VQModel) -setattr(ldm.models.autoencoder, "VQModelInterface", VQModelInterface) +ldm.models.autoencoder.VQModel = VQModel +ldm.models.autoencoder.VQModelInterface = VQModelInterface diff --git a/extensions-builtin/LDSR/sd_hijack_ddpm_v1.py b/extensions-builtin/LDSR/sd_hijack_ddpm_v1.py index 5c0488e5f..631a08ef0 100644 --- a/extensions-builtin/LDSR/sd_hijack_ddpm_v1.py +++ b/extensions-builtin/LDSR/sd_hijack_ddpm_v1.py @@ -48,7 +48,7 @@ class DDPMV1(pl.LightningModule): beta_schedule="linear", loss_type="l2", ckpt_path=None, - ignore_keys=[], + ignore_keys=None, load_only_unet=False, monitor="val/loss", use_ema=True, @@ -100,7 +100,7 @@ class DDPMV1(pl.LightningModule): if monitor is not None: self.monitor = monitor if ckpt_path is not None: - self.init_from_ckpt(ckpt_path, ignore_keys=ignore_keys, only_model=load_only_unet) + self.init_from_ckpt(ckpt_path, ignore_keys=ignore_keys or [], only_model=load_only_unet) self.register_schedule(given_betas=given_betas, beta_schedule=beta_schedule, timesteps=timesteps, linear_start=linear_start, linear_end=linear_end, cosine_s=cosine_s) @@ -182,13 +182,13 @@ class DDPMV1(pl.LightningModule): if context is not None: print(f"{context}: Restored training weights") - def init_from_ckpt(self, path, ignore_keys=list(), only_model=False): + def init_from_ckpt(self, path, ignore_keys=None, only_model=False): sd = torch.load(path, map_location="cpu") if "state_dict" in list(sd.keys()): sd = sd["state_dict"] keys = list(sd.keys()) for k in keys: - for ik in ignore_keys: + for ik in ignore_keys or []: if k.startswith(ik): print("Deleting key {} from state_dict.".format(k)) del sd[k] @@ -375,7 +375,7 @@ class DDPMV1(pl.LightningModule): @torch.no_grad() def log_images(self, batch, N=8, n_row=2, sample=True, return_keys=None, **kwargs): - log = dict() + log = {} x = self.get_input(batch, self.first_stage_key) N = min(x.shape[0], N) n_row = min(x.shape[0], n_row) @@ -383,7 +383,7 @@ class DDPMV1(pl.LightningModule): log["inputs"] = x # get diffusion row - diffusion_row = list() + diffusion_row = [] x_start = x[:n_row] for t in range(self.num_timesteps): @@ -444,13 +444,13 @@ class LatentDiffusionV1(DDPMV1): conditioning_key = None ckpt_path = kwargs.pop("ckpt_path", None) ignore_keys = kwargs.pop("ignore_keys", []) - super().__init__(conditioning_key=conditioning_key, *args, **kwargs) + super().__init__(*args, conditioning_key=conditioning_key, **kwargs) self.concat_mode = concat_mode self.cond_stage_trainable = cond_stage_trainable self.cond_stage_key = cond_stage_key try: self.num_downs = len(first_stage_config.params.ddconfig.ch_mult) - 1 - except: + except Exception: self.num_downs = 0 if not scale_by_std: self.scale_factor = scale_factor @@ -460,7 +460,7 @@ class LatentDiffusionV1(DDPMV1): self.instantiate_cond_stage(cond_stage_config) self.cond_stage_forward = cond_stage_forward self.clip_denoised = False - self.bbox_tokenizer = None + self.bbox_tokenizer = None self.restarted_from_ckpt = False if ckpt_path is not None: @@ -792,7 +792,7 @@ class LatentDiffusionV1(DDPMV1): z = z.view((z.shape[0], -1, ks[0], ks[1], z.shape[-1])) # (bn, nc, ks[0], ks[1], L ) # 2. apply model loop over last dim - if isinstance(self.first_stage_model, VQModelInterface): + if isinstance(self.first_stage_model, VQModelInterface): output_list = [self.first_stage_model.decode(z[:, :, :, :, i], force_not_quantize=predict_cids or force_not_quantize) for i in range(z.shape[-1])] @@ -877,16 +877,6 @@ class LatentDiffusionV1(DDPMV1): c = self.q_sample(x_start=c, t=tc, noise=torch.randn_like(c.float())) return self.p_losses(x, c, t, *args, **kwargs) - def _rescale_annotations(self, bboxes, crop_coordinates): # TODO: move to dataset - def rescale_bbox(bbox): - x0 = clamp((bbox[0] - crop_coordinates[0]) / crop_coordinates[2]) - y0 = clamp((bbox[1] - crop_coordinates[1]) / crop_coordinates[3]) - w = min(bbox[2] / crop_coordinates[2], 1 - x0) - h = min(bbox[3] / crop_coordinates[3], 1 - y0) - return x0, y0, w, h - - return [rescale_bbox(b) for b in bboxes] - def apply_model(self, x_noisy, t, cond, return_ids=False): if isinstance(cond, dict): @@ -900,7 +890,7 @@ class LatentDiffusionV1(DDPMV1): if hasattr(self, "split_input_params"): assert len(cond) == 1 # todo can only deal with one conditioning atm - assert not return_ids + assert not return_ids ks = self.split_input_params["ks"] # eg. (128, 128) stride = self.split_input_params["stride"] # eg. (64, 64) @@ -1126,7 +1116,7 @@ class LatentDiffusionV1(DDPMV1): if cond is not None: if isinstance(cond, dict): cond = {key: cond[key][:batch_size] if not isinstance(cond[key], list) else - list(map(lambda x: x[:batch_size], cond[key])) for key in cond} + [x[:batch_size] for x in cond[key]] for key in cond} else: cond = [c[:batch_size] for c in cond] if isinstance(cond, list) else cond[:batch_size] @@ -1157,8 +1147,10 @@ class LatentDiffusionV1(DDPMV1): if i % log_every_t == 0 or i == timesteps - 1: intermediates.append(x0_partial) - if callback: callback(i) - if img_callback: img_callback(img, i) + if callback: + callback(i) + if img_callback: + img_callback(img, i) return img, intermediates @torch.no_grad() @@ -1205,8 +1197,10 @@ class LatentDiffusionV1(DDPMV1): if i % log_every_t == 0 or i == timesteps - 1: intermediates.append(img) - if callback: callback(i) - if img_callback: img_callback(img, i) + if callback: + callback(i) + if img_callback: + img_callback(img, i) if return_intermediates: return img, intermediates @@ -1221,7 +1215,7 @@ class LatentDiffusionV1(DDPMV1): if cond is not None: if isinstance(cond, dict): cond = {key: cond[key][:batch_size] if not isinstance(cond[key], list) else - list(map(lambda x: x[:batch_size], cond[key])) for key in cond} + [x[:batch_size] for x in cond[key]] for key in cond} else: cond = [c[:batch_size] for c in cond] if isinstance(cond, list) else cond[:batch_size] return self.p_sample_loop(cond, @@ -1253,7 +1247,7 @@ class LatentDiffusionV1(DDPMV1): use_ddim = ddim_steps is not None - log = dict() + log = {} z, c, x, xrec, xc = self.get_input(batch, self.first_stage_key, return_first_stage_outputs=True, force_c_encode=True, @@ -1280,7 +1274,7 @@ class LatentDiffusionV1(DDPMV1): if plot_diffusion_rows: # get diffusion row - diffusion_row = list() + diffusion_row = [] z_start = z[:n_row] for t in range(self.num_timesteps): if t % self.log_every_t == 0 or t == self.num_timesteps - 1: @@ -1322,7 +1316,7 @@ class LatentDiffusionV1(DDPMV1): if inpaint: # make a simple center square - b, h, w = z.shape[0], z.shape[2], z.shape[3] + h, w = z.shape[2], z.shape[3] mask = torch.ones(N, h, w).to(self.device) # zeros will be filled in mask[:, h // 4:3 * h // 4, w // 4:3 * w // 4] = 0. @@ -1424,10 +1418,10 @@ class Layout2ImgDiffusionV1(LatentDiffusionV1): # TODO: move all layout-specific hacks to this class def __init__(self, cond_stage_key, *args, **kwargs): assert cond_stage_key == 'coordinates_bbox', 'Layout2ImgDiffusion only for cond_stage_key="coordinates_bbox"' - super().__init__(cond_stage_key=cond_stage_key, *args, **kwargs) + super().__init__(*args, cond_stage_key=cond_stage_key, **kwargs) def log_images(self, batch, N=8, *args, **kwargs): - logs = super().log_images(batch=batch, N=N, *args, **kwargs) + logs = super().log_images(*args, batch=batch, N=N, **kwargs) key = 'train' if self.training else 'validation' dset = self.trainer.datamodule.datasets[key] @@ -1443,7 +1437,7 @@ class Layout2ImgDiffusionV1(LatentDiffusionV1): logs['bbox_image'] = cond_img return logs -setattr(ldm.models.diffusion.ddpm, "DDPMV1", DDPMV1) -setattr(ldm.models.diffusion.ddpm, "LatentDiffusionV1", LatentDiffusionV1) -setattr(ldm.models.diffusion.ddpm, "DiffusionWrapperV1", DiffusionWrapperV1) -setattr(ldm.models.diffusion.ddpm, "Layout2ImgDiffusionV1", Layout2ImgDiffusionV1) +ldm.models.diffusion.ddpm.DDPMV1 = DDPMV1 +ldm.models.diffusion.ddpm.LatentDiffusionV1 = LatentDiffusionV1 +ldm.models.diffusion.ddpm.DiffusionWrapperV1 = DiffusionWrapperV1 +ldm.models.diffusion.ddpm.Layout2ImgDiffusionV1 = Layout2ImgDiffusionV1 diff --git a/extensions-builtin/Lora/extra_networks_lora.py b/extensions-builtin/Lora/extra_networks_lora.py index ccb249ac7..b5fea4d2e 100644 --- a/extensions-builtin/Lora/extra_networks_lora.py +++ b/extensions-builtin/Lora/extra_networks_lora.py @@ -23,5 +23,23 @@ class ExtraNetworkLora(extra_networks.ExtraNetwork): lora.load_loras(names, multipliers) + if shared.opts.lora_add_hashes_to_infotext: + lora_hashes = [] + for item in lora.loaded_loras: + shorthash = item.lora_on_disk.shorthash + if not shorthash: + continue + + alias = item.mentioned_name + if not alias: + continue + + alias = alias.replace(":", "").replace(",", "") + + lora_hashes.append(f"{alias}: {shorthash}") + + if lora_hashes: + p.extra_generation_params["Lora hashes"] = ", ".join(lora_hashes) + def deactivate(self, p): pass diff --git a/extensions-builtin/Lora/lora.py b/extensions-builtin/Lora/lora.py index 5a12f1836..eec147122 100644 --- a/extensions-builtin/Lora/lora.py +++ b/extensions-builtin/Lora/lora.py @@ -1,8 +1,9 @@ import os import re -from typing import Union import torch -from modules import shared, devices, sd_models, errors, scripts +from typing import Union + +from modules import shared, devices, sd_models, errors, scripts, sd_hijack, hashes metadata_tags_order = {"ss_sd_model_name": 1, "ss_resolution": 2, "ss_clip_skip": 3, "ss_num_train_images": 10, "ss_tag_frequency": 20} @@ -75,9 +76,9 @@ class LoraOnDisk: self.name = name self.filename = filename self.metadata = {} + self.is_safetensors = os.path.splitext(filename)[1].lower() == ".safetensors" - _, ext = os.path.splitext(filename) - if ext.lower() == ".safetensors": + if self.is_safetensors: try: self.metadata = sd_models.read_metadata_from_safetensors(filename) except Exception as e: @@ -93,14 +94,43 @@ class LoraOnDisk: self.ssmd_cover_images = self.metadata.pop('ssmd_cover_images', None) # those are cover images and they are too big to display in UI as text self.alias = self.metadata.get('ss_output_name', self.name) + self.hash = None + self.shorthash = None + self.set_hash( + self.metadata.get('sshs_model_hash') or + hashes.sha256_from_cache(self.filename, "lora/" + self.name, use_addnet_hash=self.is_safetensors) or + '' + ) + + def set_hash(self, v): + self.hash = v + self.shorthash = self.hash[0:12] + + if self.shorthash: + available_lora_hash_lookup[self.shorthash] = self + + def read_hash(self): + if not self.hash: + self.set_hash(hashes.sha256(self.filename, "lora/" + self.name, use_addnet_hash=self.is_safetensors) or '') + + def get_alias(self): + if shared.opts.lora_preferred_name == "Filename" or self.alias.lower() in forbidden_lora_aliases: + return self.name + else: + return self.alias + class LoraModule: - def __init__(self, name): + def __init__(self, name, lora_on_disk: LoraOnDisk): self.name = name + self.lora_on_disk = lora_on_disk self.multiplier = 1.0 self.modules = {} self.mtime = None + self.mentioned_name = None + """the text that was used to add lora to prompt - can be either name or an alias""" + class LoraUpDownModule: def __init__(self): @@ -125,11 +155,11 @@ def assign_lora_names_to_compvis_modules(sd_model): sd_model.lora_layer_mapping = lora_layer_mapping -def load_lora(name, filename): - lora = LoraModule(name) - lora.mtime = os.path.getmtime(filename) +def load_lora(name, lora_on_disk): + lora = LoraModule(name, lora_on_disk) + lora.mtime = os.path.getmtime(lora_on_disk.filename) - sd = sd_models.read_state_dict(filename) + sd = sd_models.read_state_dict(lora_on_disk.filename) # this should not be needed but is here as an emergency fix for an unknown error people are experiencing in 1.2.0 if not hasattr(shared.sd_model, 'lora_layer_mapping'): @@ -175,6 +205,7 @@ def load_lora(name, filename): else: print(f'Lora layer {key_diffusers} matched a layer with unsupported type: {type(sd_module).__name__}') continue + raise AssertionError(f"Lora layer {key_diffusers} matched a layer with unsupported type: {type(sd_module).__name__}") with torch.no_grad(): module.weight.copy_(weight) @@ -186,10 +217,10 @@ def load_lora(name, filename): elif lora_key == "lora_down.weight": lora_module.down = module else: - assert False, f'Bad Lora layer name: {key_diffusers} - must end in lora_up.weight, lora_down.weight or alpha' + raise AssertionError(f"Bad Lora layer name: {key_diffusers} - must end in lora_up.weight, lora_down.weight or alpha") if len(keys_failed_to_match) > 0: - print(f"Failed to match keys when loading Lora {filename}: {len(keys_failed_to_match)}") + print(f"Failed to match keys when loading Lora {lora_on_disk.filename}: {keys_failed_to_match}") return lora @@ -204,30 +235,41 @@ def load_loras(names, multipliers=None): loaded_loras.clear() loras_on_disk = [available_lora_aliases.get(name, None) for name in names] - if any([x is None for x in loras_on_disk]): + if any(x is None for x in loras_on_disk): list_available_loras() loras_on_disk = [available_lora_aliases.get(name, None) for name in names] + failed_to_load_loras = [] + for i, name in enumerate(names): lora = already_loaded.get(name, None) lora_on_disk = loras_on_disk[i] + if lora_on_disk is not None: if lora is None or os.path.getmtime(lora_on_disk.filename) > lora.mtime: try: - lora = load_lora(name, lora_on_disk.filename) + lora = load_lora(name, lora_on_disk) except Exception as e: errors.display(e, f"loading Lora {lora_on_disk.filename}") continue + lora.mentioned_name = name + + lora_on_disk.read_hash() + if lora is None: + failed_to_load_loras.append(name) print(f"Couldn't find Lora with name {name}") continue lora.multiplier = multipliers[i] if multipliers else 1.0 loaded_loras.append(lora) + if len(failed_to_load_loras) > 0: + sd_hijack.model_hijack.comments.append("Failed to find Loras: " + ", ".join(failed_to_load_loras)) + def lora_calc_updown(lora, module, target): with torch.no_grad(): @@ -311,7 +353,7 @@ def lora_apply_weights(self: Union[torch.nn.Conv2d, torch.nn.Linear, torch.nn.Mu print(f'failed to calculate lora weights for layer {lora_layer_name}') - setattr(self, "lora_current_names", wanted_names) + self.lora_current_names = wanted_names def lora_forward(module, input, original_forward): @@ -345,8 +387,8 @@ def lora_forward(module, input, original_forward): def lora_reset_cached_weight(self: Union[torch.nn.Conv2d, torch.nn.Linear]): - setattr(self, "lora_current_names", ()) - setattr(self, "lora_weights_backup", None) + self.lora_current_names = () + self.lora_weights_backup = None def lora_Linear_forward(self, input): @@ -395,7 +437,8 @@ def list_available_loras(): available_loras.clear() available_lora_aliases.clear() forbidden_lora_aliases.clear() - forbidden_lora_aliases.update({"none": 1}) + available_lora_hash_lookup.clear() + forbidden_lora_aliases.update({"none": 1, "Addams": 1}) os.makedirs(shared.cmd_opts.lora_dir, exist_ok=True) @@ -425,7 +468,7 @@ def infotext_pasted(infotext, params): added = [] - for k, v in params.items(): + for k in params: if not k.startswith("AddNet Model "): continue @@ -449,8 +492,10 @@ def infotext_pasted(infotext, params): if added: params["Prompt"] += "\n" + "".join(added) + available_loras = {} available_lora_aliases = {} +available_lora_hash_lookup = {} forbidden_lora_aliases = {} loaded_loras = [] diff --git a/extensions-builtin/Lora/scripts/lora_script.py b/extensions-builtin/Lora/scripts/lora_script.py index 1f0677938..e650f469f 100644 --- a/extensions-builtin/Lora/scripts/lora_script.py +++ b/extensions-builtin/Lora/scripts/lora_script.py @@ -1,3 +1,5 @@ +import re + import torch import gradio as gr from fastapi import FastAPI @@ -20,6 +22,7 @@ def before_ui(): ui_extra_networks.register_page(ui_extra_networks_lora.ExtraNetworksPageLora()) extra_networks.register_extra_network(extra_networks_lora.ExtraNetworkLora()) + if not hasattr(torch.nn, 'Linear_forward_before_lora'): torch.nn.Linear_forward_before_lora = torch.nn.Linear.forward @@ -52,8 +55,13 @@ script_callbacks.on_infotext_pasted(lora.infotext_pasted) shared.options_templates.update(shared.options_section(('extra_networks', "Extra Networks"), { - "sd_lora": shared.OptionInfo("None", "Add Lora to prompt", gr.Dropdown, lambda: {"choices": ["None"] + [x for x in lora.available_loras]}, refresh=lora.list_available_loras), - "lora_preferred_name": shared.OptionInfo("Alias from file", "When adding to prompt, refer to lora by", gr.Radio, {"choices": ["Alias from file", "Filename"]}), + "sd_lora": shared.OptionInfo("None", "Add Lora to prompt", gr.Dropdown, lambda: {"choices": ["None", *lora.available_loras]}, refresh=lora.list_available_loras), + "lora_preferred_name": shared.OptionInfo("Alias from file", "When adding to prompt, refer to Lora by", gr.Radio, {"choices": ["Alias from file", "Filename"]}), + "lora_add_hashes_to_infotext": shared.OptionInfo(True, "Add Lora hashes to infotext"), +})) + + +shared.options_templates.update(shared.options_section(('compatibility', "Compatibility"), { "lora_functional": shared.OptionInfo(False, "Lora: use old method that takes longer when you have multiple Loras active and produces same results as kohya-ss/sd-webui-additional-networks extension"), })) @@ -72,6 +80,37 @@ def api_loras(_: gr.Blocks, app: FastAPI): async def get_loras(): return [create_lora_json(obj) for obj in lora.available_loras.values()] + @app.post("/sdapi/v1/refresh-loras") + async def refresh_loras(): + return lora.list_available_loras() + script_callbacks.on_app_started(api_loras) +re_lora = re.compile(" b w1 w2 p1 p2 c', p1=self.window_size, p2=self.window_size) h_windows = x.size(1) w_windows = x.size(2) @@ -85,8 +87,9 @@ class WMSA(nn.Module): output = self.linear(output) output = rearrange(output, 'b (w1 w2) (p1 p2) c -> b (w1 p1) (w2 p2) c', w1=h_windows, p1=self.window_size) - if self.type != 'W': output = torch.roll(output, shifts=(self.window_size // 2, self.window_size // 2), - dims=(1, 2)) + if self.type != 'W': + output = torch.roll(output, shifts=(self.window_size // 2, self.window_size // 2), dims=(1, 2)) + return output def relative_embedding(self): @@ -262,4 +265,4 @@ class SCUNet(nn.Module): nn.init.constant_(m.bias, 0) elif isinstance(m, nn.LayerNorm): nn.init.constant_(m.bias, 0) - nn.init.constant_(m.weight, 1.0) \ No newline at end of file + nn.init.constant_(m.weight, 1.0) diff --git a/extensions-builtin/SwinIR/preload.py b/extensions-builtin/SwinIR/preload.py new file mode 100644 index 000000000..e912c6402 --- /dev/null +++ b/extensions-builtin/SwinIR/preload.py @@ -0,0 +1,6 @@ +import os +from modules import paths + + +def preload(parser): + parser.add_argument("--swinir-models-path", type=str, help="Path to directory with SwinIR model file(s).", default=os.path.join(paths.models_path, 'SwinIR')) diff --git a/extensions-builtin/SwinIR/scripts/swinir_model.py b/extensions-builtin/SwinIR/scripts/swinir_model.py index 619f52e6d..1c7bf325e 100644 --- a/extensions-builtin/SwinIR/scripts/swinir_model.py +++ b/extensions-builtin/SwinIR/scripts/swinir_model.py @@ -1,10 +1,10 @@ import os + import numpy as np import torch from PIL import Image from basicsr.utils.download_util import load_file_from_url from tqdm import tqdm -from rich import progress from modules import modelloader, devices, script_callbacks, shared from modules.shared import opts, state @@ -44,31 +44,31 @@ class UpscalerSwinIR(Upscaler): img = upscale(img, model) try: torch.cuda.empty_cache() - except: + except Exception: pass return img def load_model(self, path, scale=4): if "http" in path: dl_name = "%s%s" % (self.model_name.replace(" ", "_"), ".pth") - filename = load_file_from_url(url=path, model_dir=self.model_path, file_name=dl_name, progress=True) + filename = load_file_from_url(url=path, model_dir=self.model_download_path, file_name=dl_name, progress=True) else: filename = path if filename is None or not os.path.exists(filename): return None if filename.endswith(".v2.pth"): model = net2( - upscale=scale, - in_chans=3, - img_size=64, - window_size=8, - img_range=1.0, - depths=[6, 6, 6, 6, 6, 6], - embed_dim=180, - num_heads=[6, 6, 6, 6, 6, 6], - mlp_ratio=2, - upsampler="nearest+conv", - resi_connection="1conv", + upscale=scale, + in_chans=3, + img_size=64, + window_size=8, + img_range=1.0, + depths=[6, 6, 6, 6, 6, 6], + embed_dim=180, + num_heads=[6, 6, 6, 6, 6, 6], + mlp_ratio=2, + upsampler="nearest+conv", + resi_connection="1conv", ) params = None else: @@ -87,9 +87,8 @@ class UpscalerSwinIR(Upscaler): ) params = "params_ema" - with progress.open(filename, 'rb', description=f'Loading weights: [cyan]{filename}', auto_refresh=True) as f: - pretrained_model = torch.load(f) - if params is not None and params in pretrained_model: + pretrained_model = torch.load(filename) + if params is not None: model.load_state_dict(pretrained_model[params], strict=True) else: model.load_state_dict(pretrained_model, strict=True) diff --git a/extensions-builtin/SwinIR/swinir_model_arch.py b/extensions-builtin/SwinIR/swinir_model_arch.py index 863f42db6..93b932747 100644 --- a/extensions-builtin/SwinIR/swinir_model_arch.py +++ b/extensions-builtin/SwinIR/swinir_model_arch.py @@ -644,7 +644,7 @@ class SwinIR(nn.Module): """ def __init__(self, img_size=64, patch_size=1, in_chans=3, - embed_dim=96, depths=[6, 6, 6, 6], num_heads=[6, 6, 6, 6], + embed_dim=96, depths=(6, 6, 6, 6), num_heads=(6, 6, 6, 6), window_size=7, mlp_ratio=4., qkv_bias=True, qk_scale=None, drop_rate=0., attn_drop_rate=0., drop_path_rate=0.1, norm_layer=nn.LayerNorm, ape=False, patch_norm=True, @@ -805,7 +805,7 @@ class SwinIR(nn.Module): def forward(self, x): H, W = x.shape[2:] x = self.check_image_size(x) - + self.mean = self.mean.type_as(x) x = (x - self.mean) * self.img_range @@ -844,7 +844,7 @@ class SwinIR(nn.Module): H, W = self.patches_resolution flops += H * W * 3 * self.embed_dim * 9 flops += self.patch_embed.flops() - for i, layer in enumerate(self.layers): + for layer in self.layers: flops += layer.flops() flops += H * W * 3 * self.embed_dim * self.embed_dim flops += self.upsample.flops() diff --git a/extensions-builtin/SwinIR/swinir_model_arch_v2.py b/extensions-builtin/SwinIR/swinir_model_arch_v2.py index 0e28ae6ee..dad22cca2 100644 --- a/extensions-builtin/SwinIR/swinir_model_arch_v2.py +++ b/extensions-builtin/SwinIR/swinir_model_arch_v2.py @@ -74,7 +74,7 @@ class WindowAttention(nn.Module): """ def __init__(self, dim, window_size, num_heads, qkv_bias=True, attn_drop=0., proj_drop=0., - pretrained_window_size=[0, 0]): + pretrained_window_size=(0, 0)): super().__init__() self.dim = dim @@ -241,7 +241,7 @@ class SwinTransformerBlock(nn.Module): attn_mask = None self.register_buffer("attn_mask", attn_mask) - + def calculate_mask(self, x_size): # calculate attention mask for SW-MSA H, W = x_size @@ -263,7 +263,7 @@ class SwinTransformerBlock(nn.Module): attn_mask = mask_windows.unsqueeze(1) - mask_windows.unsqueeze(2) attn_mask = attn_mask.masked_fill(attn_mask != 0, float(-100.0)).masked_fill(attn_mask == 0, float(0.0)) - return attn_mask + return attn_mask def forward(self, x, x_size): H, W = x_size @@ -288,7 +288,7 @@ class SwinTransformerBlock(nn.Module): attn_windows = self.attn(x_windows, mask=self.attn_mask) # nW*B, window_size*window_size, C else: attn_windows = self.attn(x_windows, mask=self.calculate_mask(x_size).to(x.device)) - + # merge windows attn_windows = attn_windows.view(-1, self.window_size, self.window_size, C) shifted_x = window_reverse(attn_windows, self.window_size, H, W) # B H' W' C @@ -369,7 +369,7 @@ class PatchMerging(nn.Module): H, W = self.input_resolution flops = (H // 2) * (W // 2) * 4 * self.dim * 2 * self.dim flops += H * W * self.dim // 2 - return flops + return flops class BasicLayer(nn.Module): """ A basic Swin Transformer layer for one stage. @@ -447,7 +447,7 @@ class BasicLayer(nn.Module): nn.init.constant_(blk.norm1.weight, 0) nn.init.constant_(blk.norm2.bias, 0) nn.init.constant_(blk.norm2.weight, 0) - + class PatchEmbed(nn.Module): r""" Image to Patch Embedding Args: @@ -492,7 +492,7 @@ class PatchEmbed(nn.Module): flops = Ho * Wo * self.embed_dim * self.in_chans * (self.patch_size[0] * self.patch_size[1]) if self.norm is not None: flops += Ho * Wo * self.embed_dim - return flops + return flops class RSTB(nn.Module): """Residual Swin Transformer Block (RSTB). @@ -531,7 +531,7 @@ class RSTB(nn.Module): num_heads=num_heads, window_size=window_size, mlp_ratio=mlp_ratio, - qkv_bias=qkv_bias, + qkv_bias=qkv_bias, drop=drop, attn_drop=attn_drop, drop_path=drop_path, norm_layer=norm_layer, @@ -622,7 +622,7 @@ class Upsample(nn.Sequential): else: raise ValueError(f'scale {scale} is not supported. ' 'Supported scales: 2^n and 3.') super(Upsample, self).__init__(*m) - + class Upsample_hf(nn.Sequential): """Upsample module. @@ -642,7 +642,7 @@ class Upsample_hf(nn.Sequential): m.append(nn.PixelShuffle(3)) else: raise ValueError(f'scale {scale} is not supported. ' 'Supported scales: 2^n and 3.') - super(Upsample_hf, self).__init__(*m) + super(Upsample_hf, self).__init__(*m) class UpsampleOneStep(nn.Sequential): @@ -667,8 +667,8 @@ class UpsampleOneStep(nn.Sequential): H, W = self.input_resolution flops = H * W * self.num_feat * 3 * 9 return flops - - + + class Swin2SR(nn.Module): r""" Swin2SR @@ -698,8 +698,8 @@ class Swin2SR(nn.Module): """ def __init__(self, img_size=64, patch_size=1, in_chans=3, - embed_dim=96, depths=[6, 6, 6, 6], num_heads=[6, 6, 6, 6], - window_size=7, mlp_ratio=4., qkv_bias=True, + embed_dim=96, depths=(6, 6, 6, 6), num_heads=(6, 6, 6, 6), + window_size=7, mlp_ratio=4., qkv_bias=True, drop_rate=0., attn_drop_rate=0., drop_path_rate=0.1, norm_layer=nn.LayerNorm, ape=False, patch_norm=True, use_checkpoint=False, upscale=2, img_range=1., upsampler='', resi_connection='1conv', @@ -764,7 +764,7 @@ class Swin2SR(nn.Module): num_heads=num_heads[i_layer], window_size=window_size, mlp_ratio=self.mlp_ratio, - qkv_bias=qkv_bias, + qkv_bias=qkv_bias, drop=drop_rate, attn_drop=attn_drop_rate, drop_path=dpr[sum(depths[:i_layer]):sum(depths[:i_layer + 1])], # no impact on SR results norm_layer=norm_layer, @@ -776,7 +776,7 @@ class Swin2SR(nn.Module): ) self.layers.append(layer) - + if self.upsampler == 'pixelshuffle_hf': self.layers_hf = nn.ModuleList() for i_layer in range(self.num_layers): @@ -787,7 +787,7 @@ class Swin2SR(nn.Module): num_heads=num_heads[i_layer], window_size=window_size, mlp_ratio=self.mlp_ratio, - qkv_bias=qkv_bias, + qkv_bias=qkv_bias, drop=drop_rate, attn_drop=attn_drop_rate, drop_path=dpr[sum(depths[:i_layer]):sum(depths[:i_layer + 1])], # no impact on SR results norm_layer=norm_layer, @@ -799,7 +799,7 @@ class Swin2SR(nn.Module): ) self.layers_hf.append(layer) - + self.norm = norm_layer(self.num_features) # build the last conv layer in deep feature extraction @@ -829,10 +829,10 @@ class Swin2SR(nn.Module): self.conv_aux = nn.Conv2d(num_feat, num_out_ch, 3, 1, 1) self.conv_after_aux = nn.Sequential( nn.Conv2d(3, num_feat, 3, 1, 1), - nn.LeakyReLU(inplace=True)) + nn.LeakyReLU(inplace=True)) self.upsample = Upsample(upscale, num_feat) self.conv_last = nn.Conv2d(num_feat, num_out_ch, 3, 1, 1) - + elif self.upsampler == 'pixelshuffle_hf': self.conv_before_upsample = nn.Sequential(nn.Conv2d(embed_dim, num_feat, 3, 1, 1), nn.LeakyReLU(inplace=True)) @@ -846,7 +846,7 @@ class Swin2SR(nn.Module): nn.Conv2d(embed_dim, num_feat, 3, 1, 1), nn.LeakyReLU(inplace=True)) self.conv_last_hf = nn.Conv2d(num_feat, num_out_ch, 3, 1, 1) - + elif self.upsampler == 'pixelshuffledirect': # for lightweight SR (to save parameters) self.upsample = UpsampleOneStep(upscale, embed_dim, num_out_ch, @@ -905,7 +905,7 @@ class Swin2SR(nn.Module): x = self.patch_unembed(x, x_size) return x - + def forward_features_hf(self, x): x_size = (x.shape[2], x.shape[3]) x = self.patch_embed(x) @@ -919,7 +919,7 @@ class Swin2SR(nn.Module): x = self.norm(x) # B L C x = self.patch_unembed(x, x_size) - return x + return x def forward(self, x): H, W = x.shape[2:] @@ -951,7 +951,7 @@ class Swin2SR(nn.Module): x = self.conv_after_body(self.forward_features(x)) + x x_before = self.conv_before_upsample(x) x_out = self.conv_last(self.upsample(x_before)) - + x_hf = self.conv_first_hf(x_before) x_hf = self.conv_after_body_hf(self.forward_features_hf(x_hf)) + x_hf x_hf = self.conv_before_upsample_hf(x_hf) @@ -977,15 +977,15 @@ class Swin2SR(nn.Module): x_first = self.conv_first(x) res = self.conv_after_body(self.forward_features(x_first)) + x_first x = x + self.conv_last(res) - + x = x / self.img_range + self.mean if self.upsampler == "pixelshuffle_aux": return x[:, :, :H*self.upscale, :W*self.upscale], aux - + elif self.upsampler == "pixelshuffle_hf": x_out = x_out / self.img_range + self.mean return x_out[:, :, :H*self.upscale, :W*self.upscale], x[:, :, :H*self.upscale, :W*self.upscale], x_hf[:, :, :H*self.upscale, :W*self.upscale] - + else: return x[:, :, :H*self.upscale, :W*self.upscale] @@ -994,7 +994,7 @@ class Swin2SR(nn.Module): H, W = self.patches_resolution flops += H * W * 3 * self.embed_dim * 9 flops += self.patch_embed.flops() - for i, layer in enumerate(self.layers): + for layer in self.layers: flops += layer.flops() flops += H * W * 3 * self.embed_dim * self.embed_dim flops += self.upsample.flops() @@ -1014,4 +1014,4 @@ if __name__ == '__main__': x = torch.randn((1, 3, height, width)) x = model(x) - print(x.shape) \ No newline at end of file + print(x.shape) diff --git a/extensions-builtin/prompt-bracket-checker/javascript/prompt-bracket-checker.js b/extensions-builtin/prompt-bracket-checker/javascript/prompt-bracket-checker.js index 5c7a836a2..114cf94cc 100644 --- a/extensions-builtin/prompt-bracket-checker/javascript/prompt-bracket-checker.js +++ b/extensions-builtin/prompt-bracket-checker/javascript/prompt-bracket-checker.js @@ -4,39 +4,39 @@ // If there's a mismatch, the keyword counter turns red and if you hover on it, a tooltip tells you what's wrong. function checkBrackets(textArea, counterElt) { - var counts = {}; - (textArea.value.match(/[(){}\[\]]/g) || []).forEach(bracket => { - counts[bracket] = (counts[bracket] || 0) + 1; - }); - var errors = []; + var counts = {}; + (textArea.value.match(/[(){}[\]]/g) || []).forEach(bracket => { + counts[bracket] = (counts[bracket] || 0) + 1; + }); + var errors = []; - function checkPair(open, close, kind) { - if (counts[open] !== counts[close]) { - errors.push( - `${open}...${close} - Detected ${counts[open] || 0} opening and ${counts[close] || 0} closing ${kind}.` - ); + function checkPair(open, close, kind) { + if (counts[open] !== counts[close]) { + errors.push( + `${open}...${close} - Detected ${counts[open] || 0} opening and ${counts[close] || 0} closing ${kind}.` + ); + } } - } - checkPair('(', ')', 'round brackets'); - checkPair('[', ']', 'square brackets'); - checkPair('{', '}', 'curly brackets'); - counterElt.title = errors.join('\n'); - counterElt.classList.toggle('error', errors.length !== 0); + checkPair('(', ')', 'round brackets'); + checkPair('[', ']', 'square brackets'); + checkPair('{', '}', 'curly brackets'); + counterElt.title = errors.join('\n'); + counterElt.classList.toggle('error', errors.length !== 0); } function setupBracketChecking(id_prompt, id_counter) { - var textarea = gradioApp().querySelector("#" + id_prompt + " > label > textarea"); - var counter = gradioApp().getElementById(id_counter) + var textarea = gradioApp().querySelector("#" + id_prompt + " > label > textarea"); + var counter = gradioApp().getElementById(id_counter); - if (textarea && counter) { - textarea.addEventListener("input", () => checkBrackets(textarea, counter)); - } + if (textarea && counter) { + textarea.addEventListener("input", () => checkBrackets(textarea, counter)); + } } -onUiLoaded(function () { - setupBracketChecking('txt2img_prompt', 'txt2img_token_counter'); - setupBracketChecking('txt2img_neg_prompt', 'txt2img_negative_token_counter'); - setupBracketChecking('img2img_prompt', 'img2img_token_counter'); - setupBracketChecking('img2img_neg_prompt', 'img2img_negative_token_counter'); +onUiLoaded(function() { + setupBracketChecking('txt2img_prompt', 'txt2img_token_counter'); + setupBracketChecking('txt2img_neg_prompt', 'txt2img_negative_token_counter'); + setupBracketChecking('img2img_prompt', 'img2img_token_counter'); + setupBracketChecking('img2img_neg_prompt', 'img2img_negative_token_counter'); }); diff --git a/html/licenses.html b/html/licenses.html index bc995aa07..ef6f2c0a4 100644 --- a/html/licenses.html +++ b/html/licenses.html @@ -661,4 +661,30 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +

TAESD

+Tiny AutoEncoder for Stable Diffusion option for live previews +
+MIT License
+
+Copyright (c) 2023 Ollin Boer Bohan
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
 
\ No newline at end of file diff --git a/installer.py b/installer.py index d5b464156..120169bc0 100644 --- a/installer.py +++ b/installer.py @@ -268,7 +268,7 @@ def check_torch(): else: machine = platform.machine() if sys.platform == 'darwin': - torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.0.0 torchvision==0.15.1') + torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.0.1 torchvision==0.15.2') elif allow_directml and args.use_directml and ('arm' not in machine and 'aarch' not in machine): log.info('Using DirectML Backend') torch_command = os.environ.get('TORCH_COMMAND', 'torch-directml') diff --git a/javascript/.eslintrc.json b/javascript/.eslintrc.json deleted file mode 100644 index 5fcb88998..000000000 --- a/javascript/.eslintrc.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "globals": {}, - "env": { - "browser": true, - "commonjs": false, - "node": false, - "jquery": false, - "es2020": true - }, - "parserOptions": { "ecmaVersion": 2020 }, - "plugins": [], - "extends": ["eslint:recommended", "airbnb-base"], - "rules": { - "max-len": [1, 220, 3], - "camelcase":"off", - "no-unused-vars":"off", - "no-plusplus":"off", - "no-param-reassign":"off", - "no-restricted-syntax":"off", - "no-mixed-operators":"off" - } -} diff --git a/javascript/hints.js b/javascript/hints.js index 61da3e357..e0fc63634 100644 --- a/javascript/hints.js +++ b/javascript/hints.js @@ -22,6 +22,13 @@ titles = { '\u{1f4cb}': 'Apply selected styles to current prompt', '\u{1f4d2}': 'Paste available values into the field', '\u{1f3b4}': 'Show/hide extra networks', + '\u{1F4D8}': 'Read generation parameters from prompt or last generation if prompt is empty into user interface.', + '\u{1F6C5}': 'Save style', + '\u{1F9F3}': 'Apply selected styles to current prompt', + '\u{1F6AE}': 'Clear prompt', + '\u{1F310}': 'Show/hide extra networks', + + 'Inpaint a part of image': 'Draw a mask over an image, and the script will regenerate the masked area with content according to prompt', 'SD upscale': 'Upscale image normally, split result into tiles, improve each tile using img2img, merge whole image back', diff --git a/modules/hashes.py b/modules/hashes.py index f36291362..fb7ce62fa 100644 --- a/modules/hashes.py +++ b/modules/hashes.py @@ -17,19 +17,19 @@ def dump_cache(): def cache(subsection): - global cache_data # pylint: disable=global-statement + global cache_data + if cache_data is None: with filelock.FileLock(f"{cache_filename}.lock"): if not os.path.isfile(cache_filename): cache_data = {} else: - try: - with open(cache_filename, "r", encoding="utf8") as file: - cache_data = json.load(file) - except: - cache_data = None + with open(cache_filename, "r", encoding="utf8") as file: + cache_data = json.load(file) + s = cache_data.get(subsection, {}) cache_data[subsection] = s + return s @@ -42,8 +42,8 @@ def calculate_sha256(filename): return hash_sha256.hexdigest() -def sha256_from_cache(filename, title): - hashes = cache("hashes") +def sha256_from_cache(filename, title, use_addnet_hash=False): + hashes = cache("hashes-addnet") if use_addnet_hash else cache("hashes") ondisk_mtime = os.path.getmtime(filename) if title not in hashes: return None @@ -54,17 +54,36 @@ def sha256_from_cache(filename, title): return cached_sha256 -def sha256(filename, title): - hashes = cache("hashes") - sha256_value = sha256_from_cache(filename, title) +def sha256(filename, title, use_addnet_hash=False): + hashes = cache("hashes-addnet") if use_addnet_hash else cache("hashes") + sha256_value = sha256_from_cache(filename, title, use_addnet_hash) if sha256_value is not None: return sha256_value if shared.cmd_opts.no_hashing: return None - sha256_value = calculate_sha256(filename) + if use_addnet_hash: + with progress.open(filename, 'rb', description=f'Calculating model hash: [cyan]{filename}', auto_refresh=True) as f: + sha256_value = addnet_hash_safetensors(f) + else: + sha256_value = calculate_sha256(filename) hashes[title] = { "mtime": os.path.getmtime(filename), "sha256": sha256_value, } dump_cache() return sha256_value + + +def addnet_hash_safetensors(b): + """kohya-ss hash for safetensors from https://github.com/kohya-ss/sd-scripts/blob/main/library/train_util.py""" + hash_sha256 = hashlib.sha256() + blksize = 1024 * 1024 + b.seek(0) + header = b.read(8) + n = int.from_bytes(header, "little") + offset = n + 8 + b.seek(offset) + for chunk in iter(lambda: b.read(blksize), b""): + hash_sha256.update(chunk) + return hash_sha256.hexdigest() + diff --git a/modules/sd_samplers.py b/modules/sd_samplers.py index 8ac3f46ef..a16bc5354 100644 --- a/modules/sd_samplers.py +++ b/modules/sd_samplers.py @@ -17,11 +17,16 @@ samplers_for_img2img = all_samplers samplers_map = {} -def create_sampler(name, model): +def find_sampler_config(name): if name is not None: config = all_samplers_map.get(name, None) else: config = all_samplers[0] + return config + + +def create_sampler(name, model): + config = find_sampler_config(name) assert config is not None, f'bad sampler name: {name}' if backend == Backend.ORIGINAL: sampler = config.constructor(model) diff --git a/modules/sd_samplers_common.py b/modules/sd_samplers_common.py index 888f9a30e..1eacedca1 100644 --- a/modules/sd_samplers_common.py +++ b/modules/sd_samplers_common.py @@ -2,7 +2,7 @@ from collections import namedtuple import numpy as np import torch from PIL import Image -from modules import devices, processing, images, sd_vae_approx +from modules import devices, processing, images, sd_vae_approx, sd_samplers, sd_vae_taesd from modules.shared import opts, state import modules.shared as shared @@ -22,19 +22,22 @@ def setup_img2img_steps(p, steps=None): return steps, t_enc -approximation_indexes = {"Full": 0, "Approx NN": 1, "Approx cheap": 2} +approximation_indexes = {"Full": 0, "Approx NN": 1, "Approx cheap": 2, "TAESD": 3} def single_sample_to_image(sample, approximation=None): if approximation is None: approximation = approximation_indexes.get(opts.show_progress_type, 0) - if approximation == 2: - x_sample = sd_vae_approx.cheap_approximation(sample) - elif approximation == 1: - x_sample = sd_vae_approx.model()(sample.to(devices.device, devices.dtype).unsqueeze(0))[0].detach() + if approximation == 1: + x_sample = sd_vae_approx.model()(sample.to(devices.device, devices.dtype).unsqueeze(0))[0].detach() * 0.5 + 0.5 + elif approximation == 2: + x_sample = sd_vae_approx.cheap_approximation(sample) * 0.5 + 0.5 + elif approximation == 3: + x_sample = sample * 1.5 + x_sample = sd_vae_taesd.model()(x_sample.to(devices.device, devices.dtype).unsqueeze(0))[0].detach() else: - x_sample = processing.decode_first_stage(shared.sd_model, sample.unsqueeze(0))[0] - x_sample = torch.clamp((x_sample + 1.0) / 2.0, min=0.0, max=1.0) + x_sample = processing.decode_first_stage(shared.sd_model, sample.unsqueeze(0))[0] * 0.5 + 0.5 + x_sample = torch.clamp(x_sample, min=0.0, max=1.0) x_sample = 255. * np.moveaxis(x_sample.cpu().numpy(), 0, 2) x_sample = x_sample.astype(np.uint8) return Image.fromarray(x_sample) @@ -55,6 +58,18 @@ def store_latent(decoded): if not shared.parallel_processing_allowed: shared.state.assign_current_image(sample_to_image(decoded)) +def is_sampler_using_eta_noise_seed_delta(p): + """returns whether sampler from config will use eta noise seed delta for image creation""" + sampler_config = sd_samplers.find_sampler_config(p.sampler_name) + eta = p.eta + if eta is None and p.sampler is not None: + eta = p.sampler.eta + if eta is None and sampler_config is not None: + eta = 0 if sampler_config.options.get("default_eta_is_0", False) else 1.0 + if eta == 0: + return False + return sampler_config.options.get("uses_ensd", False) + class InterruptedException(BaseException): pass diff --git a/modules/sd_samplers_compvis.py b/modules/sd_samplers_compvis.py index 5f5544479..e07eb7d80 100644 --- a/modules/sd_samplers_compvis.py +++ b/modules/sd_samplers_compvis.py @@ -11,7 +11,7 @@ import modules.models.diffusion.uni_pc samplers_data_compvis = [ - sd_samplers_common.SamplerData('DDIM', lambda model: VanillaStableDiffusionSampler(ldm.models.diffusion.ddim.DDIMSampler, model), [], {}), + sd_samplers_common.SamplerData('DDIM', lambda model: VanillaStableDiffusionSampler(ldm.models.diffusion.ddim.DDIMSampler, model), [], {"default_eta_is_0": True, "uses_ensd": True}), sd_samplers_common.SamplerData('PLMS', lambda model: VanillaStableDiffusionSampler(ldm.models.diffusion.plms.PLMSSampler, model), [], {}), sd_samplers_common.SamplerData('UniPC', lambda model: VanillaStableDiffusionSampler(modules.models.diffusion.uni_pc.UniPCSampler, model), [], {}), ] @@ -55,7 +55,7 @@ class VanillaStableDiffusionSampler: def p_sample_ddim_hook(self, x_dec, cond, ts, unconditional_conditioning, *args, **kwargs): x_dec, ts, cond, unconditional_conditioning = self.before_sample(x_dec, ts, cond, unconditional_conditioning) - res = self.orig_p_sample_ddim(x_dec, cond, ts, unconditional_conditioning=unconditional_conditioning, *args, **kwargs) + res = self.orig_p_sample_ddim(x_dec, cond, ts, *args, unconditional_conditioning=unconditional_conditioning, **kwargs) x_dec, ts, cond, unconditional_conditioning, res = self.after_sample(x_dec, ts, cond, unconditional_conditioning, res) @@ -83,7 +83,7 @@ class VanillaStableDiffusionSampler: conds_list, tensor = prompt_parser.reconstruct_multicond_batch(cond, self.step) unconditional_conditioning = prompt_parser.reconstruct_cond_batch(unconditional_conditioning, self.step) - assert all([len(conds) == 1 for conds in conds_list]), 'composition via AND is not supported for DDIM/PLMS samplers' + assert all(len(conds) == 1 for conds in conds_list), 'composition via AND is not supported for DDIM/PLMS samplers' cond = tensor # for DDIM, shapes must match, we can't just process cond and uncond independently; @@ -132,7 +132,10 @@ class VanillaStableDiffusionSampler: self.update_step(x) def initialize(self, p): - self.eta = p.eta if p.eta is not None else shared.opts.eta_ddim + if self.is_ddim: + self.eta = p.eta if p.eta is not None else shared.opts.eta_ddim + else: + self.eta = 0.0 if self.eta != 0.0: p.extra_generation_params["Eta DDIM"] = self.eta diff --git a/modules/sd_samplers_kdiffusion.py b/modules/sd_samplers_kdiffusion.py index fbaa26873..b138a662c 100644 --- a/modules/sd_samplers_kdiffusion.py +++ b/modules/sd_samplers_kdiffusion.py @@ -11,24 +11,25 @@ from modules.script_callbacks import CFGDenoisedParams, cfg_denoised_callback from modules.script_callbacks import AfterCFGCallbackParams, cfg_after_cfg_callback samplers_k_diffusion = [ - ('Euler a', 'sample_euler_ancestral', ['k_euler_a', 'k_euler_ancestral'], {}), + ('Euler a', 'sample_euler_ancestral', ['k_euler_a', 'k_euler_ancestral'], {"uses_ensd": True}), ('Euler', 'sample_euler', ['k_euler'], {}), ('LMS', 'sample_lms', ['k_lms'], {}), - ('Heun', 'sample_heun', ['k_heun'], {}), + ('Heun', 'sample_heun', ['k_heun'], {"second_order": True}), ('DPM2', 'sample_dpm_2', ['k_dpm_2'], {'discard_next_to_last_sigma': True}), - ('DPM2 a', 'sample_dpm_2_ancestral', ['k_dpm_2_a'], {'discard_next_to_last_sigma': True}), - ('DPM++ 2S a', 'sample_dpmpp_2s_ancestral', ['k_dpmpp_2s_a'], {}), + ('DPM2 a', 'sample_dpm_2_ancestral', ['k_dpm_2_a'], {'discard_next_to_last_sigma': True, "uses_ensd": True}), + ('DPM++ 2S a', 'sample_dpmpp_2s_ancestral', ['k_dpmpp_2s_a'], {"uses_ensd": True, "second_order": True}), ('DPM++ 2M', 'sample_dpmpp_2m', ['k_dpmpp_2m'], {}), - ('DPM++ SDE', 'sample_dpmpp_sde', ['k_dpmpp_sde'], {}), - ('DPM fast', 'sample_dpm_fast', ['k_dpm_fast'], {}), - ('DPM adaptive', 'sample_dpm_adaptive', ['k_dpm_ad'], {}), + ('DPM++ SDE', 'sample_dpmpp_sde', ['k_dpmpp_sde'], {"second_order": True, "brownian_noise": True}), + ('DPM++ 2M SDE', 'sample_dpmpp_2m_sde', ['k_dpmpp_2m_sde_ka'], {"brownian_noise": True, 'discard_next_to_last_sigma': True}), + ('DPM fast', 'sample_dpm_fast', ['k_dpm_fast'], {"uses_ensd": True}), + ('DPM adaptive', 'sample_dpm_adaptive', ['k_dpm_ad'], {"uses_ensd": True}), ('LMS Karras', 'sample_lms', ['k_lms_ka'], {'scheduler': 'karras'}), - ('DPM2 Karras', 'sample_dpm_2', ['k_dpm_2_ka'], {'scheduler': 'karras', 'discard_next_to_last_sigma': True}), - ('DPM2 a Karras', 'sample_dpm_2_ancestral', ['k_dpm_2_a_ka'], {'scheduler': 'karras', 'discard_next_to_last_sigma': True}), - ('DPM++ 2S a Karras', 'sample_dpmpp_2s_ancestral', ['k_dpmpp_2s_a_ka'], {'scheduler': 'karras'}), + ('DPM2 Karras', 'sample_dpm_2', ['k_dpm_2_ka'], {'scheduler': 'karras', 'discard_next_to_last_sigma': True, "uses_ensd": True, "second_order": True}), + ('DPM2 a Karras', 'sample_dpm_2_ancestral', ['k_dpm_2_a_ka'], {'scheduler': 'karras', 'discard_next_to_last_sigma': True, "uses_ensd": True, "second_order": True}), + ('DPM++ 2S a Karras', 'sample_dpmpp_2s_ancestral', ['k_dpmpp_2s_a_ka'], {'scheduler': 'karras', "uses_ensd": True, "second_order": True}), ('DPM++ 2M Karras', 'sample_dpmpp_2m', ['k_dpmpp_2m_ka'], {'scheduler': 'karras'}), - ('DPM++ SDE Karras', 'sample_dpmpp_sde', ['k_dpmpp_sde_ka'], {'scheduler': 'karras'}), - ('DPM++ 2M SDE', 'sample_dpmpp_2m_sde', ['k_dpmpp_2m_sde'], {}), + ('DPM++ SDE Karras', 'sample_dpmpp_sde', ['k_dpmpp_sde_ka'], {'scheduler': 'karras', "second_order": True, "brownian_noise": True}), + ('DPM++ 2M SDE Karras', 'sample_dpmpp_2m_sde', ['k_dpmpp_2m_sde_ka'], {'scheduler': 'karras', "brownian_noise": True, 'discard_next_to_last_sigma': True}), ] samplers_data_k_diffusion = [ @@ -83,22 +84,22 @@ class CFGDenoiser(torch.nn.Module): # at self.image_cfg_scale == 1.0 produced results for edit model are the same as with normal sampling, # so is_edit_model is set to False to support AND composition. - is_edit_model = (shared.sd_model is not None) and hasattr(shared.sd_model, 'cond_stage_key') and (shared.sd_model.cond_stage_key == "edit") and (self.image_cfg_scale is not None) and (self.image_cfg_scale != 1.0) + is_edit_model = shared.sd_model.cond_stage_key == "edit" and self.image_cfg_scale is not None and self.image_cfg_scale != 1.0 conds_list, tensor = prompt_parser.reconstruct_multicond_batch(cond, self.step) uncond = prompt_parser.reconstruct_cond_batch(uncond, self.step) - assert not is_edit_model or all([len(conds) == 1 for conds in conds_list]), "AND is not supported for InstructPix2Pix checkpoint (unless using Image CFG scale = 1.0)" + assert not is_edit_model or all(len(conds) == 1 for conds in conds_list), "AND is not supported for InstructPix2Pix checkpoint (unless using Image CFG scale = 1.0)" batch_size = len(conds_list) repeats = [len(conds_list[i]) for i in range(batch_size)] if shared.sd_model.model.conditioning_key == "crossattn-adm": image_uncond = torch.zeros_like(image_cond) - make_condition_dict = lambda c_crossattn, c_adm: {"c_crossattn": c_crossattn, "c_adm": c_adm} # pylint: disable=unnecessary-lambda-assignment + make_condition_dict = lambda c_crossattn, c_adm: {"c_crossattn": c_crossattn, "c_adm": c_adm} # pylint: disable=C3001 else: image_uncond = image_cond - make_condition_dict = lambda c_crossattn, c_concat: {"c_crossattn": c_crossattn, "c_concat": [c_concat]} # pylint: disable=unnecessary-lambda-assignment + make_condition_dict = lambda c_crossattn, c_concat: {"c_crossattn": c_crossattn, "c_concat": [c_concat]} # pylint: disable=C3001 if not is_edit_model: x_in = torch.cat([torch.stack([x[i] for _ in range(n)]) for i, n in enumerate(repeats)] + [x]) @@ -168,8 +169,6 @@ class CFGDenoiser(torch.nn.Module): devices.test_for_nans(x_out, "unet") if opts.live_preview_content == "Prompt": - p_step = len(x_out) // batch_size - 1 - p_step = p_step if p_step > 1 else 1 sd_samplers_common.store_latent(torch.cat([x_out[i:i+1] for i in denoised_image_indexes])) elif opts.live_preview_content == "Negative prompt": sd_samplers_common.store_latent(x_out[-uncond.shape[0]:]) @@ -186,11 +185,9 @@ class CFGDenoiser(torch.nn.Module): after_cfg_callback_params = AfterCFGCallbackParams(denoised, state.sampling_step, state.sampling_steps) cfg_after_cfg_callback(after_cfg_callback_params) - if after_cfg_callback_params.output_altered: - denoised = after_cfg_callback_params.x + denoised = after_cfg_callback_params.x self.step += 1 - return denoised @@ -215,7 +212,7 @@ class TorchHijack: if noise.shape == x.shape: return noise - if x.device.type == 'mps': + if opts.randn_source == "CPU" or x.device.type == 'mps': return torch.randn_like(x, device=devices.cpu).to(x.device) else: return torch.randn_like(x) @@ -233,9 +230,10 @@ class KDiffusionSampler: self.sampler_noises = None self.stop_at = None self.eta = None - self.config = None + self.config = None # set by the function calling the constructor self.last_latent = None self.s_min_uncond = None + self.conditioning_key = sd_model.model.conditioning_key def callback_state(self, d): @@ -249,6 +247,7 @@ class KDiffusionSampler: raise sd_samplers_common.InterruptedException state.sampling_step = step + shared.total_tqdm.update() def launch_sampling(self, steps, func): state.sampling_steps = steps @@ -296,7 +295,7 @@ class KDiffusionSampler: if p.sampler_noise_scheduler_override: sigmas = p.sampler_noise_scheduler_override(steps) elif self.config is not None and self.config.options.get('scheduler', None) == 'karras': - sigma_min, sigma_max = (self.model_wrap.sigmas[0].item(), self.model_wrap.sigmas[-1].item()) + sigma_min, sigma_max = (0.1, 10) if opts.use_old_karras_scheduler_sigmas else (self.model_wrap.sigmas[0].item(), self.model_wrap.sigmas[-1].item()) sigmas = k_diffusion.sampling.get_sigmas_karras(n=steps, sigma_min=sigma_min, sigma_max=sigma_max, device=shared.device) else: @@ -308,16 +307,12 @@ class KDiffusionSampler: return sigmas def create_noise_sampler(self, x, sigmas, p): + """For DPM++ SDE: manually create noise sampler to enable deterministic results across different batch sizes""" + if shared.opts.no_dpmpp_sde_batch_determinism: + return None + from k_diffusion.sampling import BrownianTreeNoiseSampler - - positive_sigmas = sigmas[sigmas > 0] - - if positive_sigmas.numel() > 0: - sigma_min = positive_sigmas.min(dim=0)[0] - else: - sigma_min = 0 - - sigma_max = sigmas.max() + sigma_min, sigma_max = sigmas[sigmas > 0].min(), sigmas.max() current_iter_seeds = p.all_seeds[p.iteration * p.batch_size:(p.iteration + 1) * p.batch_size] return BrownianTreeNoiseSampler(x, sigma_min, sigma_max, seed=current_iter_seeds) @@ -344,16 +339,16 @@ class KDiffusionSampler: if 'sigmas' in parameters: extra_params_kwargs['sigmas'] = sigma_sched - if self.funcname == 'sample_dpmpp_sde': + if self.config.options.get('brownian_noise', False): noise_sampler = self.create_noise_sampler(x, sigmas, p) extra_params_kwargs['noise_sampler'] = noise_sampler self.model_wrap_cfg.init_latent = x self.last_latent = x - extra_args={ - 'cond': conditioning, - 'image_cond': image_conditioning, - 'uncond': unconditional_conditioning, + extra_args = { + 'cond': conditioning, + 'image_cond': image_conditioning, + 'uncond': unconditional_conditioning, 'cond_scale': p.cfg_scale, 's_min_uncond': self.s_min_uncond } @@ -380,15 +375,15 @@ class KDiffusionSampler: else: extra_params_kwargs['sigmas'] = sigmas - if self.funcname == 'sample_dpmpp_sde': + if self.config.options.get('brownian_noise', False): noise_sampler = self.create_noise_sampler(x, sigmas, p) extra_params_kwargs['noise_sampler'] = noise_sampler self.last_latent = x samples = self.launch_sampling(steps, lambda: self.func(self.model_wrap_cfg, x, extra_args={ - 'cond': conditioning, - 'image_cond': image_conditioning, - 'uncond': unconditional_conditioning, + 'cond': conditioning, + 'image_cond': image_conditioning, + 'uncond': unconditional_conditioning, 'cond_scale': p.cfg_scale, 's_min_uncond': self.s_min_uncond }, disable=False, callback=self.callback_state, **extra_params_kwargs)) diff --git a/modules/sd_vae_taesd.py b/modules/sd_vae_taesd.py new file mode 100644 index 000000000..74ad13926 --- /dev/null +++ b/modules/sd_vae_taesd.py @@ -0,0 +1,88 @@ +""" +Tiny AutoEncoder for Stable Diffusion +(DNN for encoding / decoding SD's latent space) + +https://github.com/madebyollin/taesd +""" +import os +import torch +import torch.nn as nn + +from modules import devices, paths_internal + +sd_vae_taesd = None + + +def conv(n_in, n_out, **kwargs): + return nn.Conv2d(n_in, n_out, 3, padding=1, **kwargs) + + +class Clamp(nn.Module): + @staticmethod + def forward(x): + return torch.tanh(x / 3) * 3 + + +class Block(nn.Module): + def __init__(self, n_in, n_out): + super().__init__() + self.conv = nn.Sequential(conv(n_in, n_out), nn.ReLU(), conv(n_out, n_out), nn.ReLU(), conv(n_out, n_out)) + self.skip = nn.Conv2d(n_in, n_out, 1, bias=False) if n_in != n_out else nn.Identity() + self.fuse = nn.ReLU() + + def forward(self, x): + return self.fuse(self.conv(x) + self.skip(x)) + + +def decoder(): + return nn.Sequential( + Clamp(), conv(4, 64), nn.ReLU(), + Block(64, 64), Block(64, 64), Block(64, 64), nn.Upsample(scale_factor=2), conv(64, 64, bias=False), + Block(64, 64), Block(64, 64), Block(64, 64), nn.Upsample(scale_factor=2), conv(64, 64, bias=False), + Block(64, 64), Block(64, 64), Block(64, 64), nn.Upsample(scale_factor=2), conv(64, 64, bias=False), + Block(64, 64), conv(64, 3), + ) + + +class TAESD(nn.Module): # pylint: disable=abstract-method + latent_magnitude = 3 + latent_shift = 0.5 + + def __init__(self, decoder_path="taesd_decoder.pth"): + """Initialize pretrained TAESD on the given device from the given checkpoints.""" + super().__init__() + self.decoder = decoder() + self.decoder.load_state_dict( + torch.load(decoder_path, map_location='cpu' if devices.device.type != 'cuda' else None)) + + @staticmethod + def unscale_latents(x): + """[0, 1] -> raw latents""" + return x.sub(TAESD.latent_shift).mul(2 * TAESD.latent_magnitude) + + +def download_model(model_path): + model_url = 'https://github.com/madebyollin/taesd/raw/main/taesd_decoder.pth' + + if not os.path.exists(model_path): + os.makedirs(os.path.dirname(model_path), exist_ok=True) + + print(f'Downloading TAESD decoder to: {model_path}') + torch.hub.download_url_to_file(model_url, model_path) + + +def model(): + global sd_vae_taesd # pylint: disable=global-statement + + if sd_vae_taesd is None: + model_path = os.path.join(paths_internal.models_path, "VAE-taesd", "taesd_decoder.pth") + download_model(model_path) + + if os.path.exists(model_path): + sd_vae_taesd = TAESD(model_path) + sd_vae_taesd.eval() + sd_vae_taesd.to(devices.device, devices.dtype) + else: + raise FileNotFoundError('TAESD model not found') + + return sd_vae_taesd.decoder diff --git a/modules/shared.py b/modules/shared.py index a1fce4156..df2638f70 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -177,7 +177,7 @@ state.server_start = time.time() class OptionInfo: - def __init__(self, default=None, label="", component=None, component_args=None, onchange=None, section=None, refresh=None): + def __init__(self, default=None, label="", component=None, component_args=None, onchange=None, section=None, refresh=None, comment_before='', comment_after=''): self.default = default self.label = label self.component = component @@ -185,10 +185,28 @@ class OptionInfo: self.onchange = onchange self.section = section self.refresh = refresh + self.comment_before = comment_before # HTML text that will be added after label in UI + self.comment_after = comment_after # HTML text that will be added before label in UI + + def link(self, label, uri): + self.comment_before += f"[{label}]" + return self + + def js(self, label, js_func): + self.comment_before += f"[{label}]" + return self + + def info(self, info): + self.comment_after += f"({info})" + return self + + def needs_restart(self): + self.comment_after += " (requires restart)" + return self def options_section(section_identifier, options_dict): - for _k, v in options_dict.items(): + for v in options_dict.values(): v.section = section_identifier return options_dict @@ -450,8 +468,8 @@ options_templates.update(options_section(('ui', "Live previews"), { "show_progress_grid": OptionInfo(True, "Show previews of all images generated in a batch as a grid"), "notification_audio_enable": OptionInfo(False, "Play a sound when images are finished generating"), "notification_audio_path": OptionInfo("html/notification.mp3","Path to notification sound", component_args=hide_dirs), - "show_progress_every_n_steps": OptionInfo(1, "Show new live preview image every N sampling steps. Set to -1 to show after completion of batch.", gr.Slider, {"minimum": -1, "maximum": 32, "step": 1}), - "show_progress_type": OptionInfo("Approx NN", "Image creation progress preview mode", gr.Radio, {"choices": ["Full", "Approx NN", "Approx cheap"]}), + "show_progress_every_n_steps": OptionInfo(1, "Live preview display period", gr.Slider, {"minimum": -1, "maximum": 32, "step": 1}).info("in sampling steps - show new live preview image every N sampling steps; -1 = only show after completion of batch"), + "show_progress_type": OptionInfo("TAESD", "Live preview method", gr.Radio, {"choices": ["Full", "Approx NN", "Approx cheap", "TAESD"]}).info("Full = slow but pretty; Approx NN and TAESD = fast but low quality; Approx cheap = super fast but terrible otherwise"), "live_preview_content": OptionInfo("Combined", "Live preview subject", gr.Radio, {"choices": ["Combined", "Prompt", "Negative prompt"]}), "live_preview_refresh_period": OptionInfo(250, "Progressbar/preview update period, in milliseconds") })) From fa51d45bc3477e5dafd37cd9ec524428f51b9c4c Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 30 May 2023 15:28:41 -0400 Subject: [PATCH 249/282] fix samplers --- CHANGELOG.md | 4 +++- TODO.md | 1 + modules/sd_samplers_kdiffusion.py | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67e92961b..1846b847b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,14 @@ ## Update for 05/30/2023 +Another bigger one...And more to come in the next few days... + - new live preview mode: taesd i really like this one, so its enabled as default for new installs - settings search feature - new sampler: sde++ 2m sde - fully common save/zip/delete (new) options in all tabs - which (again) meant as rework of process image tab + which (again) meant rework of process image tab - system info tab: live gpu utilization/memory graphs for nvidia gpus - updated controlnet interface - minor style changes diff --git a/TODO.md b/TODO.md index 89ed1a102..4292ad3ae 100644 --- a/TODO.md +++ b/TODO.md @@ -46,4 +46,5 @@ Tech that can be integrated as part of the core workflow... ## Random - Bunch of stuff: +- - diff --git a/modules/sd_samplers_kdiffusion.py b/modules/sd_samplers_kdiffusion.py index b138a662c..7bfc60488 100644 --- a/modules/sd_samplers_kdiffusion.py +++ b/modules/sd_samplers_kdiffusion.py @@ -212,9 +212,9 @@ class TorchHijack: if noise.shape == x.shape: return noise - if opts.randn_source == "CPU" or x.device.type == 'mps': - return torch.randn_like(x, device=devices.cpu).to(x.device) - else: + # if opts.randn_source == "CPU" or x.device.type == 'mps': + # return torch.randn_like(x, device=devices.cpu).to(x.device) + # else: return torch.randn_like(x) From c39553c4ed72fc05407a0a5c9e6253f071649e09 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 30 May 2023 16:50:36 -0400 Subject: [PATCH 250/282] fix ensd --- modules/processing.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/processing.py b/modules/processing.py index 22a504c1d..60fd93a2c 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -17,7 +17,7 @@ from einops import repeat, rearrange from blendmodes.blend import blendLayers, BlendType from installer import git_commit import modules.sd_hijack -from modules import devices, prompt_parser, masking, sd_samplers, lowvram, generation_parameters_copypaste, script_callbacks, extra_networks, sd_vae_approx, scripts # pylint: disable=unused-import +from modules import devices, prompt_parser, masking, sd_samplers, lowvram, generation_parameters_copypaste, script_callbacks, extra_networks, sd_vae_approx, scripts, sd_samplers_common # pylint: disable=unused-import from modules.sd_hijack import model_hijack from modules.shared import opts, cmd_opts, state, log, backend, Backend import modules.shared as shared @@ -424,6 +424,12 @@ def fix_seed(p): def create_infotext(p: StableDiffusionProcessing, all_prompts, all_seeds, all_subseeds, comments=None, iteration=0, position_in_batch=0): # pylint: disable=unused-argument index = position_in_batch + iteration * p.batch_size + + uses_ensd = opts.eta_noise_seed_delta != 0 + if uses_ensd: + uses_ensd = sd_samplers_common.is_sampler_using_eta_noise_seed_delta(p) + + generation_params = { "Steps": p.steps, "Sampler": p.sampler_name, @@ -441,7 +447,7 @@ def create_infotext(p: StableDiffusionProcessing, all_prompts, all_seeds, all_su "Denoising strength": getattr(p, 'denoising_strength', None), "Conditional mask weight": getattr(p, "inpainting_mask_weight", shared.opts.inpainting_mask_weight) if p.is_using_inpainting_conditioning else None, "Clip skip": p.clip_skip, - "ENSD": None if opts.eta_noise_seed_delta == 0 else opts.eta_noise_seed_delta, + "ENSD": opts.eta_noise_seed_delta if uses_ensd else None, "Init image hash": getattr(p, 'init_img_hash', None), "Version": git_commit, "Token merging ratio": None if not (opts.token_merging or cmd_opts.token_merging) or opts.token_merging_hr_only else opts.token_merging_ratio, From d1ab205d3d1a8b2776f3e05d3b48bf6252d6fb52 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 30 May 2023 17:15:52 -0400 Subject: [PATCH 251/282] fix samplers --- modules/sd_samplers_kdiffusion.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/modules/sd_samplers_kdiffusion.py b/modules/sd_samplers_kdiffusion.py index 7bfc60488..e5dcf767b 100644 --- a/modules/sd_samplers_kdiffusion.py +++ b/modules/sd_samplers_kdiffusion.py @@ -84,7 +84,7 @@ class CFGDenoiser(torch.nn.Module): # at self.image_cfg_scale == 1.0 produced results for edit model are the same as with normal sampling, # so is_edit_model is set to False to support AND composition. - is_edit_model = shared.sd_model.cond_stage_key == "edit" and self.image_cfg_scale is not None and self.image_cfg_scale != 1.0 + is_edit_model = (shared.sd_model is not None) and hasattr(shared.sd_model, 'cond_stage_key') and (shared.sd_model.cond_stage_key == "edit") and (self.image_cfg_scale is not None) and (self.image_cfg_scale != 1.0) conds_list, tensor = prompt_parser.reconstruct_multicond_batch(cond, self.step) uncond = prompt_parser.reconstruct_cond_batch(uncond, self.step) @@ -212,9 +212,9 @@ class TorchHijack: if noise.shape == x.shape: return noise - # if opts.randn_source == "CPU" or x.device.type == 'mps': - # return torch.randn_like(x, device=devices.cpu).to(x.device) - # else: + if x.device.type == 'mps': + return torch.randn_like(x, device=devices.cpu).to(x.device) + else: return torch.randn_like(x) @@ -247,7 +247,6 @@ class KDiffusionSampler: raise sd_samplers_common.InterruptedException state.sampling_step = step - shared.total_tqdm.update() def launch_sampling(self, steps, func): state.sampling_steps = steps @@ -312,7 +311,13 @@ class KDiffusionSampler: return None from k_diffusion.sampling import BrownianTreeNoiseSampler - sigma_min, sigma_max = sigmas[sigmas > 0].min(), sigmas.max() + positive_sigmas = sigmas[sigmas > 0] + if positive_sigmas.numel() > 0: + sigma_min = positive_sigmas.min(dim=0)[0] + else: + sigma_min = 0 + sigma_max = sigmas.max() + current_iter_seeds = p.all_seeds[p.iteration * p.batch_size:(p.iteration + 1) * p.batch_size] return BrownianTreeNoiseSampler(x, sigma_min, sigma_max, seed=current_iter_seeds) From 8ba766823df902e949944758e6c425c43a7e1a3a Mon Sep 17 00:00:00 2001 From: Ionite Date: Wed, 31 May 2023 01:19:59 -0400 Subject: [PATCH 252/282] Skip git check in `check_python()` when `args.skip_git` is True --- installer.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/installer.py b/installer.py index 120169bc0..0669687f4 100644 --- a/installer.py +++ b/installer.py @@ -227,11 +227,12 @@ def check_python(): log.error(f"Incompatible Python version: {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro} required 3.{supported_minors}") if not args.ignore: exit(1) - git_cmd = os.environ.get('GIT', "git") - if shutil.which(git_cmd) is None: - log.error('Git not found') - if not args.ignore: - exit(1) + if not args.skip_git: + git_cmd = os.environ.get('GIT', "git") + if shutil.which(git_cmd) is None: + log.error('Git not found') + if not args.ignore: + exit(1) else: git_version = git('--version', folder=None, ignore=False) log.debug(f'Git {git_version.replace("git version", "").strip()}') From b2b67127e3b2919b66f2ec0cffe33a2fd0ad13af Mon Sep 17 00:00:00 2001 From: Disty0 Date: Wed, 31 May 2023 12:03:00 +0300 Subject: [PATCH 253/282] Fix torch.Generator does not support XPU --- modules/sd_samplers_kdiffusion.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/sd_samplers_kdiffusion.py b/modules/sd_samplers_kdiffusion.py index e5dcf767b..7daf24983 100644 --- a/modules/sd_samplers_kdiffusion.py +++ b/modules/sd_samplers_kdiffusion.py @@ -4,7 +4,7 @@ import torch import k_diffusion.sampling from modules import prompt_parser, devices, sd_samplers_common -from modules.shared import opts, state +from modules.shared import opts, state, cmd_opts import modules.shared as shared from modules.script_callbacks import CFGDenoiserParams, cfg_denoiser_callback from modules.script_callbacks import CFGDenoisedParams, cfg_denoised_callback @@ -319,7 +319,10 @@ class KDiffusionSampler: sigma_max = sigmas.max() current_iter_seeds = p.all_seeds[p.iteration * p.batch_size:(p.iteration + 1) * p.batch_size] - return BrownianTreeNoiseSampler(x, sigma_min, sigma_max, seed=current_iter_seeds) + if cmd_opts.use_ipex: #Remove this after Intel adds support for torch.Generator() + return BrownianTreeNoiseSampler(x.to("cpu"), sigma_min, sigma_max, seed=current_iter_seeds, transform=lambda x: x.to("cpu"), transform_last=lambda x: x.to("xpu")) + else: + return BrownianTreeNoiseSampler(x, sigma_min, sigma_max, seed=current_iter_seeds) def sample_img2img(self, p, x, noise, conditioning, unconditional_conditioning, steps=None, image_conditioning=None): steps, t_enc = sd_samplers_common.setup_img2img_steps(p, steps) From 3b99450022395464fc4800206a23768e36e93f1a Mon Sep 17 00:00:00 2001 From: Disty0 Date: Wed, 31 May 2023 12:12:55 +0300 Subject: [PATCH 254/282] Check for k-diffusion patch --- modules/sd_samplers_kdiffusion.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/sd_samplers_kdiffusion.py b/modules/sd_samplers_kdiffusion.py index 7daf24983..b0ba486fd 100644 --- a/modules/sd_samplers_kdiffusion.py +++ b/modules/sd_samplers_kdiffusion.py @@ -320,7 +320,11 @@ class KDiffusionSampler: current_iter_seeds = p.all_seeds[p.iteration * p.batch_size:(p.iteration + 1) * p.batch_size] if cmd_opts.use_ipex: #Remove this after Intel adds support for torch.Generator() - return BrownianTreeNoiseSampler(x.to("cpu"), sigma_min, sigma_max, seed=current_iter_seeds, transform=lambda x: x.to("cpu"), transform_last=lambda x: x.to("xpu")) + try: + return BrownianTreeNoiseSampler(x.to("cpu"), sigma_min, sigma_max, seed=current_iter_seeds, transform=lambda x: x.to("cpu"), transform_last=lambda x: x.to("xpu")) + except: + print("ERROR Please apply this patch to repositories/k-diffusion/k_diffusion/sampling.py: https://github.com/crowsonkb/k-diffusion/pull/68/files") + return None else: return BrownianTreeNoiseSampler(x, sigma_min, sigma_max, seed=current_iter_seeds) From d9f72b066f612e0220f61d142cb5e3106df6afb8 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 31 May 2023 09:14:15 -0400 Subject: [PATCH 255/282] precalc hashes --- modules/hashes.py | 6 +----- modules/lora | 2 +- modules/sd_models.py | 19 +++++++++++++++++++ modules/ui.py | 2 ++ 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/modules/hashes.py b/modules/hashes.py index fb7ce62fa..3dd9bdb6c 100644 --- a/modules/hashes.py +++ b/modules/hashes.py @@ -17,8 +17,7 @@ def dump_cache(): def cache(subsection): - global cache_data - + global cache_data # pylint: disable=global-statement if cache_data is None: with filelock.FileLock(f"{cache_filename}.lock"): if not os.path.isfile(cache_filename): @@ -26,10 +25,8 @@ def cache(subsection): else: with open(cache_filename, "r", encoding="utf8") as file: cache_data = json.load(file) - s = cache_data.get(subsection, {}) cache_data[subsection] = s - return s @@ -86,4 +83,3 @@ def addnet_hash_safetensors(b): for chunk in iter(lambda: b.read(blksize), b""): hash_sha256.update(chunk) return hash_sha256.hexdigest() - diff --git a/modules/lora b/modules/lora index 16e5981d3..8a5e3904a 160000 --- a/modules/lora +++ b/modules/lora @@ -1 +1 @@ -Subproject commit 16e5981d3153ba02c34445089b998c5002a60abc +Subproject commit 8a5e3904a07362bf380b27c65241849b57502f91 diff --git a/modules/sd_models.py b/modules/sd_models.py index 7b1444e6a..5a5737bec 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -136,6 +136,25 @@ def list_models(): checkpoint_info.register() +def update_model_hashes(): + txt = [] + lst = [ckpt for ckpt in checkpoints_list.values() if ckpt.hash is None] + shared.log.info(f'Models list: short hash missing for {len(lst)} out of {len(checkpoints_list)} models') + for ckpt in lst: + ckpt.hash = model_hash(ckpt.filename) + txt.append(f'Calculated short hash: {ckpt.title} {ckpt.hash}') + txt.append(f'Updated short hashes for {len(lst)} out of {len(checkpoints_list)} models') + lst = [ckpt for ckpt in checkpoints_list.values() if ckpt.sha256 is None or ckpt.shorthash is None] + shared.log.info(f'Models list: full hash missing for {len(lst)} out of {len(checkpoints_list)} models') + for ckpt in lst: + ckpt.sha256 = hashes.sha256(ckpt.filename, f"checkpoint/{ckpt.name}") + ckpt.shorthash = ckpt.sha256[0:10] + txt.append(f'Calculated full hash: {ckpt.title} {ckpt.shorthash}') + txt.append(f'Updated full hashes for {len(lst)} out of {len(checkpoints_list)} models') + txt = '
'.join(txt) + return txt + + def get_closet_checkpoint_match(search_string): checkpoint_info = checkpoint_aliases.get(search_string, None) if checkpoint_info is not None: diff --git a/modules/ui.py b/modules/ui.py index e6dfc2fb3..4dd6bf4ed 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -934,6 +934,7 @@ def create_ui(): discard_weights = gr.Textbox(value="", label="Discard weights with matching name", elem_id="modelmerger_discard_weights") with gr.Row(): modelmerger_merge = gr.Button(elem_id="modelmerger_merge", value="Merge", variant='primary') + model_checkhash = gr.Button(elem_id="modelmerger_hash", value="Calculate hash for all models (may take a long time)", variant='primary') with gr.Column(variant='compact', elem_id="modelmerger_results_container"): with gr.Group(elem_id="modelmerger_results_panel"): @@ -1519,6 +1520,7 @@ def create_ui(): modelmerger_result, ] ) + model_checkhash.click(fn=sd_models.update_model_hashes, inputs=[], outputs=[modelmerger_result]) ui_config_file = cmd_opts.ui_config ui_settings = {} From fcb9bde068a1e9d78118f14201425fea7ca9bc6c Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 31 May 2023 11:47:22 -0400 Subject: [PATCH 256/282] add pause button --- javascript/black-orange.css | 7 +- javascript/style.css | 240 ++++++------------------------ modules/call_queue.py | 1 + modules/prompt_parser.py | 14 +- modules/sd_samplers_compvis.py | 7 + modules/sd_samplers_kdiffusion.py | 9 +- modules/shared.py | 11 +- modules/ui.py | 14 +- modules/ui_postprocessing.py | 2 +- 9 files changed, 91 insertions(+), 214 deletions(-) diff --git a/javascript/black-orange.css b/javascript/black-orange.css index 1d8e5523b..c45c0f9a5 100644 --- a/javascript/black-orange.css +++ b/javascript/black-orange.css @@ -81,19 +81,14 @@ svg.feather.feather-image, .feather .feather-image { display: none } #quicksettings > div, #quicksettings > fieldset { min-width: 24em; max-width: 26em; line-height: 2em; } #refresh_sd_model_checkpoint { height: 48px; margin-left: -14px; background: #333333; box-shadow: none; } #open_folder_extras, #footer, #style_pos_col, #style_neg_col, #roll_col, #extras_upscaler_2, #extras_upscaler_2_visibility, #txt2img_seed_resize_from_w, #txt2img_seed_resize_from_h { display: none; } -#refresh_txt2img_styles, #refresh_img2img_styles { height: 45px; margin-left: -8px; } #save-animation { border-radius: 0 !important; margin-bottom: 16px; background-color: #111111; } #script_list { padding: 4px; margin-top: 20px; margin-bottom: 20px; } #settings > div.flex-wrap { width: 15em; } #tab_extensions table { background-color: #222222; } -#txt2img_actions_column, #img2img_actions_column { min-width: 280px !important; max-width: 280px !important; gap: 0.6em } #txt2img_cfg_scale { min-width: 200px; } #txt2img_checkboxes, #img2img_checkboxes { background-color: transparent; } #txt2img_checkboxes, #img2img_checkboxes { margin-bottom: 0.2em; } #txt2img_gallery, #img2img_gallery, #extras_gallery { background: black !important; padding: 0; margin: 0; object-fit: contain; box-shadow: none; min-height: 0; } -#txt2img_generate, #img2img_generate { height: 36px; border: none; border-radius: 0; min-height: 36px; padding: 0; } -#txt2img_interrupt, #img2img_interrupt, #txt2img_skip, #img2img_skip { height: 36px; min-width: 116px; max-width: 116px; border: none; border-radius: 0; background-color: var(--inactive-color); margin-top: 46px; display: block !important; padding: 0; } -#extras_generate, #extras_interrupt, #extras_skip { border: none; border-radius: 0; background-color: var(--inactive-color); } #extras_upscale { margin-top: 10px } #txt2img_progress_row > div { min-width: var(--left-column); max-width: var(--left-column); } #txt2img_results, #img2img_results, #extras_results { background-color: black; padding: 0; } @@ -102,10 +97,10 @@ svg.feather.feather-image, .feather .feather-image { display: none } #txt2img_subseed_row { padding: 0; margin-top: 16px; } #txt2img_subseed_show, #img2img_subseed_show { display: None } #txt2img_subseed_strength { margin-top: 0; } -#txt2img_tools, #img2img_tools { margin-top: 54px; scale: 120%; margin-left: 40px; filter: hue-rotate(180deg) saturate(0.5); } #txtimg_hr_finalres { max-width: 200px; } #pnginfo_html2_info { margin-top: -18px; background-color: var(--input-background-fill); padding: var(--input-padding) } #txt2img_extra_refresh, #txt2img_extra_close { height: 1.7em; } +#txt2img_tools > div > button, #img2img_tools > div > button { filter: hue-rotate(180deg) saturate(0.5); } /* custom elements overrides */ #steps-animation, #controlnet { border-width: 0; } diff --git a/javascript/style.css b/javascript/style.css index ddd78e3d9..41dbd25a1 100644 --- a/javascript/style.css +++ b/javascript/style.css @@ -1,4 +1,5 @@ :root, .dark{ --checkbox-label-gap: 0.25em 0.1em; --section-header-text-size: 12pt; --block-background-fill: transparent;} +a { font-weight: bold; cursor: pointer; } div.gradio-container{ max-width: unset !important; } div.form{ border-width: 0; box-shadow: none; background: transparent; overflow: visible; gap: 0.5em; } div.compact{ gap: 1em; } @@ -48,6 +49,12 @@ button.custom-button{ text-align: center; } +/* remove footer */ +footer { display: none !important; } + +/* themes */ +.theme-preview { display: none; position: fixed; border: 4px solid var(--neutral-600); box-shadow: 2px 2px 2px 2px var(--neutral-700); top: 0; bottom: 0; left: 0; right: 0; margin: auto; max-width: 75vw; z-index: 999; } + /* txt2img/img2img specific */ .block.token-counter{ position: absolute; @@ -85,45 +92,22 @@ button.custom-button{ align-self: end; } -.performance { - font-size: 0.85em; - color: #444; -} - -.performance p{ - display: inline-block; - color: var(--primary-100) !important -} - -.performance .time { - margin-right: 0; -} - -#txt2img_generate, #img2img_generate { - min-height: 4.5em; -} +.performance { font-size: 0.85em; color: #444; } +.performance p { display: inline-block; color: var(--primary-100) !important } +.performance .time { margin-right: 0; } @media screen and (min-width: 2500px) { - #txt2img_gallery, #img2img_gallery { - min-height: 768px; - } + #txt2img_gallery, #img2img_gallery { min-height: 768px; } } -a{ - font-weight: bold; - cursor: pointer; -} - -#txt2img_gallery img, #img2img_gallery img, #extras_gallery img { - object-fit: scale-down; - width: -webkit-fill-available !important; -} -#txt2img_actions_column, #img2img_actions_column { - gap: 0.5em; -} -#txt2img_tools, #img2img_tools{ - gap: 0.4em; -} +#txt2img_gallery img, #img2img_gallery img, #extras_gallery img { object-fit: scale-down; width: -webkit-fill-available !important; } +#txt2img_actions_column, #img2img_actions_column { gap: 0.5em; } +#txt2img_generate_line1 > button, #img2img_generate_line1 > button { height: 2.2em; line-height: 0; } +#txt2img_generate_line2 > button, #img2img_generate_line2 > button, #extras_generate_box > button { height: 2.2em; line-height: 0; min-width: unset; display: block !important; } +#txt2img_generate_line2 { display: flex; } +#txt2img_tools > div, #img2img_tools > div { justify-content: space-around; margin-top: 0.5em; margin-bottom: 0em; } +#txt2img_tools > div > button, #img2img_tools > div > button { scale: 120%; } +#refresh_txt2img_styles, #refresh_img2img_styles { height: 2.46em; margin-left: -8px; } .interrogate-col{ min-width: 0 !important; @@ -134,28 +118,6 @@ a{ flex: 1; } -.generate-box{ - position: relative; -} -.gradio-button.generate-box-skip, .gradio-button.generate-box-interrupt{ - position: absolute; - width: 50%; - height: 100%; - display: none; - background: #b4c0cc; -} -.gradio-button.generate-box-skip:hover, .gradio-button.generate-box-interrupt:hover{ - background: #c2cfdb; -} -.gradio-button.generate-box-interrupt{ - left: 0; - border-radius: 0.5rem 0 0 0.5rem; -} -.gradio-button.generate-box-skip{ - right: 0; - border-radius: 0 0.5rem 0.5rem 0; -} - #txtimg_hr_finalres{ min-height: 0 !important; padding: .625rem .75rem; @@ -508,81 +470,20 @@ table.settings-value-table td{ /* extensions */ -#tab_extensions table{ - border-collapse: collapse; -} +#tab_extensions table{ border-collapse: collapse; } +#tab_extensions table td, #tab_extensions table th { border: 1px solid #ccc; padding: 0.25em 0.5em; } +#tab_extensions table input[type="checkbox"] { margin-right: 0.5em; appearance: checkbox; } +#tab_extensions button{ max-width: 16em; } +#tab_extensions input[disabled="disabled"]{ opacity: 0.5; } +.extension-tag{ font-weight: bold; font-size: 95%; } +#extensions .name{ font-size: 1.1rem } +#extensions .type{ opacity: 0.5; font-size: 90%; text-align: center; } +#extensions .version{ opacity: 0.7; } +#extensions .info{ margin: 0; } +#extensions .date{ opacity: 0.85; font-size: 90%; } +.extension-button { font-size: 95% !important; width: 6em; } -#tab_extensions table td, #tab_extensions table th{ - border: 1px solid #ccc; - padding: 0.25em 0.5em; -} - -#tab_extensions table input[type="checkbox"]{ - margin-right: 0.5em; - appearance: checkbox; -} - -#tab_extensions button{ - max-width: 16em; -} - -#tab_extensions input[disabled="disabled"]{ - opacity: 0.5; -} - -.extension-tag{ - font-weight: bold; - font-size: 95%; -} - -#extensions .name{ - font-size: 1.1rem -} - -#extensions .type{ - opacity: 0.5; - font-size: 90%; - text-align: center; -} - -#extensions .version{ - opacity: 0.7; -} - -#extensions .info{ - margin: 0; -} - -#extensions .date{ - opacity: 0.85; - font-size: 90%; -} - -.extension-button { - font-size: 95% !important; - width: 6em; -} - -/* replace original footer with ours */ - -footer { - display: none !important; -} - -#footer{ - text-align: center; -} - -#footer div{ - display: inline-block; -} - -#footer .versions{ - font-size: 85%; - opacity: 0.85; -} - -/* extra networks UI */ +/* extra networks */ .extra-networks > div > [id *= '_extra_']{ margin: 0.3em; } .extra-network-subdirs{ padding: 0.2em 0.35em; } .extra-network-subdirs button{ margin: 0 0.15em; } @@ -591,7 +492,6 @@ footer { .extra-network-cards .nocards, .extra-network-thumbs .nocards{ margin: 1.25em 0.5em 0.5em 0.5em; } .extra-network-cards .nocards h1, .extra-network-thumbs .nocards h1{ font-size: 1.5em; margin-bottom: 1em; } .extra-network-cards .nocards li, .extra-network-thumbs .nocards li{ margin-left: 0.5em; } - .extra-network-cards .card .metadata-button, .extra-network-thumbs .card .metadata-button{ display: none; position: absolute; @@ -605,7 +505,6 @@ footer { .extra-network-cards .card:hover .metadata-button, .extra-network-thumbs .card:hover .metadata-button{ display: inline-block; } .extra-network-thumbs { display: flex; flex-flow: row wrap; gap: 10px; } .extra-network-cards .card .additional a:hover, .extra-network-thumbs .card .additional a:hover { color: darkorange } - .extra-network-thumbs .card { display: inline-block; height: 9em; @@ -616,7 +515,6 @@ footer { background-position: center center; position: relative; } - .extra-network-cards .card .additional, .extra-network-thumbs .card .additional { white-space: nowrap; overflow: hidden; } .extra-network-thumbs .card:hover .additional a { display: inline-block; } .extra-network-thumbs .actions .name { @@ -631,7 +529,6 @@ footer { background: rgba(0,0,0,.5); color: white; } - .extra-network-thumbs .card:hover .actions .name { white-space: normal; word-break: break-all; } .extra-network-cards .card{ display: inline-block; @@ -647,10 +544,8 @@ footer { cursor: pointer; background-image: url('../html/card-no-preview.png') } - .extra-network-cards .card:hover { box-shadow: 0 0 2px 0.3em rgba(0, 128, 255, 0.35); } .extra-network-cards .card .actions .additional, .extra-network-thumbs .card .actions .additional{ display: none; } - .extra-network-cards .card .actions{ position: absolute; bottom: 0; @@ -661,7 +556,6 @@ footer { box-shadow: 0 0 0.25em 0.25em rgba(0,0,0,0.5); text-shadow: 0 0 0.2em black; } - .extra-network-cards .card .actions *{ color: white; } .extra-network-cards .card .actions:hover { box-shadow: 0 0 0.75em 0.75em rgba(0,0,0,0.5) !important; } .extra-network-cards .card .actions .name { font-size: 1.7em; font-weight: bold; line-break: anywhere; } @@ -671,63 +565,21 @@ footer { .extra-network-cards .card ul{ margin: 0.25em 0 0.75em 0.25em; cursor: unset; } .extra-network-cards .card ul a{ cursor: pointer; } .extra-network-cards .card ul a:hover{ color: red; } -.theme-preview { display: none; position: fixed; border: 4px solid var(--neutral-600); box-shadow: 2px 2px 2px 2px var(--neutral-700); top: 0; bottom: 0; left: 0; right: 0; margin: auto; max-width: 75vw; z-index: 999; } +/* controlnet */ +.controlnet_control_type .controlnet_control_type_filter_group .wrap:last-of-type { display: grid; grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); } +fieldset.controlnet_resize_mode_radio .wrap:last-of-type, fieldset.controlnet_control_mode_radio .wrap:last-of-type { flex-direction: column; } +div.controlnet_preprocessor_model { display: grid; grid-auto-flow: row; grid-template-columns: 1fr max-content; } +div.controlnet_preprocessor_model button.gradio-button { align-self: center; } +div.controlnet_weight_steps > div.form { display: grid; grid-template: repeat(2, 1fr) / repeat(2, 1fr); } +div.controlnet_weight_steps .controlnet_control_weight_slider { grid-column: 1 / -1; } +div.controlnet_image_controls { display: grid; grid-template-columns: repeat(4, 1fr); } +div.controlnet_image_controls .controlnet_invert_warning { grid-column: 1 / -1; } +div.controlnet_image_controls button { justify-self: center; } +div.controlnet_main_options { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: row; } + +/* specific elements */ +#modelmerger_interp_description { margin-top: 1em; margin-bottom: 1em; } #scripts_alwayson_txt2img, #scripts_alwayson_img2img { display: grid } - #extras_generate, #extras_interrupt, #extras_skip { display: block !important; position: relative; height: 36px; } #extras_upscale { margin-top: 10px } - -.controlnet_control_type .controlnet_control_type_filter_group .wrap:last-of-type { - display: grid; - grid-auto-flow: row; - grid-template-columns: repeat(4, minmax(0, 1fr)); -} - -div.controlnet_preprocessor_model { - display: grid; - grid-auto-flow: row; - grid-template-columns: 1fr max-content; -} - -div.controlnet_preprocessor_model button.gradio-button { - align-self: center; -} - -fieldset.controlnet_resize_mode_radio .wrap:last-of-type, -fieldset.controlnet_control_mode_radio .wrap:last-of-type { - flex-direction: column; -} - -div.controlnet_weight_steps > div.form { - display: grid; - grid-template: repeat(2, 1fr) / repeat(2, 1fr); -} - -div.controlnet_weight_steps .controlnet_control_weight_slider { - grid-column: 1 / -1; -} -div.controlnet_image_controls { - display: grid; - grid-template-columns: repeat(4, 1fr); -} - -div.controlnet_image_controls .controlnet_invert_warning { - grid-column: 1 / -1; -} - -div.controlnet_image_controls button { - justify-self: center; -} - -div.controlnet_main_options { - display: grid; - grid-template-columns: 1fr 1fr; - grid-auto-flow: row; -} - -#modelmerger_interp_description { margin-top: 1em; margin-bottom: 1em; } - -.thumbnail-item > img { - -} \ No newline at end of file diff --git a/modules/call_queue.py b/modules/call_queue.py index 0de523f66..8eb703051 100644 --- a/modules/call_queue.py +++ b/modules/call_queue.py @@ -76,6 +76,7 @@ def wrap_gradio_call(func, extra_outputs=None, add_stats=False): res = extra_outputs_array + [f"
{html.escape(type(e).__name__+': '+str(e))}
"] shared.state.skipped = False shared.state.interrupted = False + shared.state.paused = False shared.state.job_count = 0 if not add_stats: return tuple(res) diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py index 1474e69d3..1aa48754f 100644 --- a/modules/prompt_parser.py +++ b/modules/prompt_parser.py @@ -7,13 +7,14 @@ from rich import print sys.path.append(os.path.join(os.path.dirname(__file__), '..')) """ +import os import re from collections import namedtuple from typing import List import lark import torch from compel import Compel -from modules.shared import opts +from modules.shared import opts, log # a prompt like this: "fantasy landscape with a [mountain:lake:0.25] and [an oak:a christmas tree:0.75][ in foreground::0.6][ in background:0.25] [shoddy:masterful:0.5]" # will be represented with prompt_schedule like this (assuming steps=100): @@ -67,6 +68,9 @@ re_attention_v1 = re.compile(r""" """, re.X) +debug_output = os.environ.get('SD_PROMPT_DEBUG', None) +debug = log.info if debug_output is not None else lambda *args, **kwargs: None + def get_learned_conditioning_prompt_schedules(prompts, steps): """ @@ -161,7 +165,7 @@ def get_learned_conditioning(model, prompts, steps): prompt_schedules = get_learned_conditioning_prompt_schedules(prompts, steps) cache = {} for prompt, prompt_schedule in zip(prompts, prompt_schedules): - # log.debug(f'Prompt schedule: {prompt_schedule}') + debug(f'Prompt schedule: {prompt_schedule}') cached = cache.get(prompt, None) if cached is not None: res.append(cached) @@ -299,7 +303,7 @@ def parse_prompt_attention(text): square_brackets = [] if opts.prompt_attention == 'Fixed attention': res = [[text, 1.0]] - # log.debug(f'Prompt parse-attention: {opts.prompt_attention} {res}') + debug(f'Prompt parse-attention: {opts.prompt_attention} {res}') return res elif opts.prompt_attention == 'Compel parser': conjunction = Compel.parse_prompt_string(text) @@ -308,7 +312,7 @@ def parse_prompt_attention(text): res = [] for frag in conjunction.prompts[0].children: res.append([frag.text, frag.weight]) - # log.debug(f'Prompt parse-attention: {opts.prompt_attention} {res}') + debug(f'Prompt parse-attention: {opts.prompt_attention} {res}') return res elif opts.prompt_attention == 'A1111 parser': re_attention = re_attention_v1 @@ -363,7 +367,7 @@ def parse_prompt_attention(text): res.pop(i + 1) else: i += 1 - # log.debug(f'Prompt parse-attention: {opts.prompt_attention} {res}') + debug(f'Prompt parse-attention: {opts.prompt_attention} {res}') return res if __name__ == "__main__": diff --git a/modules/sd_samplers_compvis.py b/modules/sd_samplers_compvis.py index e07eb7d80..45ccf4b98 100644 --- a/modules/sd_samplers_compvis.py +++ b/modules/sd_samplers_compvis.py @@ -64,6 +64,13 @@ class VanillaStableDiffusionSampler: def before_sample(self, x, ts, cond, unconditional_conditioning): if state.interrupted or state.skipped: raise sd_samplers_common.InterruptedException + if state.paused: + shared.log.debug('Sampling paused') + while state.paused: + if state.interrupted or state.skipped: + raise sd_samplers_common.InterruptedException + import time + time.sleep(0.1) if self.stop_at is not None and self.step > self.stop_at: raise sd_samplers_common.InterruptedException diff --git a/modules/sd_samplers_kdiffusion.py b/modules/sd_samplers_kdiffusion.py index b0ba486fd..3cdfe77d3 100644 --- a/modules/sd_samplers_kdiffusion.py +++ b/modules/sd_samplers_kdiffusion.py @@ -81,6 +81,13 @@ class CFGDenoiser(torch.nn.Module): def forward(self, x, sigma, uncond, cond, cond_scale, s_min_uncond, image_cond): if state.interrupted or state.skipped: raise sd_samplers_common.InterruptedException + if state.paused: + shared.log.debug('Sampling paused') + while state.paused: + if state.interrupted or state.skipped: + raise sd_samplers_common.InterruptedException + import time + time.sleep(0.1) # at self.image_cfg_scale == 1.0 produced results for edit model are the same as with normal sampling, # so is_edit_model is set to False to support AND composition. @@ -321,7 +328,7 @@ class KDiffusionSampler: current_iter_seeds = p.all_seeds[p.iteration * p.batch_size:(p.iteration + 1) * p.batch_size] if cmd_opts.use_ipex: #Remove this after Intel adds support for torch.Generator() try: - return BrownianTreeNoiseSampler(x.to("cpu"), sigma_min, sigma_max, seed=current_iter_seeds, transform=lambda x: x.to("cpu"), transform_last=lambda x: x.to("xpu")) + return BrownianTreeNoiseSampler(x.to("cpu"), sigma_min, sigma_max, seed=current_iter_seeds, transform=lambda x: x.to("cpu"), transform_last=lambda x: x.to("xpu")) # pylint: disable=E1123 except: print("ERROR Please apply this patch to repositories/k-diffusion/k_diffusion/sampling.py: https://github.com/crowsonkb/k-diffusion/pull/68/files") return None diff --git a/modules/shared.py b/modules/shared.py index df2638f70..e4eed0e0b 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -86,6 +86,7 @@ def reload_hypernetworks(): class State: skipped = False interrupted = False + paused = False job = "" job_no = 0 job_count = 0 @@ -103,13 +104,17 @@ class State: server_start = None def skip(self): - log.debug('Skip requested') + log.debug('Requested skip') self.skipped = True def interrupt(self): - log.debug('Interrupt requested') + log.debug('Requested interrupt') self.interrupted = True + def pause(self): + self.paused = not self.paused + log.debug(f'Requested {"pause" if self.paused else "continue"}') + def nextjob(self): if opts.live_previews_enable and opts.show_progress_every_n_steps == -1: self.do_set_current_image() @@ -142,6 +147,7 @@ class State: self.id_live_preview = 0 self.skipped = False self.interrupted = False + self.paused = False self.textinfo = None self.time_start = time.time() devices.torch_gc() @@ -149,6 +155,7 @@ class State: def end(self): self.job = "" self.job_count = 0 + self.paused = False devices.torch_gc() def set_current_image(self): diff --git a/modules/ui.py b/modules/ui.py index 4dd6bf4ed..5c4f177f0 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -237,23 +237,27 @@ def create_toprow(is_img2img): button_interrogate = gr.Button('Interrogate\nCLIP', elem_id="interrogate") button_deepbooru = gr.Button('Interrogate\nDeepBooru', elem_id="deepbooru") with gr.Column(scale=1, elem_id=f"{id_part}_actions_column"): - with gr.Row(elem_id=f"{id_part}_generate_box", elem_classes="generate-box"): - interrupt = gr.Button('Stop', elem_id=f"{id_part}_interrupt", elem_classes="generate-box-interrupt") - skip = gr.Button('Skip', elem_id=f"{id_part}_skip", elem_classes="generate-box-skip") + with gr.Row(elem_id=f"{id_part}_generate_line1"): submit = gr.Button('Generate', elem_id=f"{id_part}_generate", variant='primary') - skip.click(fn=lambda: modules.shared.state.skip(), inputs=[], outputs=[]) + with gr.Row(elem_id=f"{id_part}_generate_line2"): + interrupt = gr.Button('Stop', elem_id=f"{id_part}_interrupt") interrupt.click(fn=lambda: modules.shared.state.interrupt(), inputs=[], outputs=[]) + skip = gr.Button('Skip', elem_id=f"{id_part}_skip") + skip.click(fn=lambda: modules.shared.state.skip(), inputs=[], outputs=[]) + pause = gr.Button('Pause', elem_id=f"{id_part}_pause") + pause.click(fn=lambda: modules.shared.state.pause(), inputs=[], outputs=[]) with gr.Row(elem_id=f"{id_part}_tools"): paste = ToolButton(value=paste_symbol, elem_id="paste") clear_prompt_button = ToolButton(value=clear_prompt_symbol, elem_id=f"{id_part}_clear_prompt") extra_networks_button = ToolButton(value=extra_networks_symbol, elem_id=f"{id_part}_extra_networks") prompt_style_apply = ToolButton(value=apply_style_symbol, elem_id=f"{id_part}_style_apply") save_style = ToolButton(value=save_style_symbol, elem_id=f"{id_part}_style_create") + clear_prompt_button.click(fn=lambda *x: x, _js="confirm_clear_prompt", inputs=[prompt, negative_prompt], outputs=[prompt, negative_prompt]) + with gr.Row(elem_id=f"{id_part}_counters"): token_counter = gr.HTML(value="0/75", elem_id=f"{id_part}_token_counter", elem_classes=["token-counter"]) token_button = gr.Button(visible=False, elem_id=f"{id_part}_token_button") negative_token_counter = gr.HTML(value="0/75", elem_id=f"{id_part}_negative_token_counter", elem_classes=["token-counter"]) negative_token_button = gr.Button(visible=False, elem_id=f"{id_part}_negative_token_button") - clear_prompt_button.click(fn=lambda *x: x, _js="confirm_clear_prompt", inputs=[prompt, negative_prompt], outputs=[prompt, negative_prompt]) with gr.Row(elem_id=f"{id_part}_styles_row"): prompt_styles = gr.Dropdown(label="Styles", elem_id=f"{id_part}_styles", choices=[k for k, v in modules.shared.prompt_styles.styles.items()], value=[], multiselect=True) create_refresh_button(prompt_styles, modules.shared.prompt_styles.reload, lambda: {"choices": [k for k, v in modules.shared.prompt_styles.styles.items()]}, f"refresh_{id_part}_styles") diff --git a/modules/ui_postprocessing.py b/modules/ui_postprocessing.py index bd928e277..990b05e23 100644 --- a/modules/ui_postprocessing.py +++ b/modules/ui_postprocessing.py @@ -39,9 +39,9 @@ def create_ui(): with gr.Row(elem_id=f"{id_part}_generate_box", elem_classes="generate-box"): submit = gr.Button('Generate', elem_id=f"{id_part}_generate", variant='primary') interrupt = gr.Button('Stop', elem_id=f"{id_part}_interrupt", variant='secondary') + interrupt.click(fn=lambda: shared.state.interrupt(), inputs=[], outputs=[]) skip = gr.Button('Skip', elem_id=f"{id_part}_skip", variant='secondary') skip.click(fn=lambda: shared.state.skip(), inputs=[], outputs=[]) - interrupt.click(fn=lambda: shared.state.interrupt(), inputs=[], outputs=[]) result_images, generation_info, html_info, html_log = ui_common.create_output_panel("extras", shared.opts.outdir_extras_samples) gr.HTML('File metadata') exif_info = gr.HTML(elem_id="pnginfo_html_info") From 2e7aa7eb15d964a407fd087b09488efad599248d Mon Sep 17 00:00:00 2001 From: Alexander Brown Date: Tue, 30 May 2023 12:50:41 -0700 Subject: [PATCH 257/282] Raise exception when failing to find diffuser model --- modules/sd_models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/sd_models.py b/modules/sd_models.py index 5a5737bec..98621e90f 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -50,8 +50,9 @@ class CheckpointInfo: else: # TODO Diffusers repo = [r for r in modelloader.diffuser_repos if filename == r['filename']] if len(repo) == 0: - shared.log.error(f'Cannot find diffuser model: {filename}') - return + error_message = f'Cannot find diffuser model: {filename}' + shared.log.error(error_message) + raise ValueError(error_message) self.name = repo[0]['name'] self.hash = repo[0]['hash'][:8] self.sha256 = repo[0]['hash'] From 8f4bc4df08c48e70ea66e16c76151f1052f034c1 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 31 May 2023 12:44:35 -0400 Subject: [PATCH 258/282] update changelog --- CHANGELOG.md | 5 +++++ javascript/ui.js | 6 ++++-- modules/txt2img.py | 7 ++++--- modules/ui.py | 3 +-- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1846b847b..1ad309e3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log for SD.Next +## Update for 05/31/2023 + +- add pause option next to stop/skip +- redesign action box to be uniform accross all themes + ## Update for 05/30/2023 Another bigger one...And more to come in the next few days... diff --git a/javascript/ui.js b/javascript/ui.js index 7a2bd837d..24c623fc4 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -119,13 +119,14 @@ function create_submit_args(args) { } function showSubmitButtons(tabname, show) { - gradioApp().getElementById(`${tabname}_interrupt`).style.display = show ? 'none' : 'block'; - gradioApp().getElementById(`${tabname}_skip`).style.display = show ? 'none' : 'block'; + // gradioApp().getElementById(`${tabname}_interrupt`).style.display = show ? 'none' : 'block'; + // gradioApp().getElementById(`${tabname}_skip`).style.display = show ? 'none' : 'block'; // gradioApp().getElementById(tabname+'_interrupt').style.display = "block" // gradioApp().getElementById(tabname+'_skip').style.display = "block" } function submit(...args) { + console.log('submit txt2img:', args); rememberGallerySelection('txt2img_gallery'); showSubmitButtons('txt2img', false); const id = randomId(); @@ -137,6 +138,7 @@ function submit(...args) { } function submit_img2img(...args) { + console.log('submit img2img:', args); rememberGallerySelection('img2img_gallery'); showSubmitButtons('img2img', false); const id = randomId(); diff --git a/modules/txt2img.py b/modules/txt2img.py index 5b0d3309e..7a55da30c 100644 --- a/modules/txt2img.py +++ b/modules/txt2img.py @@ -9,15 +9,16 @@ from modules.memstats import memory_stats def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, steps: int, sampler_index: int, restore_faces: bool, tiling: bool, n_iter: int, batch_size: int, cfg_scale: float, clip_skip: int, seed: int, subseed: int, subseed_strength: float, seed_resize_from_h: int, seed_resize_from_w: int, seed_enable_extras: bool, height: int, width: int, enable_hr: bool, denoising_strength: float, hr_scale: float, hr_upscaler: str, hr_second_pass_steps: int, hr_resize_x: int, hr_resize_y: int, override_settings_texts, *args): # pylint: disable=unused-argument - if shared.sd_model is None: - shared.log.warning('Model not loaded') - return shared.log.debug(f'txt2img: id_task={id_task}|prompt={prompt}|negative_prompt={negative_prompt}|prompt_styles={prompt_styles}|steps={steps}|sampler_index={sampler_index}|restore_faces={restore_faces}|tiling={tiling}|n_iter={n_iter}|batch_size={batch_size}|cfg_scale={cfg_scale}|clip_skip={clip_skip}|seed={seed}|subseed={subseed}|subseed_strength={subseed_strength}|seed_resize_from_h={seed_resize_from_h}|seed_resize_from_w={seed_resize_from_w}|seed_enable_extras={seed_enable_extras}|height={height}|width={width}|enable_hr={enable_hr}|denoising_strength={denoising_strength}|hr_scale={hr_scale}|hr_upscaler={hr_upscaler}|hr_second_pass_steps={hr_second_pass_steps}|hr_resize_x={hr_resize_x}|hr_resize_y={hr_resize_y}|override_settings_texts={override_settings_texts}args={args}') if sampler_index is None: shared.log.warning('Selected sampler is not enabled') sampler_index = 0 override_settings = create_override_settings_dict(override_settings_texts) + if shared.sd_model is None: + shared.log.warning('Model not loaded') + return + p = StableDiffusionProcessingTxt2Img( sd_model=shared.sd_model, outpath_samples=shared.opts.outdir_samples or shared.opts.outdir_txt2img_samples, diff --git a/modules/ui.py b/modules/ui.py index 5c4f177f0..788b0bef2 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -437,7 +437,7 @@ def create_ui(): clip_skip, seed, subseed, subseed_strength, seed_resize_from_h, seed_resize_from_w, - seed_checkbox, # seed_enable_extras + seed_checkbox, height, width, enable_hr, @@ -449,7 +449,6 @@ def create_ui(): hr_resize_y, override_settings, ] + custom_inputs, - outputs=[ txt2img_gallery, generation_info, From 364df7036ed7d0cda0c373dae13c182716129e12 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 1 Jun 2023 11:43:28 -0400 Subject: [PATCH 259/282] redo progressbar --- extensions-builtin/sd-webui-controlnet | 2 +- javascript/black-orange.css | 2 +- javascript/extensions.js | 4 - javascript/progressbar.js | 114 +++++++++++-------------- javascript/style.css | 4 +- javascript/textualInversion.js | 3 +- javascript/ui.js | 25 ++---- modules/img2img.py | 12 +++ modules/lora | 2 +- modules/processing.py | 10 ++- modules/progress.py | 10 ++- modules/ui.py | 4 +- modules/ui_common.py | 2 +- 13 files changed, 88 insertions(+), 106 deletions(-) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 7b707dc1f..4f0f26b7c 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 7b707dc1f03c3070f8a506ff70a2b68173d57bb5 +Subproject commit 4f0f26b7c6239e1d816f24516c4a654e6efe94c3 diff --git a/javascript/black-orange.css b/javascript/black-orange.css index c45c0f9a5..a42ecdaef 100644 --- a/javascript/black-orange.css +++ b/javascript/black-orange.css @@ -75,7 +75,7 @@ svg.feather.feather-image, .feather .feather-image { display: none } #txt2img_prompt, #txt2img_neg_prompt, #img2img_prompt, #img2img_neg_prompt { background-color: black; box-shadow: 4px 4px 4px 0px #333333 !important; } #txt2img_prompt > label > textarea, #txt2img_neg_prompt > label > textarea, #img2img_prompt > label > textarea, #img2img_neg_prompt > label > textarea { font-size: 1.2rem; } #img2img_settings { min-width: calc(2 * var(--left-column)); max-width: calc(2 * var(--left-column)); background-color: #111111; padding-top: 16px; } -#interrogate, #deepbooru { margin: 16px 0px 16px 0px; max-width: 100px; max-height: 74px; font-weight: normal; font-size: 14px; } +#interrogate, #deepbooru { margin: 0 0px 10px 0px; max-width: 80px; max-height: 80px; font-weight: normal; font-size: 0.95em; } #lightboxModal { background-color: rgba(20, 20, 20, 0.8) } #quicksettings .gr-button-tool { font-size: 1.6rem; box-shadow: none; margin-left: -20px; margin-top: -2px; height: 2.4em; } #quicksettings > div, #quicksettings > fieldset { min-width: 24em; max-width: 26em; line-height: 2em; } diff --git a/javascript/extensions.js b/javascript/extensions.js index d59a7d059..b827299f8 100644 --- a/javascript/extensions.js +++ b/javascript/extensions.js @@ -16,11 +16,7 @@ function extensions_check(info, extensions_disabled_list, search_text, sort_colu gradioApp().querySelectorAll('#extensions input[type="checkbox"]').forEach((x) => { if (x.name.startsWith('enable_') && !x.checked) disable.push(x.name.substring(7)); }); - // gradioApp().querySelectorAll('#extensions .extension_status').forEach((x) => { - // x.innerHTML = 'Loading...'; - // }); const id = randomId(); - // requestProgress(id, gradioApp().getElementById('extensions_installed_top'), null, null, null, false); return [id, JSON.stringify(disable), search_text, sort_column]; } diff --git a/javascript/progressbar.js b/javascript/progressbar.js index 108f36ea0..404645f4b 100644 --- a/javascript/progressbar.js +++ b/javascript/progressbar.js @@ -1,4 +1,6 @@ /* global opts */ +let lastState = {}; + function rememberGallerySelection(id_gallery) {} function getGallerySelectedIndex(id_gallery) {} @@ -36,98 +38,80 @@ function formatTime(secs) { return `${Math.floor(secs)}s`; } -function setTitle(progress) { - let title = 'SD.Next'; - if (progress) title += ` ${progress.split(' ')[0].trim()}`; - if (document.title != title) document.title = title; +function checkPaused(state) { + lastState.paused = state ? !state : !lastState.paused; + document.getElementById('txt2img_pause').innerText = lastState.paused ? 'Resume' : 'Pause' + document.getElementById('img2img_pause').innerText = lastState.paused ? 'Resume' : 'Pause' +} + +function setProgress(res) { + elements = ['txt2img_generate', 'img2img_generate', 'extras_generate'] + perc = res ? `${Math.round((res?.progress || 0) * 100.0)}%` : '' + eta = res?.paused ? ' Paused' : ` ETA: ${Math.round(res?.eta || 0)}s`; + document.title = 'SD.Next ' + perc; + for (elId of elements) { + el = document.getElementById(elId); + el.innerText = res + ? perc + eta + : 'Generate'; + el.style.background = res + ? `linear-gradient(to right, var(--primary-500) 0%, var(--primary-800) ${perc}, var(--neutral-700) ${perc})` + : 'var(--button-primary-background-fill)' + } } function randomId() { return `task(${Math.random().toString(36).slice(2, 7)}${Math.random().toString(36).slice(2, 7)}${Math.random().toString(36).slice(2, 7)})`; } -// starts sending progress requests to "/internal/progress" uri, creating progressbar above progressbarContainer element and -// preview inside gallery element. Cleans up all created stuff when the task is over and calls atEnd. -// calls onProgress every time there is a progress update -function requestProgress(id_task, progressbarContainer, gallery, atEnd = null, onProgress = null, once = false) { +// starts sending progress requests to "/internal/progress" uri, creating progressbar above progressbarContainer element and preview inside gallery element +// Cleans up all created stuff when the task is over and calls atEnd. calls onProgress every time there is a progress update +function requestProgress(id_task, gallery, atEnd = null, onProgress = null, once = false) { + localStorage.setItem('task', id_task); let hasStarted = false; const dateStart = new Date(); const prevProgress = null; - const parentProgressbar = progressbarContainer.parentNode; const parentGallery = gallery ? gallery.parentNode : null; - const divProgress = document.createElement('div'); - divProgress.className = 'progressDiv'; - divProgress.id = 'progressbar'; - divProgress.style.display = opts.show_progressbar ? 'block' : 'none'; - const divInner = document.createElement('div'); - divInner.className = 'progress'; - divProgress.appendChild(divInner); - parentProgressbar.insertBefore(divProgress, progressbarContainer); - localStorage.setItem('task', id_task); let livePreview; + const img = new Image(); if (parentGallery) { livePreview = document.createElement('div'); livePreview.className = 'livePreview'; parentGallery.insertBefore(livePreview, gallery); + const rect = gallery.getBoundingClientRect(); + if (rect.width) { + livePreview.style.width = `${rect.width}px`; + livePreview.style.height = `${rect.height}px`; + } + img.onload = function () { + livePreview.appendChild(img); + if (livePreview.childElementCount > 2) livePreview.removeChild(livePreview.firstElementChild); + }; } - const removeProgressBar = function () { + const done = function () { console.debug('task end: ', id_task); localStorage.removeItem('task'); - setTitle(''); - if (divProgress) parentProgressbar.removeChild(divProgress); - if (parentGallery) parentGallery.removeChild(livePreview); + setProgress(); + if (parentGallery && livePreview) parentGallery.removeChild(livePreview); + checkPaused(true); if (atEnd) atEnd(); }; - const fun = function (id_task, id_live_preview) { + const start = function (id_task, id_live_preview) { request('./internal/progress', { id_task, id_live_preview }, (res) => { + lastState = res; const elapsedFromStart = (new Date() - dateStart) / 1000; - if (res.completed) { - removeProgressBar(); - return; - } - var rect = progressbarContainer.getBoundingClientRect(); - if (rect.width) divProgress.style.width = `${rect.width}px`; - progressText = ''; - divInner.style.width = `${(res.progress || 0) * 100.0}%`; - divInner.style.background = res.progress ? '' : 'transparent'; - if (res.progress > 0) progressText = `${((res.progress || 0) * 100.0).toFixed(0)}%`; - if (res.eta) progressText += ` ETA: ${formatTime(res.eta)}`; - setTitle(progressText); - if (res.textinfo && res.textinfo.indexOf('\n') == -1) progressText = `${res.textinfo} ${progressText}`; - divInner.textContent = progressText; hasStarted |= res.active; - if (!res.active && (hasStarted || once)) { - removeProgressBar(); + if (res.completed || (!res.active && (hasStarted || once)) || (elapsedFromStart > 30 && !res.queued && res.progress == prevProgress)) { + done(); return; } - if (res.completed) { - removeProgressBar(); - return; - } - if (elapsedFromStart > 30 && !res.queued && res.progress == prevProgress) { - removeProgressBar(); - return; - } - if (res.live_preview && gallery) { - var rect = gallery.getBoundingClientRect(); - if (rect.width) { - livePreview.style.width = `${rect.width}px`; - livePreview.style.height = `${rect.height}px`; - } - const img = new Image(); - img.onload = function () { - livePreview.appendChild(img); - if (livePreview.childElementCount > 2) livePreview.removeChild(livePreview.firstElementChild); - }; - img.src = res.live_preview; - } + setProgress(res); + if (res.live_preview && gallery) img.src = res.live_preview; if (onProgress) onProgress(res); - setTimeout(() => fun(id_task, res.id_live_preview), opts.live_preview_refresh_period || 250); - }, () => { - removeProgressBar(); - }); + setTimeout(() => start(id_task, res.id_live_preview), opts.live_preview_refresh_period || 250); + }, done); }; - fun(id_task, 0); + start(id_task, 0); } diff --git a/javascript/style.css b/javascript/style.css index 41dbd25a1..89e4192ac 100644 --- a/javascript/style.css +++ b/javascript/style.css @@ -102,9 +102,9 @@ footer { display: none !important; } #txt2img_gallery img, #img2img_gallery img, #extras_gallery img { object-fit: scale-down; width: -webkit-fill-available !important; } #txt2img_actions_column, #img2img_actions_column { gap: 0.5em; } -#txt2img_generate_line1 > button, #img2img_generate_line1 > button { height: 2.2em; line-height: 0; } +#txt2img_generate_box > button, #img2img_generate_box > button { height: 2.2em; line-height: 0; } +#txt2img_generate_line2, #img2img_generate_line2 { display: flex; } #txt2img_generate_line2 > button, #img2img_generate_line2 > button, #extras_generate_box > button { height: 2.2em; line-height: 0; min-width: unset; display: block !important; } -#txt2img_generate_line2 { display: flex; } #txt2img_tools > div, #img2img_tools > div { justify-content: space-around; margin-top: 0.5em; margin-bottom: 0em; } #txt2img_tools > div > button, #img2img_tools > div > button { scale: 120%; } #refresh_txt2img_styles, #refresh_img2img_styles { height: 2.46em; margin-left: -8px; } diff --git a/javascript/textualInversion.js b/javascript/textualInversion.js index db73b03d9..b026474af 100644 --- a/javascript/textualInversion.js +++ b/javascript/textualInversion.js @@ -2,8 +2,7 @@ function start_training_textual_inversion() { gradioApp().querySelector('#ti_error').innerHTML='' var id = randomId() const onProgress = (progress) => gradioApp().getElementById('ti_progress').innerHTML = progress.textinfo; - // requestProgress(id_task, progressbarContainer, gallery, atEnd = null, onProgress = null, once = false) { - requestProgress(id, gradioApp().getElementById('ti_output'), gradioApp().getElementById('ti_gallery'), null, onProgress, false) + requestProgress(id, gradioApp().getElementById('ti_gallery'), null, onProgress, false) var res = args_to_array(arguments) res[0] = id return res diff --git a/javascript/ui.js b/javascript/ui.js index 24c623fc4..fe0e06a8a 100644 --- a/javascript/ui.js +++ b/javascript/ui.js @@ -118,20 +118,11 @@ function create_submit_args(args) { return res; } -function showSubmitButtons(tabname, show) { - // gradioApp().getElementById(`${tabname}_interrupt`).style.display = show ? 'none' : 'block'; - // gradioApp().getElementById(`${tabname}_skip`).style.display = show ? 'none' : 'block'; - // gradioApp().getElementById(tabname+'_interrupt').style.display = "block" - // gradioApp().getElementById(tabname+'_skip').style.display = "block" -} - function submit(...args) { console.log('submit txt2img:', args); rememberGallerySelection('txt2img_gallery'); - showSubmitButtons('txt2img', false); const id = randomId(); - const atEnd = () => showSubmitButtons('txt2img', true); - requestProgress(id, gradioApp().getElementById('txt2img_gallery_container'), gradioApp().getElementById('txt2img_gallery'), atEnd); + requestProgress(id, gradioApp().getElementById('txt2img_gallery')); const res = create_submit_args(args); res[0] = id; return res; @@ -140,10 +131,8 @@ function submit(...args) { function submit_img2img(...args) { console.log('submit img2img:', args); rememberGallerySelection('img2img_gallery'); - showSubmitButtons('img2img', false); const id = randomId(); - const atEnd = () => showSubmitButtons('img2img', true); - requestProgress(id, gradioApp().getElementById('img2img_gallery_container'), gradioApp().getElementById('img2img_gallery'), atEnd); + requestProgress(id, gradioApp().getElementById('img2img_gallery')); const res = create_submit_args(args); res[0] = id; res[1] = get_tab_index('mode_img2img'); @@ -152,7 +141,6 @@ function submit_img2img(...args) { function modelmerger(...args) { const id = randomId(); - requestProgress(id, gradioApp().getElementById('modelmerger_results_panel'), null); const res = create_submit_args(args); res[0] = id; return res; @@ -429,17 +417,14 @@ function reconnect_ui() { const api_logo = Array.from(gradioApp().querySelectorAll('img')).filter((el) => el?.src?.endsWith('api-logo.svg')); if (api_logo.length > 0) api_logo[0].remove(); - const el1 = gradioApp().getElementById('txt2img_gallery_container'); - const el2 = gradioApp().getElementById('txt2img_gallery'); + const gallery = gradioApp().getElementById('txt2img_gallery'); const task_id = localStorage.getItem('task'); - if (!el1 || !el2) return; + if (!gallery) return; clearInterval(start_check); if (task_id) { console.debug('task check:', task_id); rememberGallerySelection('txt2img_gallery'); - showSubmitButtons('txt2img', false); - const atEnd = () => showSubmitButtons('txt2img', true); - requestProgress(task_id, el1, el2, atEnd, null, true); + requestProgress(task_id, gallery, null, null, true); } const sd_model = gradioApp().getElementById('setting_sd_model_checkpoint'); diff --git a/modules/img2img.py b/modules/img2img.py index 0e0b9bf8c..f1f77c016 100644 --- a/modules/img2img.py +++ b/modules/img2img.py @@ -82,17 +82,25 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s is_batch = mode == 5 if mode == 0: # img2img + if init_img is None: + return image = init_img.convert("RGB") mask = None elif mode == 1: # img2img sketch + if sketch is None: + return image = sketch.convert("RGB") mask = None elif mode == 2: # inpaint + if init_img_with_mask is None: + return image, mask = init_img_with_mask["image"], init_img_with_mask["mask"] alpha_mask = ImageOps.invert(image.split()[-1]).convert('L').point(lambda x: 255 if x > 0 else 0, mode='1') mask = ImageChops.lighter(alpha_mask, mask.convert('L')).convert('L') image = image.convert("RGB") elif mode == 3: # inpaint sketch + if inpaint_color_sketch is None: + return image = inpaint_color_sketch orig = inpaint_color_sketch_orig or inpaint_color_sketch pred = np.any(np.array(image) != np.array(orig), axis=-1) @@ -102,6 +110,8 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s image = Image.composite(image.filter(blur), orig, mask.filter(blur)) image = image.convert("RGB") elif mode == 4: # inpaint upload mask + if init_img_inpaint is None: + return image = init_img_inpaint mask = init_mask_inpaint else: @@ -113,6 +123,8 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s assert image, "Can't scale by because no image is selected" width = int(image.width * scale_by) height = int(image.height * scale_by) + else: + return assert 0. <= denoising_strength <= 1., 'can only work with strength in [0.0, 1.0]' diff --git a/modules/lora b/modules/lora index 8a5e3904a..5931948ad 160000 --- a/modules/lora +++ b/modules/lora @@ -1 +1 @@ -Subproject commit 8a5e3904a07362bf380b27c65241849b57502f91 +Subproject commit 5931948adbf0f76017ecc13e716c68a690097c16 diff --git a/modules/processing.py b/modules/processing.py index 60fd93a2c..3e0ed9fd5 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -926,9 +926,14 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): shared.state.nextjob() img2img_sampler_name = self.sampler_name force_latent_upscaler = shared.opts.data.get('xyz_fallback_sampler') - if self.sampler_name in ['PLMS']: - img2img_sampler_name = force_latent_upscaler if force_latent_upscaler != 'None' else shared.opts.fallback_sampler # PLMS does not support img2img, use fallback instead + if force_latent_upscaler != 'None' and force_latent_upscaler != 'PLMS': + img2img_sampler_name = force_latent_upscaler + elif shared.opts.fallback_sampler != 'PLMS': + img2img_sampler_name = shared.opts.fallback_sampler + else: + img2img_sampler_name = 'UniPC' self.sampler = sd_samplers.create_sampler(img2img_sampler_name, self.sd_model) + print('HERE', force_latent_upscaler, img2img_sampler_name, self.sampler) samples = samples[:, :, self.truncate_y//2:samples.shape[2]-(self.truncate_y+1)//2, self.truncate_x//2:samples.shape[3]-(self.truncate_x+1)//2] noise = create_random_tensors(samples.shape[1:], seeds=seeds, subseeds=subseeds, subseed_strength=subseed_strength, p=self) # GC now before running the next img2img to prevent running out of memory @@ -942,7 +947,6 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): # clean patch done by first pass. (clobbering the first patch might be fine? this might be excessive) tomesd.remove_patch(self.sd_model) log.debug('Temporarily removed token merging optimizations in preparation for next pass') - sd_models.apply_token_merging(sd_model=self.sd_model, hr=True) log.debug('Applied token merging for high-res pass') samples = self.sampler.sample_img2img(self, samples, noise, conditioning, unconditional_conditioning, steps=self.hr_second_pass_steps or self.steps, image_conditioning=image_conditioning) diff --git a/modules/progress.py b/modules/progress.py index 09e282353..a6fb504a5 100644 --- a/modules/progress.py +++ b/modules/progress.py @@ -42,9 +42,10 @@ class ProgressRequest(BaseModel): id_live_preview: int = Field(default=-1, title="Live preview image ID", description="id of last received last preview image") -class ProgressResponse(BaseModel): +class InternalProgressResponse(BaseModel): active: bool = Field(title="Whether the task is being worked on right now") queued: bool = Field(title="Whether the task is in queue") + paused: bool = Field(title="Whether the task is paused") completed: bool = Field(title="Whether the task has already finished") progress: float = Field(default=None, title="Progress", description="The progress with a range of 0 to 1") eta: float = Field(default=None, title="ETA in secs") @@ -54,15 +55,16 @@ class ProgressResponse(BaseModel): def setup_progress_api(app): - return app.add_api_route("/internal/progress", progressapi, methods=["POST"], response_model=ProgressResponse) + return app.add_api_route("/internal/progress", progressapi, methods=["POST"], response_model=InternalProgressResponse) def progressapi(req: ProgressRequest): active = req.id_task == current_task queued = req.id_task in pending_tasks completed = req.id_task in finished_tasks + paused = shared.state.paused if not active: - return ProgressResponse(active=active, queued=queued, completed=completed, id_live_preview=-1, textinfo="Queued..." if queued else "Waiting...") + return InternalProgressResponse(active=active, queued=queued, paused=paused, completed=completed, id_live_preview=-1, textinfo="Queued..." if queued else "Waiting...") progress = 0 job_count, job_no = shared.state.job_count, shared.state.job_no sampling_steps, sampling_step = shared.state.sampling_steps, shared.state.sampling_step @@ -88,4 +90,4 @@ def progressapi(req: ProgressRequest): live_preview = None else: live_preview = None - return ProgressResponse(active=active, queued=queued, completed=completed, progress=progress, eta=eta, live_preview=live_preview, id_live_preview=id_live_preview, textinfo=shared.state.textinfo) + return InternalProgressResponse(active=active, queued=queued, paused=paused, completed=completed, progress=progress, eta=eta, live_preview=live_preview, id_live_preview=id_live_preview, textinfo=shared.state.textinfo) diff --git a/modules/ui.py b/modules/ui.py index 788b0bef2..b0686d10f 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -237,7 +237,7 @@ def create_toprow(is_img2img): button_interrogate = gr.Button('Interrogate\nCLIP', elem_id="interrogate") button_deepbooru = gr.Button('Interrogate\nDeepBooru', elem_id="deepbooru") with gr.Column(scale=1, elem_id=f"{id_part}_actions_column"): - with gr.Row(elem_id=f"{id_part}_generate_line1"): + with gr.Row(elem_id=f"{id_part}_generate_box"): submit = gr.Button('Generate', elem_id=f"{id_part}_generate", variant='primary') with gr.Row(elem_id=f"{id_part}_generate_line2"): interrupt = gr.Button('Stop', elem_id=f"{id_part}_interrupt") @@ -245,7 +245,7 @@ def create_toprow(is_img2img): skip = gr.Button('Skip', elem_id=f"{id_part}_skip") skip.click(fn=lambda: modules.shared.state.skip(), inputs=[], outputs=[]) pause = gr.Button('Pause', elem_id=f"{id_part}_pause") - pause.click(fn=lambda: modules.shared.state.pause(), inputs=[], outputs=[]) + pause.click(fn=lambda: modules.shared.state.pause(), _js='checkPaused', inputs=[], outputs=[]) with gr.Row(elem_id=f"{id_part}_tools"): paste = ToolButton(value=paste_symbol, elem_id="paste") clear_prompt_button = ToolButton(value=clear_prompt_symbol, elem_id=f"{id_part}_clear_prompt") diff --git a/modules/ui_common.py b/modules/ui_common.py index e5582086d..c399be619 100644 --- a/modules/ui_common.py +++ b/modules/ui_common.py @@ -161,7 +161,7 @@ def create_output_panel(tabname, outdir): html_log = gr.HTML(elem_id=f'html_log_{tabname}') generation_info = gr.Textbox(visible=False, elem_id=f'generation_info_{tabname}') generation_info_button = gr.Button(visible=False, elem_id=f"{tabname}_generation_info_button") - generation_info_button.click(fn=update_generation_info, _js="function(x, y, z){ return [x, y, selected_gallery_index()] }", show_progress=False, + generation_info_button.click(fn=update_generation_info, _js="(x, y, z) => [x, y, selected_gallery_index()]", show_progress=False, inputs=[generation_info, html_info, html_info], outputs=[html_info, html_info], ) From 02c9640fa538b993af589b1158f18f3ebb71c43f Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 1 Jun 2023 15:44:38 -0400 Subject: [PATCH 260/282] enhance image saving --- CHANGELOG.md | 3 +- javascript/edit-attention.js | 4 -- .../prompt-bracket-checker.js | 0 javascript/style.css | 2 + modules/api/api.py | 53 +++++++++++-------- modules/images.py | 3 +- modules/img2img.py | 2 - modules/processing.py | 4 +- modules/progress.py | 18 +++---- modules/shared.py | 4 +- modules/ui_extra_networks.py | 15 +----- 11 files changed, 50 insertions(+), 58 deletions(-) rename {extensions-builtin/prompt-bracket-checker/javascript => javascript}/prompt-bracket-checker.js (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ad309e3f..609538753 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,9 @@ ## Update for 05/31/2023 -- add pause option next to stop/skip - redesign action box to be uniform accross all themes +- add pause option next to stop/skip +- redesign progress bar ## Update for 05/30/2023 diff --git a/javascript/edit-attention.js b/javascript/edit-attention.js index 059685fc0..467a99842 100644 --- a/javascript/edit-attention.js +++ b/javascript/edit-attention.js @@ -79,16 +79,12 @@ function keyupEditAttention(event) { weight = parseFloat(weight.toPrecision(12)); if (String(weight).length === 1) weight += '.0'; - console.log('HERE', closeCharacter, weight); if (closeCharacter == ')' && weight == 1) { - console.log('HERE2'); text = text.slice(0, selectionStart - 1) + text.slice(selectionStart, selectionEnd) + text.slice(selectionEnd + 5); selectionStart--; selectionEnd--; - console.log('HERE2', text); } else { text = text.slice(0, selectionEnd + 1) + weight + text.slice(selectionEnd + 1 + end - 1); - console.log('HERE3', text); } target.focus(); diff --git a/extensions-builtin/prompt-bracket-checker/javascript/prompt-bracket-checker.js b/javascript/prompt-bracket-checker.js similarity index 100% rename from extensions-builtin/prompt-bracket-checker/javascript/prompt-bracket-checker.js rename to javascript/prompt-bracket-checker.js diff --git a/javascript/style.css b/javascript/style.css index 89e4192ac..c564b512c 100644 --- a/javascript/style.css +++ b/javascript/style.css @@ -101,6 +101,8 @@ footer { display: none !important; } } #txt2img_gallery img, #img2img_gallery img, #extras_gallery img { object-fit: scale-down; width: -webkit-fill-available !important; } + +#txt2img_generate_box, #img2img_generate_box { gap: 0.5em; flex-wrap: wrap-reverse; } #txt2img_actions_column, #img2img_actions_column { gap: 0.5em; } #txt2img_generate_box > button, #img2img_generate_box > button { height: 2.2em; line-height: 0; } #txt2img_generate_line2, #img2img_generate_line2 { display: flex; } diff --git a/modules/api/api.py b/modules/api/api.py index 38a43c63f..9f0fa6573 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -60,28 +60,39 @@ def decode_base64_to_image(encoding): shared.log.warning(f'API cannot decode image: {e}') raise HTTPException(status_code=500, detail="Invalid encoded image") from e -def encode_pil_to_base64(image): - with io.BytesIO() as output_bytes: - if shared.opts.samples_format.lower() == 'png': - use_metadata = False - encoded_metadata = PngImagePlugin.PngInfo() - for k, v in image.info.items(): - if isinstance(k, str) and isinstance(v, str): - encoded_metadata.add_text(k, v) - use_metadata = True - image.save(output_bytes, format="PNG", pnginfo=(encoded_metadata if use_metadata else None), quality=shared.opts.jpeg_quality) - elif shared.opts.samples_format.lower() in ("jpg", "jpeg", "webp"): - parameters = image.info.get('parameters', None) - exif_bytes = piexif.dump({ - "Exif": { piexif.ExifIFD.UserComment: piexif.helper.UserComment.dump(parameters or "", encoding="unicode") } - }) - if shared.opts.samples_format.lower() in ("jpg", "jpeg"): - image.save(output_bytes, format="JPEG", exif = exif_bytes, quality=shared.opts.jpeg_quality) - else: - image.save(output_bytes, format="WEBP", exif = exif_bytes, quality=shared.opts.jpeg_quality) - else: - raise HTTPException(status_code=500, detail="Invalid image format") +def save_image(image, fn, ext): + # actual save + parameters = image.info.get('parameters', None) + image_format = Image.registered_extensions()[f'.{ext}'] + if image_format == 'PNG': + pnginfo_data = PngImagePlugin.PngInfo() + for k, v in image.info.items(): + pnginfo_data.add_text(k, str(v)) + image.save(fn, format=image_format, quality=shared.opts.jpeg_quality, pnginfo=pnginfo_data) + elif image_format == 'JPEG': + if image.mode == 'RGBA': + shared.log.warning('Saving RGBA image as JPEG: Alpha channel will be lost') + image = image.convert("RGB") + elif image.mode == 'I;16': + image = image.point(lambda p: p * 0.0038910505836576).convert("L") + exif_bytes = piexif.dump({ "Exif": { piexif.ExifIFD.UserComment: piexif.helper.UserComment.dump(parameters or "", encoding="unicode") } }) + image.save(fn, format=image_format, quality=shared.opts.jpeg_quality, exif=exif_bytes) + elif image_format == 'WEBP': + if image.mode == 'I;16': + image = image.point(lambda p: p * 0.0038910505836576).convert("RGB") + exif_bytes = piexif.dump({ "Exif": { piexif.ExifIFD.UserComment: piexif.helper.UserComment.dump(parameters or "", encoding="unicode") } }) + image.save(fn, format=image_format, quality=shared.opts.jpeg_quality, lossless=shared.opts.webp_lossless, exif=exif_bytes) + else: + # shared.log.warning(f'Unrecognized image format: {extension} attempting save as {image_format}') + image.save(fn, format=image_format, quality=shared.opts.jpeg_quality) + + +def encode_pil_to_base64(image): + # TODO jpeg + print('HERE1', vars(image)) + with io.BytesIO() as output_bytes: + save_image(image, output_bytes, shared.opts.samples_format) bytes_data = output_bytes.getvalue() return base64.b64encode(bytes_data) diff --git a/modules/images.py b/modules/images.py index 40c369652..526490256 100644 --- a/modules/images.py +++ b/modules/images.py @@ -431,6 +431,7 @@ def atomically_save_image(): while True: image, filename, extension, params, exifinfo_data, txt_fullfn = save_queue.get() fn = filename + extension + filename = filename.strip() image_format = Image.registered_extensions()[extension] shared.log.debug(f'Saving image: {image_format} {fn} {image.size}') # actual save @@ -453,7 +454,7 @@ def atomically_save_image(): exif_bytes = piexif.dump({ "Exif": { piexif.ExifIFD.UserComment: piexif.helper.UserComment.dump(exifinfo_data or "", encoding="unicode") } }) image.save(fn, format=image_format, quality=shared.opts.jpeg_quality, lossless=shared.opts.webp_lossless, exif=exif_bytes) else: - shared.log.warning(f'Unrecognized image format: {extension} attempting save as {image_format}') + # shared.log.warning(f'Unrecognized image format: {extension} attempting save as {image_format}') image.save(fn, format=image_format, quality=shared.opts.jpeg_quality) # additional metadata saved in files if shared.opts.save_txt and len(exifinfo_data) > 0: diff --git a/modules/img2img.py b/modules/img2img.py index f1f77c016..421c47957 100644 --- a/modules/img2img.py +++ b/modules/img2img.py @@ -123,8 +123,6 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s assert image, "Can't scale by because no image is selected" width = int(image.width * scale_by) height = int(image.height * scale_by) - else: - return assert 0. <= denoising_strength <= 1., 'can only work with strength in [0.0, 1.0]' diff --git a/modules/processing.py b/modules/processing.py index 3e0ed9fd5..b2fe38b8a 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -713,7 +713,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: p.restore_faces = False info=infotext(n, i) p.restore_faces = orig - images.save_image(Image.fromarray(x_sample), p.outpath_samples, "", seeds[i], prompts[i], opts.samples_format, info=info, p=p, suffix="-before-face-restoration") + images.save_image(Image.fromarray(x_sample), path=p.outpath_samples, basename="", seed=seeds[i], prompt=prompts[i], extension=opts.samples_format, info=info, p=p, suffix="-before-face-restoration") x_sample = modules.face_restoration.restore_faces(x_sample) image = Image.fromarray(x_sample) if p.scripts is not None: @@ -727,7 +727,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: info=infotext(n, i) p.color_corrections = orig image_without_cc = apply_overlay(image, p.paste_to, i, p.overlay_images) - images.save_image(image_without_cc, p.outpath_samples, "", seeds[i], prompts[i], opts.samples_format, info=info, p=p, suffix="-before-color-correction") + images.save_image(image_without_cc, path=p.outpath_samples, basename="", seed=seeds[i], prompt=prompts[i], extension=opts.samples_format, info=info, p=p, suffix="-before-color-correction") image = apply_color_correction(p.color_corrections[i], image) image = apply_overlay(image, p.paste_to, i, p.overlay_images) if opts.samples_save and not p.do_not_save_samples: diff --git a/modules/progress.py b/modules/progress.py index a6fb504a5..728198047 100644 --- a/modules/progress.py +++ b/modules/progress.py @@ -77,17 +77,11 @@ def progressapi(req: ProgressRequest): predicted_duration = elapsed_since_start / progress if progress > 0 else None eta = predicted_duration - elapsed_since_start if predicted_duration is not None else None id_live_preview = req.id_live_preview + live_preview = None shared.state.set_current_image() - if shared.opts.live_previews_enable and shared.state.id_live_preview != req.id_live_preview: - image = shared.state.current_image - if image is not None: - buffered = io.BytesIO() - fmt = 'jpeg' if shared.opts.samples_format == 'jpg' else shared.opts.samples_format - image.save(buffered, format=fmt) - live_preview = f'data:image/{fmt};base64,{base64.b64encode(buffered.getvalue()).decode("ascii")}' - id_live_preview = shared.state.id_live_preview - else: - live_preview = None - else: - live_preview = None + if shared.opts.live_previews_enable and (shared.state.id_live_preview != req.id_live_preview) and (shared.state.current_image is not None): + buffered = io.BytesIO() + shared.state.current_image.save(buffered, format='jpeg') + live_preview = f'data:image/jpeg;base64,{base64.b64encode(buffered.getvalue()).decode("ascii")}' + id_live_preview = shared.state.id_live_preview return InternalProgressResponse(active=active, queued=queued, paused=paused, completed=completed, progress=progress, eta=eta, live_preview=live_preview, id_live_preview=id_live_preview, textinfo=shared.state.textinfo) diff --git a/modules/shared.py b/modules/shared.py index e4eed0e0b..18df84d7d 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -319,11 +319,11 @@ options_templates.update(options_section(('system-paths', "System Paths"), { options_templates.update(options_section(('saving-images', "Image Options"), { "samples_save": OptionInfo(True, "Always save all generated images"), - "samples_format": OptionInfo('jpg', 'File format for images'), + "samples_format": OptionInfo('jpg', 'File format for generated images', gr.Dropdown, lambda: {"choices": ["jpg", "png", "webp", "tiff", "jp2", "psd"]}), "samples_filename_pattern": OptionInfo("[seed]-[prompt_spaces]", "Images filename pattern", component_args=hide_dirs), "save_images_add_number": OptionInfo(True, "Add number to filename when saving", component_args=hide_dirs), "grid_save": OptionInfo(True, "Always save all generated image grids"), - "grid_format": OptionInfo('jpg', 'File format for grids'), + "grid_format": OptionInfo('jpg', 'File format for grids', gr.Dropdown, lambda: {"choices": ["jpg", "png", "webp", "tiff", "jp2", "psd"]}), "grid_extended_filename": OptionInfo(True, "Add extended info (seed, prompt) to filename when saving grid"), "grid_only_if_multiple": OptionInfo(True, "Do not save grids consisting of one picture"), "grid_prevent_empty_spots": OptionInfo(True, "Prevent empty spots in grid (when set to autodetect)"), diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py index 95ed70d78..12ca03a52 100644 --- a/modules/ui_extra_networks.py +++ b/modules/ui_extra_networks.py @@ -3,11 +3,8 @@ import html import os.path import urllib.parse from pathlib import Path -from PIL import PngImagePlugin import gradio as gr - from modules import shared -from modules.images import read_info_from_image from modules.generation_parameters_copypaste import image_from_url_text from modules.ui_components import ToolButton @@ -156,9 +153,7 @@ class ExtraNetworksPage: """ Find a preview PNG for a given path (without extension) and call link_preview on it. """ - preview_extensions = ["png", "jpg", "webp"] - if shared.opts.samples_format not in preview_extensions: - preview_extensions.append(shared.opts.samples_format) + preview_extensions = ["jpg", "png", "webp", "tiff", "jp2", "psd"] potential_files = sum([[path + "." + ext, path + ".preview." + ext] for ext in preview_extensions], []) for file in potential_files: if os.path.isfile(file): @@ -265,19 +260,13 @@ def setup_ui(ui, gallery): index = len(images) - 1 if index >= len(images) else index img_info = images[index if index >= 0 else 0] image = image_from_url_text(img_info) - geninfo, _items = read_info_from_image(image) is_allowed = False for extra_page in ui.stored_extra_pages: if any([path_is_parent(x, filename) for x in extra_page.allowed_directories_for_previews()]): is_allowed = True break assert is_allowed, f'writing to {filename} is not allowed' - if geninfo: - pnginfo_data = PngImagePlugin.PngInfo() - pnginfo_data.add_text('parameters', geninfo) - image.save(filename, pnginfo=pnginfo_data) - else: - image.save(filename) + image.save(filename) return [page.create_html(ui.tabname) for page in ui.stored_extra_pages] ui.button_save_preview.click( From 523dbaf8dcf32ff05155e9af4627789695ee2899 Mon Sep 17 00:00:00 2001 From: Vince Navarro Date: Thu, 1 Jun 2023 16:42:21 -0400 Subject: [PATCH 261/282] Add XPU support for --device-id --- modules/devices.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/devices.py b/modules/devices.py index b49745bd3..de35d0066 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -24,6 +24,8 @@ def extract_device_id(args, name): # pylint: disable=redefined-outer-name def get_cuda_device_string(): if shared.cmd_opts.use_ipex: + if shared.cmd_opts.device_id is not None: + return f"xpu:{shared.cmd_opts.device_id}" return "xpu" else: if shared.cmd_opts.device_id is not None: @@ -33,7 +35,7 @@ def get_cuda_device_string(): def get_optimal_device_name(): if shared.cmd_opts.use_ipex: - return "xpu" + return get_cuda_device_string() elif cuda_ok and not shared.cmd_opts.use_directml: return get_cuda_device_string() if has_mps(): @@ -66,7 +68,7 @@ def torch_gc(force=False): collected = gc.collect() if shared.cmd_opts.use_ipex: try: - with torch.xpu.device("xpu"): + with torch.xpu.device(get_cuda_device_string()): torch.xpu.empty_cache() except: pass @@ -143,7 +145,11 @@ def set_cuda_params(): args = cmd_args.parser.parse_args() if args.use_ipex: - cpu = torch.device("xpu") #Use XPU instead of CPU. %20 Perf improvement on weak CPUs. + print(args.device_id) + if args.device_id is not None: + cpu = torch.device(f"xpu:{args.device_id}") #Use XPU instead of CPU. %20 Perf improvement on weak CPUs. + else: + cpu = torch.device("xpu") else: cpu = torch.device("cpu") device = device_interrogate = device_gfpgan = device_esrgan = device_codeformer = None From c30eb90afff5759d25834c1978ea647d1cd6beb1 Mon Sep 17 00:00:00 2001 From: Vince Navarro Date: Thu, 1 Jun 2023 17:28:13 -0400 Subject: [PATCH 262/282] Remove stray print --- modules/devices.py | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/devices.py b/modules/devices.py index de35d0066..f633400a4 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -145,7 +145,6 @@ def set_cuda_params(): args = cmd_args.parser.parse_args() if args.use_ipex: - print(args.device_id) if args.device_id is not None: cpu = torch.device(f"xpu:{args.device_id}") #Use XPU instead of CPU. %20 Perf improvement on weak CPUs. else: From 251dc341f9ad37e48ddbf5ea33146abee0be368e Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 1 Jun 2023 17:44:12 -0400 Subject: [PATCH 263/282] restruct html/js and cleanup --- .gitignore | 2 +- CHANGELOG.md | 4 + README.md | 2 +- {javascript => html}/black-orange.jpg | Bin {javascript => html}/gradio-base.jpg | Bin {javascript => html}/gradio-default.jpg | Bin {javascript => html}/gradio-glass.jpg | Bin {javascript => html}/gradio-monochrome.jpg | Bin {javascript => html}/gradio-soft.jpg | Bin {javascript => html}/roboto.ttf | Bin installer.py | 15 +-- javascript/hints.js | 106 +++++-------------- javascript/{hires_fix.js => hires.js} | 0 javascript/package.json | 13 --- javascript/set-hints.js | 20 ++++ javascript/ui.js | 6 +- modules/api/api.py | 1 - modules/images.py | 4 +- modules/processing.py | 1 - modules/shared.py | 10 +- modules/textual_inversion/image_embedding.py | 2 +- webui.py | 9 +- 22 files changed, 78 insertions(+), 117 deletions(-) rename {javascript => html}/black-orange.jpg (100%) rename {javascript => html}/gradio-base.jpg (100%) rename {javascript => html}/gradio-default.jpg (100%) rename {javascript => html}/gradio-glass.jpg (100%) rename {javascript => html}/gradio-monochrome.jpg (100%) rename {javascript => html}/gradio-soft.jpg (100%) rename {javascript => html}/roboto.ttf (100%) rename javascript/{hires_fix.js => hires.js} (100%) delete mode 100644 javascript/package.json create mode 100644 javascript/set-hints.js diff --git a/.gitignore b/.gitignore index 19aed4141..ddcab30e3 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,7 @@ __pycache__ /webui-user.bat /webui-user.sh /html/extensions.json -/javascript/themes.json +/html/themes.json node_modules pnpm-lock.yaml package-lock.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 609538753..6f601a162 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ - redesign action box to be uniform accross all themes - add pause option next to stop/skip - redesign progress bar +- enable more image formats + note: not all are understood by browser so previews and images may appear as blank + unless you have some browser extensions that can handle them + but they do get stored correctly. and cant beat raw quality of 32-bit tiff or psd :) ## Update for 05/30/2023 diff --git a/README.md b/README.md index 10cae8fdd..6b06f20df 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Below is partial list of all available parameters, run `webui --help` for the fu --upgrade Upgrade main repository to latest version, default: False --safe Run in safe mode with no user extensions -
![screenshot](javascript/black-orange.jpg)
+
![screenshot](html/black-orange.jpg)
## Notes diff --git a/javascript/black-orange.jpg b/html/black-orange.jpg similarity index 100% rename from javascript/black-orange.jpg rename to html/black-orange.jpg diff --git a/javascript/gradio-base.jpg b/html/gradio-base.jpg similarity index 100% rename from javascript/gradio-base.jpg rename to html/gradio-base.jpg diff --git a/javascript/gradio-default.jpg b/html/gradio-default.jpg similarity index 100% rename from javascript/gradio-default.jpg rename to html/gradio-default.jpg diff --git a/javascript/gradio-glass.jpg b/html/gradio-glass.jpg similarity index 100% rename from javascript/gradio-glass.jpg rename to html/gradio-glass.jpg diff --git a/javascript/gradio-monochrome.jpg b/html/gradio-monochrome.jpg similarity index 100% rename from javascript/gradio-monochrome.jpg rename to html/gradio-monochrome.jpg diff --git a/javascript/gradio-soft.jpg b/html/gradio-soft.jpg similarity index 100% rename from javascript/gradio-soft.jpg rename to html/gradio-soft.jpg diff --git a/javascript/roboto.ttf b/html/roboto.ttf similarity index 100% rename from javascript/roboto.ttf rename to html/roboto.ttf diff --git a/installer.py b/installer.py index 0669687f4..2bd69aa98 100644 --- a/installer.py +++ b/installer.py @@ -203,13 +203,16 @@ def update(folder): # clone git repository def clone(url, folder, commithash=None): if os.path.exists(folder): + if args.skip_update: + return if commithash is None: - return - current_hash = git('rev-parse HEAD', folder).strip() - if current_hash != commithash: - git('fetch', folder) - git(f'checkout {commithash}', folder) - return + update(folder) + else: + current_hash = git('rev-parse HEAD', folder).strip() + if current_hash != commithash: + git('fetch', folder) + git(f'checkout {commithash}', folder) + return else: log.info(f'Cloning repository: {url}') git(f'clone "{url}" "{folder}"') diff --git a/javascript/hints.js b/javascript/hints.js index e0fc63634..026836b67 100644 --- a/javascript/hints.js +++ b/javascript/hints.js @@ -1,18 +1,7 @@ -// mouseover tooltips for various UI elements +// HTML tooltips for various UI elements titles = { - 'Sampling steps': 'How many times to improve the generated image iteratively; higher values take longer; very low values can produce bad results', - 'Sampling method': 'Which algorithm to use to produce the image', - GFPGAN: 'Restore low quality faces using GFPGAN neural network', - 'Euler a': 'Euler Ancestral - very creative, each can get a completely different picture depending on step count, setting steps higher than 30-40 does not help', - DDIM: 'Denoising Diffusion Implicit Models - best at inpainting', - UniPC: 'Unified Predictor-Corrector Framework for Fast Sampling of Diffusion Models', - 'DPM adaptive': 'Ignores step count - uses a number of steps determined by the CFG and resolution', - - 'Batch count': 'How many batches of images to create (has no impact on generation performance or VRAM usage)', - 'Batch size': 'How many image to create in a single batch (increases generation performance at cost of higher VRAM usage)', - 'CFG Scale': 'Classifier Free Guidance Scale - how strongly the image should conform to prompt - lower values produce more creative results', - Seed: "A value that determines the output of random number generator - if you create an image with same parameters and seed as another image, you'll get the same result", + // unicode icons '\u{1f3b2}\ufe0f': 'Set seed to -1, which will cause a new random number to be used every time', '\u267b\ufe0f': 'Reuse seed from last generation, mostly useful if it was randomed', '\u2199\ufe0f': 'Read generation parameters from prompt or last generation if prompt is empty into user interface.', @@ -27,90 +16,76 @@ titles = { '\u{1F9F3}': 'Apply selected styles to current prompt', '\u{1F6AE}': 'Clear prompt', '\u{1F310}': 'Show/hide extra networks', - - - + // strings + 'Sampling steps': 'How many times to improve the generated image iteratively; higher values take longer; very low values can produce bad results', + 'Sampling method': 'Which algorithm to use to produce the image', + 'GFPGAN': 'Restore low quality faces using GFPGAN neural network', + 'Euler a': 'Euler Ancestral - very creative, each can get a completely different picture depending on step count, setting steps higher than 30-40 does not help', + 'DDIM': 'Denoising Diffusion Implicit Models - best at inpainting', + 'UniPC': 'Unified Predictor-Corrector Framework for Fast Sampling of Diffusion Models', + 'DPM adaptive': 'Ignores step count - uses a number of steps determined by the CFG and resolution', + 'Batch count': 'How many batches of images to create (has no impact on generation performance or VRAM usage)', + 'Batch size': 'How many image to create in a single batch (increases generation performance at cost of higher VRAM usage)', + 'CFG Scale': 'Classifier Free Guidance Scale - how strongly the image should conform to prompt - lower values produce more creative results', + 'Seed': "A value that determines the output of random number generator - if you create an image with same parameters and seed as another image, you'll get the same result", 'Inpaint a part of image': 'Draw a mask over an image, and the script will regenerate the masked area with content according to prompt', 'SD upscale': 'Upscale image normally, split result into tiles, improve each tile using img2img, merge whole image back', - 'Just resize': 'Resize image to target resolution. Unless height and width match, you will get incorrect aspect ratio.', 'Crop and resize': 'Resize the image so that entirety of target resolution is filled with the image. Crop parts that stick out.', 'Resize and fill': "Resize the image so that entirety of image is inside target resolution. Fill empty space with image's colors.", - 'Mask blur': 'How much to blur the mask before processing, in pixels.', 'Masked content': 'What to put inside the masked area before processing it with Stable Diffusion.', - fill: 'fill it with colors of the image', - original: 'keep whatever was there originally', + 'fill': 'fill it with colors of the image', + 'original': 'keep whatever was there originally', 'latent noise': 'fill it with latent space noise', 'latent nothing': 'fill it with latent space zeroes', 'Inpaint at full resolution': 'Upscale masked region to target resolution, do inpainting, downscale back and paste into original image', - 'Denoising strength': "Determines how little respect the algorithm should have for image's content. At 0, nothing will change, and at 1 you'll get an unrelated image. With values below 1.0, processing will take less steps than the Sampling Steps slider specifies.", - - Skip: 'Stop processing current image and continue processing.', - Interrupt: 'Stop processing images and return any results accumulated so far.', - Save: 'Write image to a directory (default - log/images) and generation parameters into csv file.', - + 'Skip': 'Stop processing current image and continue processing.', + 'Interrupt': 'Stop processing images and return any results accumulated so far.', + 'Save': 'Write image to a directory (default - log/images) and generation parameters into csv file.', 'X values': 'Separate values for X axis using commas.', 'Y values': 'Separate values for Y axis using commas.', - - None: 'Do not do anything special', + 'None': 'Do not do anything special', 'Prompt matrix': 'Separate prompts into parts using vertical pipe character (|) and the script will create a picture for every combination of them (except for the first part, which will be present in all combinations)', 'X/Y/Z plot': 'Create grid(s) where images will have different parameters. Use inputs below to specify which parameters will be shared by columns and rows', 'Custom code': 'Run Python code. Advanced user only. Must run program with --allow-code for this to work', - 'Prompt S/R': 'Separate a list of words with commas, and the first word will be used as a keyword: script will search for this word in the prompt, and replace it with others', 'Prompt order': 'Separate a list of words with commas, and the script will make a variation of prompt with those words for their every possible order', - - Tiling: 'Produce an image that can be tiled.', + 'Tiling': 'Produce an image that can be tiled.', 'Tile overlap': 'For SD upscale, how much overlap in pixels should there be between tiles. Tiles overlap so that when they are merged back into one picture, there is no clearly visible seam.', - 'Variation seed': 'Seed of a different picture to be mixed into the generation.', 'Variation strength': 'How strong of a variation to produce. At 0, there will be no effect. At 1, you will get the complete picture with variation seed (except for ancestral samplers, where you will just get something).', 'Resize seed from height': 'Make an attempt to produce a picture similar to what would have been produced with same seed at specified resolution', 'Resize seed from width': 'Make an attempt to produce a picture similar to what would have been produced with same seed at specified resolution', - - Interrogate: 'Reconstruct prompt from existing image and put it into the prompt field.', - + 'Interrogate': 'Reconstruct prompt from existing image and put it into the prompt field.', 'Images filename pattern': 'Use following tags to define how filenames for images are chosen: [steps], [cfg], [prompt_hash], [prompt], [prompt_no_styles], [prompt_spaces], [width], [height], [styles], [sampler], [seed], [model_hash], [model_name], [prompt_words], [date], [datetime], [datetime], [datetime