Repository: voicepaw/so-vits-svc-fork

Issue:
UnpicklingError: Weights only load failed. Unpickler error: Unsupported class numpy.core.multiarray._reconstruct
**Describe the bug**
I tried to update, but I got this exception start from version 3.6.0 during inference
```
UnpicklingError: Weights only load failed. Re-running `torch.load` with `weights_only` set to `False` will likely succeed, but it can result in arbitrary code execution.Do it only if you get the file from a trusted source. WeightsUnpickler error: Unsupported class numpy.core.multiarray._reconstruct
```

**To Reproduce**
Steps to reproduce the behavior:
- Update so-vits-svc-fork
- Run inference

**Additional context**
Initially I updated to version 3.8.0, because of the exception I tried to solve by keep downgrading the version until I got to version 3.5.1 to solve the problem.



Discussion:
same
it doesnt add much but heres the error i got too
                    Traceback (most recent call last):
                      File "C:\Users\matth\AppData\Local\Programs\Python\Python310\lib\site-packages\so_vits_svc_fork\gui.py", line 678, in main
                        future.result()
                      File "C:\Users\matth\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 451, in result
                        return self.__get_result()
                      File "C:\Users\matth\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 403, in __get_result
                        raise self._exception
                      File "C:\Users\matth\AppData\Local\Programs\Python\Python310\lib\site-packages\so_vits_svc_fork\gui.py", line 686, in main
                        future.result()
                      File "C:\Users\matth\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 451, in result
                        return self.__get_result()
                      File "C:\Users\matth\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 403, in __get_result
                        raise self._exception
                      File "C:\Users\matth\AppData\Local\Programs\Python\Python310\lib\site-packages\so_vits_svc_fork\gui.py", line 678, in main
                        future.result()
                      File "C:\Users\matth\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 451, in result
                        return self.__get_result()
                      File "C:\Users\matth\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 403, in __get_result
                        raise self._exception
                    _pickle.UnpicklingError: Weights only load failed. Re-running `torch.load` with `weights_only` set to `False` will likely succeed, but it can result in arbitrary code execution.Do
                    it only if you get the file from a trusted source. WeightsUnpickler error: Unsupported operand 71

how do you install a specific version?

Resolving patch:
diff --git a/src/so_vits_svc_fork/cluster/__init__.py b/src/so_vits_svc_fork/cluster/__init__.py
--- a/src/so_vits_svc_fork/cluster/__init__.py
+++ b/src/so_vits_svc_fork/cluster/__init__.py
@@ -9,7 +9,9 @@
 
 def get_cluster_model(ckpt_path: Path | str):
     with Path(ckpt_path).open("rb") as f:
-        checkpoint = torch.load(f, map_location="cpu", weights_only=True)
+        checkpoint = torch.load(
+            f, map_location="cpu"
+        )  # Danger of arbitrary code execution
     kmeans_dict = {}
     for spk, ckpt in checkpoint.items():
         km = KMeans(ckpt["n_features_in_"])


Test patch: