diff --git a/CHANGELOG.md b/CHANGELOG.md index 51d61aa46..d49c1c555 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,11 +47,17 @@ - Flux: all-in-one safetensors example: - Flux: do not recast quants -- **Offload** improvements: - - faster and more compatible *balanced* mode +- **Memory** improvements: + - faster and more compatible *balanced offload* mode - balanced offload: units are now in percentage instead of bytes - balanced offload: add both high and low watermark - *note*: balanced offload is recommended method for offload when using any large models such as sd35 or flux + default is 25% for low-watermark (skip offload if memory usage is below 25%) and 70% high-watermark (must offload if memory usage is above 70%) + - change-in-behavior: + `lowvrwam` triggers *sequential offload*, also automatically triggered on systems with <=4GB vram + all other systems use *balanced offload* by default (can be changed in settings) + previous behavior was to use *model offload* on systems with <=8GB and `medvram` and no offload by default + - VAE upcase is now disabled by default on all systems + if you have issues with image decode, you'll need to enable it manually - **UI**: - improved stats on generate completion - improved live preview display and performance diff --git a/configs/flux/vae/config.json b/configs/flux/vae/config.json index b43183d0f..7ecb342c2 100644 --- a/configs/flux/vae/config.json +++ b/configs/flux/vae/config.json @@ -14,7 +14,7 @@ "DownEncoderBlock2D", "DownEncoderBlock2D" ], - "force_upcast": true, + "force_upcast": false, "in_channels": 3, "latent_channels": 16, "latents_mean": null, diff --git a/configs/sd15/vae/config.json b/configs/sd15/vae/config.json index 55d78924f..2cba0e824 100644 --- a/configs/sd15/vae/config.json +++ b/configs/sd15/vae/config.json @@ -14,6 +14,7 @@ "DownEncoderBlock2D", "DownEncoderBlock2D" ], + "force_upcast": false, "in_channels": 3, "latent_channels": 4, "layers_per_block": 2, diff --git a/configs/sd3/vae/config.json b/configs/sd3/vae/config.json index 58e7764fb..f6f4e8684 100644 --- a/configs/sd3/vae/config.json +++ b/configs/sd3/vae/config.json @@ -15,7 +15,7 @@ "DownEncoderBlock2D", "DownEncoderBlock2D" ], - "force_upcast": true, + "force_upcast": false, "in_channels": 3, "latent_channels": 16, "latents_mean": null, diff --git a/configs/sdxl/vae/config.json b/configs/sdxl/vae/config.json index a66a171ba..1c7a60866 100644 --- a/configs/sdxl/vae/config.json +++ b/configs/sdxl/vae/config.json @@ -15,7 +15,7 @@ "DownEncoderBlock2D", "DownEncoderBlock2D" ], - "force_upcast": true, + "force_upcast": false, "in_channels": 3, "latent_channels": 4, "layers_per_block": 2, diff --git a/modules/shared.py b/modules/shared.py index aa41a6fd6..068ee8b40 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -432,15 +432,15 @@ def get_default_modes(): cmd_opts.lowvram = True default_offload_mode = "sequential" log.info(f"Device detect: memory={gpu_memory:.1f} optimization=lowvram") - elif gpu_memory <= 8: - cmd_opts.medvram = True - default_offload_mode = "model" - log.info(f"Device detect: memory={gpu_memory:.1f} optimization=medvram") + # elif gpu_memory <= 8: + # cmd_opts.medvram = True + # default_offload_mode = "model" + # log.info(f"Device detect: memory={gpu_memory:.1f} optimization=medvram") else: - default_offload_mode = "none" - log.info(f"Device detect: memory={gpu_memory:.1f} optimization=none") + default_offload_mode = "balanced" + log.info(f"Device detect: memory={gpu_memory:.1f} optimization=balanced") elif cmd_opts.medvram: - default_offload_mode = "model" + default_offload_mode = "balanced" elif cmd_opts.lowvram: default_offload_mode = "sequential"