Spaces:
Paused
Paused
Download patch_configs.py from rahul7star/Magi: direct link, hf CLI and curl.
- Browser
- Download file 390 Bytes
-
https://huggingface.co/spaces/rahul7star/Magi/resolve/main/patch_configs.py
- Command line
-
hf download hf://spaces/rahul7star/Magi/patch_configs.py
-
curl -L -o patch_configs.py https://huggingface.co/spaces/rahul7star/Magi/resolve/main/patch_configs.py
390 Bytes
| 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) |