File size: 1,086 Bytes
2fe3da0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from huggingface_hub import HfApi, HfFolder, Repository, create_repo, upload_file
import os

# 登录到 Hugging Face
from huggingface_hub import login
login()

# 创建或指定现有的 Repository
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)

# # 上传数据文件
# data_path = "/hpc2hdd/home/jlin695/data/env_map/data/env_map_light_large.tar.gz"
# upload_file(path_or_fileobj=data_path, path_in_repo="env_map_light_large.tar.gz", repo_id=repo_id)

print("模型和数据文件已上传到 Hugging Face。")