From 75756ac6ea51189fd6e3e5d6b035bf45d92c93f2 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 18 Apr 2025 08:32:41 -0400 Subject: [PATCH] add new ltx Signed-off-by: Vladimir Mandic --- CHANGELOG.md | 4 +++- modules/sd_samplers_diffusers.py | 2 +- modules/video_models/models_def.py | 24 ++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc1d1fa27..d3f7a0aa9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,13 @@ # Change Log for SD.Next -## Update for 2025-04-17 +## Update for 2025-04-18 - **Features** - [Nunchaku](https://github.com/mit-han-lab/nunchaku) inference engine with custom **SVDQuant** 4-bit execution highly experimental and with limited support, but when it works, its magic: **Flux.1 at 6.0 it/s** *(not sec/it)*! see [Nunchaku Wiki](https://github.com/vladmandic/sdnext/wiki/Nunchaku) for installation guide and list of supported models & features + - [LTXVideo 0.9.6](https://github.com/Lightricks/LTX-Video?tab=readme-ov-file) T2V and I2V + in both standard and distilled variants - [CFG-Zero](https://github.com/WeichenFan/CFG-Zero-star) new guidance method optimized for flow-matching models implemented for **FLUX.1, HiDream-I1, SD3.x, CogView4, HunyuanVideo, WanAI** enable and configure in *settings -> pipeline modifiers -> cfg zero* diff --git a/modules/sd_samplers_diffusers.py b/modules/sd_samplers_diffusers.py index f5bde64bd..3d83cb29d 100644 --- a/modules/sd_samplers_diffusers.py +++ b/modules/sd_samplers_diffusers.py @@ -268,7 +268,7 @@ class DiffusionSampler: if 'shift' in self.config: self.config['shift'] = shared.opts.schedulers_shift if shared.opts.schedulers_shift > 0 else 3 if 'use_dynamic_shifting' in self.config: - self.config['use_dynamic_shifting'] = True if shared.opts.schedulers_shift <= 0 else shared.opts.schedulers_dynamic_shift + self.config['use_dynamic_shifting'] = True if shared.opts.schedulers_shift == 0 else shared.opts.schedulers_dynamic_shift if 'use_beta_sigmas' in self.config and 'sigma_schedule' in self.config: self.config['use_beta_sigmas'] = 'StableDiffusion3' in model.__class__.__name__ if 'rescale_betas_zero_snr' in self.config: diff --git a/modules/video_models/models_def.py b/modules/video_models/models_def.py index 31c6354f3..0d471cd60 100644 --- a/modules/video_models/models_def.py +++ b/modules/video_models/models_def.py @@ -71,6 +71,30 @@ models = { ], 'LTX Video': [ Model(name='None'), + Model(name='LTXVideo 0.9.6 2B T2V', + url='https://huggingface.co/Lightricks/LTX-Video', + repo='Lightricks/LTX-Video', + repo_cls=diffusers.LTXConditionPipeline, + te_cls=transformers.T5EncoderModel, + dit_cls=diffusers.LTXVideoTransformer3DModel), + Model(name='LTXVideo 0.9.6 2B I2V', + url='https://huggingface.co/Lightricks/LTX-Video', + repo='Lightricks/LTX-Video', + repo_cls=diffusers.LTXConditionPipeline, + te_cls=transformers.T5EncoderModel, + dit_cls=diffusers.LTXVideoTransformer3DModel), + Model(name='LTXVideo 0.9.6 2B T2V Distilled', + url='https://huggingface.co/Lightricks/LTX-Video-2B-0.9.6-Distilled-04-25', + repo='Lightricks/LTX-Video-2B-0.9.6-Distilled-04-25', + repo_cls=diffusers.LTXConditionPipeline, + te_cls=transformers.T5EncoderModel, + dit_cls=diffusers.LTXVideoTransformer3DModel), + Model(name='LTXVideo 0.9.6 2B I2V Distilled', + url='https://huggingface.co/Lightricks/LTX-Video-2B-0.9.6-Distilled-04-25', + repo='Lightricks/LTX-Video-2B-0.9.6-Distilled-04-25', + repo_cls=diffusers.LTXConditionPipeline, + te_cls=transformers.T5EncoderModel, + dit_cls=diffusers.LTXVideoTransformer3DModel), Model(name='LTXVideo 0.9.5 T2V', # https://github.com/huggingface/diffusers/pull/10968 url='https://huggingface.co/Lightricks/LTX-Video-0.9.5', repo='Lightricks/LTX-Video-0.9.5',