diff --git a/CHANGELOG.md b/CHANGELOG.md index 758701941..0c82c2ff8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ OPTIONAL: - pending `diffusers==0.26.0` - wuerstchen v3 [pr](https://github.com/huggingface/diffusers/pull/6487) - animatediff image2video [pr](https://github.com/huggingface/diffusers/pull/6509) +- tiledvae [pr](https://github.com/huggingface/diffusers/pull/1441) +- style aligned [pr](https://github.com/huggingface/diffusers/pull/6489) +- mixture tiling [pr](https://github.com/huggingface/diffusers/tree/main/examples/community#stable-diffusion-mixture-tiling) +- depth anything [repo](https://depth-anything.github.io/) - control api - photomaker api - interrogate api @@ -16,7 +20,7 @@ OPTIONAL: - masking api - preprocess api -## Update for 2023-01-21 +## Update for 2023-01-22 Another big release, highlights being: - A lot more functionality in the **Control** module: @@ -151,6 +155,10 @@ As of this release, default backend is set to **diffusers** as its more feature see wiki page for more details on syntax thanks @NetroScript - reduce html overhead + - **model compression**, thanks @Disty0 + - using built-in NNCF model compression, you can reduce the size of your models significantly + example: up to 3.4GB of VRAM saved for SD-XL model! + - see [wiki](https://github.com/vladmandic/automatic/wiki/Model-Compression-with-NNCF) for details - **offline deployment**: allow deployment without git clone for example, you can now deploy a zip of the sdnext folder - **latent upscale**: updated latent upscalers (some are new) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 137fc1c89..25e41dc63 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 137fc1c89aeb5243be5f2a1b97a1fc47d6fa15f6 +Subproject commit 25e41dc63b19f5882dedd5ea67d587951e390caf diff --git a/modules/control/run.py b/modules/control/run.py index c409b5339..49dda469b 100644 --- a/modules/control/run.py +++ b/modules/control/run.py @@ -260,12 +260,16 @@ def control_run(units: List[unit.Unit], inputs, inits, mask, unit_type: str, is_ else: # run in txt2img/img2img mode if len(active_strength) > 0: p.strength = active_strength[0] + pipe = shared.sd_model + instance = None + """ try: pipe = diffusers.AutoPipelineForText2Image.from_pipe(shared.sd_model) # use set_diffuser_pipe except Exception as e: shared.log.warning(f'Control pipeline create: {e}') pipe = shared.sd_model - instance = None + """ + debug(f'Control pipeline: class={pipe.__class__} args={vars(p)}') t1, t2, t3 = time.time(), 0, 0 diff --git a/modules/masking.py b/modules/masking.py index b504ac3d4..3c14c0acb 100644 --- a/modules/masking.py +++ b/modules/masking.py @@ -255,6 +255,8 @@ def run_rembg(input_image: Image, input_mask: np.ndarray): mask = cv2.cvtColor(input_mask, cv2.COLOR_RGB2GRAY) binary_input = cv2.threshold(input_mask, 127, 255, cv2.THRESH_BINARY | cv2.THRESH_OTSU)[1] binary_output = cv2.threshold(mask, 127, 255, cv2.THRESH_BINARY | cv2.THRESH_OTSU)[1] + if binary_input.shape != binary_output.shape: + binary_output = cv2.resize(binary_output, binary_input.shape[:2], interpolation=cv2.INTER_LINEAR) binary_overlap = cv2.bitwise_and(binary_input, binary_output) input_size = np.count_nonzero(binary_input) overlap_size = np.count_nonzero(binary_overlap) diff --git a/modules/sd_models.py b/modules/sd_models.py index 9a06f1245..3c7627fff 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -645,6 +645,7 @@ def set_diffuser_options(sd_model, vae = None, op: str = 'model'): if hasattr(sd_model, "vae"): if vae is not None: sd_model.vae = vae + shared.log.debug(f'Setting {op} VAE: name={sd_vae.loaded_vae_file}') if shared.opts.diffusers_vae_upcast != 'default': if shared.opts.diffusers_vae_upcast == 'true': sd_model.vae.config.force_upcast = True @@ -653,7 +654,7 @@ def set_diffuser_options(sd_model, vae = None, op: str = 'model'): if shared.opts.no_half_vae: devices.dtype_vae = torch.float32 sd_model.vae.to(devices.dtype_vae) - shared.log.debug(f'Setting {op} VAE: name={sd_vae.loaded_vae_file} upcast={sd_model.vae.config.get("force_upcast", None)}') + shared.log.debug(f'Setting {op} VAE: upcast={sd_model.vae.config.get("force_upcast", None)}') if hasattr(sd_model, "enable_model_cpu_offload"): if (shared.cmd_opts.medvram and devices.backend != "directml") or shared.opts.diffusers_model_cpu_offload: shared.log.debug(f'Setting {op}: enable model CPU offload') diff --git a/wiki b/wiki index 203234e73..e36796b11 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 203234e7397733e5801227e00691ccfe68a80826 +Subproject commit e36796b11369b1ed8b815d6a5bfb17d02e3607fd