Instructions to use ruixiangma/LongCat-AudioDiT-1B-Diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ruixiangma/LongCat-AudioDiT-1B-Diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ruixiangma/LongCat-AudioDiT-1B-Diffusers", 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
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LongCat-AudioDiT-1B-Diffusers
|
| 2 |
+
|
| 3 |
+
Diffusers format for Meituan's [LongCat-AudioDiT-1B](https://huggingface.co/meituan-longcat/LongCat-AudioDiT-1B).
|
| 4 |
+
|
| 5 |
+
## Model Description
|
| 6 |
+
|
| 7 |
+
A DiT (Diffusion Transformer) based audio generation model for text-to-audio synthesis.
|
| 8 |
+
|
| 9 |
+
## Directory Structure
|
| 10 |
+
|
| 11 |
+
```
|
| 12 |
+
βββ model_index.json # Diffusers config file
|
| 13 |
+
βββ text_encoder/ # Text encoder (UMT5)
|
| 14 |
+
βββ tokenizer/ # Tokenizer (T5)
|
| 15 |
+
βββ transformer/ # Main DiT model
|
| 16 |
+
βββ vae/ # VAE encoder/decoder
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
## Usage
|
| 20 |
+
|
| 21 |
+
```python
|
| 22 |
+
from diffusers import LongCatAudioDiTPipeline
|
| 23 |
+
import torch
|
| 24 |
+
|
| 25 |
+
pipe = LongCatAudioDiTPipeline.from_pretrained(
|
| 26 |
+
"ruixiangma/LongCat-AudioDiT-1B-Diffusers",
|
| 27 |
+
torch_dtype=torch.bfloat16
|
| 28 |
+
)
|
| 29 |
+
|
| 30 |
+
audio = pipe(
|
| 31 |
+
prompt="A cheerful piano melody",
|
| 32 |
+
audio_duration_s=5.0,
|
| 33 |
+
num_inference_steps=50,
|
| 34 |
+
guidance_scale=4.0
|
| 35 |
+
).audio
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
## Original Model
|
| 39 |
+
|
| 40 |
+
- HuggingFace: [meituan-longcat/LongCat-AudioDiT-1B](https://huggingface.co/meituan-longcat/LongCat-AudioDiT-1B)
|