Commit Graph

133 Commits

Author SHA1 Message Date
CalamitousFelicitousness 5cf46d2f81 feat(ltx): canonical LTX-2.x Stage 2 recipe (LoRA + guidance + connectors)
Implement the Lightricks two-stage recipe (diffusers PR #13217) for the
LTX-2.x Dev family: Stage 1 at half-res with full four-way guidance,
2x latent upsample, Stage 2 with distilled LoRA + scheduler swap + identity
guidance on STAGE_2_DISTILLED_SIGMA_VALUES.

Extends to both LTX-2.0 and LTX-2.3 Dev via per-family distilled-LoRA
repos carried on the caps; Distilled variants take the same flow minus
the LoRA swap. Auto-couples Refine with a fixed 2x upsample on any Dev
variant with a known LoRA when the user enables Refine without Upsample.

- caps: is_ltx_2_3, use_cross_timestep, default_dynamic_shift,
  stage2_dev_lora_repo, supports_canonical_stage2, modality_default_scale,
  guidance_rescale_default; LTX-2.x defaults realigned to canonical
  cfg=3.0 / steps=30; per-variant STG block and four-way guidance wired
  for non-distilled 2.x
- process: canonical Stage 1/Stage 2 helpers, scheduler + opts snapshot
  under try/finally, per-family upsampler repo, audio latents threaded
  from Stage 1 into Stage 2, use_cross_timestep gated per caps
- overrides: skip the redundant unsharded LTX-2.3 connectors blob and
  share LTX2TextConnectors weights across 2.3 variants when te_shared_t5
- load: Gemma3 shared-TE path for LTX-2.3; gate use_dynamic_shifting=False
  override to 0.9.x only so LTX-2.x stays on its canonical token-count
  dynamic shift
2026-04-19 03:37:25 +01:00
CalamitousFelicitousness 05abd99285 fix(video): invalidate ltx cache on pipe-class mismatch
Move cache tracking from ltx_util into video_load where shared.sd_model
lives, and invalidate the name-based hit when the cached class no longer
matches the current pipeline (e.g. after Unload Models triggers an
auto-reload of the default checkpoint).

- Drop the duplicate module-level loaded_model cache in ltx_util
- Add a pipe-class isinstance check around the cache hit in video_load
2026-04-19 03:36:16 +01:00
CalamitousFelicitousness acac6157b0 refactor(ltx): unify tab across 0.9.x and 2.x pipeline families
Rework the LTX Video tab so one UI handles every registered variant
(0.9.0 through 2.3, Dev/Distilled/SDNQ-4Bit, T2V/I2V/Condition). Per-
variant behavior is driven from a single capability lookup rather than
substring matching on model names scattered across the backend.

- modules/ltx/ltx_capabilities.py: new module computing family, is_i2v,
  distilled, supports_input_media, supports_multi_condition,
  supports_image_cond_noise_scale, supports_decode_timestep,
  supports_stg, supports_audio, supports_frame_rate_kwarg, and the
  default CFG / steps / sampler_shift for a given model name by reading
  its registered repo_cls in models_def.

- modules/ltx/ltx_ui.py: capability-gated UI. Selecting a model rewires
  accordion visibility, slider interactivity, and defaults via a single
  model.change handler. New controls: dedicated image input slot inside
  the LTX tab (replaces the disconnected shared init_image for I2V),
  condition strength slider, CFG / sampler shift / dynamic shift
  sliders that were previously unreachable. Input media accordion
  restructured so the image slot is always-visible while the video /
  gallery prefix tabs only appear on Condition pipelines.

- modules/ltx/ltx_process.py: route the base pass through
  processing.process_images(p) so LTX inherits standard scheduler
  wiring, extra_networks activation, VAE handling, and error plumbing
  from StableDiffusionProcessingVideo. The multi-pass latent path
  (upsample / refine) stays on direct pipeline calls for latent
  re-entry. Refine noise control gets family-specific kwargs:
  denoise_strength for 0.9.x LTXConditionPipeline, noise_scale for all
  2.x pipelines; the prior strength= injection crashed on 2.x and only
  affected conditioning intensity on 0.9.x. Add torch_gc between every
  stage boundary (base to upsample to refine to vae decode) so the
  CUDA allocator cache does not retain the prior pass's allocations
  across stages. Remove the TypeError fallback that silently passed
  raw latents to save_video when VAE decode returned None on OOM;
  those errors now surface cleanly.

- modules/ltx/ltx_util.py: get_conditions grows a family parameter and
  builds LTX2VideoCondition (frames, index, strength) for 2.x or
  LTXVideoCondition (image, video, frame_index, strength) for 0.9.x.
  get_bucket floors to max(32, vae_spatial_compression_ratio) since LTX
  pipelines validate divisibility by 32 regardless of family.

- modules/video_models/video_overrides.py: extend the I2V generator
  reset to cover LTX2ImageToVideoPipeline and both Condition classes.
  Keep the strength= kwarg injection gated to 0.9.x
  LTXConditionPipeline only; LTX2ConditionPipeline.__call__ does not
  accept it (per-condition strength lives on the LTX2VideoCondition
  dataclass instead).
2026-04-17 00:37:15 +01:00
CalamitousFelicitousness ca93f0b9b6 fix(video): correct pipeline classes for ltx 2.3 i2v and condition variants
The 2.3 I2V variants (Dev, Distilled, SDNQ-4Bit, Distilled SDNQ-4Bit)
were registered against LTX2Pipeline, whose __call__ does not accept an
image kwarg; init images were silently dropped. Route them through
LTX2ImageToVideoPipeline instead.

Also register the four 2.3 Condition variants under LTX2ConditionPipeline
so the multi-condition (image/video/gallery prefix) generation path is
reachable on LTX 2.3.
2026-04-17 00:37:15 +01:00
CalamitousFelicitousness 2f00a5764d fix(video): friendlier error messages for missing inputs
Replace "init image not set" / "last image not set" with actionable
messages that tell the user what to do. Matches the phrasing used by
the Caption tab for the same failure class.
2026-04-17 00:37:15 +01:00
vladmandic 7061672252 add ltx-2.3-1.1
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-16 08:15:46 +02:00
CalamitousFelicitousness 0541843a86 fix(video): resolve outdir_video against outdir_samples 2026-04-15 23:03:15 +01:00
vladmandic ec1341348b update todo/changelog
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-30 12:19:36 +02:00
vladmandic ca2d49497b ltx test
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-30 11:16:55 +02:00
awsr 09ab19c438 RUF013 updates and formatting 2026-03-24 06:07:34 -07:00
vladmandic a72e3c4f29 merge: modules/video_models/video_run.py 2026-03-13 13:21:14 +01:00
vladmandic 24e3416e02 merge: modules/video_models/video_save.py 2026-03-12 14:16:51 +01:00
vladmandic afff46f2ac add google-flash-3.1-image
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-27 10:53:22 +01:00
Vladimir Mandic d79d4edddb add explicit sdnq import
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-02-21 13:26:20 +00:00
Vladimir Mandic 4006b3e093 pylint 2026-02-19 11:36:20 +01:00
Vladimir Mandic e5c494f999 cleanup logger 2026-02-19 11:09:13 +01:00
Vladimir Mandic a3074baf8b unified logger 2026-02-19 09:46:42 +01:00
Vladimir Mandic bfe014f5da modernize typing 2026-02-19 09:15:37 +01:00
vladmandic da1cf2f996 refactor image methods
Signed-off-by: vladmandic <mandic00@live.com>
2026-02-11 12:29:00 +01:00
vladmandic cc03ebc584 move vae to subfolder
Signed-off-by: vladmandic <mandic00@live.com>
2026-01-30 11:34:25 +01:00
Ryan Meador e6eeb22a81 fix/add element names for some video controls that were duplicate/missing 2026-01-21 19:53:11 -05:00
vladmandic 84ad7bf20b improve wrap_gradio_call
Signed-off-by: vladmandic <mandic00@live.com>
2026-01-20 18:56:49 +01:00
Vladimir Mandic d934920c23 cleanup
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-01-16 17:34:34 +00:00
Vladimir Mandic 05b919f35b ltx2 improvements
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-01-16 17:31:56 +00:00
CalamitousFelicitousness 761ea1c327 feat(settings): add base path support for output folders
Change "Images folder" and "Grids folder" settings to act as base paths
that combine with specific folder settings, rather than replacing them.

- Add resolve_output_path() helper function to modules/paths.py
- Update all output path usages to use combined base + specific paths
- Update gallery API to return resolved paths with display labels
- Update gallery UI to show short labels with full path on hover

Example: If base is "C:\Database\" and specific is "outputs/text",
the resolved path becomes "C:\Database\outputs\text"

Edge cases handled:
- Empty base path: uses specific path directly (backward compatible)
- Absolute specific path: ignores base path
- Empty specific path: uses base path only
2026-01-16 16:24:05 +00:00
vladmandic f444679fc1 lint
Signed-off-by: vladmandic <mandic00@live.com>
2026-01-16 08:56:30 +01:00
Vladimir Mandic 33e0d0f9ed ltx2 vae fix
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-01-12 18:40:25 +00:00
vladmandic 5e4ed9c9bb fix ltx2
Signed-off-by: vladmandic <mandic00@live.com>
2026-01-12 17:12:13 +01:00
vladmandic b386675c06 ltx-2 prototype
Signed-off-by: vladmandic <mandic00@live.com>
2026-01-10 09:31:59 +01:00
CalamitousFelicitousness 1aab61aa47 Cleanup 2026-01-10 03:08:22 +00:00
CalamitousFelicitousness 9fe9d9521c fix(cloud): support three Google GenAI auth modes, use UI settings only 2026-01-09 00:30:55 +00:00
vladmandic dde91321b9 genai exception handling and lint all
Signed-off-by: vladmandic <mandic00@live.com>
2025-12-22 20:29:50 +01:00
vladmandic 13b4dc8996 update google access methods
Signed-off-by: vladmandic <mandic00@live.com>
2025-12-12 09:56:39 +01:00
vladmandic 3a65d561a7 add google-veo-3.1
Signed-off-by: vladmandic <mandic00@live.com>
2025-12-09 19:14:08 +01:00
vladmandic f91af19094 update video models
Signed-off-by: vladmandic <mandic00@live.com>
2025-12-09 09:22:28 +01:00
Vladimir Mandic 3b4f909862 Merge pull request #4436 from CalamitousFelicitousness/runai-update
Update runai-model-streamer logging integration
2025-12-02 03:59:38 -05:00
CalamitousFelicitousness 55c089ae48 Update runai-model-streamer logging integration
- Remove stdout redirect monkeypatch (fixed in runai v0.15.1 via PR #97)
- Add RUNAI_STREAMER_LOG_LEVEL controlled by SD_LOAD_DEBUG
- Add one-time runai config log when hijack is activated
- Add `loader=runai|default` to model loading logs
- Remove per-file logging clutter from sd_hijack_safetensors.py
2025-12-02 02:01:51 +00:00
awsr 00d3be3dba show_progress requires "full", "minimal", or "hidden" 2025-11-28 02:27:19 -08:00
Vladimir Mandic c50c987a33 sdnq always-register
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-11-16 08:14:01 -05:00
Vladimir Mandic 007e265740 prototype wan-animate
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-11-13 08:10:24 -05:00
Vladimir Mandic a5cefc96b6 add nvidia-sana-video-2b
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-11-06 08:40:10 -05:00
Vladimir Mandic ab1ddaf59b fix save video to folder
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-11-03 08:13:11 -05:00
Vladimir Mandic c1d87a14eb import sdnq on video prequant model load
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-11-01 11:20:30 -04:00
Vladimir Mandic 82b9a9fe3d curly braces for inline wildcards
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-10-31 18:16:06 -04:00
Vladimir Mandic 91d4b3377d fix duplicate ui labels
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-10-28 14:46:58 -04:00
Vladimir Mandic b02778e689 update changelog
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-10-28 14:00:06 -04:00
Vladimir Mandic bc775f0530 add wan asymmetric vae upscaler
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-10-28 13:55:46 -04:00
Vladimir Mandic df4571588b add wan-2.2-sdnq pre-quant to video models
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-10-28 11:12:42 -04:00
Vladimir Mandic 46876060ab kandinsky 10s force flex attn
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-10-28 10:53:19 -04:00
Vladimir Mandic a96b376cc0 add kandinsky5 10s variants
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-10-28 10:08:12 -04:00