From 89ec1c09dbc2c2a837d775318e01bf619e5537dc Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 17 Jul 2025 08:18:52 -0400 Subject: [PATCH] improve git error logging Signed-off-by: Vladimir Mandic --- CHANGELOG.md | 16 ++++++++-------- installer.py | 22 ++++++++++++---------- modules/processing_info.py | 6 +++--- wiki | 2 +- 4 files changed, 24 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 889b3aefc..11ea88bfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,8 @@ # Change Log for SD.Next -## Update for 2025-07-16 +## Update for 2025-07-17 -### Highlights for 2025-07-16 - -In this release we finally break with legacy with the removal of the original [A1111](https://github.com/AUTOMATIC1111/stable-diffusion-webui/) codebase which has not been maintained for a while now -This plus major cleanup of codebase and external dependencies resulted in ~53k LoC (*lines-of-code*) reduction and spread over [~720 files](https://github.com/vladmandic/sdnext/pull/4017)! - -We also switched project license to [Apache-2.0](https://github.com/vladmandic/sdnext/blob/dev/LICENSE.txt) which means that SD.Next is now fully compatible with commercial and non-commercial use and redistribution regardless of modifications! +### Highlights for 2025-07-17 Feature highlights include: - **ModernUI** layout redesign which should make it more user friendly and easier to navigate @@ -17,6 +12,11 @@ Feature highlights include: - New **LLM/VLM** models available for captioning and prompt enhance - Compute improvements +In this release we finally break with legacy with the removal of the original [A1111](https://github.com/AUTOMATIC1111/stable-diffusion-webui/) codebase which has not been maintained for a while now +This plus major cleanup of codebase and external dependencies resulted in ~53k LoC (*lines-of-code*) reduction and spread over [~720 files](https://github.com/vladmandic/sdnext/pull/4017)! + +We also switched project license to [Apache-2.0](https://github.com/vladmandic/sdnext/blob/dev/LICENSE.txt) which means that SD.Next is now fully compatible with commercial and non-commercial use and redistribution regardless of modifications! + And (*as always*) many bugfixes and improvements to existing features! *Note*: We recommend clean install for this release due to sheer size of changes @@ -24,7 +24,7 @@ Although upgrades and existing installations are tested and should work fine! [ReadMe](https://github.com/vladmandic/automatic/blob/master/README.md) | [ChangeLog](https://github.com/vladmandic/automatic/blob/master/CHANGELOG.md) | [Docs](https://vladmandic.github.io/sdnext-docs/) | [WiKi](https://github.com/vladmandic/automatic/wiki) | [Discord](https://discord.com/invite/sd-next-federal-batch-inspectors-1101998836328697867) -### Details for 2025-07-16 +### Details for 2025-07-17 - **License** - SD.Next [license](https://github.com/vladmandic/sdnext/blob/dev/LICENSE.txt) switched from **aGPL-v3.0** to **Apache-v2.0** diff --git a/installer.py b/installer.py index f7898cf11..fec4367ec 100644 --- a/installer.py +++ b/installer.py @@ -400,20 +400,22 @@ def git(arg: str, folder: str = None, ignore: bool = False, optional: bool = Fal if git_cmd != "git": git_cmd = os.path.abspath(git_cmd) result = subprocess.run(f'"{git_cmd}" {arg}', check=False, shell=True, env=os.environ, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=folder or '.') - txt = result.stdout.decode(encoding="utf8", errors="ignore") + stdout = result.stdout.decode(encoding="utf8", errors="ignore") if len(result.stderr) > 0: - txt += ('\n' if len(txt) > 0 else '') + result.stderr.decode(encoding="utf8", errors="ignore") - txt = txt.strip() + stdout += ('\n' if len(stdout) > 0 else '') + result.stderr.decode(encoding="utf8", errors="ignore") + stdout = stdout.strip() if result.returncode != 0 and not ignore: - if "couldn't find remote ref" in txt: # not a git repo - return txt + if "couldn't find remote ref" in stdout: # not a git repo + log.error(f'Git: folder="{folder}" could not identify repository') + elif "no submodule mapping found" in stdout: + log.warning(f'Git: folder="{folder}" submodules changed') + elif 'or stash them' in stdout: + log.error(f'Git: folder="{folder}" local changes detected') + else: + log.error(f'Git: folder="{folder}" arg="{arg}" output={stdout}') errors.append(f'git: {folder}') - log.error(f'Git: {folder} / {arg}') - if 'or stash them' in txt: - log.error(f'Git local changes detected: check details log="{log_file}"') - log.debug(f'Git output: {txt}') ts('git', t_start) - return txt + return stdout # reattach as needed as head can get detached diff --git a/modules/processing_info.py b/modules/processing_info.py index e15083644..b04233679 100644 --- a/modules/processing_info.py +++ b/modules/processing_info.py @@ -42,9 +42,6 @@ def create_infotext(p: StableDiffusionProcessing, all_prompts=None, all_seeds=No ops = list(set(p.ops)) args = { # basic - "Pipeline": shared.sd_model.__class__.__name__, - "TE": None if (shared.opts.sd_text_encoder is None or shared.opts.sd_text_encoder == 'Default') else shared.opts.sd_text_encoder, - "UNet": None if (shared.opts.sd_unet is None or shared.opts.sd_unet == 'Default') else shared.opts.sd_unet, "Steps": p.steps, "Size": f"{p.width}x{p.height}" if hasattr(p, 'width') and hasattr(p, 'height') else None, "Sampler": p.sampler_name if p.sampler_name != 'Default' else None, @@ -63,6 +60,9 @@ def create_infotext(p: StableDiffusionProcessing, all_prompts=None, all_seeds=No "Version": git_commit, "Parser": shared.opts.prompt_attention if shared.opts.prompt_attention != 'native' else None, "Comment": comment, + "Pipeline": shared.sd_model.__class__.__name__, + "TE": None if (shared.opts.sd_text_encoder is None or shared.opts.sd_text_encoder == 'Default') else shared.opts.sd_text_encoder, + "UNet": None if (shared.opts.sd_unet is None or shared.opts.sd_unet == 'Default') else shared.opts.sd_unet, "Operations": '; '.join(ops).replace('"', '') if len(p.ops) > 0 else 'none', } if shared.opts.add_model_name_to_info: diff --git a/wiki b/wiki index df24c6fd9..daacd1e61 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit df24c6fd92d76b88fe2357d6146be91e02b4c112 +Subproject commit daacd1e61d4ee86d275970fefaa269bb8670c761