Commit Graph

8918 Commits

Author SHA1 Message Date
Disty0 c35201de30 cleanup triton mm 2026-07-09 16:21:47 +03:00
Disty0 8cc5faa877 remove math import 2026-07-09 14:14:50 +03:00
Disty0 3641d12274 Inductor breaks down with math.log 2026-07-09 14:06:02 +03:00
Vladimir Mandic f4348bcb69 server info handle multi-gpu
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-09 11:18:04 +02:00
Disty0 3476125374 fix hadamard on sdnq atten with sd 1.5 2026-07-09 01:03:26 +03:00
Disty0 f8623d7879 Update SDNQConfig docstring 2026-07-08 21:49:28 +03:00
Disty0 2490023570 SDNQ skip quant if numel is less than 16384 and add nn.Embedding to no spilt modules on offload 2026-07-08 21:38:28 +03:00
Disty0 87684e1a21 SDNQ fix hadamard with non pow2 shapes and add 16bit types to quant list 2026-07-08 19:29:57 +03:00
Vladimir Mandic bcd597cd8a improve ui models
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-08 14:50:29 +02:00
CalamitousFelicitousness 56dc1b5a39 fix(models): prefetch configs skipped by hf hub downloads on windows
diffusers pipeline downloads build subfolder config.json allow-patterns
with os.path.join, and huggingface_hub>=1.22 matches patterns with
fnmatchcase which does not normalize path separators
(huggingface/huggingface_hub#4435). On windows the resulting backslash
patterns match nothing, so per-component config.json files are never
downloaded and the incomplete snapshot still passes the diffusers
cache-completeness check, failing every subsequent load with
"no file named config.json".

Prefetch component configs with forward-slash patterns before pipeline
load. This covers all model families and also repairs snapshots already
broken by the bug on the next load attempt. No-op on linux, in offline
mode, and for local folder or single-file models.
2026-07-08 12:18:11 +01:00
Vladimir Mandic 70c503f58e fix non-english git and add faster stat
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-08 11:14:40 +02:00
Vladimir Mandic 3158468dc4 add server restart api endpoint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-08 10:09:36 +02:00
Vladimir Mandic cfd31599b4 fix lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-08 09:50:26 +02:00
Vladimir Mandic 9a2c76ade3 Merge pull request #4987 from vladmandic/fix/lora-te-fixes
Fix/lora te fixes
2026-07-08 09:48:06 +02:00
CalamitousFelicitousness 1f549839dd fix(lora): disable diffusers-method loras on removal
Removing all loras never called set_adapters, so peft adapters stayed
active until model reload. Removal now uses disable_lora, which keeps
modules intact; unload_lora_weights would detach balanced offload hooks.
Load calls enable_lora after set_adapters since peft set_adapter does
not clear the disabled flag. Removal of fused diffusers loras remains
unhandled.
2026-07-08 03:06:47 +01:00
CalamitousFelicitousness 2605764f43 fix(lora): honor te multiplier for text encoder keys
NetworkModule.multiplier matched text encoders via 'transformer' in the
key prefix, which fits dit keys but never lora_te keys, so text encoder
modules followed unet_multiplier[0] and the te= tag strength was ignored.
2026-07-08 03:06:14 +01:00
CalamitousFelicitousness 4554b9a277 fix(lora): apply te networks before encode and honor lora_apply_te
Network activation ran after prompt encoding, so text encoder lora
weights never affected embeds on the first generation and the stale
result was then served from the embed cache. The trailing unfiltered
activate in network_load also overrode the te exclude filter, so the
lora_apply_te setting was never honored.

- parse and activate networks in process_base before pipeline args are built
- activate_filtered gates text encoder components on per-request or global
  lora_apply_te; used by base, hires, detailer and faceid call sites
- network_load accepts activate=False for callers that run their own
  deactivate/activate sequence with include/exclude
- network_activate walks excluded components in restore-only mode so a
  filtered text encoder reverts to backup instead of keeping stale deltas
- loaded_loras cache is single-entry since per-filter entries go stale when
  the setting toggles
- prompt embed cache key includes the effective lora_apply_te value
2026-07-08 03:06:04 +01:00
CalamitousFelicitousness 917dd3a109 fix(lora): handle flattened clip text model in kohya te keys
transformers >=5.6 removed the text_model wrapper from CLIPTextModel, so
kohya te keys no longer matched the network layer mapping and text encoder
weights were silently skipped. KeyConvert retries te keys with the
text_model segment dropped; lora extraction keeps writing canonical kohya
naming for flattened encoders.
2026-07-08 03:05:30 +01:00
0xDELUXA 6460601407 rocm: detect hipBLASLt lazy library in per-arch subfolder and zlib form 2026-07-07 23:12:04 +03:00
Disty0 afe6394833 SDNQ add and enable use_contiguous_fp16_mm for ROCm 2026-07-07 03:48:30 +03:00
Disty0 ae4b116f95 dedupe and cleanup sdnq code 2026-07-06 21:40:29 +03:00
Vladimir Mandic c254eff191 revert stat
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-06 17:58:50 +02:00
Vladimir Mandic 870cca30fa schedulers fix zero-sigma final-step
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-06 13:21:19 +02:00
Vladimir Mandic fc2231b6cf fix wan vae postprocessing step
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-06 10:30:33 +02:00
Vladimir Mandic d5ad5bab24 pin correct tokenizers
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-06 08:12:09 +02:00
CalamitousFelicitousness 9ffaed47ba feat(te): reset text-encoder override when base model architecture changes
When a checkpoint change switches the model type, a custom sd_text_encoder no
longer fits, so reset it to Default and clear loaded_te, mirroring the sd_unet
reset. The type is resolved with detect_pipeline on both the loaded and incoming
checkpoints, so same-arch switches (Krea2 Base and Turbo share one pipeline
class) do not reset. The checkpoint handler also returns sd_text_encoder
alongside sd_unet so the dropdown reflects it.
2026-07-06 02:29:36 +01:00
CalamitousFelicitousness f96a0639e2 fix(te): apply sd_text_encoder changes for non-T5 encoders
reload_text_encoder only hot-swapped T5-family encoders and ran only at initial
load, so changing sd_text_encoder for a model with a generic encoder (Krea2's
Qwen3-VL) never took effect until a full model reload. Track the loaded
selection and, for encoders with no in-place swap, reload the model on change,
triggered from the settings handler. The fresh model object also invalidates
the prompt cache.
2026-07-05 22:49:47 +01:00
Disty0 b7322637a4 fix old torch 2026-07-05 10:41:04 +03:00
Disty0 3ea46fff79 don't disable mm with uint8 2026-07-05 10:23:55 +03:00
Disty0 16a284eecf lint 2026-07-04 21:53:40 +03:00
Disty0 77c72e03ab remove dequantize_symmetric_with_bias 2026-07-04 19:09:25 +03:00
Disty0 e49ae6bd1b SDNQ Add UINT8 MM support 2026-07-04 18:51:45 +03:00
Disty0 7274565deb SDNQ Rename FP8 MM to FP8 Scaled MM and Rename FP8 TW MM to FP8 MM 2026-07-04 16:38:50 +03:00
Vladimir Mandic 4bd0c39133 lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-04 15:31:58 +02:00
Vladimir Mandic db26b77909 add boogu
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-04 15:26:36 +02:00
Vladimir Mandic 9d6122c50d lint sdnq
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-04 11:18:32 +02:00
Vladimir Mandic 2c632bb562 refactor detailer
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-04 11:17:56 +02:00
Disty0 d62a0690a2 SDNQ: Don't re-quantize for matmul with dyn quant, Fix nn.Embedding and Typing 2026-07-04 02:54:19 +03:00
CalamitousFelicitousness 2d5903e91b fix(networks): keep reference mtime a datetime for date sort
strptime was handed the stat datetime instead of the date string, so it
always failed and left a raw string mtime; the Date sort then crashed on
mixed str/datetime items. Parse the date string, falling back to stat mtime.
2026-07-03 21:14:50 +01:00
CalamitousFelicitousness 4bdda6d91a feat(civitai): route DiT checkpoint downloads to the UNET folder
CivitAI has no model type for a standalone transformer, so DiT finetunes
are published as 'Checkpoint' like full models and all landed in
Stable-diffusion, where the single-file transformer loader never looks.
Route Checkpoint downloads to UNET unless the base model is a known full
checkpoint (SD1.x/2.x, SDXL and its Pony/Illustrious/NoobAI derivatives,
SVD, Kolors, Stable Cascade). Downloads with no base_model, or a
civitai_save_type_folders override, keep the previous behavior.
2026-07-03 21:07:46 +01:00
CalamitousFelicitousness 3c0ca8f483 fix(civitai): validate downloads by content-length and content-type
An absolute 1024-byte floor rejected valid complete downloads, since
some safetensors are legitimately tiny (a lone projector-diff tensor is
~160 bytes). Verify completeness against the declared Content-Length
instead, accepting any size, and keep the floor only as a fallback when
it is missing. Reject text/* responses up front so an HTML error or
login page served with HTTP 200 is never saved as a model file.
2026-07-03 21:07:46 +01:00
Vladimir Mandic 98a7d17207 linting
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-03 22:05:33 +02:00
Vladimir Mandic a4d107a919 refactor detailer
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-03 21:03:28 +02:00
Vladimir Mandic 5cda0aeeb2 update reference displays
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-03 12:51:28 +02:00
Vladimir Mandic 17c8fe91e2 cleanup performance tags
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-02 19:14:04 +02:00
Vladimir Mandic 51a0eaaa21 add experimental openai interface
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-02 14:36:44 +02:00
Vladimir Mandic fcee7e23f2 add experimental pruna
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-02 11:25:33 +02:00
Vladimir Mandic e21ba60d05 update hf hijack, simplify anima loader, add few more models
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-01 22:47:07 +02:00
Vladimir Mandic e08bdaf76b handle invalid extension
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-01 18:59:20 +02:00
Vladimir Mandic 22d01c7e6e lora load cache state_dict
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-01 18:43:48 +02:00