Spaces:
Runtime error
Runtime error
Update download link
Browse files
app.py
CHANGED
@@ -27,10 +27,11 @@ if not os.path.exists(lora_path):
|
|
27 |
os.system(f'wget https://civitai.com/api/download/models/152309?type=Model&format=SafeTensor -O {lora_path}')
|
28 |
|
29 |
# global variable
|
30 |
-
device = "cuda"
|
31 |
MAX_SEED = np.iinfo(np.int32).max
|
32 |
STYLE_NAMES = list(styles.keys())
|
33 |
DEFAULT_STYLE_NAME = "(No style)"
|
|
|
34 |
# download PhotoMaker checkpoint to cache
|
35 |
photomaker_ckpt = hf_hub_download(repo_id="TencentARC/PhotoMaker", filename="photomaker-v1.bin", repo_type="model")
|
36 |
|
|
|
27 |
os.system(f'wget https://civitai.com/api/download/models/152309?type=Model&format=SafeTensor -O {lora_path}')
|
28 |
|
29 |
# global variable
|
30 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
31 |
MAX_SEED = np.iinfo(np.int32).max
|
32 |
STYLE_NAMES = list(styles.keys())
|
33 |
DEFAULT_STYLE_NAME = "(No style)"
|
34 |
+
|
35 |
# download PhotoMaker checkpoint to cache
|
36 |
photomaker_ckpt = hf_hub_download(repo_id="TencentARC/PhotoMaker", filename="photomaker-v1.bin", repo_type="model")
|
37 |
|