update lens and bria

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2026-06-29 09:19:29 +02:00
parent f0ef201882
commit d3e3948787
7 changed files with 44 additions and 32 deletions
+5 -4
View File
@@ -1,20 +1,21 @@
# Change Log for SD.Next
## Update for 2026-06-26
## Update for 2026-06-29
### Highlights for 2026-06-26
### Highlights for 2026-06-29
Service-pack update with several fixes and quality-of-life improvements
Plus new **Krea 2** model and **SDNQ** improvements: now with NPU support and its own native attention kernels!
Plus new **Krea 2** model and **SDNQ** improvements: now with *NPU* support and its own native *attention* kernels!
[Home](https://vladmandic.github.io/sdnext/) | [ChangeLog](https://github.com/vladmandic/automatic/blob/master/CHANGELOG.md) | [Docs](https://vladmandic.github.io/sdnext-docs/) | [Discord](https://discord.com/invite/sd-next-federal-batch-inspectors-1101998836328697867) | [Sponsor](https://github.com/sponsors/vladmandic)
### Details for 2026-06-26
### Details for 2026-06-29
- **Models**
- [Krea 2](https://www.krea.ai/blog/krea-2-image-model) in *base* and *turbo* (distilled) variants
both *base* and *turbo* are available in both full *bf16* and *sdnq* pre-quantized variants
K2 is a 12.9B single-stream flow-matching DiT and using a Qwen3-VL-4B text encoder
- **Microsoft Lens** got unpublished, but we still got a mirror
- **Features**
- **SDNQ-Attention**
modelled after *sage-attention*, but modified to support AMD and Intel GPUs in addition to nVidia
+5 -1
View File
@@ -31,5 +31,9 @@
"vladmandic--Anima-1.0-Base-sdnq-svd-dynamic-uint4": "vladmandic--Anima-1.0-Base.jpg",
"vladmandic--Anima-1.0-Turbo-sdnq-svd-dynamic-uint4": "vladmandic--Anima-1.0-Turbo.jpg",
"vladmandic--Krea-2-Turbo-sdnq-hadamard-uint4": "CalamitousFelicitousness--Krea-2-Turbo-Diffusers.jpg",
"vladmandic--Krea-2-Base-sdnq-hadamard-uint4": "CalamitousFelicitousness--Krea-2-Base-Diffusers.jpg"
"vladmandic--Krea-2-Base-sdnq-hadamard-uint4": "CalamitousFelicitousness--Krea-2-Base-Diffusers.jpg",
"Jinstudio--Lens": "microsoft--Lens.jpg",
"Jinstudio--Lens-Base": "microsoft--Lens-Base.jpg",
"Jinstudio--Lens-Turbo": "microsoft--Lens-Turbo.jpg",
"SahilCarterr--BRIA-3.2": "briaai--BRIA-3.2.jpg"
}
+9 -9
View File
@@ -35,14 +35,14 @@
"date": "2023 July"
},
"Microsoft Lens": {
"path": "microsoft/Lens",
"path": "Jinstudio/Lens",
"preview": "microsoft--Lens.jpg",
"desc": "Microsoft Lens is a text-to-image DiT model using GPT-OSS chat-style prompt encoding and Flux2 VAE decoding.",
"size": 30.53,
"date": "2026 May"
},
"Microsoft Lens Base": {
"path": "microsoft/Lens-Base",
"path": "Jinstudio/Lens-Base",
"preview": "microsoft--Lens-Base.jpg",
"desc": "Microsoft Lens-Base is the base variant of Lens for text-to-image generation with GPT-OSS prompt features.",
"size": 30.53,
@@ -730,13 +730,6 @@
"size": 25.56,
"date": "2024 October"
},
"Bria 3.2": {
"path": "briaai/BRIA-3.2",
"desc": "Bria 3.2 is the next-generation commercial-ready text-to-image model. With just 4 billion parameters, it provides exceptional aesthetics and text rendering, evaluated to provide on par results to leading open-source models, and outperforming other licensed models.",
"preview": "briaai--BRIA-3.2.jpg",
"size": 18.66,
"date": "2025 June"
},
"Meissonic": {
"path": "MeissonFlow/Meissonic",
"desc": "Meissonic is a non-autoregressive mask image modeling text-to-image synthesis model that can generate high-resolution images. It is designed to run on consumer graphics cards.",
@@ -833,6 +826,13 @@
"size": 24.13,
"date": "2025 December"
},
"Bria 3.2": {
"path": "SahilCarterr/BRIA-3.2",
"desc": "Bria 3.2 is the next-generation commercial-ready text-to-image model. With just 4 billion parameters, it provides exceptional aesthetics and text rendering, evaluated to provide on par results to leading open-source models, and outperforming other licensed models.",
"preview": "briaai--BRIA-3.2.jpg",
"size": 18.66,
"date": "2025 June"
},
"StepFun Step1X-Edit v1.1": {
"path": "stepfun-ai/Step1X-Edit-v1p1-diffusers",
"preview": "stepfun-ai--Step1X-Edit-v1p1-diffusers.jpg",
+1 -1
View File
@@ -33,7 +33,7 @@
"size": 38.78
},
"Microsoft Lens Turbo": {
"path": "microsoft/Lens-Turbo",
"path": "Jinstudio/Lens-Turbo",
"preview": "microsoft--Lens-Turbo.jpg",
"desc": "Microsoft Lens-Turbo is the distilled Lens variant optimized for faster text-to-image generation with fewer steps.",
"size": 30.53,
+20 -16
View File
@@ -307,8 +307,26 @@ def get_hf_api_hijack(user_agent = None): # pylint: disable=unused-argument
return HfApi(library_name="kernels", user_agent="donottrack")
def set_attention_dispatcher(pipe):
def hijack_kernels():
global orig_get_kernel # pylint: disable=global-statement
try:
install('kernels==0.14.1')
import kernels
import kernels.utils
log.debug(f'Attention dispatcher: kernels={kernels.__version__}')
if orig_get_kernel is None:
orig_get_kernel = kernels.get_kernel
kernels.get_kernel = get_kernel_hijack
kernels.utils._get_hf_api = get_hf_api_hijack # pylint: disable=protected-access
from diffusers.utils import import_utils
import_utils._kernels_available = True # pylint: disable=protected-access
import_utils._kernels_version = kernels.__version__ # pylint: disable=protected-access
except Exception as e:
log.error(f'Attention dispatcher kernels: {e}')
return
def set_attention_dispatcher(pipe):
from modules import shared
attn = shared.opts.hf_attention.strip().lower()
if pipe is None or not hasattr(pipe, 'transformer') or not hasattr(pipe.transformer, 'set_attention_backend'):
@@ -320,21 +338,7 @@ def set_attention_dispatcher(pipe):
# https://huggingface.co/docs/diffusers/optimization/attention_backends#available-backends
if 'hub' in attn:
try:
install('kernels==0.14.1')
import kernels
import kernels.utils
log.debug(f'Attention dispatcher: kernels={kernels.__version__}')
if orig_get_kernel is None:
orig_get_kernel = kernels.get_kernel
kernels.get_kernel = get_kernel_hijack
kernels.utils._get_hf_api = get_hf_api_hijack # pylint: disable=protected-access
from diffusers.utils import import_utils
import_utils._kernels_available = True # pylint: disable=protected-access
import_utils._kernels_version = kernels.__version__ # pylint: disable=protected-access
except Exception as e:
log.error(f'Attention dispatcher kernels: {e}')
return
hijack_kernels()
prev = a._AttentionBackendRegistry.get_active_backend() # pylint: disable=protected-access
if attn in backends:
+1 -1
View File
@@ -211,7 +211,7 @@ try:
except Exception as e:
log.error(f'Loader: diffusers=={diffusers.__version__ if "diffusers" in sys.modules else None} {e}')
log.error('Please restart re-run the installer')
# errors.display(e, 'diffusers')
errors.display(e, 'diffusers')
sys.exit(1)
try:
+3
View File
@@ -12,6 +12,9 @@ def load_lens(checkpoint_info, diffusers_load_config=None):
sd_models.hf_auth_check(checkpoint_info)
from pipelines import lens
from modules.attention import hijack_kernels
hijack_kernels()
load_args, _quant_args = model_quant.get_dit_args(diffusers_load_config, allow_quant=False)
log.debug(f'Load model: type=Lens repo="{repo_id}" config={diffusers_load_config} offload={shared.opts.diffusers_offload_mode} dtype={devices.dtype} reasoner={shared.opts.model_lens_enable_pe} args={load_args}')