put back cuda
Browse files- handler.py +1 -1
handler.py
CHANGED
@@ -11,7 +11,7 @@ class EndpointHandler():
|
|
11 |
def __init__(self, path=""):
|
12 |
# load the optimized model
|
13 |
# create inference pipeline
|
14 |
-
self.pipeline = pipeline("text-to-audio", "facebook/musicgen-stereo-large", device="
|
15 |
|
16 |
def generate_audio(self, text: str):
|
17 |
# Here you can implement your audio generation logic
|
|
|
11 |
def __init__(self, path=""):
|
12 |
# load the optimized model
|
13 |
# create inference pipeline
|
14 |
+
self.pipeline = pipeline("text-to-audio", "facebook/musicgen-stereo-large", device="cuda", torch_dtype=torch.float16)
|
15 |
|
16 |
def generate_audio(self, text: str):
|
17 |
# Here you can implement your audio generation logic
|