Commit Graph

9075 Commits

Author SHA1 Message Date
Vladimir Mandic 431774e6e2 fix progress in legacy tabs
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-11 10:41:34 +02:00
Dity0 251945939b Add Lloyd-Max quantization with use_codebook 2026-08-10 22:51:32 +03:00
Vladimir Mandic ccb048a9af fix api-control
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-10 20:43:50 +02:00
Vladimir Mandic 6aa5b45b80 remove directml
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-10 13:43:45 +02:00
Dity0 2250d8052a remove sdnq_dequantize_compile option
- advanced users should use the env var SDNQ_USE_TORCH_COMPILE instead
2026-08-10 13:30:56 +03:00
Vladimir Mandic e89062c04f register submodule as package
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-10 12:06:33 +02:00
Vladimir Mandic 8b1f0d60b5 cleanup
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-10 11:13:28 +02:00
Dity0 712a13f1a0 Move SDNQ to upstream SDNQ repo 2026-08-10 12:13:10 +03:00
Vladimir Mandic 40fb45a546 improve handling of hf auth
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-10 10:55:25 +02:00
Dity0 a2ae48cceb Move triton logging hijacks to loader.py 2026-08-10 11:34:51 +03:00
CalamitousFelicitousness 156b76aa9c feat(sdnq): report triton kernel autotuning and compile time
Autotune sweeps and kernel compiles run inside the first forward pass at a
new shape and can take minutes with no indication in the log or UI. Add
listeners on the triton autotuning and compilation knobs plus a wrap of the
per-candidate benchmark: a sweep draws a console progress bar over its
candidates and mirrors the count in the live progress text, the completion
line records the kernel, shape, duration and compile share, and standalone
compiles over 1s are logged.

- fix timer_sdnq reading bench_time from the python wrapper functions
  instead of the autotuner kernel objects, which left the two matmul
  autotune timers permanently empty
- restore the pre-tuning progress text across chained sweeps, so an
  abandoned sweep cannot strand its own tuning label in the UI
2026-08-10 02:45:23 +01:00
CalamitousFelicitousness fbb447f419 fix(video): capture pipeline audio before batch script hooks
The audio waveform rides as an attribute on the decoded sample list, but
the batch script hooks rewrap samples into a plain list before the
capture ran, so joint audio-video models muxed silent files whenever a
script runner was attached. Capture the attribute before the hooks run.
2026-08-10 02:45:08 +01:00
CalamitousFelicitousness adf0385c52 fix(sampler): record and restore Default instead of the None sentinel
The keep-current-scheduler sentinel leaked into user-facing surfaces:
infotexts and filenames recorded Sampler: None, restoring such an
infotext pushed an invalid value into the dropdown, and the API
samplers list never offered Default at all.

- infotext always records the sampler, mapping a stray None to Default
- parse maps legacy Sampler: None infotexts to Default
- api samplers list leads with Default; the remaining excluded config
  keys are shared templates, not samplers
2026-08-10 02:44:56 +01:00
CalamitousFelicitousness 1fd39358c5 fix(sdnq): reset dynamo caches at model unload
Dynamo tracks a lifetime recompile counter per compiled function that
freed models leave climbing while their graphs and guards die, and the
compiled dequant runs fullgraph, so crossing the accumulated limit is a
hard FailOnRecompileLimitHit instead of an eager fallback; enough model
or quant switches in one process got there. unload_model_weights now
calls reset_compile_caches when the compiled dequant is active, dropping
the dead graphs and the counters in the same sweep as the unload gc.
Raised limits only move the wall; the reset removes it.

- scoped to the model unload branch: the reset is global and must only
  run when the graphs' owner is being discarded
- regression test trips the wall under a lowered limit and recovers
  through the same helper the unload path calls
2026-08-10 02:44:39 +01:00
CalamitousFelicitousness 8ac84c8468 refactor(lora): drop the underscore from the native dispatch registry
NATIVE_DISPATCH is the documented registration surface for per-arch
native loaders and is read cross-module by the fidelity analyzer, so
the private marker signaled the opposite of its role and enforced
nothing.
2026-08-10 02:44:12 +01:00
CalamitousFelicitousness 4e20c43f8c fix(sdnq): restore safe_open key iteration
safe_open exposes keys() but implements no __iter__, so the dict idiom applied
in d11a619a6 raises TypeError on every non-streamer load of a pre-quantized
checkpoint. The threaded method reaches the same loop, since load_threaded
delegates one file at a time.
2026-08-10 02:43:58 +01:00
CalamitousFelicitousness 76d76be4b7 fix(lora): promote per-network multipliers after the removal pass
Cached networks are shared objects, and network_load overwrote their
multipliers before network_deactivate ran, so fuse-mode removal recomputed
the subtraction delta with the new values: a strength edit froze at its
first applied value and a later removal left residue in the model weights.
network_load now stages the values on the net and network_activate promotes
them, so the removal pass always subtracts the delta that was applied.
Backup mode restores from stored tensors and was unaffected.
2026-08-10 02:43:58 +01:00
CalamitousFelicitousness bf0be3da69 fix(lora): keep applied and restored weights on their original storage
Backup-mode apply and restore installed fresh Parameters. Matmul kernel
selection is sensitive to operand placement, so the first load/remove cycle
shifted otherwise deterministic renders once per process even though every
weight restored byte-exact: bit-identical inputs entered the first post-cycle
unet forward and a different output left it. Copying into the existing
parameter keeps each touched module on its load-time allocation and drops the
per-layer transient of holding old and new weights side by side.

- assign_weight writes weight and bias installs in place when shape, dtype
  and device match; quantized fallback layers keep their rebuild path
- regression test pins storage stability across the activate walk
2026-08-10 02:43:23 +01:00
CalamitousFelicitousness 28bd5e8d74 fix(lora): materialize balanced-offload modules before touching weights
Under a pressed balanced offload, dispatched modules hold meta tensors
whose data lives in the accelerate offload map. The factor path raised
trying to move a meta svd tensor and aborted activation mid-pass; the
legacy requantize path silently skipped those layers. Both left the
model with a partially applied network.

Rebuild the offload state with apply_balanced_offload(force) at
activate and deactivate entry: modules come back real on cpu with
hooks intact and the execution device unchanged, so both paths see
usable tensors and the next forward re-onloads under the watermark.
2026-08-10 02:42:28 +01:00
CalamitousFelicitousness 5b694d3300 fix(lora): default dyn_dim to none when caller omits dyn_dims
network_load seeded net.dyn_dim with extra_networks_default_multiplier
when no dyn_dims list was passed, so a float multiplier landed where
consumers expect a rank and slice with it. The prompt path always builds
a per-network list of ints or None, which is why the crash never fired
from the UI; any direct network_load caller hits it in both
rebuild_conventional and the sdnq factor path.
2026-08-10 02:42:05 +01:00
CalamitousFelicitousness 4c85a60c3e perf(lora): skip the discarded init when building lora modules
create_module built each up/down module with the default constructor,
which kaiming-initializes the parameter, then copied the stored weight
over the whole thing. The init is thrown away every time and costs about
four times the copy: 22.1ms per module against 2.5ms, or 5.8s against
0.7s over a 264-module lora, on every load.

skip_init constructs on meta and materializes uninitialized, so the copy
still fully defines the parameter. Dtype, device and values are
unchanged, including the fp32 upcast of bf16 files that the copy performs.
2026-08-10 02:42:05 +01:00
Vladimir Mandic 562be970ae reorder env vars
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-10 00:43:15 +02:00
Vladimir Mandic ca955ba1c2 update handlers for all authenticated workflows
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-09 22:47:17 +02:00
Vladimir Mandic a882ce945b detailer.next
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-09 15:05:00 +02:00
Dity0 33416f6f82 Accept SDNQConfig in post load quant 2026-08-09 15:58:01 +03:00
Vladimir Mandic e10ec40e2c detailer enable vl models
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-08 16:24:00 +02:00
Vladimir Mandic 48cf0166f3 separate progress monitoring from live preview, live preview improvements, progress details
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-07 11:41:40 +02:00
Vladimir Mandic b092cf7318 unauthenticated path traversal in /thumbs
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-06 18:45:06 +02:00
Dity0 08b2729c22 AMD takes forever to compile with num_stages > 1 2026-08-06 15:20:14 +03:00
Vladimir Mandic 6e448de56c switch to internally managed uvicorn
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-06 13:24:48 +02:00
Vladimir Mandic 0efd18aed5 skip sdnq openvino on non-cpu devices
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-05 20:10:51 +02:00
Vladimir Mandic 7fdaefda0b aux prevent race condition
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-05 14:38:37 +02:00
Vladimir Mandic 84905f77da improve server monitor and profiling
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-05 12:19:07 +02:00
Vladimir Mandic a1df374773 add support for nunchaku-lite models and engine
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-04 15:31:05 +02:00
Dity0 9a7fa12218 SDNQ add minimum_allowed_channel_size 2026-08-04 15:46:38 +03:00
Vladimir Mandic a83795273e prompt enhance and caption use llm-context
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-04 14:21:53 +02:00
Vladimir Mandic 808a25749f update sefi model and add rl variant
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-04 12:40:55 +02:00
Dity0 beacd02487 cleanup 2026-08-04 13:09:07 +03:00
Dity0 c55a1f1e11 lazy init ov_core 2026-08-04 13:01:11 +03:00
Vladimir Mandic 55ba386941 torch reset dynamo cache on model reload
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-04 10:58:32 +02:00
Dity0 b76ec32ac0 cleanup 2026-08-04 11:18:54 +03:00
Dity0 89d2bef078 Add device checks on kernel_wrappers and support OpenVINO MM for CPU and Triton MM for GPU at the same time 2026-08-04 11:16:53 +03:00
Vladimir Mandic 514a68b1af add storage analyzer
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-02 11:22:12 +02:00
Vladimir Mandic 78f843f969 networks avoid slow yield
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-01 09:10:15 +02:00
Vladimir Mandic 81ea0a835a test flag also test linked previews
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-31 15:20:45 +02:00
Dity0 e532958ad4 cleanup openvino mm 2026-07-31 08:44:45 +03:00
Vladimir Mandic 59f077604c rembg add lucida
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-30 14:39:30 +02:00
Dity0 1b1f6c5863 Update SDNQ and Diffusers to support SDNQ in native upstream Diffusers 2026-07-30 11:24:27 +03:00
Vladimir Mandic 9056b88f69 fix select network checkpoint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-29 08:13:45 +02:00
Vladimir Mandic c6dc750a81 remove resolution from some reference models
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-28 14:18:55 +02:00