Spaces:
Running
on
L40S
Running
on
L40S
Upload app_hg.py with huggingface_hub
Browse files
app_hg.py
CHANGED
@@ -60,9 +60,7 @@ def install_requirements():
|
|
60 |
subprocess.check_call([sys.executable, "-m", "pip", "install", "git+https://github.com/NVlabs/nvdiffrast"])
|
61 |
subprocess.check_call([sys.executable, "-m", "pip", "install", "git+https://github.com/facebookresearch/pytorch3d@stable"])
|
62 |
|
63 |
-
|
64 |
-
install_requirements()
|
65 |
-
|
66 |
def download_models():
|
67 |
os.makedirs("weights", exist_ok=True)
|
68 |
os.makedirs("weights/hunyuanDiT", exist_ok=True)
|
@@ -95,6 +93,9 @@ def download_models():
|
|
95 |
except Exception as e:
|
96 |
print(f"Error downloading DUSt3R: {e}")
|
97 |
|
|
|
|
|
|
|
98 |
|
99 |
from infer import seed_everything, save_gif
|
100 |
from infer import Text2Image, Removebg, Image2Views, Views2Mesh, GifRenderer
|
@@ -122,8 +123,6 @@ parser.add_argument("--save_memory", default=False)
|
|
122 |
parser.add_argument("--device", default="cuda:0", type=str)
|
123 |
args = parser.parse_args()
|
124 |
|
125 |
-
download_models() ### download weights !!!!
|
126 |
-
|
127 |
################################################################
|
128 |
# initial setting
|
129 |
################################################################
|
|
|
60 |
subprocess.check_call([sys.executable, "-m", "pip", "install", "git+https://github.com/NVlabs/nvdiffrast"])
|
61 |
subprocess.check_call([sys.executable, "-m", "pip", "install", "git+https://github.com/facebookresearch/pytorch3d@stable"])
|
62 |
|
63 |
+
|
|
|
|
|
64 |
def download_models():
|
65 |
os.makedirs("weights", exist_ok=True)
|
66 |
os.makedirs("weights/hunyuanDiT", exist_ok=True)
|
|
|
93 |
except Exception as e:
|
94 |
print(f"Error downloading DUSt3R: {e}")
|
95 |
|
96 |
+
# install_cuda_toolkit()
|
97 |
+
install_requirements()
|
98 |
+
download_models() ### download weights !!!!
|
99 |
|
100 |
from infer import seed_everything, save_gif
|
101 |
from infer import Text2Image, Removebg, Image2Views, Views2Mesh, GifRenderer
|
|
|
123 |
parser.add_argument("--device", default="cuda:0", type=str)
|
124 |
args = parser.parse_args()
|
125 |
|
|
|
|
|
126 |
################################################################
|
127 |
# initial setting
|
128 |
################################################################
|