Download scripts/phase2_counterfactual/patch_router.py from KCBtheone/SplatAtlas: direct link, hf CLI and curl.
- Browser
- Download file 643 Bytes
-
https://huggingface.co/KCBtheone/SplatAtlas/resolve/main/scripts/phase2_counterfactual/patch_router.py
- Command line
-
hf download hf://KCBtheone/SplatAtlas/scripts/phase2_counterfactual/patch_router.py
-
curl -L -o patch_router.py https://huggingface.co/KCBtheone/SplatAtlas/resolve/main/scripts/phase2_counterfactual/patch_router.py
643 Bytes
| import os | |
| path = "/root/autodl-tmp/SplatAtlas/scripts/phase1_validation/render_single.py" | |
| with open(path, "r") as f: code = f.read() | |
| old_str = 'is_synthetic = os.path.exists(os.path.join(source_path, "transforms_test.json"))' | |
| new_str = 'is_synthetic = os.path.exists(os.path.join(source_path, "transforms_test.json")) and not os.path.exists(os.path.join(source_path, "sparse"))' | |
| if old_str in code: | |
| code = code.replace(old_str, new_str) | |
| with open(path, "w") as f: f.write(code) | |
| print("[Patch Applied] render_single.py routing logic hardened (sparse check added).") | |
| else: | |
| print("[Patch Skipped] old routing string not found.") | |