Commit Graph

13758 Commits

Author SHA1 Message Date
Disty0 bd3eac047f SDNQ fix NPU accuracy 2026-06-19 02:59:21 +03:00
Disty0 7d14e814bd SDNQ revert NPU default 2026-06-19 01:55:06 +03:00
Disty0 38820cbbd9 SDNQ add NPU support and default to NPU on CPUs with OpenVINO 2026-06-19 00:12:22 +03:00
Disty0 8a9f5c0761 sdnq fix use_contiguous_mm check with openvino 2026-06-18 20:03:47 +03:00
Disty0 5244f63554 SDNQ add OpenVINO MM for CPUs 2026-06-18 18:15:57 +03:00
Vladimir Mandic b18d12f8d2 Merge branch 'master' into dev 2026-06-18 11:49:04 +02:00
Vladimir Mandic 8d4ebcd5ef processors multiple fixes
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-18 11:45:34 +02:00
Vladimir Mandic 7c81bc2d50 lint fixes
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-18 11:45:34 +02:00
Vladimir Mandic b60c67ecd4 fix preview mapping
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-18 11:45:34 +02:00
Vladimir Mandic 6b02ac059d fix pulid
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-18 11:45:34 +02:00
Disty0 4b89d65639 Remove CPU from use_contiguous_mm 2026-06-17 22:10:50 +03:00
Disty0 8214b044e3 SDNQ show a warining for no Triton instead and stop overriding matmul to false 2026-06-17 02:17:21 +03:00
Vladimir Mandic c2c36a8d76 Merge pull request #4937 from vladmandic/dev
merge dev
2026-06-16
2026-06-16 12:17:57 +02:00
Vladimir Mandic 37fc1da9ba update changelog
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-16 12:13:24 +02:00
Vladimir Mandic b0dd94ab8a fix tinyvae with anima
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-16 11:58:36 +02:00
Vladimir Mandic aba915ff44 update changelog
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-16 11:25:56 +02:00
CalamitousFelicitousness 0769d423a7 fix(upscale): make SeedVR2 generation_step patch idempotent
UpscalerSeedVR.load_model() rebinds the module-global
generation.generation_step (called by name inside generation_loop) to
the instance's model_step wrapper, keeping the previous value to call
back into. That global was never restored, so the second pass through
load_model() saved the wrapper itself as the "original", making
model_step() call itself -> RecursionError.

The second pass is reached on any model (re)load: with upscaler_unload
enabled (self.model reset to None after each run) every subsequent run
recurses, and switching SeedVR variants (self.model_loaded != model_name)
triggers it even without unload.

Stash the pristine generation_step on the module once and have the
wrapper call that, so repeated loads never wrap the wrapper.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 10:18:21 +01:00
Vladimir Mandic ccae78ca66 Potential fix for pull request finding 'CodeQL / Workflow does not contain permissions'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-06-16 10:17:13 +02:00
Vladimir Mandic 25262146fb lint fix
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-16 10:16:17 +02:00
Vladimir Mandic d65180cde3 Merge branch 'master' into dev 2026-06-16 10:15:05 +02:00
Vladimir Mandic 6cc2a9582f Merge pull request #4935 from QualiaRain/fix/lora-network-shape-guard
fix(lora): guard self.shape for modules without a weight attribute
2026-06-16 09:01:24 +02:00
Vladimir Mandic 8f5759ac01 fix video prompt
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-16 08:47:19 +02:00
Vladimir Mandic d989bac108 Merge pull request #4932 from QualiaRain/fix/hypertile-hires-dimensions
fix(hypertile): correct width/height mapping in hires set_resolution
2026-06-16 08:37:43 +02:00
Vladimir Mandic 524c059b79 Merge pull request #4931 from QualiaRain/fix/controlnet-unit-guards
fix(control-units): list zimage controlnets under 'all'; fix LLLite output-block fall-through
2026-06-16 08:37:12 +02:00
Vladimir Mandic 9b3687ca55 Merge pull request #4930 from QualiaRain/fix/runtime-and-detect-guards
fix(runtime): capture bias dtype cast, coerce env seq-len to int, init pipeline before use
2026-06-16 08:36:11 +02:00
Vladimir Mandic b4079881ec Merge pull request #4929 from QualiaRain/fix/api-input-guards
fix(api): IP-adapter mask accumulation, null params, colon-in-password, raw allowed path
2026-06-16 08:35:35 +02:00
Vladimir Mandic d131606153 Merge pull request #4928 from QualiaRain/fix/lora-extract-component-selection
fix(lora-extract): stop overwriting the module selection list; fix dead no-LoRA guard
2026-06-16 08:33:09 +02:00
Vladimir Mandic cf64578f48 Merge pull request #4927 from QualiaRain/fix/control-video-frame-advance
fix(control): advance video frames via cap, not the always-None video var
2026-06-16 08:28:09 +02:00
Disty0 78243b70a4 sharpfin don't use antialias with area mode 2026-06-15 23:41:58 +03:00
QualiaRain 42a4b82c8e fix(lora): guard self.shape for modules without a weight attribute
NetworkModule.__init__ set self.shape only inside 'if hasattr(sd_module, weight)' but then used len(self.shape) unconditionally, raising AttributeError when a LoRA targets a weightless module. Default shape to None and skip the dora_norm_dims computation when absent.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 15:20:08 -04:00
QualiaRain 14a8eebbb8 fix(hypertile): correct width/height mapping in hires set_resolution
hr_upscale_to_x is the width dimension and hr_upscale_to_y the height (see processing_class.py); set_resolution assigned them transposed, producing swapped HyperTile geometry on non-square hires passes.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 15:20:07 -04:00
QualiaRain bbbb450884 fix(control-units): list zimage controlnets under 'all'; fix LLLite output-block fall-through
api_list_models omitted the 'or model_type == all' clause for zimage, so ZImage ControlNets never appeared in the all listing - added it to match every other family. lite_model used pass for the unimplemented root==output branch, which fell through to b = getattr(b, attn_name) with b unbound or stale from a prior iteration (UnboundLocalError or wrong-block patch); use continue to skip it.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 15:20:07 -04:00
QualiaRain a68da643f1 fix(runtime): capture bias dtype cast, coerce env seq-len to int, init pipeline before use
sd_hijack_accelerate.py: bias.to(weight.dtype) discarded its result (Tensor.to is not in-place), so the conv still received the mismatched bias. sd_hijack_te.py: os.environ.get returns a str when MAX_SEQUENCE_LENGTH is set, so max(int, str) raised TypeError (uncaught, before the try); coerce with int(). sd_detect.py: pipeline was referenced in 'if callable(pipeline)' but only assigned when cls is not None, raising UnboundLocalError for a model_index.json without _class_name.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 15:20:07 -04:00
QualiaRain 711d6018bf fix(api): IP-adapter mask accumulation, null params, colon-in-password, raw allowed path
generate.py: p.ip_adapter_masks was reinitialized inside the per-adapter loop, discarding all but the last adapter's masks; move it beside the other accumulators. process.py: req.params is dict|None, so a null params body crashed .items() in post_preprocess/post_mask. api.py: split(':') without maxsplit broke auth/auth-file entries whose password contains a colon. gallery.py: allowed_paths stored quote(path) but the membership check and path guards use the raw path, causing duplicate accumulation and an ineffective whitelist; also drop the unused FastAPI import (pylint W0611 surfaced when this file is linted).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 15:20:07 -04:00
QualiaRain ca730fa3e6 fix(lora-extract): stop overwriting the module selection list; fix dead no-LoRA guard
make_lora reassigned the 'modules' selection arg to a named_modules() generator, so the subsequent 'te'/'unet' in modules checks tested an exhausted generator and silently skipped TE2 + UNet extraction. Also 'loaded_lora() == ""' never matched a loaded model (returns a list), so the no-LoRA-detected guard never fired.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 15:20:06 -04:00
QualiaRain a6b4614e25 fix(control): advance video frames via cap, not the always-None video var
The VideoCapture is stored in cap, but the per-frame read and skip/yield guards referenced video, which is set to None at function entry and never reassigned. As a result only the first frame of a video input was processed.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 15:20:06 -04:00
Disty0 d227a46406 SDNQ handle hf_quantizer and modules_to_not_use_matmul in loader 2026-06-15 22:04:43 +03:00
Disty0 e5a15ab6e1 Update SDNQConfig docstring 2026-06-15 19:39:03 +03:00
Vladimir Mandic bc9b65432d update js requirements
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-15 15:10:24 +02:00
Vladimir Mandic f69ce0d845 update requirements
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-15 14:55:14 +02:00
Vladimir Mandic 1a59647b12 cleanup
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-15 13:03:09 +02:00
Vladimir Mandic 5aea60ab71 lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-15 12:06:43 +02:00
Vladimir Mandic 8e04473ac4 rebuild ui
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-15 11:57:53 +02:00
Vladimir Mandic fd210da39f lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-15 08:45:58 +02:00
CalamitousFelicitousness 1be0867d1e refactor(lora): centralize universal passthrough prefixes in the shared resolver
transformer., bare-diffusers, and lora_transformer_ bases are already in
network-key form for every arch, yet each per-arch resolve_targets repeated the
same passthrough branch for them. Move that into a shared
PASSTHROUGH_PREFIXES_DEFAULT set consulted by resolve_group_targets, leaving each
arch's resolve_targets to only the prefixes it actually rewrites (kohya / BFL).
lycoris_ stays in flux2, the one arch that recognizes it.

Pure refactor: the same keys resolve to the same modules.
2026-06-14 18:22:41 +01:00
CalamitousFelicitousness 2d47b1f761 test(lora): cover OneTrainer lora_transformer_ format for native loaders
Add an end-to-end regression per diffusers arch (chroma, flux2, zimage, ernie)
that loads a lora_transformer_ diffusers-flat state dict and checks the
expected modules bind. The chroma suite also asserts the shared
resolve_group_targets passthrough runs above each arch's own resolve_targets,
which returns nothing for this prefix.
2026-06-14 18:22:41 +01:00
CalamitousFelicitousness 31c07dbaf9 fix(lora): load OneTrainer diffusers-format LoRAs via lora_transformer_ prefix
OneTrainer saves LoRAs against the diffusers layout, keying each module as
'lora_transformer_' + the underscore-flattened module path with QKV pre-split.
That is sdnext's own network_layer_mapping namespace, but the native loader did
not list it as a known prefix, so parse_key dropped every key and the network
loaded zero modules ("not loaded").

Add lora_transformer_ to KNOWN_PREFIXES_DEFAULT and resolve it in a shared
resolve_group_targets helper that passes the base through unchanged, with no
rename or chunking. Routing every family loader through the helper gives all
diffusers arches (chroma, flux2, zimage, ernie) OneTrainer support without
per-arch wiring.

Fixes #4877
2026-06-14 18:22:41 +01:00
Disty0 c8458ae0af SDNQ fix conv1d 2026-06-14 19:25:22 +03:00
Vladimir Mandic 7a0584ee4e sampler categories
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-14 09:35:56 +02:00
Vladimir Mandic 2ad8edd622 Merge pull request #4923 from vladmandic/sampler-dropdown-separators
Sampler dropdown separators
2026-06-14 08:53:16 +02:00