Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,13 +34,13 @@ device = "cuda"
|
|
| 34 |
|
| 35 |
models_path = snapshot_download(repo_id="Snapchat/w2w")
|
| 36 |
|
| 37 |
-
mean = torch.load(f"{models_path}/files/mean.pt").bfloat16()
|
| 38 |
-
std = torch.load(f"{models_path}/files/std.pt").bfloat16()
|
| 39 |
-
v = torch.load(f"{models_path}/files/V.pt").bfloat16()
|
| 40 |
-
proj = torch.load(f"{models_path}/files/proj_1000pc.pt").bfloat16()
|
| 41 |
df = torch.load(f"{models_path}/files/identity_df.pt")
|
| 42 |
weight_dimensions = torch.load(f"{models_path}/files/weight_dimensions.pt")
|
| 43 |
-
pinverse = torch.load(f"{models_path}/files/pinverse_1000pc.pt")#.bfloat16()#.to(device)
|
| 44 |
|
| 45 |
|
| 46 |
unet, vae, text_encoder, tokenizer, noise_scheduler = load_models(device)
|
|
|
|
| 34 |
|
| 35 |
models_path = snapshot_download(repo_id="Snapchat/w2w")
|
| 36 |
|
| 37 |
+
mean = torch.load(f"{models_path}/files/mean.pt", map_location=torch.device('cpu')).bfloat16().to(device)
|
| 38 |
+
std = torch.load(f"{models_path}/files/std.pt", map_location=torch.device('cpu')).bfloat16().to(device)
|
| 39 |
+
v = torch.load(f"{models_path}/files/V.pt", map_location=torch.device('cpu')).bfloat16().to(device)
|
| 40 |
+
proj = torch.load(f"{models_path}/files/proj_1000pc.pt", map_location=torch.device('cpu')).bfloat16().to(device)
|
| 41 |
df = torch.load(f"{models_path}/files/identity_df.pt")
|
| 42 |
weight_dimensions = torch.load(f"{models_path}/files/weight_dimensions.pt")
|
| 43 |
+
pinverse = torch.load(f"{models_path}/files/pinverse_1000pc.pt", map_location=torch.device('cpu'))#.bfloat16()#.to(device)
|
| 44 |
|
| 45 |
|
| 46 |
unet, vae, text_encoder, tokenizer, noise_scheduler = load_models(device)
|