| from huggingface_hub import HfApi, HfFolder, Repository, create_repo, upload_file |
| import os |
|
|
| |
| from huggingface_hub import login |
| login() |
|
|
| |
| repo_name = "PRM" |
| username = "LTT" |
| repo_id = f"{username}/{repo_name}" |
|
|
| |
| create_repo(repo_id, exist_ok=True) |
| |
| model_path = "/hpc2hdd/home/jlin695/code/For_debug/intrinsic-LRM/new_ckpt/camera_random_step=00006400-nerf-12wdata.ckpt" |
| upload_file(path_or_fileobj=model_path, path_in_repo="final_ckpt.ckpt", repo_id=repo_id) |
|
|
| |
| data_path = "/hpc2hdd/home/jlin695/data/pretrained_model/models--TencentARC--InstantMesh/diffusion_pytorch_model.bin" |
| upload_file(path_or_fileobj=data_path, path_in_repo="diffusion_pytorch_model.bin", repo_id=repo_id) |
|
|
| |
| |
| |
|
|
| print("模型和数据文件已上传到 Hugging Face。") |