Say exactly what is needed to run this, having tested it
Browse files
README.md
CHANGED
|
@@ -174,12 +174,25 @@ Space loads a `Q3_K_M` DiT alongside it.
|
|
| 174 |
|
| 175 |
### Standalone
|
| 176 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 177 |
```python
|
| 178 |
from huggingface_hub import hf_hub_download, snapshot_download
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 179 |
from ltx_packed_codec import load_packed_model
|
| 180 |
from transformers import AutoTokenizer
|
| 181 |
|
| 182 |
-
repo = "topabaem/LTX-2.5-Text-Encoder-4bit"
|
| 183 |
packed = hf_hub_download(repo, "A3.packed.safetensors")
|
| 184 |
encoder_dir = snapshot_download(repo, allow_patterns=["encoder-hf/*"]) + "/encoder-hf"
|
| 185 |
|
|
@@ -187,11 +200,37 @@ model = load_packed_model(encoder_dir, packed, resident=True)
|
|
| 187 |
tokenizer = AutoTokenizer.from_pretrained(encoder_dir)
|
| 188 |
```
|
| 189 |
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
|
| 196 |
### ComfyUI
|
| 197 |
|
|
|
|
| 174 |
|
| 175 |
### Standalone
|
| 176 |
|
| 177 |
+
Five packages and one file. No build step, no custom CUDA kernels, no
|
| 178 |
+
compilation.
|
| 179 |
+
|
| 180 |
+
```bash
|
| 181 |
+
pip install -r <(curl -sL https://huggingface.co/topabaem/LTX-2.5-Text-Encoder-4bit/resolve/main/requirements.txt)
|
| 182 |
+
```
|
| 183 |
+
|
| 184 |
```python
|
| 185 |
from huggingface_hub import hf_hub_download, snapshot_download
|
| 186 |
+
|
| 187 |
+
repo = "topabaem/LTX-2.5-Text-Encoder-4bit"
|
| 188 |
+
|
| 189 |
+
# The loader ships with the weights; put it on the path before importing it.
|
| 190 |
+
import sys, os
|
| 191 |
+
sys.path.insert(0, os.path.dirname(hf_hub_download(repo, "ltx_packed_codec.py")))
|
| 192 |
+
|
| 193 |
from ltx_packed_codec import load_packed_model
|
| 194 |
from transformers import AutoTokenizer
|
| 195 |
|
|
|
|
| 196 |
packed = hf_hub_download(repo, "A3.packed.safetensors")
|
| 197 |
encoder_dir = snapshot_download(repo, allow_patterns=["encoder-hf/*"]) + "/encoder-hf"
|
| 198 |
|
|
|
|
| 200 |
tokenizer = AutoTokenizer.from_pretrained(encoder_dir)
|
| 201 |
```
|
| 202 |
|
| 203 |
+
Verified end to end in a clean virtualenv containing nothing but those five
|
| 204 |
+
packages, on **torch 2.13.0 / transformers 5.15.1** and on **torch 2.10.0 /
|
| 205 |
+
transformers 5.12.1**. `encoder-hf/` is config and tokenizer only, 31 MB — the
|
| 206 |
+
26 GB original is not needed.
|
| 207 |
+
|
| 208 |
+
### What your GPU has to support
|
| 209 |
+
|
| 210 |
+
Nothing unusual. The format needs no fp8 hardware: the group scales are stored
|
| 211 |
+
as `float8_e4m3fn` bytes and converted in software during a CPU-side decode, so
|
| 212 |
+
`float8` here is a container and never an instruction. There is no minimum
|
| 213 |
+
compute capability, no `comfy_kitchen`, no CUDA 13. The resident model is BF16
|
| 214 |
+
and runs on cards with no bf16 tensor cores at all.
|
| 215 |
+
|
| 216 |
+
**The one real constraint is your torch wheel, not your GPU.** The default wheel
|
| 217 |
+
on PyPI is now a cu130 build and cu130 dropped Volta. Measured on a V100:
|
| 218 |
+
|
| 219 |
+
| torch build | device | result |
|
| 220 |
+
|---|---|---|
|
| 221 |
+
| 2.13.0+cu130 | CPU | works |
|
| 222 |
+
| 2.13.0+cu130 | V100, sm_70 | **`no kernel image is available`** |
|
| 223 |
+
| 2.10.0+cu128 | V100, sm_70 | works |
|
| 224 |
+
|
| 225 |
+
That failure arrives at the *first kernel launch*, well after
|
| 226 |
+
`torch.cuda.is_available()` has returned `True`, so it does not look like an
|
| 227 |
+
installation problem. On sm_70 install a cu128 build:
|
| 228 |
+
|
| 229 |
+
```bash
|
| 230 |
+
pip install torch --index-url https://download.pytorch.org/whl/cu128
|
| 231 |
+
```
|
| 232 |
+
|
| 233 |
+
Ampere and newer are unaffected — the stock wheel carries kernels for them.
|
| 234 |
|
| 235 |
### ComfyUI
|
| 236 |
|