Instructions to use rooroo79/music-spectrogram-diffusion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use rooroo79/music-spectrogram-diffusion with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("rooroo79/music-spectrogram-diffusion", 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
Include traceback in MIDI inference errors
Browse files- handler.py +4 -1
handler.py
CHANGED
|
@@ -30,6 +30,7 @@ import os
|
|
| 30 |
import subprocess
|
| 31 |
import sys
|
| 32 |
import tempfile
|
|
|
|
| 33 |
import wave
|
| 34 |
from typing import Any
|
| 35 |
|
|
@@ -135,7 +136,9 @@ class EndpointHandler:
|
|
| 135 |
"format": "wav",
|
| 136 |
}
|
| 137 |
except Exception as err:
|
| 138 |
-
raise RuntimeError(
|
|
|
|
|
|
|
| 139 |
|
| 140 |
|
| 141 |
def _has_diffusers_index(path: str) -> bool:
|
|
|
|
| 30 |
import subprocess
|
| 31 |
import sys
|
| 32 |
import tempfile
|
| 33 |
+
import traceback
|
| 34 |
import wave
|
| 35 |
from typing import Any
|
| 36 |
|
|
|
|
| 136 |
"format": "wav",
|
| 137 |
}
|
| 138 |
except Exception as err:
|
| 139 |
+
raise RuntimeError(
|
| 140 |
+
f"{type(err).__name__}: {err}; {_payload_preview(data)}\n{traceback.format_exc()}"
|
| 141 |
+
) from err
|
| 142 |
|
| 143 |
|
| 144 |
def _has_diffusers_index(path: str) -> bool:
|