Add LTX-2 Support (#644)

* WIP, adding support for LTX2

* Training on images working

* Fix loading comfy models

* Handle converting and deconverting lora so it matches original format

* Reworked ui to habdle ltx and propert dataset default overwriting.

* Update the way lokr saves to it is more compatable with comfy

* Audio loading and synchronization/resampling is working

* Add audio to training. Does it work? Maybe, still testing.

* Fixed fps default issue for sound

* Have ui set fps for accurate audio mapping on ltx

* Added audio procession options to the ui for ltx

* Clean up requirements
This commit is contained in:
Jaret Burkett
2026-01-13 04:55:30 -07:00
committed by GitHub
parent 6870ab490f
commit 5b5aadadb8
28 changed files with 2180 additions and 71 deletions

View File

@@ -265,11 +265,18 @@ class LoRASpecialNetwork(ToolkitNetworkMixin, LoRANetwork):
self.peft_format = peft_format
self.is_transformer = is_transformer
# use the old format for older models unless the user has specified otherwise
self.use_old_lokr_format = False
if self.network_config is not None and hasattr(self.network_config, 'old_lokr_format'):
self.use_old_lokr_format = self.network_config.old_lokr_format
# also allow a false from the model itself
if base_model is not None and not base_model.use_old_lokr_format:
self.use_old_lokr_format = False
# always do peft for flux only for now
if self.is_flux or self.is_v3 or self.is_lumina2 or is_transformer:
# don't do peft format for lokr
if self.network_type.lower() != "lokr":
# don't do peft format for lokr if using old format
if self.network_type.lower() != "lokr" or not self.use_old_lokr_format:
self.peft_format = True
if self.peft_format: