mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user