From 1114165cc13501a004b23da0d4133cb65dd03774 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 29 Aug 2024 20:16:32 -0400 Subject: [PATCH] update changelog and cleanup --- CHANGELOG.md | 8 +++++--- modules/processing_callbacks.py | 2 +- modules/sd_models.py | 1 - wiki | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08e667161..e2c11e212 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,12 +53,13 @@ To use and of the new models, simply select model from *Networks -> Reference* a **New Features...** +- support for **Balanced Offload**, thanks @Disty0! + balanced offload will dynamically split and offload models from the GPU based on the max gpu and cpu memory size: model parts that dont fit in the GPU will be dynamically sliced and offloaded to the CPU + see *Settings -> Diffusers Settings -> Max GPU memory and Max CPU memory* + *note*: balanced offload will force loading LoRA with Diffusers method and it is not compatible with Optimum Quanto - support for **Optimum Quanto** with 8 bit and 4 bit quantization options, thanks @Disty0 and @Trojaner! to use, go to Settings -> Compute Settings and enable "Quantize Model weights with Optimum Quanto" option note: Optimum Quanto requires PyTorch 2.4 -- support for **Balanced Offload**, thanks @Disty0! - balanced offload will dynamically split and offload models from the gpu based on the max gpu and cpu memory size - *note*: balanced offload will force loading LoRA with Diffusers method and it is not compatible with Optimum Quanto - new prompt attention mode: **xhinker** which brings support for prompt attention to new models such as FLUX.1 and SD3 to use, enable in Settings -> Execution -> Prompt attention @@ -87,6 +88,7 @@ To use and of the new models, simply select model from *Networks -> Reference* a - fix LoRA apply with force-diffusers - fix LoRA scales with force-diffusers - fix control API +- fix VAE load refrerencing incorrect configuration - fix NVML gpu monitoring ## Update for 2024-07-08 diff --git a/modules/processing_callbacks.py b/modules/processing_callbacks.py index 2f838c14b..a9c7ab5e8 100644 --- a/modules/processing_callbacks.py +++ b/modules/processing_callbacks.py @@ -83,7 +83,7 @@ def diffusers_callback(pipe, step: int, timestep: int, kwargs: dict): for key in {"prompt_embeds", "negative_prompt_embeds", "add_text_embeds", "add_time_ids"} & set(kwargs): kwargs[key] = kwargs[key].chunk(2)[-1] if hasattr(pipe, "_unpack_latents") and hasattr(pipe, "vae_scale_factor"): # FLUX - shared.state.current_latent = pipe._unpack_latents(kwargs['latents'], p.height, p.width, pipe.vae_scale_factor) + shared.state.current_latent = pipe._unpack_latents(kwargs['latents'], p.height, p.width, pipe.vae_scale_factor) # pylint: disable=protected-access else: shared.state.current_latent = kwargs['latents'] if shared.cmd_opts.profile and shared.profiler is not None: diff --git a/modules/sd_models.py b/modules/sd_models.py index 3c1222219..529924976 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -1674,7 +1674,6 @@ def reload_text_encoder(initial=False): return # dont unload signature = inspect.signature(shared.sd_model.__class__.__init__, follow_wrapped=True, eval_str=True).parameters t5 = [k for k, v in signature.items() if 'T5EncoderModel' in str(v)] - print('HERE', signature.items()) if len(t5) > 0: from modules.model_t5 import set_t5 shared.log.debug(f'Load: t5={shared.opts.sd_text_encoder} module="{t5[0]}"') diff --git a/wiki b/wiki index f87329761..1e82d89b5 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit f87329761eff3fa35f2c0d79ad5d239c5a1f6395 +Subproject commit 1e82d89b50b4b8de6341f34db06ed61c6affae2a