warn of modified files

This commit is contained in:
Vladimir Mandic
2023-06-08 11:56:29 -04:00
parent c82eaef261
commit b5f745b4cd
6 changed files with 34 additions and 14 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ body:
- type: markdown
attributes:
value: |
If issue is setup, installation or startup related, please check `webui.log` before reporting
If issue is setup, installation or startup related, please check `sdnext.log` before reporting
And when posting console logs, please use code blocks ( \`\`\` ) to format them insead of uploading screenshots
- type: markdown
attributes:
+7 -1
View File
@@ -22,6 +22,12 @@ body:
label: URL link of the extension
description: URL link of the extension
value:
- type: textarea
id: url
attributes:
label: URL link of the issue reported in the extension repository
description: Any extension related issue must also be reported to extension repository as well
value:
- type: markdown
attributes:
value: |
@@ -29,5 +35,5 @@ body:
- type: markdown
attributes:
value: |
If issue is extension installation or startup related, please check `webui.log` before reporting
If issue is extension installation or startup related, please check `sdnext.log` before reporting
And when posting console logs, please use code blocks ( \`\`\` ) to format them insead of uploading screenshots
+2 -2
View File
@@ -31,13 +31,13 @@ Individual features are not listed here, instead check [Changelog](CHANGELOG.md)
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`)
- Starts `sdnext.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
*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 `webui.log`, so if you encounter any issues, please check it first
Full startup sequence is logged in `sdnext.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:
+1
View File
@@ -58,3 +58,4 @@ Tech that can be integrated as part of the core workflow...
- port `p.all_hr_prompts`
- test `lyco_patch_lora`
- fix `lyco` logging
- git diff index
+21 -10
View File
@@ -20,7 +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')
log_file = os.path.join(os.path.dirname(__file__), 'sdnext.log')
quick_allowed = True
errors = 0
opts = {}
@@ -343,6 +343,18 @@ def check_torch():
print_profile(pr, 'Torch')
# check modified files
def check_modified_files():
if args.skip_git:
return
try:
res = git('status --porcelain')
files = [x[2:].strip() for x in res.split('\n')]
log.warning(f'Modified files: {files}')
except:
pass
# install required packages
def install_packages():
if args.profile:
@@ -415,17 +427,20 @@ def run_extension_installer(folder):
log.error(f'Exception running extension installer: {e}')
# get list of all enabled extensions
def list_extensions(folder):
def list_extensions(folder, quiet=False):
name = os.path.basename(folder)
disabled_extensions_all = opts.get('disable_all_extensions', 'none')
if disabled_extensions_all != 'none':
log.info(f'Disabled {name}: {disabled_extensions_all}')
if not quiet:
log.info(f'Disabled {name}: {disabled_extensions_all}')
return []
disabled_extensions = opts.get('disabled_extensions', [])
if len(disabled_extensions) > 0:
log.info(f'Disabled {name}: {disabled_extensions}')
if not quiet:
log.info(f'Disabled {name}: {disabled_extensions}')
enabled_extensions = [x for x in os.listdir(folder) if x not in disabled_extensions and not x.startswith('.')]
log.info(f'Enabled {name}: {enabled_extensions}')
if not quiet:
log.info(f'Enabled {name}: {enabled_extensions}')
return enabled_extensions
@@ -446,7 +461,7 @@ def install_extensions():
for folder in extension_folders:
if not os.path.isdir(folder):
continue
extensions = list_extensions(folder)
extensions = list_extensions(folder, quiet=True)
log.debug(f'Extensions all: {extensions}')
for ext in extensions:
if ext in extensions_enabled:
@@ -582,10 +597,6 @@ def check_version(offline=False, reset=True): # pylint: disable=unused-argument
log.error('Not a git repository')
if not args.ignore:
sys.exit(1)
# status = git('status')
# if 'branch' not in status:
# log.error('Cannot get git repository status')
# sys.exit(1)
ver = git('log -1 --pretty=format:"%h %ad"')
log.info(f'Version: {ver}')
if args.version:
+2
View File
@@ -151,11 +151,13 @@ if __name__ == "__main__":
installer.check_version()
installer.set_environment()
installer.check_torch()
installer.check_modified_files()
if args.reinstall:
installer.log.info('Forcing reinstall of all packages')
installer.quick_allowed = False
if installer.check_timestamp():
installer.log.info('No changes detected: Quick launch active')
installer.check_extensions()
else:
installer.install_requirements()
installer.install_packages()