diff --git a/CHANGELOG.md b/CHANGELOG.md index f9db1683e..8390e4e5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,17 @@ # Change Log for SD.Next -## Highlights for 2026-08-26 +## Update for 2026-08-27 + +- **LoRA** + - new calibration engine that allows lora to be applied with far smaller error when dealing with highly quantized models + - new apply engine that allows lora to be applied much faster + - *note*: calibration data is stored once calculated so it can be reused for future runs, location is `models/calibration` folder +- **Internal** + - attention mechanisms decision tree and apply method refactor + +## Update for 2026-08-26 + +### Highlights for 2026-08-26 Time for a new release, *this is a large one*! Main focus is improving video workflows which also brings full support for new [MiniMax H3](https://vladmandic.github.io/sdnext-docs/MiniMax) and [LTXVideo-2.5](https://vladmandic.github.io/sdnext-docs/LTX) diff --git a/modules/lora/lora_calib.py b/modules/lora/lora_calib.py index d854016d9..032148944 100644 --- a/modules/lora/lora_calib.py +++ b/modules/lora/lora_calib.py @@ -21,6 +21,7 @@ compiled (hooks would break the graph) and everything is gated by the """ import os +from typing import Optional, TypedDict import torch @@ -28,9 +29,23 @@ from modules import paths, shared, script_callbacks from modules.logger import log +class CaptureRecord(TypedDict): + m: torch.nn.Module + ss: Optional[torch.Tensor] + n: int + done: bool + + +class CaptureState(TypedDict): + model: Optional[str] + recs: dict[str, CaptureRecord] + handles: list[torch.utils.hooks.RemovableHandle] + complete: bool + + TOKENS_DONE = 65536 calib_root = os.path.join(paths.models_path, 'calibration') -capture = {'model': None, 'recs': {}, 'handles': [], 'complete': False} +capture: CaptureState = {'model': None, 'recs': {}, 'handles': [], 'complete': False} def enabled():