Instructions to use drbaph/LongCat-AudioDiT-3.5B-fp8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use drbaph/LongCat-AudioDiT-3.5B-fp8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-speech", model="drbaph/LongCat-AudioDiT-3.5B-fp8")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("drbaph/LongCat-AudioDiT-3.5B-fp8", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -4,3 +4,107 @@ language:
|
|
| 4 |
- zh
|
| 5 |
- en
|
| 6 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
- zh
|
| 5 |
- en
|
| 6 |
---
|
| 7 |
+
|
| 8 |
+
# LongCat-AudioDiT-3.5B β FP8 Weight-Only Quantized (ComfyUI)
|
| 9 |
+
|
| 10 |
+
**FP8 quantized version of [meituan-longcat/LongCat-AudioDiT-3.5B](https://huggingface.co/meituan-longcat/LongCat-AudioDiT-3.5B).**
|
| 11 |
+
|
| 12 |
+
[**Original Model**](https://huggingface.co/meituan-longcat/LongCat-AudioDiT-3.5B) | [**Paper**](https://github.com/meituan-longcat/LongCat-AudioDiT/blob/main/LongCat-AudioDiT.pdf) | [**GitHub (Original)**](https://github.com/meituan-longcat/LongCat-AudioDiT) | [**ComfyUI Node**](https://github.com/Saganaki22/ComfyUI-LongCat-AudioDIT-TTS)
|
| 13 |
+
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
|
| 19 |
+
## What is this?
|
| 20 |
+
|
| 21 |
+
This is a weight-only FP8 quantization of LongCat-AudioDiT-3.5B β a state-of-the-art diffusion-based zero-shot TTS model by Meituan that operates directly in the waveform latent space. The quantization cuts the on-disk size roughly in half and reduces VRAM usage from ~14 GB to ~4 GB, with no perceptible quality loss in practice.
|
| 22 |
+
|
| 23 |
+
| | Original (3.5B FP32) | This (3.5B FP8) |
|
| 24 |
+
|---|---|---|
|
| 25 |
+
| **Weight dtype** | float32 | float8_e4m3fn |
|
| 26 |
+
| **Activation dtype** | bfloat16 | bfloat16 |
|
| 27 |
+
| **Scale** | β | per-tensor float32 |
|
| 28 |
+
| **File size** | ~14 GB | ~4 GB |
|
| 29 |
+
| **VRAM (inference)** | ~20 GB | ~8 GB |
|
| 30 |
+
| **Extra dependencies** | none | none |
|
| 31 |
+
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
## Quantization Details
|
| 35 |
+
|
| 36 |
+
**What is quantized:** All linear weight matrices in the DiT transformer backbone. Non-linear weights (VAE, embeddings, layer norms, text encoder) remain in bfloat16.
|
| 37 |
+
|
| 38 |
+
**Method: Per-tensor symmetric FP8**
|
| 39 |
+
|
| 40 |
+
Each weight matrix is quantized using a per-tensor scale factor stored in `fp8_scales.json`:
|
| 41 |
+
````
|
| 42 |
+
scale = max(abs(W)) / FP8_MAX # FP8_MAX = 448.0 for float8_e4m3fn
|
| 43 |
+
W_fp8 = round(W_fp32 / scale) # quantize
|
| 44 |
+
W_bf16 = W_fp8.to(bfloat16) * scale # dequantize at inference
|
| 45 |
+
````
|
| 46 |
+
|
| 47 |
+
**No external quantization library required.** Dequantization is handled automatically by the [ComfyUI-LongCat-AudioDIT-TTS](https://github.com/Saganaki22/ComfyUI-LongCat-AudioDIT-TTS) node pack at load time. The model is fully compatible with the original `audiodit` inference code once dequantized.
|
| 48 |
+
|
| 49 |
+
**File layout:**
|
| 50 |
+
- `model.safetensors` β FP8 weight tensors
|
| 51 |
+
- `fp8_scales.json` β per-tensor float32 scale factors for dequantization
|
| 52 |
+
|
| 53 |
+
---
|
| 54 |
+
|
| 55 |
+
## Hardware Requirements
|
| 56 |
+
|
| 57 |
+
- **GPU:** NVIDIA GPU with CUDA support
|
| 58 |
+
- **VRAM:** ~4 GB
|
| 59 |
+
- **Native FP8 tensor cores:** Ada Lovelace or Blackwell (RTX 4090, RTX 5090, H100, etc.) β recommended for full speed
|
| 60 |
+
- **Older GPUs (Ampere and below):** Will load and run correctly. Dequantization to bfloat16 happens on all hardware, so you still get the reduced VRAM footprint even without native FP8 cores.
|
| 61 |
+
|
| 62 |
+
---
|
| 63 |
+
|
| 64 |
+
## Usage β ComfyUI (Recommended)
|
| 65 |
+
|
| 66 |
+
The easiest way to use this model is with **[ComfyUI-LongCat-AudioDIT-TTS](https://github.com/Saganaki22/ComfyUI-LongCat-AudioDIT-TTS)**, which has native support for this FP8 model with zero extra setup.
|
| 67 |
+
|
| 68 |
+
### Installation
|
| 69 |
+
|
| 70 |
+
1. Install the ComfyUI node via **ComfyUI Manager** (search `LongCat-AudioDiT`) or manually:
|
| 71 |
+
```bash
|
| 72 |
+
cd ComfyUI/custom_nodes
|
| 73 |
+
git clone https://github.com/Saganaki22/ComfyUI-LongCat-AudioDIT-TTS.git
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
2. The model **auto-downloads on first use** β select `LongCat-AudioDiT-3.5B-fp8` from the model dropdown in any LongCat node.
|
| 77 |
+
|
| 78 |
+
3. Or download manually:
|
| 79 |
+
```bash
|
| 80 |
+
huggingface-cli download drbaph/LongCat-AudioDiT-3.5B-fp8 --local-dir ComfyUI/models/audiodit/LongCat-AudioDiT-3.5B-fp8
|
| 81 |
+
```
|
| 82 |
+
|
| 83 |
+
### Available Nodes
|
| 84 |
+
|
| 85 |
+
- **LongCat AudioDiT TTS** β Zero-shot text-to-speech
|
| 86 |
+
- **LongCat AudioDiT Voice Clone TTS** β Voice cloning from reference audio
|
| 87 |
+
- **LongCat AudioDiT Multi-Speaker TTS** β Multi-speaker conversation synthesis
|
| 88 |
+
|
| 89 |
+
### Recommended Settings
|
| 90 |
+
|
| 91 |
+
- `dtype`: `auto` or `bf16` β FP8 weights are dequantized to BF16 at load time
|
| 92 |
+
- `guidance_method`: `cfg` for TTS, `apg` for voice cloning
|
| 93 |
+
- `steps`: `16` (balanced), `32` (higher quality)
|
| 94 |
+
- `keep_model_loaded`: `True` for repeated use
|
| 95 |
+
|
| 96 |
+
---
|
| 97 |
+
|
| 98 |
+
## About LongCat-AudioDiT
|
| 99 |
+
|
| 100 |
+
LongCat-AudioDiT is a non-autoregressive diffusion-based TTS model from Meituan that achieves state-of-the-art zero-shot voice cloning performance on the Seed benchmark. Unlike previous methods relying on mel-spectrograms, it operates directly in the waveform latent space using only a Wav-VAE and a DiT backbone.
|
| 101 |
+
|
| 102 |
+
The 3.5B variant achieves **0.818 SIM on Seed-ZH** and **0.797 SIM on Seed-Hard**, surpassing both open-source and closed-source competitors.
|
| 103 |
+
|
| 104 |
+
---
|
| 105 |
+
|
| 106 |
+
## License
|
| 107 |
+
|
| 108 |
+
This model inherits the [MIT License](https://github.com/meituan-longcat/LongCat-AudioDiT/blob/main/LICENSE) from [meituan-longcat/LongCat-AudioDiT-3.5B](https://huggingface.co/meituan-longcat/LongCat-AudioDiT-3.5B).
|
| 109 |
+
|
| 110 |
+
The FP8 quantization was produced by [drbaph](https://huggingface.co/drbaph) and is released under the same license.
|