From 4e8b0f83b4fe31d72feb41bb20d05fac805122d3 Mon Sep 17 00:00:00 2001 From: vladmandic Date: Thu, 1 Jan 2026 16:33:49 +0100 Subject: [PATCH] lint Signed-off-by: vladmandic --- TODO.md | 3 ++- modules/sdnq/loader.py | 4 ++-- modules/sdnq/packed_float.py | 6 +++--- modules/ui_extensions.py | 6 +++--- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/TODO.md b/TODO.md index 626fc7a6e..69c96eb88 100644 --- a/TODO.md +++ b/TODO.md @@ -54,7 +54,8 @@ TODO: *Prioritize*! - [Bytedance Lynx](https://github.com/bytedance/lynx) - [ByteDance OneReward](https://github.com/bytedance/OneReward) - [ByteDance USO](https://github.com/bytedance/USO) -- [Chroma1 Radiance](https://huggingface.co/lodestones/Chroma1-Radiance) +- [Chroma Radiance](https://huggingface.co/lodestones/Chroma1-Radiance) +- [Chroma Zeta](https://huggingface.co/lodestones/Zeta-Chroma) - [DiffSynth Studio](https://github.com/modelscope/DiffSynth-Studio) - [DiffusionForcing](https://github.com/kwsong0113/diffusion-forcing-transformer) - [Dream0 guidance](https://huggingface.co/ByteDance/DreamO) diff --git a/modules/sdnq/loader.py b/modules/sdnq/loader.py index 4d6f6077e..7a9d60c29 100644 --- a/modules/sdnq/loader.py +++ b/modules/sdnq/loader.py @@ -179,8 +179,8 @@ def apply_sdnq_options_to_module(model, dtype: torch.dtype = None, dequantize_fp output_channel_size, channel_size = module.sdnq_dequantizer.original_shape else: current_use_quantized_matmul = False - current_use_quantized_matmul = current_use_quantized_matmul and channel_size >= 32 and output_channel_size >= 32 - current_use_quantized_matmul = current_use_quantized_matmul and output_channel_size % 16 == 0 and channel_size % 16 == 0 + current_use_quantized_matmul = current_use_quantized_matmul and channel_size >= 32 and output_channel_size >= 32 # pylint: disable=possibly-used-before-assignment + current_use_quantized_matmul = current_use_quantized_matmul and output_channel_size % 16 == 0 and channel_size % 16 == 0 # pylint: disable=possibly-used-before-assignment if dtype is not None and module.sdnq_dequantizer.result_dtype != torch.float32: module.sdnq_dequantizer.result_dtype = dtype diff --git a/modules/sdnq/packed_float.py b/modules/sdnq/packed_float.py index dcdc0491a..8cd7940d7 100644 --- a/modules/sdnq/packed_float.py +++ b/modules/sdnq/packed_float.py @@ -21,13 +21,13 @@ def pack_float(x: torch.FloatTensor, weights_dtype: str) -> torch.Tensor: total_bits = dtype_dict[weights_dtype]["num_bits"] if dtype_dict[weights_dtype]["is_unsigned"]: - sign_mask = (1 << (total_bits-1)) + sign_mask = (1 << (total_bits-1)) # pylint: disable=superfluous-parens else: sign_mask = (1 << (total_bits-1)) + (1 << (total_bits-2)) mantissa_difference = 23 - mantissa_bits exponent_difference = 8 - exponent_bits - mantissa_mask = (1 << mantissa_difference) + mantissa_mask = (1 << mantissa_difference) # pylint: disable=superfluous-parens x = x.to(dtype=torch.float32).view(torch.int32) @@ -65,7 +65,7 @@ def unpack_float(x: torch.Tensor, shape: torch.Size, weights_dtype: str) -> torc total_bits = dtype_dict[weights_dtype]["num_bits"] if dtype_dict[weights_dtype]["is_unsigned"]: - sign_mask = (1 << (total_bits-1)) + sign_mask = (1 << (total_bits-1)) # pylint: disable=superfluous-parens else: sign_mask = (1 << (total_bits-1)) + (1 << (total_bits-2)) diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py index 4a800ec73..5abd7f872 100644 --- a/modules/ui_extensions.py +++ b/modules/ui_extensions.py @@ -275,9 +275,9 @@ def search_extensions(search_text, sort_column): def make_wrappable_html(text: str) -> str: - text = html.escape(text) - text = re_snake_case.sub("_", text) - return re_camelCase.sub(r"\1", text) + text = html.escape(text) + text = re_snake_case.sub("_", text) + return re_camelCase.sub(r"\1", text) def create_html(search_text, sort_column):