From 49a9ab3d87ac716214cc795ee03aa71e0b0f0c4d Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 29 Oct 2025 11:40:20 -0400 Subject: [PATCH] linting Signed-off-by: Vladimir Mandic --- TODO.md | 5 +++-- modules/control/util.py | 2 +- modules/face/reswapper_utils.py | 5 ++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/TODO.md b/TODO.md index 7ece7fad7..3f62f5763 100644 --- a/TODO.md +++ b/TODO.md @@ -65,13 +65,13 @@ Main ToDo list can be found at [GitHub projects](https://github.com/users/vladma ## Code TODO -> pnpm lint | grep W0511 | awk -F'TODO ' '{print "- "$NF}' | sed 's/ (fixme)//g' | sort +> npm run todo - control: support scripts via api - fc: autodetect distilled based on model - fc: autodetect tensor format based on model - hypertile: vae breaks when using non-standard sizes -- install: enable ROCm for windows when available +- install: switch to pytorch source when it becomes available - loader: load receipe - loader: save receipe - lora: add other quantization types @@ -81,5 +81,6 @@ Main ToDo list can be found at [GitHub projects](https://github.com/users/vladma - model load: implement model in-memory caching - modernui: monkey-patch for missing tabs.select event - modules/lora/lora_extract.py:188:9: W0511: TODO: lora: support pre-quantized flux +- modules/modular_guiders.py:65:58: W0511: TODO: guiders - processing: remove duplicate mask params - resize image: enable full VAE mode for resize-latent diff --git a/modules/control/util.py b/modules/control/util.py index f528c7ac9..fccfa0abc 100644 --- a/modules/control/util.py +++ b/modules/control/util.py @@ -55,7 +55,7 @@ def nms(x, t, s): for f in [f1, f2, f3, f4]: np.putmask(y, cv2.dilate(x, kernel=f) == x, x) z = np.zeros_like(y, dtype=np.uint8) - z[y > t] = 255 + z[y > t] = 255 # pylint: disable=unsupported-assignment-operation return z def min_max_norm(x): diff --git a/modules/face/reswapper_utils.py b/modules/face/reswapper_utils.py index ae260054d..a7451103f 100644 --- a/modules/face/reswapper_utils.py +++ b/modules/face/reswapper_utils.py @@ -1,9 +1,8 @@ +# https://github.com/somanchiu/ReSwapper/blob/GAN/Image.py import cv2 import numpy as np -### https://github.com/somanchiu/ReSwapper/blob/GAN/Image.py - input_std = 255.0 input_mean = 0.0 @@ -38,7 +37,7 @@ def blend_swapped_image(swapped_face, target_image, M): warped_face = cv2.warpAffine(swapped_face, M_inv, (w, h),borderValue=0.0) img_white = np.full((swapped_face.shape[0], swapped_face.shape[1]), 255, dtype=np.float32) img_mask = cv2.warpAffine(img_white, M_inv, (w, h), borderValue=0.0) - img_mask[img_mask > 20] = 255 + img_mask[img_mask > 20] = 255 # pylint: disable=unsupported-assignment-operation mask_h_inds, mask_w_inds = np.where(img_mask == 255) if len(mask_h_inds) > 0 and len(mask_w_inds) > 0: # safety check mask_h = np.max(mask_h_inds) - np.min(mask_h_inds)