Spaces:
Paused
Paused
Download src/StructDiffusion/utils/files.py from wliu88/StructDiffusionDemo: direct link, hf CLI and curl.
- Browser
- Download file 289 Bytes
-
https://huggingface.co/spaces/wliu88/StructDiffusionDemo/resolve/824a79ed4bebbe50ea64ab8e40e64700f3d448e0/src/StructDiffusion/utils/files.py
- Command line
-
hf download hf://spaces/wliu88/StructDiffusionDemo@824a79ed4bebbe50ea64ab8e40e64700f3d448e0/src/StructDiffusion/utils/files.py
-
curl -L -o files.py https://huggingface.co/spaces/wliu88/StructDiffusionDemo/resolve/824a79ed4bebbe50ea64ab8e40e64700f3d448e0/src/StructDiffusion/utils/files.py
289 Bytes
| import os | |
| def get_checkpoint_path_from_dir(checkpoint_dir): | |
| checkpoint_path = None | |
| for file in os.listdir(checkpoint_dir): | |
| if "ckpt" in file: | |
| checkpoint_path = os.path.join(checkpoint_dir, file) | |
| assert checkpoint_path is not None | |
| return checkpoint_path |