Skip to content

LTX-Video Support for ComfyUI

Automated PR - 2025-05-08

sync-botd617d4bd3133
diff --git a/__init__.py b/__init__.py
index c97ed6e..c56e879 100644
--- a/__init__.py
+++ b/__init__.py
@@ -1,34 +1,58 @@
-from .decoder_noise import DecoderNoise # noqa: F401
-from .easy_samplers import LTXVBaseSampler # noqa: F401
-from .film_grain import LTXVFilmGrain # noqa: F401
-from .guide import LTXVAddGuideAdvanced # noqa: F401
-from .latent_adain import LTXVAdainLatent # noqa: F401
-from .latent_upsampler import LTXVLatentUpsampler # noqa: F401
-from .latents import LTXVSelectLatents, LTXVSetVideoLatentNoiseMasks # noqa: F401
-from .nodes_registry import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
-from .prompt_enhancer_nodes import ( # noqa: F401
- LTXVPromptEnhancer,
- LTXVPromptEnhancerLoader,
+from .decoder_noise import DecoderNoise
+from .easy_samplers import LTXVBaseSampler
+from .film_grain import LTXVFilmGrain
+from .guide import LTXVAddGuideAdvanced
+from .latent_adain import LTXVAdainLatent
+from .latent_upsampler import LTXVLatentUpsampler
+from .latents import LTXVSelectLatents, LTXVSetVideoLatentNoiseMasks
+from .nodes_registry import NODE_CLASS_MAPPINGS as RUNTIME_NODE_CLASS_MAPPINGS
+from .nodes_registry import (
+ NODE_DISPLAY_NAME_MAPPINGS as RUNTIME_NODE_DISPLAY_NAME_MAPPINGS,
)
-from .q8_nodes import LTXVQ8Patch # noqa: F401
-from .recurrent_sampler import ( # noqa: F401
- LinearOverlapLatentTransition,
- LTXVRecurrentKSampler,
-)
-from .stg import ( # noqa: F401
+from .prompt_enhancer_nodes import LTXVPromptEnhancer, LTXVPromptEnhancerLoader
+from .q8_nodes import LTXVQ8Patch
+from .recurrent_sampler import LinearOverlapLatentTransition, LTXVRecurrentKSampler
+from .stg import (
LTXVApplySTG,
STGAdvancedPresetsNode,
STGGuiderAdvancedNode,
STGGuiderNode,
)
-from .tiled_sampler import LTXVTiledSampler # noqa: F401
+from .tiled_sampler import LTXVTiledSampler
from .tricks import NODE_CLASS_MAPPINGS as TRICKS_NODE_CLASS_MAPPINGS
from .tricks import NODE_DISPLAY_NAME_MAPPINGS as TRICKS_NODE_DISPLAY_NAME_MAPPINGS
+# Static node mappings, required for ComfyUI-Manager mapping to work
+NODE_CLASS_MAPPINGS = {
+ "DecoderNoise": DecoderNoise,
+ "LinearOverlapLatentTransition": LinearOverlapLatentTransition,
+ "LTXVAddGuideAdvanced": LTXVAddGuideAdvanced,
+ "LTXVAdainLatent": LTXVAdainLatent,
+ "LTXVApplySTG": LTXVApplySTG,
+ "LTXVBaseSampler": LTXVBaseSampler,
+ "LTXVFilmGrain": LTXVFilmGrain,
+ "LTXVLatentUpsampler": LTXVLatentUpsampler,
+ "LTXVPromptEnhancer": LTXVPromptEnhancer,
+ "LTXVPromptEnhancerLoader": LTXVPromptEnhancerLoader,
+ "LTXVQ8Patch": LTXVQ8Patch,
+ "LTXVRecurrentKSampler": LTXVRecurrentKSampler,
+ "LTXVSelectLatents": LTXVSelectLatents,
+ "LTXVSetVideoLatentNoiseMasks": LTXVSetVideoLatentNoiseMasks,
+ "LTXVTiledSampler": LTXVTiledSampler,
+ "STGAdvancedPresetsNode": STGAdvancedPresetsNode,
+ "STGGuiderAdvancedNode": STGGuiderAdvancedNode,
+ "STGGuiderNode": STGGuiderNode,
+}
+NODE_DISPLAY_NAME_MAPPINGS = {}
+
# Merge the node mappings from tricks into the main mappings
NODE_CLASS_MAPPINGS.update(TRICKS_NODE_CLASS_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(TRICKS_NODE_DISPLAY_NAME_MAPPINGS)
+# Update with runtime mappings (these will override static mappings if there are any differences)
+NODE_CLASS_MAPPINGS.update(RUNTIME_NODE_CLASS_MAPPINGS)
+NODE_DISPLAY_NAME_MAPPINGS.update(RUNTIME_NODE_DISPLAY_NAME_MAPPINGS)
+
# Export so that ComfyUI can pick them up.
__all__ = [
"NODE_CLASS_MAPPINGS",