Instructions to use hgjc/ltx-ugc-bundle with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LTX.io
How to use hgjc/ltx-ugc-bundle with LTX.io:
# 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 hgjc/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
| import os | |
| from .utils import load_json_file, path_exists, save_json_file | |
| THIS_DIR = os.path.dirname(os.path.abspath(__file__)) | |
| USERDATA = os.path.join(THIS_DIR, '..', 'userdata') | |
| def read_userdata_file(rel_path: str): | |
| """Reads a file from the userdata directory.""" | |
| file_path = clean_path(rel_path) | |
| if path_exists(file_path): | |
| with open(file_path, 'r', encoding='UTF-8') as file: | |
| return file.read() | |
| return None | |
| def save_userdata_file(rel_path: str, content: str): | |
| """Saves a file from the userdata directory.""" | |
| file_path = clean_path(rel_path) | |
| with open(file_path, 'w+', encoding='UTF-8') as file: | |
| file.write(content) | |
| def delete_userdata_file(rel_path: str): | |
| """Deletes a file from the userdata directory.""" | |
| file_path = clean_path(rel_path) | |
| if os.path.isfile(file_path): | |
| os.remove(file_path) | |
| def read_userdata_json(rel_path: str): | |
| """Reads a json file from the userdata directory.""" | |
| file_path = clean_path(rel_path) | |
| return load_json_file(file_path) | |
| def save_userdata_json(rel_path: str, data: dict): | |
| """Saves a json file from the userdata directory.""" | |
| file_path = clean_path(rel_path) | |
| return save_json_file(file_path, data) | |
| def clean_path(rel_path: str): | |
| """Cleans a relative path by splitting on forward slash and os.path.joining.""" | |
| cleaned = USERDATA | |
| paths = rel_path.split('/') | |
| for path in paths: | |
| cleaned = os.path.join(cleaned, path) | |
| return cleaned | |