From b3d65f4559c53b8bc95db8262ccb2bb23f3914b9 Mon Sep 17 00:00:00 2001 From: vladmandic Date: Fri, 16 Jan 2026 11:32:09 +0100 Subject: [PATCH] logging cleanup Signed-off-by: vladmandic --- CHANGELOG.md | 1 + modules/model_quant.py | 3 ++- modules/sd_models.py | 3 ++- pipelines/generic.py | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cb4954c4..b52d8d8fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ Plus some significant under-the-hood changes to improve code coverage and qualit - [Flux.2 Klein](https://bfl.ai/blog/flux2-klein-towards-interactive-visual-intelligence) Flux.2-Klein is a new family of compact models from BFL in *4B and 9B sizes* and avaialable as *destilled and base* variants also includes are *sdnq prequantized variants* + *note*: 9B variant is [gated](https://vladmandic.github.io/sdnext-docs/Gated/) - [Qwen-Image-2512](https://qwen.ai/blog?id=qwen-image-2512) Qwen-Image successor, significantly reduces the AI-generated look and adds finer natural detailils and improved text rendering available in both *original*, *sdnq-svd prequantized* and *sdnq-dynamic prequantized* variants diff --git a/modules/model_quant.py b/modules/model_quant.py index 5437bacd7..1a501be0a 100644 --- a/modules/model_quant.py +++ b/modules/model_quant.py @@ -236,7 +236,8 @@ def create_sdnq_config(kwargs = None, allow: bool = True, module: str = 'Model', ) if quantized_matmul_dtype is None: quantized_matmul_dtype = "auto" # set for logging - log.debug(f'Quantization: module="{module}" type=sdnq mode=pre dtype={weights_dtype} matmul_dtype={quantized_matmul_dtype} matmul={shared.opts.sdnq_use_quantized_matmul} group_size={shared.opts.sdnq_quantize_weights_group_size} svd_rank={shared.opts.sdnq_svd_rank} svd_steps={shared.opts.sdnq_svd_steps} use_svd={shared.opts.sdnq_use_svd} dynamic={shared.opts.sdnq_use_dynamic_quantization} loss={shared.opts.sdnq_dynamic_loss_threshold} quant_conv={shared.opts.sdnq_quantize_conv_layers} matmul_conv={shared.opts.sdnq_use_quantized_matmul_conv} dequantize_fp32={shared.opts.sdnq_dequantize_fp32} quantize_with_gpu={shared.opts.sdnq_quantize_with_gpu} quantization_device={quantization_device} return_device={return_device} device_map={shared.opts.device_map} offload_mode={shared.opts.diffusers_offload_mode} non_blocking={shared.opts.diffusers_offload_nonblocking} modules_to_not_convert={modules_to_not_convert} modules_dtype_dict={modules_dtype_dict}') + svd = f'{shared.opts.sdnq_use_svd} rank={shared.opts.sdnq_svd_rank} steps={shared.opts.sdnq_svd_steps}' if shared.opts.sdnq_use_svd else f'{shared.opts.sdnq_use_svd}' + log.debug(f'Quantization: module="{module}" type=sdnq mode=pre dtype={weights_dtype} svd={svd} dynamic={shared.opts.sdnq_use_dynamic_quantization} group={shared.opts.sdnq_quantize_weights_group_size} loss={shared.opts.sdnq_dynamic_loss_threshold} matmul_dtype={quantized_matmul_dtype} matmul_quant={shared.opts.sdnq_use_quantized_matmul} matmul_conv={shared.opts.sdnq_use_quantized_matmul_conv} quant_conv={shared.opts.sdnq_quantize_conv_layers} fp32={shared.opts.sdnq_dequantize_fp32} device={quantization_device} return={return_device} use_gpu={shared.opts.sdnq_quantize_with_gpu} map={shared.opts.device_map} offload={shared.opts.diffusers_offload_mode} non_blocking={shared.opts.diffusers_offload_nonblocking} skip_modules={modules_to_not_convert} dict={modules_dtype_dict}') if kwargs is None: return sdnq_config else: diff --git a/modules/sd_models.py b/modules/sd_models.py index 7d7be538f..89a437463 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -493,7 +493,8 @@ def load_diffuser_force(detected_model_type, checkpoint_info, diffusers_load_con allow_post_quant = False except Exception as e: shared.log.error(f'Load {op}: path="{checkpoint_info.path}" {e}') - errors.display(e, 'Load') + if debug_load: + errors.display(e, 'Load') return None, True if sd_model is not None: return sd_model, True diff --git a/pipelines/generic.py b/pipelines/generic.py index 0a51c1cec..c3fd8fd42 100644 --- a/pipelines/generic.py +++ b/pipelines/generic.py @@ -92,7 +92,7 @@ def load_transformer(repo_id, cls_name, load_config=None, subfolder="transformer transformer.quantization_config = quant_args.get('quantization_config', None) except Exception as e: shared.log.error(f'Load model: transformer="{repo_id}" cls={cls_name.__name__} {e}') - errors.display(e, 'Load:') + errors.display(e, 'Load') raise devices.torch_gc() shared.state.end(jobid) @@ -243,7 +243,7 @@ def load_text_encoder(repo_id, cls_name, load_config=None, subfolder="text_encod text_encoder.quantization_config = quant_args.get('quantization_config', None) except Exception as e: shared.log.error(f'Load model: text_encoder="{repo_id}" cls={cls_name.__name__} {e}') - errors.display(e, 'Load:') + errors.display(e, 'Load') raise devices.torch_gc() shared.state.end(jobid)