Instructions to use DouraVITA/ltx-ugc-bundle with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LTX-2
How to use DouraVITA/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 DouraVITA/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/modules/dit/utils.py from DouraVITA/ltx-ugc-bundle: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/DouraVITA/ltx-ugc-bundle/resolve/main/custom_nodes/ComfyUI-Easy-Use/py/modules/dit/utils.py
- Command line
-
hf download hf://DouraVITA/ltx-ugc-bundle/custom_nodes/ComfyUI-Easy-Use/py/modules/dit/utils.py
-
curl -L -o utils.py https://huggingface.co/DouraVITA/ltx-ugc-bundle/resolve/main/custom_nodes/ComfyUI-Easy-Use/py/modules/dit/utils.py
1.1 kB
| import torch | |
| from comfy import model_management | |
| def string_to_dtype(s="none", mode=None): | |
| s = s.lower().strip() | |
| if s in ["default", "as-is"]: | |
| return None | |
| elif s in ["auto", "auto (comfy)"]: | |
| if mode == "vae": | |
| return model_management.vae_device() | |
| elif mode == "text_encoder": | |
| return model_management.text_encoder_dtype() | |
| elif mode == "unet": | |
| return model_management.unet_dtype() | |
| else: | |
| raise NotImplementedError(f"Unknown dtype mode '{mode}'") | |
| elif s in ["none", "auto (hf)", "auto (hf/bnb)"]: | |
| return None | |
| elif s in ["fp32", "float32", "float"]: | |
| return torch.float32 | |
| elif s in ["bf16", "bfloat16"]: | |
| return torch.bfloat16 | |
| elif s in ["fp16", "float16", "half"]: | |
| return torch.float16 | |
| elif "fp8" in s or "float8" in s: | |
| if "e5m2" in s: | |
| return torch.float8_e5m2 | |
| elif "e4m3" in s: | |
| return torch.float8_e4m3fn | |
| else: | |
| raise NotImplementedError(f"Unknown 8bit dtype '{s}'") | |
| elif "bnb" in s: | |
| assert s in ["bnb8bit", "bnb4bit"], f"Unknown bnb mode '{s}'" | |
| return s | |
| elif s is None: | |
| return None | |
| else: | |
| raise NotImplementedError(f"Unknown dtype '{s}'") |