Commit Graph

8752 Commits

Author SHA1 Message Date
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 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 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 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
CalamitousFelicitousness 4a64ec428b feat(samplers): add DPM++ 3M SDE preset
DPMSolverMultistepScheduler implements 3rd-order sde-dpmsolver++, but the preset grid stopped at order 2 on the SDE row. Add the order-3 variant next to DPM++ SDE and DPM++ 2M SDE to complete it.
2026-06-14 01:42:26 +01:00
CalamitousFelicitousness e804d6df21 feat(samplers): group sampler dropdown into labeled sections
Reorder samplers_data_diffusers into recognizable solver-family groups (Euler, DPM/DPM++, UniPC/DEIS, Heun/KDPM2, ER-SDE, Classic, Distilled, Misc), each ending with its FlowMatch variants, and Res4Lyf as a fenced experimental section, so the dropdown is scannable.

Dividers are SamplerData sentinels with U+2500 names: create_sampler keeps the current scheduler when one is selected, get_sampler_name falls back to Default, set_samplers and validate_sampler_name exclude them, and a visible_samplers() helper drops them from the xyz axes, detailer, and folder pickers. The main and refine dropdowns render them as section labels. No sampler is removed or renamed, so saved infotexts, styles, and API calls keep resolving.
2026-06-14 01:41:05 +01:00
Disty0 099b4e4214 SDNQ fix Diffusers API change breaking Transformers 2026-06-13 03:03:14 +03:00
Disty0 55f811e837 SDNQ add N4 Hadamard and set Hadamard Group Size to 256 2026-06-13 00:56:50 +03:00
Vladimir Mandic 25b6030d2b Merge pull request #4920 from QualiaRain/fix/assorted-logic-bugs
Fix dead ControlNet-union path, double video-VAE normalization, and four more logic bugs
2026-06-12 19:31:24 +02:00
Vladimir Mandic 698003b590 Merge pull request #4918 from QualiaRain/fix/ui-misc-guards
Fix parse_metadtaa typo, None-desc crash, and malformed-input crashes in UI/misc
2026-06-12 19:30:35 +02:00
Vladimir Mandic 8f4ea879b9 Merge pull request #4917 from QualiaRain/fix/model-vae-fixes
Fix wrong-variable checks in TE/quant loading and remote-VAE response handling
2026-06-12 19:28:33 +02:00
Vladimir Mandic dfc1fc70ab Merge pull request #4916 from QualiaRain/fix/processing-crash-guards
Fix dead init_images branch, dead timer profile mode, and empty-list crashes in processing
2026-06-12 19:26:13 +02:00
QualiaRain 8a8d99019a fix: dead hasattr-on-dict path, double video-vae normalization, undefined self.device, hyimage if/elif, attention-mask attr typo, wrong face logged
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 13:00:57 -04:00
QualiaRain 9f2374f5ff fix ui/misc: None desc crash, ratio/tile/lora split guards, parse_metadtaa typo, moondream type guard
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 13:00:50 -04:00
QualiaRain 023c829179 fix model/vae: wrong quant_config var, getattr guards, remote-vae latent_copy shadowing + response handling
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 13:00:39 -04:00
QualiaRain 6f8d79313a fix processing: init_images hasattr typo, empty-list guards, dead timer profile branch
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 13:00:31 -04:00
QualiaRain 584f2b84c4 fix cli+api: data-uri decode guards, mutable default, caption/ffprobe/palette IndexError guards
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 13:00:23 -04:00
Vladimir Mandic 1cf715fac2 add gemma-4-unified, tensor-compressed, qat
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-12 15:15:16 +02:00
Vladimir Mandic 469428b502 update transformers/diffusers and enhanced tests
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-12 15:15:16 +02:00
Vladimir Mandic 10414e01a1 Merge pull request #4912 from QualiaRain/fix/script-extension-fixes
Fix seven small bugs in script extensions
2026-06-12 10:49:39 +02:00
Vladimir Mandic ccc8f92d05 Merge pull request #4911 from QualiaRain/fix/upscale-postprocess-fixes
Fix four small bugs in upscale and postprocess paths
2026-06-12 10:40:12 +02:00
Vladimir Mandic d1ba7eceea Merge pull request #4910 from QualiaRain/fix/parser-metadata-keys
Fix compel prompt guard duplicate clause and PObject infotext key mismatches
2026-06-12 10:38:36 +02:00
Claude 77f7fc61bd Fix UnboundLocalError when resize gets an invalid upscaler name
The invalid-upscaler warning referenced selected_upscaler, which is only
assigned when a matching upscaler was found, so an unknown name (stale
infotext, removed upscaler) crashed the resize instead of falling back
to plain resampling.

https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:41:34 -04:00
Claude 6ef1228727 Fix per-script timing always recording zero
ScriptSummary.record reset the reference timestamp immediately before
measuring against it, so every recorded duration was ~0 and report()
never logged script timings. Measure against the previous timestamp,
then advance it.

https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:41:32 -04:00
Claude e6c13aab37 Fix PObject metadata keys that never match parsed infotext
Infotext parsing produces 'Negative prompt' and 'Variation seed', but
the save-image PObject looked up 'Negative_prompt' and 'Subseed', so
images saved from restored metadata always lost their negative prompt
and variation seed. Use the keys the parser actually emits, matching
the sibling lookups like 'CFG scale'.

https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:41:25 -04:00
Claude 077a82e99e Fix duplicated clause in compel prompt guard
The guard repeated 'conjunction.prompts is None' twice; the second copy
was meant to check for an empty list, so an empty (non-None) prompts
list raised IndexError inside the guard instead of returning the empty
fallback.

https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:41:25 -04:00
QualiaRain 0002062367 Fix inverted lerp weights in slerp_alt near-parallel shortcut
Same inversion as the slerp() near-parallel shortcut: at val=0 the
expression returned hi instead of lo, opposite to both the
near-orthogonal shortcut and the general slerp path in the same
function.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:28:42 -04:00
Claude ace616d287 Fix inverted lerp weights in slerp near-parallel shortcut
The nearly-parallel fast path interpolated in the wrong direction:
at val=0 it returned hi instead of lo, opposite to both the general
slerp formula below and the sibling near-orthogonal shortcut. Affects
subseed/variation strength when base and subseed noise are nearly
parallel.

https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:27:51 -04:00
Claude 26a58b46fb Fix seed 0 being dropped from generator seeds
The truthiness filter removed valid seed 0 from p.seeds, causing an
unseeded generator for single images and a generator/batch length
mismatch for batches. Filter only None entries; 0 is a legitimate seed
per get_fixed_seed.

https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:27:51 -04:00
Claude e7d7e699e1 Fix latent concatenation running inside the loop in resize_hires
torch.cat was indented into the per-item loop, so with two or more
latents the first iteration replaced the list with a tensor and the
next iteration concatenated its dim-0 slices, destroying the batch
dimension. Concatenate once after the loop.

https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 02:27:50 -04:00
Vladimir Mandic d38feefebd Merge pull request #4905 from QualiaRain/fix/infotext-padding
Fix batch list padding in create_infotext corrupting infotext indices
2026-06-11 08:22:24 +02:00
Claude 7d1ba849e1 fix batch list padding in create_infotext corrupting infotext indices
padding loops used insert(0) which shifts existing prompt/seed entries
to higher indices, so subsequent index lookups - including the caller's
own p.prompts[i]/p.seeds[i] reads on the same aliased lists - return
values belonging to a different image; append preserves existing
index-to-entry mapping and pads missing slots at the end

https://claude.ai/code/session_01UZT4ypkGQH5fzJ89dXPFYp
2026-06-11 01:42:42 -04:00
QualiaRain 148a7883a2 Fix assorted small typos: dead __str__, unformatted messages, preview min-height, tooltip
- processing.py: __str___ misspelled dunder never dispatched; rename to __str__
- demofusion.py: missing f-prefix printed literal {width}x{height} in user-facing error
- sparse_backend.py: missing f-prefix printed literal {size} in ValueError
- generation_parameters_copypaste.py: debug message typo 'Not not registered'
- progressBar.ts: live-preview gallery minHeight computed from naturalWidth; mirrors the adjacent maxHeight line (naturalHeight)
- settings.ts: stray } in settings-tab tooltip
2026-06-11 01:42:29 -04:00
Vladimir Mandic 72b2f0d7be bump compel
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-06-10 08:09:00 +02:00
CalamitousFelicitousness 47aa9a2c93 fix(samplers): report validation failures without backtrace
Sampler capability gates raised plain ValueError when schedulers_fallback is
disabled, so the API middleware and the gradio call wrapper printed a full
backtrace for an expected outcome. Add errors.ValidationError, raise it from
the gates, and report it message-only in errors.display; the UI error box and
the API error response already carry the message.
2026-06-10 03:08:20 +01:00
CalamitousFelicitousness e783981f3d fix(samplers): honor fallback setting in remaining sampler fallback paths
create_sampler restored the model default scheduler on a prediction-type
mismatch, on an unknown sampler config, and on any scheduler-constructor
exception regardless of schedulers_fallback; only SD_SAMPLER_DEBUG could turn
the prediction mismatch into an error. Raise like the other capability gates
when the fallback setting is disabled.

An unresolved sampler name substituted UniPC before any of those gates could
run; pass the requested name through instead, so it falls back to the model
default (or raises when fallback is disabled) and the infotext records
Default rather than the unresolved name. find_sampler now also resolves an
unspecified sampler to Default instead of UniPC, matching the platform
default used everywhere else.
2026-06-10 03:08:20 +01:00
CalamitousFelicitousness 1d5fbc60e5 feat(samplers): wire sigma transforms into ER-SDE FlowMatch presets
The ER-SDE FlowMatch presets carried only use_flow_sigmas, so the sigma
method selector could not drive karras/beta/exponential for the FlowMatch
variants. Add use_karras_sigmas/use_exponential_sigmas/use_beta_sigmas to
match the plain ER-SDE presets and the Euler/UniPC/Flash FlowMatch presets,
which use the same boolean-flag mechanism.
2026-06-10 03:08:20 +01:00
CalamitousFelicitousness 40cf818f72 feat(samplers): apply sigma transforms to ER-SDE flow sigmas
In flow mode ER-SDE only ran karras/beta/exponential on the VP path and
silently dropped them, unlike FlowMatchEuler and DPM FlowMatch which
redistribute the shifted flow sigmas. Apply the same transform to the
flow sigmas in _setup_flow so the sigma method works in flow mode and
the ER-SDE FlowMatch variants gain karras/beta/exponential. Default flow
schedule is unchanged.
2026-06-10 03:08:20 +01:00
CalamitousFelicitousness 7084ac2c81 fix(samplers): warn or raise when sampler lacks selected sigma method
The sigma-method override silently fell back to the sampler's default
schedule when the selected method has no matching config key. Now warns and
uses the default schedule with schedulers_fallback enabled, or raises like
the other capability gates when it is disabled.
2026-06-10 03:08:20 +01:00