Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -58,8 +58,8 @@ ego_gpt_path = hf_hub_download(
|
|
58 |
# pretrained = "/mnt/sfs-common/jkyang/EgoGPT/checkpoints/EgoGPT-llavaov-7b-EgoIT-109k-release"
|
59 |
# pretrained = "/mnt/sfs-common/jkyang/EgoGPT/checkpoints/EgoGPT-llavaov-7b-EgoIT-EgoLife-Demo"
|
60 |
pretrained = 'EgoLife-v1/EgoGPT'
|
61 |
-
device =
|
62 |
-
device_map =
|
63 |
|
64 |
# Add this initialization code before loading the model
|
65 |
def setup(rank, world_size):
|
|
|
58 |
# pretrained = "/mnt/sfs-common/jkyang/EgoGPT/checkpoints/EgoGPT-llavaov-7b-EgoIT-109k-release"
|
59 |
# pretrained = "/mnt/sfs-common/jkyang/EgoGPT/checkpoints/EgoGPT-llavaov-7b-EgoIT-EgoLife-Demo"
|
60 |
pretrained = 'EgoLife-v1/EgoGPT'
|
61 |
+
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
62 |
+
device_map = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
63 |
|
64 |
# Add this initialization code before loading the model
|
65 |
def setup(rank, world_size):
|