Commit Graph

14186 Commits

Author SHA1 Message Date
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
Dity0 ab9a8151e6 handle rocm version checks with rocm 7.14 2026-08-08 19:59:20 +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 44eebcd19b update submodules
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-07 19:06:01 +02:00
Vladimir Mandic d77bb29bc1 Merge pull request #5010 from vladmandic/master
dev update
2026-08-07 18:50:54 +02:00
Vladimir Mandic 22a119ffbf pre-merge update
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-07 18:43:42 +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
Vladimir Mandic 0b64c4f981 update changelog
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-06 18:34:37 +02:00
Dity0 08b2729c22 AMD takes forever to compile with num_stages > 1 2026-08-06 15:20:14 +03:00
Vladimir Mandic 5d71061946 Merge pull request #5007 from liutyi/dev
Microsoft Mage 4B reference images
2026-08-06 13:38:42 +02:00
Oleksandr Liutyi d00e64e0be Microsoft Mage 4B reference images 2026-08-06 11:29:33 +00: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 c26149b80e krea2 add inpaint and detailer support
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-05 13:07:24 +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 37dfedb8ff update changelog
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-31 15:20:45 +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
Vladimir Mandic b96456bb2c add sefi-image model
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-31 15:20:45 +02:00
Vladimir Mandic 2b442bfabb add mage-flow
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 6941122a96 update packages
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-29 08:57:52 +02: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
Vladimir Mandic e280938e79 add prompt enhance to ltx and fix audio
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-07-28 13:11:21 +02:00