From 203e46af0cbecef62f36062bfa7da4480053b309 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 25 Oct 2025 12:18:52 -0400 Subject: [PATCH] update reference sizes Signed-off-by: Vladimir Mandic --- cli/hf-search.py | 16 ++++++++-------- html/reference.json | 13 +++++++++---- pipelines/generic.py | 9 +++++++++ 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/cli/hf-search.py b/cli/hf-search.py index f69c215eb..9ee696602 100755 --- a/cli/hf-search.py +++ b/cli/hf-search.py @@ -7,12 +7,12 @@ from rich import print # pylint: disable=redefined-builtin if __name__ == "__main__": sys.argv.pop(0) keyword = sys.argv[0] if len(sys.argv) > 0 else '' + hf.logging.set_verbosity_info() hf_api = hf.HfApi() - model_filter = hf.ModelFilter( - model_name=keyword, - # task='text-to-image', - library=['diffusers'], - ) - res = hf_api.list_models(filter=model_filter, full=True, limit=50, sort="downloads", direction=-1) - models = [{ 'name': m.id, 'downloads': m.downloads, 'mtime': m.lastModified, 'url': f'https://huggingface.co/{m.id}', 'pipeline': m.pipeline_tag, 'tags': m.tags } for m in res] - print(models) + res = hf_api.list_models(model_name=keyword, full=True, limit=100, sort="downloads", direction=-1) + res = sorted(res, key=lambda x: x.id) + 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 }) diff --git a/html/reference.json b/html/reference.json index 2022a40db..437e7461c 100644 --- a/html/reference.json +++ b/html/reference.json @@ -912,7 +912,7 @@ "desc": "4 bit (UINT4 with SVD rank 32) quantization of black-forest-labs/FLUX.1-dev using SDNQ.", "skip": true, "tags": "quantized", - "size": 6.8, + "size": 13.53, "date": "2025 October", "extras": "" }, @@ -922,7 +922,7 @@ "desc": "quantization of lodestones/Chroma1-HD using SDNQ: sdnq-svd 4-bit uint with svd rank 32", "skip": true, "tags": "quantized", - "size": 5.4, + "size": 11.89, "date": "2025 October", "extras": "" }, @@ -933,6 +933,7 @@ "skip": true, "tags": "quantized", "date": "2025 October", + "size": 23.54, "extras": "" }, "Wan-AI Wan2.2 A14B I2I sdnq-svd-uint4": { @@ -942,6 +943,7 @@ "skip": true, "tags": "quantized", "date": "2025 October", + "size": 23.55, "extras": "" }, "Qwen-Image sdnq-svd-uint4": { @@ -951,6 +953,7 @@ "skip": true, "tags": "quantized", "date": "2025 October", + "size": 16.09, "extras": "" }, "Qwen-Image-Edit sdnq-svd-uint4": { @@ -960,6 +963,7 @@ "skip": true, "tags": "quantized", "date": "2025 October", + "size": 16.10, "extras": "" }, "Qwen-Image-Edit-2509 sdnq-svd-uint4": { @@ -969,6 +973,7 @@ "skip": true, "tags": "quantized", "date": "2025 October", + "size": 16.10, "extras": "" }, @@ -978,7 +983,7 @@ "desc": "quantization of Laxhar/noobai-XL-1.1 using SDNQ: sdnq-svd 4-bit uint with svd rank 128", "skip": true, "tags": "quantized", - "size": 2.56, + "size": 3.37, "date": "2025 October", "extras": "" }, @@ -988,7 +993,7 @@ "desc": "quantization of Laxhar/noobai-XL-Vpred-1.0 using SDNQ: sdnq-svd 4-bit uint with svd rank 128", "skip": true, "tags": "quantized", - "size": 2.56, + "size": 3.37, "date": "2025 October", "extras": "" }, diff --git a/pipelines/generic.py b/pipelines/generic.py index e78ac7b8b..70f3b4449 100644 --- a/pipelines/generic.py +++ b/pipelines/generic.py @@ -49,6 +49,8 @@ def load_transformer(repo_id, cls_name, load_config={}, subfolder="transformer", ) else: shared.log.debug(f'Load model: transformer="{repo_id}" cls={cls_name.__name__} subfolder={subfolder} quant="{quant_type}" args={load_args}') + if 'sdnq-' in repo_id.lower(): + quant_args = {} if dtype is not None: load_args['torch_dtype'] = dtype if subfolder is not None: @@ -131,6 +133,13 @@ def load_text_encoder(repo_id, cls_name, load_config={}, subfolder="text_encoder ) text_encoder.quantization_method = 'SVDQuant' elif shared.opts.te_shared_t5: + """ + if 'sdnq-' in repo_id.lower(): + repo_id = 'Disty0/FLUX.1-dev-SDNQ-uint4-svd-r32' + load_args['subfolder'] = 'text_encoder_2' + quant_args = {} + else: + """ repo_id = 'Disty0/t5-xxl' shared.log.debug(f'Load model: text_encoder="{repo_id}" cls={cls_name.__name__} quant="{quant_type}" shared={shared.opts.te_shared_t5}') if dtype is not None: