Text-to-Audio
Transformers
Safetensors
qadit
feature-extraction
diffusion
dit
audio
educational
research
custom_code
Instructions to use QuarkML/QaDiT-160 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuarkML/QaDiT-160 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-audio", model="QuarkML/QaDiT-160", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("QuarkML/QaDiT-160", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- modelling_qadit.py +6 -2
modelling_qadit.py
CHANGED
|
@@ -466,12 +466,16 @@ class QaDiTOutput(ModelOutput):
|
|
| 466 |
|
| 467 |
@dataclass
|
| 468 |
class QaDiTGeneratorOutput(ModelOutput):
|
| 469 |
-
"""Output of :meth:`QaDiTModel.generate`.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 470 |
|
| 471 |
audios: Optional[List[np.ndarray]] = None
|
| 472 |
audio_values: Optional[torch.FloatTensor] = None
|
| 473 |
latents: Optional[torch.FloatTensor] = None
|
| 474 |
-
sampling_rate: int =
|
| 475 |
|
| 476 |
|
| 477 |
# --------------------------------------------------------------------------- #
|
|
|
|
| 466 |
|
| 467 |
@dataclass
|
| 468 |
class QaDiTGeneratorOutput(ModelOutput):
|
| 469 |
+
"""Output of :meth:`QaDiTModel.generate`.
|
| 470 |
+
|
| 471 |
+
Hugging Face ``ModelOutput`` requires every field after the first to default
|
| 472 |
+
to ``None`` (not other sentinels like ``16000``).
|
| 473 |
+
"""
|
| 474 |
|
| 475 |
audios: Optional[List[np.ndarray]] = None
|
| 476 |
audio_values: Optional[torch.FloatTensor] = None
|
| 477 |
latents: Optional[torch.FloatTensor] = None
|
| 478 |
+
sampling_rate: Optional[int] = None
|
| 479 |
|
| 480 |
|
| 481 |
# --------------------------------------------------------------------------- #
|