Update handler.py
Browse files- handler.py +18 -0
handler.py
CHANGED
@@ -154,6 +154,24 @@ class EndpointHandler:
|
|
154 |
output_codec="h264",
|
155 |
output_quality=17,
|
156 |
model_base_dir="/repository/varnish",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
)
|
158 |
|
159 |
async def process_frames(
|
|
|
154 |
output_codec="h264",
|
155 |
output_quality=17,
|
156 |
model_base_dir="/repository/varnish",
|
157 |
+
|
158 |
+
# there is currently a bug with MMAudio and/or torch and/or the weight format and/or version..
|
159 |
+
# not sure how to fix that.. :/
|
160 |
+
#
|
161 |
+
# it says:
|
162 |
+
# File "dist-packages/varnish.py", line 152, in __init__
|
163 |
+
# self._setup_mmaudio()
|
164 |
+
# File "dist-packages/varnish/varnish.py", line 165, in _setup_mmaudio
|
165 |
+
# net.load_weights(torch.load(model.model_path, map_location=self.device, weights_only=False))
|
166 |
+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
167 |
+
# File "dist-packages/torch/serialization.py", line 1384, in load
|
168 |
+
# return _legacy_load(
|
169 |
+
# ^^^^^^^^^^^^^
|
170 |
+
# File "dist-packages/torch/serialization.py", line 1628, in _legacy_load
|
171 |
+
# magic_number = pickle_module.load(f, **pickle_load_args)
|
172 |
+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
173 |
+
# _pickle.UnpicklingError: invalid load key, '<'.
|
174 |
+
enable_mmaudio=False,
|
175 |
)
|
176 |
|
177 |
async def process_frames(
|