Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ import shutil
|
|
33 |
import yaml
|
34 |
import numpy as np
|
35 |
|
36 |
-
from huggingface_hub import
|
37 |
|
38 |
print(os.getcwd())
|
39 |
os.environ["TORCH_HOME"] = os.path.join(os.getcwd(), "checkpoints")
|
@@ -57,8 +57,7 @@ config = get_train_config(config_path)
|
|
57 |
model.config = config
|
58 |
store_attn_map = False
|
59 |
|
60 |
-
|
61 |
-
ckpt_root = os.path.dirname(file_path)
|
62 |
|
63 |
modulation_adapter = load_modulation_adapter(model, config, dtype, device, f"{ckpt_root}/modulation_adapter", is_training=False)
|
64 |
model.add_modulation_adapter(modulation_adapter)
|
|
|
33 |
import yaml
|
34 |
import numpy as np
|
35 |
|
36 |
+
from huggingface_hub import snapshot_download
|
37 |
|
38 |
print(os.getcwd())
|
39 |
os.environ["TORCH_HOME"] = os.path.join(os.getcwd(), "checkpoints")
|
|
|
57 |
model.config = config
|
58 |
store_attn_map = False
|
59 |
|
60 |
+
ckpt_root = snapshot_download(repo_id="ByteDance/XVerse")
|
|
|
61 |
|
62 |
modulation_adapter = load_modulation_adapter(model, config, dtype, device, f"{ckpt_root}/modulation_adapter", is_training=False)
|
63 |
model.add_modulation_adapter(modulation_adapter)
|