add krea, cleanup, lint

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-10-25 13:22:22 -04:00
parent f903fe3473
commit 7ada86032a
5 changed files with 32 additions and 25 deletions
+7 -3
View File
@@ -5,10 +5,13 @@
- **Models**
- [Tencent HunyuanImage 2.1](https://huggingface.co/tencent/HunyuanImage-2.1) in *full*, *distilled* and *refiner* variants
HunyuanImage-2.1 is a large (51GB) T2I model capable of natively generating 2K images and uses Qwen2.5 + T5 text-encoders and 32x VAE
- networks reference section is now split into actual **Reference** *Base* models plus:
- **Distilled**: distilled variants of base models, for example *Turbo or Lightning*
- **Reference** networks section is now split into actual *Base* models plus:
- **Distilled**: distilled variants of base models
examples: *Turbo, Lightning, Lite, SRPO, Distill, Pruning, etc.*
- **Quantized**: pre-quantized variants of the base models using SDNQ-SVD quantization for optimal quality and smallest possible resource usage
- **Community**: community highlights, for example, *Illustrious, Pony, NoobAI*
examples: *FLUX.1-Dev/Krea/Kontext, Qwen-Image/Edit/2509, Chroma1-HD, WAN-2.2-A44B, etc.*
- **Community**: community highlights
examples: *Tempest, Juggernaut, Illustrious, Pony, NoobAI, etc.*
- **Features**
- **offline mode**: enable in *settings -> hugginface*
enables fully offline mode where previously downloaded models can be used as-is
@@ -25,6 +28,7 @@
- enhance `--optional` flag to pre-install optional packages
- add `[lora]` to recognized filename patterns
- add **Apple DepthPro** controlnet processor, thanks @nolbert82
- when using **shared-t5** *(default)*, it will load standard or pre-quant depending on model
- **Fixes**
- startup error with `--profile` enabled if using `--skip`
- restore orig init image for each batch sequence
-6
View File
@@ -2,12 +2,6 @@
Main ToDo list can be found at [GitHub projects](https://github.com/users/vladmandic/projects)
## Blockers
- Load pre-quantized T5: <https://github.com/vladmandic/sdnext/blob/203e46af0cbecef62f36062bfa7da4480053b309/pipelines/generic.py#L137>
- Wan-2.2-5B VAE tiling: <https://github.com/huggingface/diffusers/pull/12521>
- Wan-2.2-14V VACE single-stage: <https://github.com/huggingface/diffusers/pull/12428>
## Future Candidates
- [Kanvas](https://github.com/vladmandic/kanvas)
+20 -10
View File
@@ -909,17 +909,27 @@
"FLUX.1-Dev sdnq-svd-uint4": {
"path": "Disty0/FLUX.1-dev-SDNQ-uint4-svd-r32",
"preview": "Disty0--FLUX.1-dev-SDNQ-uint4-svd-r32.jpg",
"desc": "4 bit (UINT4 with SVD rank 32) quantization of black-forest-labs/FLUX.1-dev using SDNQ.",
"desc": "Quantization of black-forest-labs/FLUX.1-dev using SDNQ: sdnq-svd 4-bit uint with svd rank 32",
"skip": true,
"tags": "quantized",
"size": 13.53,
"size": 12.60,
"date": "2025 October",
"extras": ""
},
"FLUX.1-Dev Krea sdnq-svd-uint4": {
"path": "Disty0/FLUX.1-Krea-dev-SDNQ-uint4-svd-r32",
"preview": "Disty0--FLUX.1-dev-SDNQ-uint4-svd-r32.jpg",
"desc": "Quantization of black-forest-labs/FLUX.1-Krea-dev using SDNQ: sdnq-svd 4-bit uint with svd rank 32",
"skip": true,
"tags": "quantized",
"size": 12.60,
"date": "2025 October",
"extras": ""
},
"Chroma1-HD sdnq-svd-uint4": {
"path": "Disty0/Chroma1-HD-SDNQ-uint4-svd-r32",
"preview": "Disty0--Chroma1-HD-SDNQ-uint4-svd-r32.jpg",
"desc": "quantization of lodestones/Chroma1-HD using SDNQ: sdnq-svd 4-bit uint with svd rank 32",
"desc": "Quantization of lodestones/Chroma1-HD using SDNQ: sdnq-svd 4-bit uint with svd rank 32",
"skip": true,
"tags": "quantized",
"size": 11.89,
@@ -929,7 +939,7 @@
"Wan-AI Wan2.2 A14B T2I sdnq-svd-uint4": {
"path": "Disty0/Wan2.2-T2V-A14B-SDNQ-uint4-svd-r32",
"preview": "Wan-AI--Wan2.2-T2V-A14B-Diffusers.jpg",
"desc": "quantization of Wan-AI/Wan2.2-T2V-A14B-Diffusers using SDNQ: sdnq-svd 4-bit uint with svd rank 32",
"desc": "Quantization of black-forest-labs/FLUX.1-dev using SDNQ: sdnq-svd 4-bit uint with svd rank 32",
"skip": true,
"tags": "quantized",
"date": "2025 October",
@@ -939,7 +949,7 @@
"Wan-AI Wan2.2 A14B I2I sdnq-svd-uint4": {
"path": "Disty0/Wan2.2-I2V-A14B-SDNQ-uint4-svd-r32",
"preview": "Wan-AI--Wan2.2-T2V-A14B-Diffusers.jpg",
"desc": "quantization of Wan-AI/Wan2.2-I2V-A14B-Diffusers using SDNQ: sdnq-svd 4-bit uint with svd rank 32",
"desc": "Quantization of Laxhar/noobai-XL-1.1 using SDNQ: sdnq-svd 4-bit uint with svd rank 128",
"skip": true,
"tags": "quantized",
"date": "2025 October",
@@ -949,7 +959,7 @@
"Qwen-Image sdnq-svd-uint4": {
"path": "Disty0/Qwen-Image-SDNQ-uint4-svd-r32",
"preview": "Qwen--Qwen-Image.jpg",
"desc": "quantization of Qwen/Qwen-Image using SDNQ: sdnq-svd 4-bit uint with svd rank 32",
"desc": "Quantization of Qwen/Qwen-Image using SDNQ: sdnq-svd 4-bit uint with svd rank 32",
"skip": true,
"tags": "quantized",
"date": "2025 October",
@@ -959,7 +969,7 @@
"Qwen-Image-Edit sdnq-svd-uint4": {
"path": "Disty0/Qwen-Image-Edit-SDNQ-uint4-svd-r32",
"preview": "Qwen--Qwen-Image-Edit.jpg",
"desc": "quantization of Qwen/Qwen-Image-Edit using SDNQ: sdnq-svd 4-bit uint with svd rank 32",
"desc": "Quantization of Qwen/Qwen-Image-Edit using SDNQ: sdnq-svd 4-bit uint with svd rank 32",
"skip": true,
"tags": "quantized",
"date": "2025 October",
@@ -969,7 +979,7 @@
"Qwen-Image-Edit-2509 sdnq-svd-uint4": {
"path": "Disty0/Qwen-Image-Edit-2509-SDNQ-uint4-svd-r32",
"preview": "Qwen--Qwen-Image-Edit-2509.jpg",
"desc": "quantization of Qwen/Qwen-Image-Edit-2509 using SDNQ: sdnq-svd 4-bit uint with svd rank 32",
"desc": "Quantization of Qwen/Qwen-Image-Edit-2509 using SDNQ: sdnq-svd 4-bit uint with svd rank 32",
"skip": true,
"tags": "quantized",
"date": "2025 October",
@@ -980,7 +990,7 @@
"NoobAI-XL v1.1 epsilon sdnq-svd-uint4": {
"path": "Disty0/NoobAI-XL-v1.1-SDNQ-uint4-svd-r128",
"preview": "Disty0--NoobAI-XL-v1.1-SDNQ-uint4-svd-r128.jpg",
"desc": "quantization of Laxhar/noobai-XL-1.1 using SDNQ: sdnq-svd 4-bit uint with svd rank 128",
"desc": "Quantization of Laxhar/noobai-XL-1.1 using SDNQ: sdnq-svd 4-bit uint with svd rank 128",
"skip": true,
"tags": "quantized",
"size": 3.37,
@@ -990,7 +1000,7 @@
"NoobAI-XL v1.0 v-pred sdnq-svd-uint4": {
"path": "Disty0/NoobAI-XL-Vpred-v1.0-SDNQ-uint4-svd-r128",
"preview": "Disty0--NoobAI-XL-Vpred-v1.0-SDNQ-uint4-svd-r128.jpg",
"desc": "quantization of Laxhar/noobai-XL-Vpred-1.0 using SDNQ: sdnq-svd 4-bit uint with svd rank 128",
"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": 3.37,
+1 -1
View File
@@ -1149,7 +1149,7 @@ def add_noise_pred_to_diffusers_callback(pipe):
return pipe
if pipe.__class__.__name__.startswith("StableCascade") and ("predicted_image_embedding" not in pipe._callback_tensor_inputs): # pylint: disable=protected-access
pipe.prior_pipe._callback_tensor_inputs.append("predicted_image_embedding") # pylint: disable=protected-access
elif "noise_pred" not in pipe._callback_tensor_inputs:
elif "noise_pred" not in pipe._callback_tensor_inputs: # pylint: disable=protected-access
if pipe.__class__.__name__.startswith("StableDiffusion"):
pipe._callback_tensor_inputs.append("noise_pred") # pylint: disable=protected-access
elif hasattr(pipe, "scheduler") and "flow" in pipe.scheduler.__class__.__name__.lower():
+4 -5
View File
@@ -13,7 +13,7 @@ def load_transformer(repo_id, cls_name, load_config={}, subfolder="transformer",
jobid = shared.state.begin('Load DiT')
try:
if 'sdnq-' in repo_id.lower():
from modules import sdnq # register to diffusers and transformers
from modules import sdnq # pylint: disable=unused-import # register to diffusers and transformers
load_args, quant_args = model_quant.get_dit_args(load_config, module='Model', device_map=True, allow_quant=allow_quant, modules_to_not_convert=modules_to_not_convert, modules_dtype_dict=modules_dtype_dict)
quant_type = model_quant.get_quant_type(quant_args)
dtype = dtype or devices.dtype
@@ -86,7 +86,7 @@ def load_text_encoder(repo_id, cls_name, load_config={}, subfolder="text_encoder
jobid = shared.state.begin('Load TE')
try:
if 'sdnq-' in repo_id.lower():
from modules import sdnq # register to diffusers and transformers
from modules import sdnq # pylint: disable=unused-import # register to diffusers and transformers
load_args, quant_args = model_quant.get_dit_args(load_config, module='TE', device_map=True, allow_quant=allow_quant, modules_to_not_convert=modules_to_not_convert, modules_dtype_dict=modules_dtype_dict)
quant_type = model_quant.get_quant_type(quant_args)
dtype = dtype or devices.dtype
@@ -140,9 +140,8 @@ def load_text_encoder(repo_id, cls_name, load_config={}, subfolder="text_encoder
load_args['subfolder'] = 'text_encoder_2'
else:
repo_id = 'Disty0/t5-xxl'
if 'sdnq-' not in repo_id.lower():
with open(os.path.join('configs', 'flux', 'text_encoder_2', 'config.json'), encoding='utf8') as f:
load_args['config'] = transformers.T5Config(**json.load(f))
with open(os.path.join('configs', 'flux', 'text_encoder_2', 'config.json'), encoding='utf8') as f:
load_args['config'] = transformers.T5Config(**json.load(f))
shared.log.debug(f'Load model: text_encoder="{repo_id}" cls={cls_name.__name__} quant="{quant_type}" shared={shared.opts.te_shared_t5} args={load_args}')
if dtype is not None:
load_args['torch_dtype'] = dtype