Spaces:
Runtime error
Runtime error
Fix PyTorch 2.6+ weights_only=True unpickling error for XttsConfig
#100
by
hasanbasbunar
- opened
app.py
CHANGED
|
@@ -61,6 +61,7 @@ config = XttsConfig()
|
|
| 61 |
config.load_json(os.path.join(model_path, "config.json"))
|
| 62 |
|
| 63 |
model = Xtts.init_from_config(config)
|
|
|
|
| 64 |
model.load_checkpoint(
|
| 65 |
config,
|
| 66 |
checkpoint_path=os.path.join(model_path, "model.pth"),
|
|
|
|
| 61 |
config.load_json(os.path.join(model_path, "config.json"))
|
| 62 |
|
| 63 |
model = Xtts.init_from_config(config)
|
| 64 |
+
torch.serialization.add_safe_globals([XttsConfig])
|
| 65 |
model.load_checkpoint(
|
| 66 |
config,
|
| 67 |
checkpoint_path=os.path.join(model_path, "model.pth"),
|