Instructions to use modest-mouse/ltx-ugc-bundle with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LTX-2
How to use modest-mouse/ltx-ugc-bundle with LTX-2:
# Install the LTX-2 pipelines git clone https://github.com/Lightricks/LTX-2.git cd LTX-2 uv sync --frozen
# Download the weights from this repo, plus the Gemma text encoder hf download modest-mouse/ltx-ugc-bundle --local-dir models/ltx-ugc-bundle hf download google/gemma-3-12b-it-qat-q4_0-unquantized --local-dir models/gemma-3-12b
# Fast pipeline (distilled model, no distilled LoRA needed) uv run python -m ltx_pipelines.distilled \ --distilled-checkpoint-path models/ltx-ugc-bundle/<distilled-checkpoint>.safetensors \ --spatial-upsampler-path models/ltx-ugc-bundle/<spatial-upsampler>.safetensors \ --gemma-root models/gemma-3-12b \ --prompt "A beautiful sunset over the ocean" \ --output-path output.mp4 # For image-to-video, add: --image path/to/image.jpg 0 0.8# HQ pipeline (two-stage, higher quality) uv run python -m ltx_pipelines.ti2vid_two_stages_hq \ --checkpoint-path models/ltx-ugc-bundle/<checkpoint>.safetensors \ --distilled-lora models/ltx-ugc-bundle/<distilled-lora>.safetensors 0.8 \ --spatial-upsampler-path models/ltx-ugc-bundle/<spatial-upsampler>.safetensors \ --gemma-root models/gemma-3-12b \ --prompt "A beautiful sunset over the ocean" \ --output-path output.mp4 # For image-to-video, add: --image path/to/image.jpg 0 0.8 - Notebooks
- Google Colab
- Kaggle
Download custom_nodes/ComfyUI-Easy-Use/py/libs/conditioning.py from modest-mouse/ltx-ugc-bundle: direct link, hf CLI and curl.
- Browser
- Download file 2.99 kB
-
https://huggingface.co/modest-mouse/ltx-ugc-bundle/resolve/main/custom_nodes/ComfyUI-Easy-Use/py/libs/conditioning.py
- Command line
-
hf download hf://modest-mouse/ltx-ugc-bundle/custom_nodes/ComfyUI-Easy-Use/py/libs/conditioning.py
-
curl -L -o conditioning.py https://huggingface.co/modest-mouse/ltx-ugc-bundle/resolve/main/custom_nodes/ComfyUI-Easy-Use/py/libs/conditioning.py
2.99 kB
| from .utils import find_wildcards_seed, find_nearest_steps, is_linked_styles_selector | |
| from .log import log_node_warn | |
| from .translate import zh_to_en, has_chinese | |
| from .wildcards import process_with_loras | |
| from .adv_encode import advanced_encode | |
| from nodes import ConditioningConcat, ConditioningCombine, ConditioningAverage, ConditioningSetTimestepRange, CLIPTextEncode | |
| def prompt_to_cond(type, model, clip, clip_skip, lora_stack, text, prompt_token_normalization, prompt_weight_interpretation, a1111_prompt_style ,my_unique_id, prompt, easyCache, can_load_lora=True, steps=None, model_type=None): | |
| styles_selector = is_linked_styles_selector(prompt, my_unique_id, type) | |
| title = "Positive encoding" if type == 'positive' else "Negative encoding" | |
| # Translate cn to en | |
| if model_type not in ['hydit'] and text is not None and has_chinese(text): | |
| text = zh_to_en([text])[0] | |
| if model_type in ['hydit', 'flux', 'mochi']: | |
| log_node_warn(title + "...") | |
| embeddings_final, = CLIPTextEncode().encode(clip, text) if text is not None else (None,) | |
| return (embeddings_final, "", model, clip) | |
| log_node_warn(title + "...") | |
| positive_seed = find_wildcards_seed(my_unique_id, text, prompt) | |
| model, clip, text, cond_decode, show_prompt, pipe_lora_stack = process_with_loras( | |
| text, model, clip, type, positive_seed, can_load_lora, lora_stack, easyCache) | |
| wildcard_prompt = cond_decode if show_prompt or styles_selector else "" | |
| clipped = clip.clone() | |
| # 当clip模型不存在t5xxl时,可执行跳过层 | |
| if not hasattr(clip.cond_stage_model, 't5xxl'): | |
| if clip_skip != 0: | |
| clipped.clip_layer(clip_skip) | |
| steps = steps if steps is not None else find_nearest_steps(my_unique_id, prompt) | |
| return (advanced_encode(clipped, text, prompt_token_normalization, | |
| prompt_weight_interpretation, w_max=1.0, | |
| apply_to_pooled='enable', | |
| a1111_prompt_style=a1111_prompt_style, steps=steps) if text is not None else None, wildcard_prompt, model, clipped) | |
| def set_cond(old_cond, new_cond, mode, average_strength, old_cond_start, old_cond_end, new_cond_start, new_cond_end): | |
| if not old_cond: | |
| return new_cond | |
| else: | |
| if mode == "replace": | |
| return new_cond | |
| elif mode == "concat": | |
| return ConditioningConcat().concat(new_cond, old_cond)[0] | |
| elif mode == "combine": | |
| return ConditioningCombine().combine(old_cond, new_cond)[0] | |
| elif mode == 'average': | |
| return ConditioningAverage().addWeighted(new_cond, old_cond, average_strength)[0] | |
| elif mode == 'timestep': | |
| cond_1 = ConditioningSetTimestepRange().set_range(old_cond, old_cond_start, old_cond_end)[0] | |
| cond_2 = ConditioningSetTimestepRange().set_range(new_cond, new_cond_start, new_cond_end)[0] | |
| return ConditioningCombine().combine(cond_1, cond_2)[0] |