improve git error logging

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-07-17 08:18:52 -04:00
parent b315c4d1db
commit 89ec1c09db
4 changed files with 24 additions and 22 deletions
+8 -8
View File
@@ -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**
+12 -10
View File
@@ -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
+3 -3
View File
@@ -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:
+1 -1
Submodule wiki updated: df24c6fd92...daacd1e61d