mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
cleanup
This commit is contained in:
@@ -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
@@ -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
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user