Download hmc/reference/patches/nifreeze-keepdir-float.diff from neurodeskorg/webapps: direct link, hf CLI and curl.
- Browser
- Download file 1.29 kB
-
https://huggingface.co/datasets/neurodeskorg/webapps/resolve/main/hmc/reference/patches/nifreeze-keepdir-float.diff
- Command line
-
hf download hf://datasets/neurodeskorg/webapps/hmc/reference/patches/nifreeze-keepdir-float.diff
-
curl -L -o nifreeze-keepdir-float.diff https://huggingface.co/datasets/neurodeskorg/webapps/resolve/main/hmc/reference/patches/nifreeze-keepdir-float.diff
1.29 kB
| --- estimator.py.orig 2026-10-18 21:11:40.050259152 -0400 | |
| +++ estimator.py 2026-10-18 21:13:03.554800501 -0400 | |
| else: | |
| dataset_length = len(dataset) - self._start_index | |
| - with TemporaryDirectory() as tmp_dir: | |
| + import contextlib | |
| + import os | |
| + | |
| + _keep = os.environ.get("NIFREEZE_KEEP_DIR") | |
| + if _keep: | |
| + Path(_keep).mkdir(parents=True, exist_ok=True) | |
| + with ( | |
| + contextlib.nullcontext(_keep) if _keep else TemporaryDirectory() | |
| + ) as tmp_dir: | |
| print(f"Processing in <{tmp_dir}>") | |
| ptmp_dir = Path(tmp_dir) | |
| # update | |
| dataset.set_transform(i, xform.matrix) | |
| + with open(ptmp_dir / "order.txt", "a") as _f: | |
| + _f.write(f"{i}\n") | |
| pbar.update() | |
| return self | |
| --- registration/ants.py.orig 2026-10-18 21:11:40.047381430 -0400 | |
| +++ registration/ants.py 2026-10-18 21:13:03.555341791 -0400 | |
| if num_threads: | |
| reg_iface.inputs.num_threads = num_threads | |
| + import os | |
| + | |
| + if os.environ.get("NIFREEZE_ANTS_FLOAT") == "1": | |
| + reg_iface.inputs.float = True | |
| + | |
| return reg_iface | |