Spaces:
Build error
Build error
Fix: pipeline.instantiate() modifies in-place, use pipeline directly after instantiate
Browse files- src/models.py +5 -4
src/models.py
CHANGED
|
@@ -64,12 +64,13 @@ class DiarizationEngine:
|
|
| 64 |
if "clustering" in params and clustering_params:
|
| 65 |
params["clustering"].update(clustering_params)
|
| 66 |
|
| 67 |
-
# Instantiate pipeline with parameters
|
| 68 |
print(f"DEBUG: Instantiating pipeline...", file=sys.stderr)
|
| 69 |
-
|
| 70 |
-
print(f"DEBUG: Pipeline instantiated
|
| 71 |
|
| 72 |
-
|
|
|
|
| 73 |
self.pipeline.to(self.device)
|
| 74 |
print(f"DEBUG: Pipeline moved to device: {self.device}", file=sys.stderr)
|
| 75 |
|
|
|
|
| 64 |
if "clustering" in params and clustering_params:
|
| 65 |
params["clustering"].update(clustering_params)
|
| 66 |
|
| 67 |
+
# Instantiate pipeline with parameters (modifies in-place and returns self)
|
| 68 |
print(f"DEBUG: Instantiating pipeline...", file=sys.stderr)
|
| 69 |
+
pipeline.instantiate(params)
|
| 70 |
+
print(f"DEBUG: Pipeline instantiated successfully", file=sys.stderr)
|
| 71 |
|
| 72 |
+
# Store and move to device
|
| 73 |
+
self.pipeline = pipeline
|
| 74 |
self.pipeline.to(self.device)
|
| 75 |
print(f"DEBUG: Pipeline moved to device: {self.device}", file=sys.stderr)
|
| 76 |
|