Spaces:
Running
on
Zero
Running
on
Zero
刘虹雨
commited on
Commit
·
ab4d9b9
1
Parent(s):
32fac76
update code
Browse files
app.py
CHANGED
@@ -305,7 +305,10 @@ def prepare_working_dir(dir, style):
|
|
305 |
def launch_pretrained():
|
306 |
|
307 |
from huggingface_hub import snapshot_download
|
308 |
-
|
|
|
|
|
|
|
309 |
snapshot_download(
|
310 |
repo_id="KumaPower/AvatarArtist",
|
311 |
repo_type="model",
|
@@ -954,11 +957,15 @@ if __name__ == '__main__':
|
|
954 |
if _get_output(["nvcc", "--version"]) is None:
|
955 |
logging.info("Installing CUDA toolkit...")
|
956 |
install_cuda_toolkit()
|
|
|
|
|
957 |
else:
|
958 |
logging.info("Detected CUDA: %s" % _get_output(["nvcc", "--version"]))
|
959 |
|
960 |
|
961 |
launch_pretrained()
|
|
|
|
|
962 |
image_folder = "./demo_data/source_img/img_generate_different_domain/images512x512/demo_imgs"
|
963 |
example_img_names = os.listdir(image_folder)
|
964 |
render_model, sample_steps, DiT_model, \
|
|
|
305 |
def launch_pretrained():
|
306 |
|
307 |
from huggingface_hub import snapshot_download
|
308 |
+
os.system("pip uninstall torch")
|
309 |
+
os.system("pip uninstall torchvision")
|
310 |
+
os.system("pip install https://download.pytorch.org/whl/cu121/torch-2.4.1%2Bcu121-cp310-cp310-linux_x86_64.whl")
|
311 |
+
os.system("pip install https://download.pytorch.org/whl/cu121/torchvision-0.19.1%2Bcu121-cp310-cp310-linux_x86_64.whl")
|
312 |
snapshot_download(
|
313 |
repo_id="KumaPower/AvatarArtist",
|
314 |
repo_type="model",
|
|
|
957 |
if _get_output(["nvcc", "--version"]) is None:
|
958 |
logging.info("Installing CUDA toolkit...")
|
959 |
install_cuda_toolkit()
|
960 |
+
logging.info("install CUDA: %s" % _get_output(["nvcc", "--version"]))
|
961 |
+
|
962 |
else:
|
963 |
logging.info("Detected CUDA: %s" % _get_output(["nvcc", "--version"]))
|
964 |
|
965 |
|
966 |
launch_pretrained()
|
967 |
+
|
968 |
+
|
969 |
image_folder = "./demo_data/source_img/img_generate_different_domain/images512x512/demo_imgs"
|
970 |
example_img_names = os.listdir(image_folder)
|
971 |
render_model, sample_steps, DiT_model, \
|