diff --git a/CHANGELOG.md b/CHANGELOG.md index e8ad9b844..8151bbe2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,22 +1,36 @@ # Change Log for SD.Next -## Update for 2025-01-15 +## Update for 2025-01-16 + +### Highlights for 2025-01-16 + +First release of 2026 brings quite a few new models: **Flux.2-Klein, Qwen-Image-2512, LTX-2-Dev, GLM-Image** +There are also improvements to SDNQ quantization engine, updated Prompt Enhance and many others +Plus some significant under-the-hood changes to improve code coverage and quality which resulted in more than usual levels of bug-fixes! + +[ReadMe](https://github.com/vladmandic/automatic/blob/master/README.md) | [ChangeLog](https://github.com/vladmandic/automatic/blob/master/CHANGELOG.md) | [Docs](https://vladmandic.github.io/sdnext-docs/) | [WiKi](https://github.com/vladmandic/automatic/wiki) | [Discord](https://discord.com/invite/sd-next-federal-batch-inspectors-1101998836328697867) | [Sponsor](https://github.com/sponsors/vladmandic) + +### Details for 2025-01-16 - **Models** - - [Qwen-Image-2512](https://huggingface.co/Qwen/Qwen-Image-2512) + - [Flux.2 Klein](https://bfl.ai/blog/flux2-klein-towards-interactive-visual-intelligence) + Flux.2-Klein is a new family of compact models from BFL in *4B and 9B sizes* and avaialable as *destilled and base* variants + also includes are *SDNQ prequantized variants* + - [Qwen-Image-2512](https://qwen.ai/blog?id=qwen-image-2512) Qwen-Image successor, significantly reduces the AI-generated look and adds finer natural detailils and improved text rendering available in both *original*, *sdnq-svd prequantized* and *sdnq-dynamic prequantized* variants - - [LTX-2 19B Dev](https://huggingface.co/Lightricks/LTX-2) + - [LTX-2 19B Dev](https://ltx.io/model/ltx-2) LTX-2 is a new very large 19B parameter video generation model from Lightricks using Gemma-3 text encoder available for T2I/I2I workflows in original and SDNQ prequantized variants *note*: audio generation and upsampling are not yet supported (soon) - - [GLM-Image](https://huggingface.co/zai-org/GLM-Image) + - [GLM-Image](https://z.ai/blog/glm-image) GLM-image is a new image generation model that adopts a hybrid autoregressive with diffusion decoder architecture available in both *original* and *sdnq-dynamic prequantized* variants, thanks @CalamitousFelicitousness *note*: model requires pre-release versions of `transformers` package: > pip install --upgrade git+https://github.com/huggingface/transformers.git > ./webui.sh --experimental - [Nunchaku Z-Image Turbo](https://huggingface.co/nunchaku-tech/nunchaku-z-image-turbo) + nunchaku optimized z-image turbo - **Feaures** - **SDNQ**: add *dynamic* quantization method sdnq can dynamically determine best quantization method for each module layer diff --git a/cli/hf-search.py b/cli/hf-search.py index 9ee696602..638af0aa1 100755 --- a/cli/hf-search.py +++ b/cli/hf-search.py @@ -9,10 +9,19 @@ if __name__ == "__main__": keyword = sys.argv[0] if len(sys.argv) > 0 else '' hf.logging.set_verbosity_info() hf_api = hf.HfApi() - res = hf_api.list_models(model_name=keyword, full=True, limit=100, sort="downloads", direction=-1) + res = hf_api.list_models( + model_name=keyword, + full=True, + limit=100, + sort="downloads", + direction=-1, + ) res = sorted(res, key=lambda x: x.id) + exact = [m for m in res if keyword.lower() in m.id.lower()] + if len(exact) > 0: + res = exact for m in res: meta = hf_api.model_info(m.id, files_metadata=True) m.files = [f.rfilename for f in meta.siblings if f.rfilename.endswith('.bin') or f.rfilename.endswith('.safetensors')] - m.size = sum([f.size for f in meta.siblings]) / 1024 / 1024 / 1024 # in GB - print({ 'name': m.id, 'files': len(m.files), 'size': m.size, 'downloads': m.downloads, 'mtime': m.lastModified, 'url': f'https://huggingface.co/{m.id}', 'pipeline': m.pipeline_tag }) + m.size = round(sum([f.size for f in meta.siblings]) / 1024 / 1024 / 1024, 2) + print({ 'name': m.id, 'files': len(m.files), 'size': m.size, 'downloads': m.downloads, 'ctime': m.created_at.isoformat(), 'url': f'https://huggingface.co/{m.id}', 'pipeline': m.pipeline_tag }) diff --git a/html/reference-quant.json b/html/reference-quant.json index b8a1f8c97..2dbeb5fca 100644 --- a/html/reference-quant.json +++ b/html/reference-quant.json @@ -56,7 +56,7 @@ "skip": true, "extras": "sampler: Default, cfg_scale: 4.0, steps: 50", "tags": "quantized", - "size": 8.5, + "size": 5.1, "date": "2025 January" }, "Black Forest Labs FLUX.2 Klein Base 9B sdnq-uint4-dynamic-svd": { @@ -66,10 +66,9 @@ "skip": true, "extras": "sampler: Default, cfg_scale: 4.0, steps: 50", "tags": "quantized", - "size": 18.5, + "size": 11.7, "date": "2025 January" }, - "Chroma1-HD sdnq-svd-uint4": { "path": "Disty0/Chroma1-HD-SDNQ-uint4-svd-r32", "preview": "Disty0--Chroma1-HD-SDNQ-uint4-svd-r32.jpg", @@ -137,7 +136,7 @@ "skip": true, "tags": "quantized", "extras": "", - "size": 16.10, + "size": 17.2, "date": "2026 January" }, "Qwen-Image-Edit sdnq-svd-uint4": { @@ -233,7 +232,7 @@ "desc": "Quantization of ZAI GLM-Image using SDNQ: sdnq-dynamic 4-bit uint", "skip": true, "extras": "sampler: Default, cfg_scale: 1.5, steps: 50", - "size": 15.3, + "size": 11.6, "tags": "quantized", "date": "2025 January" } diff --git a/modules/framepack/framepack_wrappers.py b/modules/framepack/framepack_wrappers.py index 2e98944c6..7259db5ea 100644 --- a/modules/framepack/framepack_wrappers.py +++ b/modules/framepack/framepack_wrappers.py @@ -1,7 +1,6 @@ import os import re import random -import threading import numpy as np import torch import gradio as gr diff --git a/modules/ltx/ltx_process.py b/modules/ltx/ltx_process.py index 582cef6b4..bd265d97c 100644 --- a/modules/ltx/ltx_process.py +++ b/modules/ltx/ltx_process.py @@ -1,6 +1,5 @@ import os import time -import threading import torch from PIL import Image diff --git a/modules/ui_control.py b/modules/ui_control.py index d1ac488de..8e967621b 100644 --- a/modules/ui_control.py +++ b/modules/ui_control.py @@ -314,7 +314,6 @@ def create_ui(_blocks: gr.Blocks=None): result_txt, output_html_log, ] - global control_dict # pylint: disable=global-statement control_dict = dict( fn=generate_click, _js="submit_control", diff --git a/modules/ui_loadsave.py b/modules/ui_loadsave.py index 767eca024..ff054f686 100644 --- a/modules/ui_loadsave.py +++ b/modules/ui_loadsave.py @@ -1,6 +1,6 @@ +from typing import TYPE_CHECKING, cast import os import gradio as gr -from typing import TYPE_CHECKING, cast from modules import errors from modules.ui_components import ToolButton diff --git a/pipelines/model_glm.py b/pipelines/model_glm.py index 31974f75b..d849ebb19 100644 --- a/pipelines/model_glm.py +++ b/pipelines/model_glm.py @@ -86,6 +86,10 @@ def load_glm_image(checkpoint_info, diffusers_load_config=None): repo_id = sd_models.path_to_repo(checkpoint_info) sd_models.hf_auth_check(checkpoint_info) + if not hasattr(transformers, 'GlmImageForConditionalGeneration'): + shared.log.error(f'Load model: type=GLM-Image repo="{repo_id}" transformers={transformers.__version__} not supported') + return None + load_args, _quant_args = model_quant.get_dit_args(diffusers_load_config, allow_quant=False) shared.log.debug(f'Load model: type=GLM-Image repo="{repo_id}" offload={shared.opts.diffusers_offload_mode} dtype={devices.dtype} args={load_args}') @@ -108,7 +112,7 @@ def load_glm_image(checkpoint_info, diffusers_load_config=None): # Note: This is a conditional generation model, different from typical text encoders vision_language_encoder = generic.load_text_encoder( repo_id, - cls_name=transformers.GlmImageForConditionalGeneration, + cls_name=transformers.GlmImageForConditionalGeneration, # pylint: disable=no-member subfolder="vision_language_encoder", load_config=diffusers_load_config, allow_shared=False