This commit is contained in:
Vladimir Mandic
2024-04-20 11:48:44 -04:00
parent 5df214e545
commit e900adf5ee
4 changed files with 8 additions and 7 deletions
+1 -2
View File
@@ -489,8 +489,7 @@ def check_torch():
try:
command = subprocess.run('hipconfig --version', shell=True, check=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
arr = command.stdout.decode(encoding="utf8", errors="ignore").split('.')
if len(arr) >= 2:
rocm_ver = f'{arr[0]}.{arr[1]}'
rocm_ver = f'{arr[0]}.{arr[1]}' if len(arr) >= 2 else None
log.debug(f'ROCm version detected: {rocm_ver}')
except Exception as e:
log.debug(f'ROCm hipconfig failed: {e}')
+2 -2
View File
@@ -242,10 +242,10 @@ def select_checkpoint(op='model'):
return checkpoint_info
if len(checkpoints_list) == 0:
shared.log.warning("Cannot generate without a checkpoint")
shared.log.info("Set system paths to use existing folders in a different location")
shared.log.info("Set system paths to use existing folders")
shared.log.info(" or use --models-dir <path-to-folder> to specify base folder with all models")
shared.log.info(" or use --ckpt-dir <path-to-folder> to specify folder with sd models")
shared.log.info(" or use --ckpt <path-to-checkpoint> to force using existing model")
shared.log.info(" or use --ckpt <path-to-checkpoint> to force using specific model")
return None
checkpoint_info = next(iter(checkpoints_list.values()))
if model_checkpoint is not None:
+3 -1
View File
@@ -118,6 +118,8 @@ def readfile(filename, silent=False, lock=False):
t1 = time.time()
if not silent:
log.debug(f'Read: file="{filename}" json={len(data)} bytes={os.path.getsize(filename)} time={t1-t0:.3f}')
except FileNotFoundError as e:
log.debug(f'Reading failed: {filename} {e}')
except Exception as e:
if not silent:
log.error(f'Reading failed: {filename} {e}')
@@ -304,7 +306,7 @@ def temp_disable_extensions():
if theme_name == 'standard' or theme_name == 'default':
theme_name = 'standard/black-teal'
if theme_name == 'modern':
theme_name = 'modern/sdxl_alpha'
theme_name = 'modern/Default'
if theme_name == 'gradio':
theme_name = 'gradio/default'
if theme_name == 'huggingface':
+2 -2
View File
@@ -74,7 +74,7 @@ def list_themes():
if f.endswith('.css'):
themes.append(os.path.splitext(f)[0])
if len(themes) == 0:
themes.append('modern/sdxl_alpha')
themes.append('modern/Default')
themes = sorted(themes)
modules.shared.log.debug(f'UI themes available: type={modules.shared.opts.theme_type} themes={len(themes)}')
else:
@@ -98,7 +98,7 @@ def reload_gradio_theme():
if modules.shared.opts.theme_type == 'Standard':
theme_name = 'black-teal'
elif modules.shared.opts.theme_type == 'Modern':
theme_name = 'sdxl_alpha'
theme_name = 'Default'
modules.shared.opts.data['gradio_theme'] = theme_name