mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
cleanup logging
This commit is contained in:
+1
-2
@@ -138,7 +138,6 @@ def test_fp16():
|
||||
x = torch.tensor([[1.5,.0,.0,.0]]).to(device).half()
|
||||
layerNorm = torch.nn.LayerNorm(4, eps=0.00001, elementwise_affine=True, dtype=torch.float16, device=device)
|
||||
_y = layerNorm(x)
|
||||
shared.log.debug('Torch FP16 test passed')
|
||||
return True
|
||||
except Exception as ex:
|
||||
shared.log.warning(f'Torch FP16 test failed: Forcing FP32 operations: {ex}')
|
||||
@@ -206,7 +205,7 @@ def set_cuda_params():
|
||||
unet_needs_upcast = shared.opts.upcast_sampling
|
||||
inference_context = torch.inference_mode if shared.opts.inference_mode == 'inference-mode' else torch.no_grad
|
||||
shared.log.debug(f'Desired Torch parameters: dtype={shared.opts.cuda_dtype} no-half={shared.opts.no_half} no-half-vae={shared.opts.no_half_vae} upscast={shared.opts.upcast_sampling}')
|
||||
shared.log.info(f'Setting Torch parameters: dtype={dtype} vae={dtype_vae} unet={dtype_unet} context={inference_context.__name__}')
|
||||
shared.log.info(f'Setting Torch parameters: dtype={dtype} vae={dtype_vae} unet={dtype_unet} context={inference_context.__name__} fp16={fp16_ok}')
|
||||
shared.log.debug(f'Torch default device: {torch.device(get_optimal_device_name())}')
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -295,7 +295,7 @@ def list_themes():
|
||||
builtin = list_builtin_themes()
|
||||
default = ["gradio/default", "gradio/base", "gradio/glass", "gradio/monochrome", "gradio/soft"]
|
||||
external = {x['id'] for x in res if x['status'] == 'RUNNING' and 'test' not in x['id'].lower()}
|
||||
log.info(f'Themes list: builtin={len(builtin)} default={len(default)} external={len(external)}')
|
||||
log.info(f'Themes: builtin={len(builtin)} default={len(default)} external={len(external)}')
|
||||
themes = sorted(builtin) + sorted(default) + sorted(external, key=str.casefold)
|
||||
return themes
|
||||
|
||||
|
||||
+2
-3
@@ -522,7 +522,7 @@ def create_ui(startup_timer = None):
|
||||
negative_token_button.click(fn=wrap_queued_call(update_token_counter), inputs=[txt2img_negative_prompt, steps], outputs=[negative_token_counter])
|
||||
|
||||
ui_extra_networks.setup_ui(extra_networks_ui, txt2img_gallery)
|
||||
log.debug(f'UI interface: tab=txt2img batch={show_batch.value} seed={show_seed.value} advanced={show_advanced.value} second_pass={show_second_pass.value}')
|
||||
# log.debug(f'UI interface: tab=txt2img batch={show_batch.value} seed={show_seed.value} advanced={show_advanced.value} second_pass={show_second_pass.value}')
|
||||
|
||||
timer.startup.record("ui-txt2img")
|
||||
|
||||
@@ -882,8 +882,7 @@ def create_ui(startup_timer = None):
|
||||
parameters_copypaste.register_paste_params_button(parameters_copypaste.ParamBinding(
|
||||
paste_button=img2img_paste, tabname="img2img", source_text_component=img2img_prompt, source_image_component=None,
|
||||
))
|
||||
|
||||
log.debug(f'UI interface: tab=img2img seed={show_seed.value} resize={show_resize.value} batch={show_batch.value} denoise={show_denoise.value} advanced={show_advanced.value}')
|
||||
# log.debug(f'UI interface: tab=img2img seed={show_seed.value} resize={show_resize.value} batch={show_batch.value} denoise={show_denoise.value} advanced={show_advanced.value}')
|
||||
|
||||
timer.startup.record("ui-img2img")
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ def update_extension_list():
|
||||
try:
|
||||
with open(os.path.join(paths.script_path, "html", "extensions.json"), "r", encoding="utf-8") as f:
|
||||
extensions_list = json.loads(f.read())
|
||||
shared.log.debug(f'Extensions list loaded: {os.path.join(paths.script_path, "html", "extensions.json")}')
|
||||
# shared.log.debug(f'Extensions list loaded: {os.path.join(paths.script_path, "html", "extensions.json")}')
|
||||
except Exception:
|
||||
shared.log.debug(f'Extensions list failed to load: {os.path.join(paths.script_path, "html", "extensions.json")}')
|
||||
found = []
|
||||
|
||||
Reference in New Issue
Block a user