From cd32b966b2b506f0631fc284e5862bf22313f3b1 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 31 Dec 2024 09:15:31 -0500 Subject: [PATCH] torch 2.6.0 support Signed-off-by: Vladimir Mandic --- CHANGELOG.md | 22 ++++++++++++---------- modules/masking.py | 12 ++++++------ 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c45af644d..d9b2b0aed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,31 +4,33 @@ NYE refresh release with quite a few optimizatios and bug fixes... -- **LoRA**: +- **LoRA**: - **Sana** support - quantized models support - fuse support with on-demand apply/unapply - add legacy option in *settings -> networks* -- **HunyuanVideo** +- **HunyuanVideo**: - optimizations: full offload, quantization and tiling support -- **LTXVideo** +- **LTXVideo**: - optimizations: full offload, quantization and tiling support - [TeaCache](https://github.com/ali-vilab/TeaCache/blob/main/TeaCache4LTX-Video/README.md) integration -- **VAE**: +- **VAE**: - tiling granular options in *settings -> variable auto encoder* -- **UI**: +- **UI**: - live preview optimizations and error handling - live preview high quality output, thanks @Disty0 - CSS optimizations when log view is disabled -- **Samplers**: +- **Samplers**: - add flow shift options and separate dynamic thresholding from dynamic shifting - autodetect matching sigma capabilities -- **API** +- **API**: - better default values for generate -- **Refactor**: +- **Refactor**: - remove all LDM imports if running in native mode - - startup optimizatios -- **Fixes** + - startup optimizatios +- **Torch**: + - support for `torch==2.6.0` +- **Fixes**: - flux pipeline switches: txt/img/inpaint - flux custom unet loader for bnb - interrogate caption with T5 diff --git a/modules/masking.py b/modules/masking.py index 42e8e894e..51198d979 100644 --- a/modules/masking.py +++ b/modules/masking.py @@ -388,7 +388,7 @@ def run_mask(input_image: Image.Image, input_mask: Image.Image = None, return_ty if input_image is None: return input_mask - t0 = time.time() + # t0 = time.time() input_mask = get_mask(input_image, input_mask) # perform optional auto-masking if input_mask is None: return None @@ -436,14 +436,14 @@ def run_mask(input_image: Image.Image, input_mask: Image.Image = None, return_ty if opts.invert: mask = np.invert(mask) - mask_size = np.count_nonzero(mask) - total_size = np.prod(mask.shape) - area_size = np.count_nonzero(mask) - t1 = time.time() return_type = return_type or opts.preview_type - shared.log.debug(f'Mask: size={input_image.width}x{input_image.height} masked={mask_size}px area={area_size/total_size:.2f} auto={opts.auto_mask} blur={opts.mask_blur:.3f} erode={opts.mask_erode:.3f} dilate={opts.mask_dilate:.3f} type={return_type} time={t1-t0:.2f}') + # mask_size = np.count_nonzero(mask) + # total_size = np.prod(mask.shape) + # area_size = np.count_nonzero(mask) + # t1 = time.time() + # shared.log.debug(f'Mask: size={input_image.width}x{input_image.height} masked={mask_size}px area={area_size/total_size:.2f} auto={opts.auto_mask} blur={opts.mask_blur:.3f} erode={opts.mask_erode:.3f} dilate={opts.mask_dilate:.3f} type={return_type} time={t1-t0:.2f}') if return_type == 'None': return input_mask elif return_type == 'Opaque':