Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ v = torch.load(f"{models_path}/files/V.pt", map_location=torch.device('cpu')).bf
|
|
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'))
|
44 |
|
45 |
unet, vae, text_encoder, tokenizer, noise_scheduler = load_models(device)
|
46 |
|
@@ -205,8 +205,9 @@ def sample_then_run():
|
|
205 |
torch.save(network.proj, "model.pt" )
|
206 |
return image, "model.pt"
|
207 |
|
208 |
-
|
209 |
def start_items():
|
|
|
210 |
print("Starting items")
|
211 |
global young
|
212 |
global pointy
|
|
|
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 |
unet, vae, text_encoder, tokenizer, noise_scheduler = load_models(device)
|
46 |
|
|
|
205 |
torch.save(network.proj, "model.pt" )
|
206 |
return image, "model.pt"
|
207 |
|
208 |
+
#@spaces.GPU
|
209 |
def start_items():
|
210 |
+
device = "cpu"
|
211 |
print("Starting items")
|
212 |
global young
|
213 |
global pointy
|