Spaces:
Paused
Paused
| import json, glob | |
| BASE = "/tmp/models" | |
| for cfg in glob.glob("/workspace/MagiCompiler/example/*/config.json"): | |
| with open(cfg) as f: | |
| data = json.load(f) | |
| data["text_encoder_path"] = f"{BASE}/t5" | |
| data["audio_model_path"] = f"{BASE}/audio" | |
| data["vae_path"] = f"{BASE}/vae" | |
| with open(cfg, "w") as f: | |
| json.dump(data, f, indent=2) | |
| print("Patched:", cfg) |