Skip to content
Python

split LTX 2 files and replaced LTX 2 VAE

DeepBeepMeep775988f724a0
diff --git a/README.md b/README.md
index 021b213..fc92f7b 100644
--- a/README.md
+++ b/README.md
@@ -37,13 +37,13 @@ WanGP supports the Wan (and derived models), Hunyuan Video and LTV Video models
## 🔥 Latest Updates :
-### January 12th 2026: WanGP v10.23, When there is no VRAM left there is still some VRAM left ...
+### January 13th 2026: WanGP v10.24, When there is no VRAM left there is still some VRAM left ...
- **LTX 2 - SUPER VRAM OPTIMIZATIONS**
*With WanGP 10.21 HD 720p Video Gens of 10s just need now 8GB of VRAM!*
-LTX Team said this video gen was for 4k. So I had no choice but to squeeze more VRAM for further optimizations.
+LTX Team said this video gen was for 4k. So I had no choice but to squeeze more VRAM with further optimizations.
After much suffering I have managed to reduce by at least 1/3 the VRAM requirements of LTX 2, which means:
- 10s at 720p can be done with only 8GB of VRAM
@@ -53,9 +53,9 @@ After much suffering I have managed to reduce by at least 1/3 the VRAM requireme
3K/4K resolutions will be available only if you enable them in the *Config* / *General* tab.
-- **Ic Loras support**
+- **LTX Distilled VAE Upgrade**: *Kijai* has observed that the Distilled VAE produces images that were less sharp that the VAE of the Non Distilled model. I have used this as an opportunity to repackage all the LTX 2 checkpoints and reduce their overal HD footprint since they all share around 5GB. So dont be surprised if the old checkpoints are deleted and new are downloaded.
-Use a *Control Video* to transfer *Pose*, *Depth*, *Canny Edges*. I have added some extra tweaks: with WanGP you can restrict the transfer to a *masked area*, define a *denoising strength* (how much the control video is going to be followed) and a *masking strength* (how much unmasked area is impacted)
+- **Ic Loras support**: Use a *Control Video* to transfer *Pose*, *Depth*, *Canny Edges*. I have added some extra tweaks: with WanGP you can restrict the transfer to a *masked area*, define a *denoising strength* (how much the control video is going to be followed) and a *masking strength* (how much unmasked area is impacted)
- **Start Image Strength**: This new slider will appear below a *Start Image* or Source *Video*. If you set it to values lower than 1 you may to reduce the static image effect, you get sometime with LTX2 i2v
@@ -67,7 +67,8 @@ Use a *Control Video* to transfer *Pose*, *Depth*, *Canny Edges*. I have added s
*update 10.21*: added slider Loras Max Pinning slider\
*update 10.22*: added support for custom Ltx2 Text Encoder + Auto Recovery mode if Lora Pinning failed\
-*update 10.23*: Fixed text prompt ignore in profile 1 & 2 (this created random output videos)
+*update 10.23*: Fixed text prompt ignore in profile 1 & 2 (this created random output videos)\
+*update 10.24*: Replaced LTX 2 Distilled VAE by sharper non Distilled VAE
### January 9st 2026: WanGP v10.11, Spoiled again
diff --git a/defaults/ltx2_19B.json b/defaults/ltx2_19B.json
index e344f0e..65a1d97 100644
--- a/defaults/ltx2_19B.json
+++ b/defaults/ltx2_19B.json
@@ -4,8 +4,8 @@
"architecture": "ltx2_19B",
"description": "LTX-2 generates video up to 20s with an audio soundtrack. Supports start/end keyframes and sliding-window continuation. You can force the audio soundtrack by providing an Audio Prompt.",
"URLs": [
- "https://huggingface.co/DeepBeepMeep/LTX-2/resolve/main/ltx-2-19b-dev.safetensors",
- "https://huggingface.co/DeepBeepMeep/LTX-2/resolve/main/ltx-2-19b-dev-fp8.safetensors"
+ "https://huggingface.co/DeepBeepMeep/LTX-2/resolve/main/ltx-2-19b-dev_diffusion_model.safetensors",
+ "https://huggingface.co/DeepBeepMeep/LTX-2/resolve/main/ltx-2-19b-dev-fp8_diffusion_model.safetensors"
],
"preload_URLs": [
"https://huggingface.co/DeepBeepMeep/LTX-2/resolve/main/ltx-2-19b-ic-lora-pose-control.safetensors",
diff --git a/defaults/ltx2_distilled.json b/defaults/ltx2_distilled.json
index 36f0589..3984a17 100644
--- a/defaults/ltx2_distilled.json
+++ b/defaults/ltx2_distilled.json
@@ -4,8 +4,8 @@
"architecture": "ltx2_19B",
"description": "LTX-2 distilled checkpoint with faster generation.",
"URLs": [
- "https://huggingface.co/DeepBeepMeep/LTX-2/resolve/main/ltx-2-19b-distilled.safetensors",
- "https://huggingface.co/DeepBeepMeep/LTX-2/resolve/main/ltx-2-19b-distilled-fp8.safetensors"
+ "https://huggingface.co/DeepBeepMeep/LTX-2/resolve/main/ltx-2-19b-distilled_diffusion_model.safetensors",
+ "https://huggingface.co/DeepBeepMeep/LTX-2/resolve/main/ltx-2-19b-distilled-fp8_diffusion_model.safetensors"
],
"preload_URLs": "ltx2_19B",
"ltx2_pipeline": "distilled"
diff --git a/models/chatterbox/chatterbox_handler.py b/models/chatterbox/chatterbox_handler.py
index be34131..8ed571f 100644
--- a/models/chatterbox/chatterbox_handler.py
+++ b/models/chatterbox/chatterbox_handler.py
@@ -88,7 +88,7 @@ class family_handler:
return extra_model_def
@staticmethod
- def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization):
+ def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization, model_def=None):
mandatory_files = [
"ve.safetensors",
"t3_mtl23ls_v2.safetensors",
diff --git a/models/flux/flux_handler.py b/models/flux/flux_handler.py
index 5d2cc89..bea796c 100644
--- a/models/flux/flux_handler.py
+++ b/models/flux/flux_handler.py
@@ -207,7 +207,7 @@ class family_handler():
return args.lora_dir_flux
@staticmethod
- def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization):
+ def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization, model_def=None):
text_encoder_filename = get_flux_text_encoder_filename(text_encoder_quantization, base_model_type)
if test_flux2(base_model_type):
ret = [
diff --git a/models/hyvideo/hunyuan_handler.py b/models/hyvideo/hunyuan_handler.py
index 45fa251..9986728 100644
--- a/models/hyvideo/hunyuan_handler.py
+++ b/models/hyvideo/hunyuan_handler.py
@@ -201,7 +201,7 @@ class family_handler():
return latent_rgb_factors, latent_rgb_factors_bias
@staticmethod
- def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization):
+ def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization, model_def=None):
text_encoder_filename = get_hunyuan_text_encoder_filename(base_model_type,text_encoder_quantization)
if test_hunyuan_1_5(base_model_type):
diff --git a/models/kandinsky5/kandinsky_handler.py b/models/kandinsky5/kandinsky_handler.py
index 8830907..d651b65 100644
--- a/models/kandinsky5/kandinsky_handler.py
+++ b/models/kandinsky5/kandinsky_handler.py
@@ -222,7 +222,7 @@ class family_handler:
return extra_model_def
@staticmethod
- def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization):
+ def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization, model_def=None):
text_encoder_filename = get_kandinsky_text_encoder_filename(text_encoder_quantization)
return [
{
diff --git a/models/longcat/longcat_handler.py b/models/longcat/longcat_handler.py
index 83c6338..2cba8ac 100644
--- a/models/longcat/longcat_handler.py
+++ b/models/longcat/longcat_handler.py
@@ -104,7 +104,7 @@ class family_handler:
return get_rgb_factors("wan")
@staticmethod
- def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization):
+ def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization, model_def=None):
text_encoder_filename = get_longcat_text_encoder_filename(text_encoder_quantization)
download_def = [
{
diff --git a/models/ltx2/ltx2.py b/models/ltx2/ltx2.py
index 2f37dea..442a4c1 100644
--- a/models/ltx2/ltx2.py
+++ b/models/ltx2/ltx2.py
@@ -296,6 +296,7 @@ class LTX2:
VAE_dtype: torch.dtype = torch.float32,
override_text_encoder: str | None = None,
text_encoder_filepath = None,
+ checkpoint_paths: dict | None = None,
) -> None:
self.device = torch.device("cuda")
self.dtype = dtype
@@ -314,6 +315,12 @@ class LTX2:
checkpoint_path = model_filename[0]
else:
checkpoint_path = model_filename
+ transformer_path = checkpoint_path
+ if checkpoint_paths is not None:
+ transformer_path = checkpoint_paths.get("transformer")
+ if not transformer_path:
+ raise ValueError("Missing transformer path in checkpoint_paths.")
+ checkpoint_path = checkpoint_paths
gemma_root = text_encoder_filepath if override_text_encoder is None else override_text_encoder
spatial_upsampler_path = fl.locate_file(_SPATIAL_UPSCALER_FILENAME)
@@ -321,7 +328,7 @@ class LTX2:
# Keep internal FP8 off by default; mmgp handles quantization transparently.
fp8transformer = bool(model_def.get("ltx2_internal_fp8", False))
if fp8transformer:
- fp8transformer = "fp8" in os.path.basename(checkpoint_path).lower()
+ fp8transformer = "fp8" in os.path.basename(transformer_path).lower()
pipeline_kind = model_def.get("ltx2_pipeline", "two_stage")
if pipeline_kind == "distilled":
diff --git a/models/ltx2/ltx2_handler.py b/models/ltx2/ltx2_handler.py
index 8da7af5..4d0d64b 100644
--- a/models/ltx2/ltx2_handler.py
+++ b/models/ltx2/ltx2_handler.py
@@ -8,6 +8,46 @@ _GEMMA_MERGED_FILENAME = f"{_GEMMA_FOLDER}.safetensors"
_GEMMA_QUANTO_FILENAME = f"{_GEMMA_FOLDER}_quanto_bf16_int8.safetensors"
_SPATIAL_UPSCALER_FILENAME = "ltx-2-spatial-upscaler-x2-1.0.safetensors"
_DISTILLED_LORA_FILENAME = "ltx-2-19b-distilled-lora-384.safetensors"
+_VIDEO_VAE_FILENAME = "ltx-2-19b_vae.safetensors"
+_AUDIO_VAE_FILENAME = "ltx-2-19b_audio_vae.safetensors"
+_VOCODER_FILENAME = "ltx-2-19b_vocoder.safetensors"
+_TEXT_EMBEDDING_PROJECTION_FILENAME = "ltx-2-19b_text_embedding_projection.safetensors"
+_DEV_EMBEDDINGS_CONNECTOR_FILENAME = "ltx-2-19b-dev_embeddings_connector.safetensors"
+_DISTILLED_EMBEDDINGS_CONNECTOR_FILENAME = "ltx-2-19b-distilled_embeddings_connector.safetensors"
+
+
+def _use_multi_file_storage(model_def):
+ return (model_def or {}).get("storage", "").lower() == "multi_files"
+
+
+def _get_embeddings_connector_filename(model_def):
+ pipeline_kind = (model_def or {}).get("ltx2_pipeline", "two_stage")
+ if pipeline_kind == "distilled":
+ return _DISTILLED_EMBEDDINGS_CONNECTOR_FILENAME
+ return _DEV_EMBEDDINGS_CONNECTOR_FILENAME
+
+
+def _get_multi_file_names(model_def):
+ return {
+ "video_vae": _VIDEO_VAE_FILENAME,
+ "audio_vae": _AUDIO_VAE_FILENAME,
+ "vocoder": _VOCODER_FILENAME,
+ "text_embedding_projection": _TEXT_EMBEDDING_PROJECTION_FILENAME,
+ "text_embeddings_connector": _get_embeddings_connector_filename(model_def),
+ }
+
+
+def _resolve_multi_file_paths(model_def):
+ return {key: fl.locate_file(name) for key, name in _get_multi_file_names(model_def).items()}
+
+
+def _is_diffusion_only_file(model_filename):
+ if not model_filename:
+ return False
+ filename = model_filename[0] if isinstance(model_filename, (list, tuple)) else model_filename
+ if not filename:
+ return False
+ return "diffusion_model" in os.path.basename(str(filename)).lower()
@@ -46,6 +86,7 @@ class family_handler:
"frames_minimum": 17,
"frames_steps": 8,
"sliding_window": True,
+ "storage": "multi_files",
"image_prompt_types_allowed": "TSEV",
"returns_audio": True,
"any_audio_prompt": True,
@@ -128,7 +169,7 @@ class family_handler:
return 64
@staticmethod
- def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization):
+ def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization, model_def=None):
text_encoder_filename = family_handler.get_text_encoder_filename(text_encoder_quantization)
gemma_files = [
"added_tokens.json",
@@ -143,11 +184,17 @@ class family_handler:
"tokenizer_config.json",
] + computeList(text_encoder_filename)
+ file_list = [_SPATIAL_UPSCALER_FILENAME] + computeList(model_filename)
+ if _use_multi_file_storage(model_def):
+ for name in _get_multi_file_names(model_def).values():
+ if name not in file_list:
+ file_list.append(name)
+
download_def = [
{
"repoId": "DeepBeepMeep/LTX-2",
"sourceFolderList": [""],
- "fileList": [[_SPATIAL_UPSCALER_FILENAME] + computeList(model_filename)],
+ "fileList": [file_list],
},
{
"repoId": "DeepBeepMeep/LTX-2",
@@ -183,6 +230,17 @@ class family_handler:
):
from .ltx2 import LTX2
+ if not _use_multi_file_storage(model_def) and _is_diffusion_only_file(model_filename):
+ raise ValueError(
+ "Diffusion-only LTX-2 checkpoints require storage='multi_files' with companion files."
+ )
+
+ checkpoint_paths = None
+ if _use_multi_file_storage(model_def):
+ checkpoint_paths = _resolve_multi_file_paths(model_def)
+ transformer_path = model_filename[0] if isinstance(model_filename, (list, tuple)) else model_filename
+ checkpoint_paths["transformer"] = fl.locate_file(transformer_path)
+
ltx2_model = LTX2(
model_filename=model_filename,
model_type=model_type,
@@ -192,6 +250,7 @@ class family_handler:
VAE_dtype=VAE_dtype,
override_text_encoder=override_text_encoder,
text_encoder_filepath = family_handler.get_text_encoder_filename(text_encoder_quantization),
+ checkpoint_paths=checkpoint_paths,
)
pipe = {
diff --git a/models/ltx2/ltx_core/model/transformer/model_configurator.py b/models/ltx2/ltx_core/model/transformer/model_configurator.py
index e93b794..9f47d03 100644
--- a/models/ltx2/ltx_core/model/transformer/model_configurator.py
+++ b/models/ltx2/ltx_core/model/transformer/model_configurator.py
@@ -187,13 +187,17 @@ def amend_forward_with_upcast(
LTXV_MODEL_COMFY_RENAMING_MAP = (
SDOps("LTXV_MODEL_COMFY_PREFIX_MAP")
.with_matching(prefix="model.diffusion_model.")
+ .with_matching(prefix="diffusion_model.")
.with_replacement("model.diffusion_model.", "")
+ .with_replacement("diffusion_model.", "")
)
LTXV_MODEL_COMFY_RENAMING_WITH_TRANSFORMER_LINEAR_DOWNCAST_MAP = (
SDOps("LTXV_MODEL_COMFY_PREFIX_MAP")
.with_matching(prefix="model.diffusion_model.")
+ .with_matching(prefix="diffusion_model.")
.with_replacement("model.diffusion_model.", "")
+ .with_replacement("diffusion_model.", "")
.with_kv_operation(
key_prefix="transformer_blocks.", key_suffix=".to_q.weight", operation=_naive_weight_or_bias_downcast
)
diff --git a/models/ltx2/ltx_core/text_encoders/gemma/encoders/av_encoder.py b/models/ltx2/ltx_core/text_encoders/gemma/encoders/av_encoder.py
index ec5ebe8..eb29c35 100644
--- a/models/ltx2/ltx_core/text_encoders/gemma/encoders/av_encoder.py
+++ b/models/ltx2/ltx_core/text_encoders/gemma/encoders/av_encoder.py
@@ -138,9 +138,13 @@ AV_GEMMA_TEXT_ENCODER_KEY_OPS = (
.with_matching(prefix="text_embedding_projection.")
.with_matching(prefix="model.diffusion_model.audio_embeddings_connector.")
.with_matching(prefix="model.diffusion_model.video_embeddings_connector.")
+ .with_matching(prefix="diffusion_model.audio_embeddings_connector.")
+ .with_matching(prefix="diffusion_model.video_embeddings_connector.")
.with_replacement("text_embedding_projection.", "feature_extractor_linear.")
.with_replacement("model.diffusion_model.video_embeddings_connector.", "embeddings_connector.")
.with_replacement("model.diffusion_model.audio_embeddings_connector.", "audio_embeddings_connector.")
+ .with_replacement("diffusion_model.video_embeddings_connector.", "embeddings_connector.")
+ .with_replacement("diffusion_model.audio_embeddings_connector.", "audio_embeddings_connector.")
)
TEXT_EMBEDDING_PROJECTION_KEY_OPS = (
@@ -153,6 +157,10 @@ TEXT_EMBEDDINGS_CONNECTOR_KEY_OPS = (
SDOps("TEXT_EMBEDDINGS_CONNECTOR_KEY_OPS")
.with_matching(prefix="model.diffusion_model.audio_embeddings_connector.")
.with_matching(prefix="model.diffusion_model.video_embeddings_connector.")
+ .with_matching(prefix="diffusion_model.audio_embeddings_connector.")
+ .with_matching(prefix="diffusion_model.video_embeddings_connector.")
.with_replacement("model.diffusion_model.audio_embeddings_connector.", "audio_embeddings_connector.")
.with_replacement("model.diffusion_model.video_embeddings_connector.", "video_embeddings_connector.")
+ .with_replacement("diffusion_model.audio_embeddings_connector.", "audio_embeddings_connector.")
+ .with_replacement("diffusion_model.video_embeddings_connector.", "video_embeddings_connector.")
)
diff --git a/models/ltx2/ltx_pipelines/utils/model_ledger.py b/models/ltx2/ltx_pipelines/utils/model_ledger.py
index 0d42ebe..63de296 100644
--- a/models/ltx2/ltx_pipelines/utils/model_ledger.py
+++ b/models/ltx2/ltx_pipelines/utils/model_ledger.py
@@ -97,7 +97,7 @@ class ModelLedger:
self,
dtype: torch.dtype,
device: torch.device,
- checkpoint_path: str | None = None,
+ checkpoint_path: str | list[str] | tuple[str, ...] | dict[str, str] | None = None,
gemma_root_path: str | None = None,
spatial_upsampler_path: str | None = None,
loras: LoraPathStrengthAndSDOps | None = None,
@@ -118,7 +118,8 @@ class ModelLedger:
self._shared_state_dict = shared_state_dict
self._shared_quantization_map = shared_quantization_map
self._shared_config = shared_config
- if self.checkpoint_path is not None and self._shared_state_dict is None:
+ self._component_paths = checkpoint_path if isinstance(checkpoint_path, dict) else None
+ if self.checkpoint_path is not None and self._shared_state_dict is None and self._component_paths is None:
(
self._shared_state_dict,
self._shared_quantization_map,
@@ -126,6 +127,14 @@ class ModelLedger:
) = self._load_checkpoint_state(self.checkpoint_path)
self.build_model_builders()
+ def _get_component_path(self, component: str) -> str | list[str] | tuple[str, ...]:
+ if self._component_paths is None:
+ raise ValueError("Component paths are not available for this ledger.")
+ path = self._component_paths.get(component)
+ if not path:
+ raise ValueError(f"Missing '{component}' path for multi-file ledger.")
+ return path
+
def _load_checkpoint_state(self, checkpoint_path: str | list[str] | tuple[str, ...]):
from mmgp import safetensors2
@@ -155,7 +164,7 @@ class ModelLedger:
return state_dict, quantization_map, config
def build_model_builders(self) -> None:
- if self.checkpoint_path is not None:
+ if self.checkpoint_path is not None and self._component_paths is None:
self.transformer_builder = Builder(
model_path=self.checkpoint_path,
model_class_configurator=LTXModelConfigurator,
@@ -262,6 +271,83 @@ class ModelLedger:
consume_shared_state_dict=True,
)
+ if self._component_paths is not None:
+ transformer_path = self._get_component_path("transformer")
+ video_vae_path = self._get_component_path("video_vae")
+ audio_vae_path = self._get_component_path("audio_vae")
+ vocoder_path = self._get_component_path("vocoder")
+ text_projection_path = self._get_component_path("text_embedding_projection")
+ text_connector_path = self._get_component_path("text_embeddings_connector")
+
+ self.transformer_builder = Builder(
+ model_path=transformer_path,
+ model_class_configurator=LTXModelConfigurator,
+ model_sd_ops=LTXV_MODEL_COMFY_RENAMING_MAP,
+ loras=tuple(self.loras),
+ registry=self.registry,
+ )
+
+ self.vae_decoder_builder = Builder(
+ model_path=video_vae_path,
+ model_class_configurator=VideoDecoderConfigurator,
+ model_sd_ops=VAE_DECODER_COMFY_KEYS_FILTER,
+ registry=self.registry,
+ )
+
+ self.vae_encoder_builder = Builder(
+ model_path=video_vae_path,
+ model_class_configurator=VideoEncoderConfigurator,
+ model_sd_ops=VAE_ENCODER_COMFY_KEYS_FILTER,
+ registry=self.registry,
+ )
+
+ self.audio_decoder_builder = Builder(
+ model_path=audio_vae_path,
+ model_class_configurator=AudioDecoderConfigurator,
+ model_sd_ops=AUDIO_VAE_DECODER_COMFY_KEYS_FILTER,
+ registry=self.registry,
+ )
+
+ self.audio_encoder_builder = Builder(
+ model_path=audio_vae_path,
+ model_class_configurator=AudioEncoderConfigurator,
+ model_sd_ops=AUDIO_VAE_ENCODER_COMFY_KEYS_FILTER,
+ registry=self.registry,
+ )
+
+ self.vocoder_builder = Builder(
+ model_path=vocoder_path,
+ model_class_configurator=VocoderConfigurator,
+ model_sd_ops=VOCODER_COMFY_KEYS_FILTER,
+ registry=self.registry,
+ )
+
+ if self.gemma_root_path is not None:
+ empty_text_sd = {}
+ empty_text_config = {}
+ self.text_encoder_builder = Builder(
+ model_path=transformer_path,
+ model_class_configurator=GemmaTextEncoderModelConfigurator,
+ model_sd_ops=GEMMA_TEXT_ENCODER_KEY_OPS,
+ registry=self.registry,
+ module_ops=module_ops_from_gemma_root(self.gemma_root_path),
+ shared_state_dict=empty_text_sd,
+ shared_config=empty_text_config,
+ ignore_missing_keys=True,
+ )
+ self.text_embedding_projection_builder = Builder(
+ model_path=text_projection_path,
+ model_class_configurator=GemmaFeaturesExtractorProjLinear,
+ model_sd_ops=TEXT_EMBEDDING_PROJECTION_KEY_OPS,
+ registry=self.registry,
+ )
+ self.text_embeddings_connector_builder = Builder(
+ model_path=text_connector_path,
+ model_class_configurator=GemmaTextEmbeddingsConnectorModelConfigurator,
+ model_sd_ops=TEXT_EMBEDDINGS_CONNECTOR_KEY_OPS,
+ registry=self.registry,
+ )
+
if self.spatial_upsampler_path is not None:
self.upsampler_builder = Builder(
model_path=self.spatial_upsampler_path,
diff --git a/models/ltx_video/ltxv_handler.py b/models/ltx_video/ltxv_handler.py
index 026e6af..1f99c16 100644
--- a/models/ltx_video/ltxv_handler.py
+++ b/models/ltx_video/ltxv_handler.py
@@ -81,7 +81,7 @@ class family_handler():
return 32
@staticmethod
- def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization):
+ def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization, model_def=None):
text_encoder_filename = get_ltxv_text_encoder_filename(text_encoder_quantization)
return {
"repoId" : "DeepBeepMeep/LTX_Video",
diff --git a/models/qwen/qwen_handler.py b/models/qwen/qwen_handler.py
index 16419ce..e643ee7 100644
--- a/models/qwen/qwen_handler.py
+++ b/models/qwen/qwen_handler.py
@@ -112,7 +112,7 @@ class family_handler():
return args.lora_dir_qwen
@staticmethod
- def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization):
+ def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization, model_def=None):
text_encoder_filename = get_qwen_text_encoder_filename(text_encoder_quantization)
vae_files = ["qwen_vae.safetensors", "qwen_vae_config.json"]
if base_model_type in ["qwen_image_layered_20B"]:
diff --git a/models/wan/df_handler.py b/models/wan/df_handler.py
index 5744332..3c7f8b7 100644
--- a/models/wan/df_handler.py
+++ b/models/wan/df_handler.py
@@ -86,7 +86,7 @@ class family_handler():
return latent_rgb_factors, latent_rgb_factors_bias
@staticmethod
- def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization):
+ def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization, model_def=None):
from .wan_handler import family_handler
return family_handler.query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization)
diff --git a/models/wan/ovi_handler.py b/models/wan/ovi_handler.py
index 9801c34..b88ac7b 100644
--- a/models/wan/ovi_handler.py
+++ b/models/wan/ovi_handler.py
@@ -68,7 +68,7 @@ class family_handler:
return cfg
@staticmethod
- def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization):
+ def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization, model_def=None):
from .wan_handler import family_handler
download_def = family_handler.query_model_files(computeList, "ti2v_2_2", model_filename, text_encoder_quantization)
diff --git a/models/wan/wan_handler.py b/models/wan/wan_handler.py
index f0fa27b..c7b6f4a 100644
--- a/models/wan/wan_handler.py
+++ b/models/wan/wan_handler.py
@@ -675,7 +675,7 @@ class family_handler():
return latent_rgb_factors, latent_rgb_factors_bias
@staticmethod
- def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization):
+ def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization, model_def=None):
text_encoder_filename = family_handler.get_text_encoder_filename(text_encoder_quantization)
if test_wan_5B(base_model_type):
diff --git a/models/z_image/z_image_handler.py b/models/z_image/z_image_handler.py
index 7c0d43c..4b4a0e2 100644
--- a/models/z_image/z_image_handler.py
+++ b/models/z_image/z_image_handler.py
@@ -90,7 +90,7 @@ class family_handler:
return args.lora_dir_z_image
@staticmethod
- def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization):
+ def query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization, model_def=None):
text_encoder_filename = get_z_image_text_encoder_filename(text_encoder_quantization)
download_def = [
{
diff --git a/wgp.py b/wgp.py
index 8959d89..7c0ebde 100644
--- a/wgp.py
+++ b/wgp.py
@@ -85,7 +85,7 @@ AUTOSAVE_TEMPLATE_PATH = AUTOSAVE_FILENAME
CONFIG_FILENAME = "wgp_config.json"
PROMPT_VARS_MAX = 10
target_mmgp_version = "3.6.14"
-WanGP_version = "10.23"
+WanGP_version = "10.24"
settings_version = 2.43
max_source_video_frames = 3000
prompt_enhancer_image_caption_model, prompt_enhancer_image_caption_processor, prompt_enhancer_llm_model, prompt_enhancer_llm_tokenizer = None, None, None, None
@@ -2175,7 +2175,7 @@ for path in ["wan2.1_Vace_1.3B_preview_bf16.safetensors", "sky_reels2_diffusion
"wan2.1_image2video_720p_14B_quanto_int8.safetensors", "wan2.1_image2video_720p_14B_quanto_fp16_int8.safetensors", "wan2.1_image2video_720p_14B_bf16.safetensors",
"wan2.1_text2video_14B_bf16.safetensors", "wan2.1_text2video_14B_quanto_int8.safetensors",
"wan2.1_Vace_14B_mbf16.safetensors", "wan2.1_Vace_14B_quanto_mbf16_int8.safetensors", "wan2.1_FLF2V_720p_14B_quanto_int8.safetensors", "wan2.1_FLF2V_720p_14B_bf16.safetensors", "wan2.1_FLF2V_720p_14B_fp16.safetensors", "wan2.1_Vace_1.3B_mbf16.safetensors", "wan2.1_text2video_1.3B_bf16.safetensors",
-"ltxv_0.9.7_13B_dev_bf16.safetensors"
+"ltxv_0.9.7_13B_dev_bf16.safetensors", "ltx-2-19b-distilled-fp8.safetensors", "ltx-2-19b-dev-fp8.safetensors", "ltx-2-19b-distilled.safetensors", "ltx-2-19b-dev.safetensors"
]:
if fl.locate_file(path, error_if_none= False) is not None:
print(f"Removing old version of model '{path}'. A new version of this model will be downloaded next time you use it.")
@@ -3033,7 +3033,9 @@ def download_models(model_filename = None, model_type= None, module_type = False
raise Exception(f"Lora URL '{url}' is invalid: {str(e)}'")
if module_type: return
- model_files = model_type_handler.query_model_files(computeList, base_model_type, model_filename, text_encoder_quantization)
+ model_files = model_type_handler.query_model_files(
+ computeList, base_model_type, model_filename, text_encoder_quantization, model_def
+ )
if not isinstance(model_files, list): model_files = [model_files]
for one_repo in model_files:
process_files_def(**one_repo)
@@ -3335,6 +3337,7 @@ def load_models(model_type, override_profile = -1, **model_kwargs):
if len(compile) > 0 and hasattr(wan_model, "custom_compile"):
wan_model.custom_compile(backend= "inductor", mode ="default")
compile_modules = model_def.get("compile", compile) if len(compile) > 0 else ""
+ # kwargs["pinnedMemory"] = "text_encoder"
offloadobj = offload.profile(pipe, profile_no= mmgp_profile, compile = compile_modules, quantizeTransformer = False, loras = loras_transformer, perc_reserved_mem_max = perc_reserved_mem_max , vram_safety_coefficient = vram_safety_coefficient , convertWeightsFloatTo = transformer_dtype, **kwargs)
if len(args.gpu) > 0:
torch.set_default_device(args.gpu)