Commit Graph

8526 Commits

Author SHA1 Message Date
CalamitousFelicitousness ba1080fea2 feat(civitai): backfill preview meta on rescan
When download_civit_preview short-circuits at 304 (file exists), the
rescan path now falls back to backfill_preview_parameters: checks
whether the file already carries an embedded parameters chunk and, if
not, embeds img.meta in place. Existing libraries get retroactive
metadata via the existing "Search metadata" rescan, no model
re-download required.
2026-05-10 03:30:10 +01:00
CalamitousFelicitousness 4c2022dfdf feat(civitai): embed preview meta into downloaded images
Civitai's CDN strips PNG tEXt/EXIF chunks during delivery, leaving the
modernUI Preview metadata tab empty for downloaded networks. Format the
version API's images[].meta into sdnext's standard parameters channel
(PNG tEXt / JPEG-WEBP EXIF UserComment) so read_info_from_image picks
it up through the existing path. Embedding is wrapped in try/except
and never blocks the download.
2026-05-10 03:20:03 +01:00
Vladimir Mandic fad9015270 fix vae preview flash previous image
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-09 17:09:55 +02:00
Vladimir Mandic eb88f27a04 cleanup preview
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-09 13:32:29 +02:00
Vladimir Mandic 12d5ce65ee taesd preview modularize
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-09 10:15:26 +02:00
Vladimir Mandic 4747ca2fc0 lora change detection improvements
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-09 09:38:54 +02:00
Vladimir Mandic 13e21b4c04 lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-08 14:50:05 +02:00
Vladimir Mandic 82e9745c65 add joyai-image-edit
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-08 14:44:00 +02:00
Vladimir Mandic 2e50671d69 networks load/download model track progress
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-08 14:43:39 +02:00
Vladimir Mandic 54ad469919 models and hfcache tables
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-08 13:58:35 +02:00
Vladimir Mandic f1b6e82ccf models table improvements
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-08 12:16:21 +02:00
Vladimir Mandic 8293a12137 fix ipex autocast
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-08 10:56:14 +02:00
Vladimir Mandic 74fc05c9f9 add sd-ultimate-upscale
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-08 10:16:17 +02:00
Vladimir Mandic d8f8c88c50 cache network thumbnails
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-08 08:46:18 +02:00
Vladimir Mandic e7946a65b2 fix invalid ipex device type
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-08 07:12:25 +02:00
Vladimir Mandic ca6e39749e Merge pull request #4833 from awsr/segmentation-fix
Fix detailer segmentation
2026-05-08 07:09:04 +02:00
CalamitousFelicitousness 688e217815 feat(processing): warn when distilled pipeline ignores cfg_scale 2026-05-07 22:22:05 +01:00
CalamitousFelicitousness 2fbe261634 fix(lint): drop unused f-prefix and add trailing newline 2026-05-07 22:21:58 +01:00
awsr 278990a3d2 Fix detailer segmentation 2026-05-07 13:36:45 -07:00
Vladimir Mandic bb5d3c45af fix lut
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-07 07:20:20 +02:00
awsr f496da6550 Fix shutdown/restart behavior 2026-05-06 20:48:40 -07:00
Disty0 704bf2a756 Fix upscaler namegen 2026-05-07 01:09:28 +03:00
Disty0 74c56da1d3 OpenVINO override diffusers_offload_mode to none 2026-05-07 00:51:35 +03:00
Vladimir Mandic a7d3723014 add lumina-dimmo
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-06 09:11:33 +02:00
Vladimir Mandic 75b0a4da59 add ultraflux
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-06 07:50:33 +02:00
Vladimir Mandic 40330c8d76 patch rich traceback
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-05 17:02:17 +02:00
Vladimir Mandic 7f3f08ca4b Merge pull request #4825 from vladmandic/feat/chroma-lora-native
feat(chroma): native loader for chroma lora
2026-05-05 14:39:51 +02:00
Vladimir Mandic 6261c68396 add Step1X-Edit
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-05 09:31:05 +02:00
Vladimir Mandic 725db1f324 add gallery quick actions
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-05 07:45:26 +02:00
awsr a0ef5fa58e Remove old commented-out code 2026-05-04 21:35:00 -07:00
awsr ac90ab7b0b Remove old/unused stepwise code 2026-05-04 21:32:39 -07:00
CalamitousFelicitousness a37443d8f1 fix(ltx): wrap explicit encode_prompt in inference_context
Upstream LTX2 encode_prompt is not @torch.no_grad-decorated; only __call__
is. Calling encode_prompt directly from ltx_process recorded the full
Gemma3 forward graph.
2026-05-04 21:44:07 +01:00
CalamitousFelicitousness 92df94a227 feat(chroma): native loader for chroma lora
Add a per-model native LoRA path for Chroma that handles both PEFT-style
(diffusion_model.<dotted>.lora_A.weight, no alpha) and kohya-flat
(lora_unet_<flat> with .alpha) layouts, plus LoKR/LoHA/OFT/DoRA.

Resolves issue #4169 (ostris ai-toolkit Chroma LoRAs failed to load).

- new pipelines/chroma/chroma_lora.py with try_load_lora/lokr/loha/oft
- fused-QKV expansion: 3-way equal for img/txt qkv, 4-way unequal
  [3072, 3072, 3072, 12288] for single linear1 (Q+K+V+proj_mlp)
- NetworkModuleLokrSliceChunk for unequal-row LoKR slicing
- path rewrite from Flux-source to ChromaTransformer2DModel naming
- lora_load.py: dispatch chroma to the native loader and narrow the
  kohya-Flux convert gate to f1 only
2026-05-04 21:17:14 +01:00
Vladimir Mandic 13965a3e73 Merge pull request #4822 from vladmandic/hint-update
Hint update
2026-05-04 20:54:24 +02:00
Vladimir Mandic b760088d0b gallery quick actions placeholders
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-04 20:45:10 +02:00
CalamitousFelicitousness b37e275212 feat(lora): native loader for ernie-image
Adds pipelines/ernie/ernie_lora.py with try_load_lora/lokr/loha/oft
entry points modeled on the z-image native loader, wires it into
lora_load.load_safetensors, and adds 'ernieimage' to allow_native.

ERNIE attention is not fused (separate to_q/to_k/to_v/to_out.0), so
the loader skips the qkv-split machinery the z-image loader needs and
supports all four families uniformly. Recognized prefixes are
diffusion_model., transformer., and lora_unet_; PEFT lora_A/lora_B
keys are normalized to lora_down/lora_up. Verified against PEFT, LoKR,
and Kohya/AIT files in the wild with zero unmapped or shape-mismatched
modules.
2026-05-04 16:43:36 +01:00
Disty0 cc0f06d64f SNDQ unify Triton MM configs 2026-05-04 15:14:30 +03:00
Vladimir Mandic 580f66c12f gallery add thumbnail size slider
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-04 09:03:50 +02:00
Vladimir Mandic 948082692c Merge pull request #4819 from vladmandic/feat/ltx-audio
LTX Audio and optimisations
2026-05-04 07:37:40 +02:00
CalamitousFelicitousness 4523e7c3ac fix(ltx,processing): address pr #4819 review
review feedback from vladmandic on commit 80fde086f.

- run_ltx: drop the inline random.seed() / randrange resolve and use
  processing.fix_seed(p) right after the StableDiffusionProcessingVideo
  construction. p.seed carries the resolved int across every stage
  (latent_pass, both upsample paths, refine, post-refine vae_decode).
  matches the existing fix_seed(p) call sites in img2img.py:30,
  video_run.py:101, xyz_grid.py:266 and 8 others.

- process_decode: add AudioFrameList(list) subclass and attach_audio
  helper to carry output.audio onto the returned frame list. mirrors
  the existing output.bytes early-return contract: samples.audio
  survives downstream so process_images_inner can collect it via the
  Processed.audio kwarg.

- drop the p.audio_capture transit in process_diffusers and the
  fallback read in process_images_inner. p is input params, not
  output state.
2026-05-04 02:52:42 +01:00
CalamitousFelicitousness cf7a72a9b5 docs(locale): expand resize hints and restore OpenCLiP entries 2026-05-04 00:50:23 +01:00
CalamitousFelicitousness 80fde086f9 fix(ltx): close three two-stage audit gaps
- resolve seed=-1 once at top of run_ltx and thread the int through every
  stage (StableDiffusionProcessingVideo, _latent_pass, upsample 0.9/2.x,
  refine, post-refine vae_decode). get_generator(-1) reseeds globally per
  call so each stage was rolling an uncorrelated value; p.seed now carries
  the resolved seed so reruns reproduce.

- pre-encode prompts via shared.sd_model.encode_prompt before the latent
  path; park the four tensors on CPU and pass them as prompt_embeds /
  *_attention_mask kwargs through _latent_pass and refine_args. Stage 2
  reuses Stage 1's embeds instead of re-running the text encoder. The
  manual encode is outside pipe.__call__ so the post-forward offload hook
  never fires; apply_balanced_offload(force=True) re-anchors the device
  map so the text encoder doesn't stay pinned through Stage 1.

- skip audio_vae.decode + vocoder on refine when audio_enable=False:
  output_type='latent' bypasses the internal audio + video decode and
  hands off to the post-refine vae_decode block. Per-step audio
  cross-attention still runs for video conditioning.
2026-05-03 06:18:56 +01:00
CalamitousFelicitousness 41ffa78438 fix(ltx): align stage 2 audio to canonical pr #13217
drop the project-specific stage 1 direct audio decode (a6870f7d2). smoke
testing showed broadband tinniness on distilled is BWE-bound, not stage 2
corruption, so the deviation didn't fix the underlying issue.

revert to canonical:
- _latent_pass returns video latents only; result.audio is unused.
- stage 2 receives audio_latents=None (default), prepare_audio_latents
  generates fresh gaussian noise, audio scheduler runs the 3 stage-2
  sigmas under identity guidance, video<->audio cross-attention
  conditions the audio branch.
- capture stage 2 result.audio[0].float().cpu() for save.

upstream evidence: pipeline_ltx2.py:937-940 documents audio_latents as
pre-generated noisy latents (initial gaussian, not stage 1 output); no
caller in diffusers threads stage outputs into the kwarg.

non-latent path is unchanged and continues to work via p.audio_capture.
2026-05-02 19:56:30 +01:00
CalamitousFelicitousness 207e7d8b3b fix(processing): preserve pipeline audio across process_decode
process_decode strips video pipeline output to a flat list of frames at the
PIL early-return (processing_diffusers.py:461-465), so any output.audio is
lost before processing.process_images returns. video pipelines that produce
synchronized audio (LTX-2 audio-capable models) were getting silent mp4s on
the non-latent path.

stash output.audio on p.audio_capture before process_decode runs and let
processing read it back as a fallback when samples is a flat list.

ltx_process non-latent branch strips the (B, 2, N) batch dim with [0] so
write_audio's .T+contiguous() path produces interleaved bytes for AAC s16.
2026-05-02 19:43:43 +01:00
CalamitousFelicitousness a6870f7d27 fix(ltx): decode stage 1 audio directly, discard stage 2 audio output
stop threading stage 1 audio_latents into stage 2 refine. Lightricks/LTX-2#126
reports the two-stage pipeline degrades audio quality, confirmed locally as
clean speech with tinny ambient/foley/music on the threaded path.

root cause: stage 2 prepare_audio_latents calls _create_noised_state at
noise_scale=0.909 (pipeline_ltx2.py:704-714, 598-603), keeping ~9% of stage 1
signal. 3 refine steps recover speech via video<->audio cross-attention but
not broadband content.

new path: _latent_pass decodes audio_latents to waveform via audio_vae +
vocoder mirroring pipeline_ltx2.py:1471-1473 exactly (input cast to
audio_vae.dtype, no module dtype mutation). stage 2 result.audio is
discarded; cross-attention still runs each block for video conditioning.
2026-05-02 19:42:59 +01:00
CalamitousFelicitousness 506f5e1c29 fix(ltx): audio toggle ux and audio mux stream registration
relabel toggle to 'LTX save audio' (default true) since audio always
generates on 2.x audio-capable models; the toggle gates mux only. hint
added to locale_en.json.

split add_audio_stream from write_audio. avformat_write_header runs on
first container.mux() and freezes the stream set, so audio added after
video packets has time_base=0/0 and raises 'Cannot rebase to zero time.'
atomic_save_video registers the audio stream before the encode loop.
2026-05-02 19:38:08 +01:00
Vladimir Mandic ee5978f72b custom vae loader
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-02 10:22:43 +02:00
Vladimir Mandic e74a9a60e5 fix kandinsky detection
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-02 09:09:06 +02:00
Vladimir Mandic 63190a50e7 fix ernie preview
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-02 08:06:57 +02:00
Vladimir Mandic c855a5146a cleanup
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-05-01 16:34:42 +02:00