Instructions to use Quantumbraid/ltx2-lora2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Quantumbraid/ltx2-lora2 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Quantumbraid/ltx2-lora2", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
File size: 2,744 Bytes
cd95e4d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | ---
tags:
- ltx-2
- ltx-video
- text-to-video
- audio-video
pinned: true
language:
- en
license: other
pipeline_tag: text-to-video
library_name: diffusers
---
# ltx2-lora2
Trained with the [LTX LoRA Trainer](https://huggingface.co/spaces/ltx-community/ltx2-lora-trainer) — powered by [LTX-2](https://github.com/Lightricks/LTX-2).
This is a **Text-to-Video LoRA** fine-tuned from [`ltx-2.3-22b-dev.safetensors`](https://huggingface.co/Lightricks/LTX-2.3) on custom data.
## Model Details
- **Base Model:** [`ltx-2.3-22b-dev.safetensors`](https://huggingface.co/Lightricks/LTX-2.3)
- **LoRA type:** Text-to-Video LoRA
- **Training Type:** LoRA fine-tuning
- **Training Steps:** 2000
- **Learning Rate:** 0.0001
- **Batch Size:** 1
## Sample Outputs
| | | | |
|:---:|:---:|:---:|:---:|
## Usage
### 🧨 Diffusers
> LTX-2.3 support is currently on the diffusers `main` branch:
> `pip install git+https://github.com/huggingface/diffusers.git`
```python
import torch
from diffusers import LTX2Pipeline
from diffusers.pipelines.ltx2.export_utils import encode_video
from diffusers.pipelines.ltx2.utils import DEFAULT_NEGATIVE_PROMPT
pipe = LTX2Pipeline.from_pretrained(
"diffusers/LTX-2.3-Diffusers", torch_dtype=torch.bfloat16
)
pipe.enable_model_cpu_offload()
# Load this LoRA
pipe.load_lora_weights("Quantumbraid/ltx2-lora2", weight_name="lora_weights_step_02000.safetensors", adapter_name="lora")
pipe.set_adapters("lora", 1.0)
video, audio = pipe(
prompt="<your prompt>",
negative_prompt=DEFAULT_NEGATIVE_PROMPT,
width=768, height=512, num_frames=49, frame_rate=25.0,
num_inference_steps=30, guidance_scale=4.0,
output_type="np", return_dict=False,
)
encode_video(video[0], fps=25.0, output_path="output.mp4")
```
For the full reference implementation and ComfyUI workflows, see the [official LTX-2 repository](https://github.com/Lightricks/LTX-2).
### 🔌 Using Trained LoRAs in ComfyUI
In order to use the trained LoRA in ComfyUI, follow these steps:
1. Copy your trained LoRA checkpoint (`.safetensors` file) to the `models/loras` folder in your ComfyUI installation.
2. In your ComfyUI workflow:
- Add the "Load LoRA" node to choose your LoRA file
- Connect it to the "Load Checkpoint" node to apply the LoRA to the base model
You can find reference Text-to-Video (T2V) and Image-to-Video (I2V) workflows in the
official [LTX-2 repository](https://github.com/Lightricks/LTX-2).
### Example Prompts
This model inherits the license of the base model ([`ltx-2.3-22b-dev.safetensors`](https://huggingface.co/Lightricks/LTX-2.3)).
## Acknowledgments
- Base model: [Lightricks](https://huggingface.co/Lightricks/LTX-2)
- Trainer: [LTX-2](https://github.com/Lightricks/LTX-2)
|