Spaces:
Build error
Build error
walter
commited on
Commit
•
cb65a78
1
Parent(s):
143f726
Try to to use GPUs
Browse files- app.py +3 -3
- requirements.txt +0 -3
app.py
CHANGED
@@ -19,16 +19,16 @@ ffmpeg_path = shutil.which("ffmpeg")
|
|
19 |
mediapy.set_ffmpeg(ffmpeg_path)
|
20 |
|
21 |
# Loading model
|
22 |
-
device = torch.device("
|
23 |
vqvae = mlflow.pytorch.load_model(
|
24 |
"./trained_models/vae/",
|
25 |
-
map_location=device,
|
26 |
)
|
27 |
vqvae.eval()
|
28 |
|
29 |
diffusion = mlflow.pytorch.load_model(
|
30 |
"./trained_models/ddpm/",
|
31 |
-
map_location=device,
|
32 |
)
|
33 |
diffusion.eval()
|
34 |
|
|
|
19 |
mediapy.set_ffmpeg(ffmpeg_path)
|
20 |
|
21 |
# Loading model
|
22 |
+
device = torch.device("cuda")
|
23 |
vqvae = mlflow.pytorch.load_model(
|
24 |
"./trained_models/vae/",
|
25 |
+
# map_location=device,
|
26 |
)
|
27 |
vqvae.eval()
|
28 |
|
29 |
diffusion = mlflow.pytorch.load_model(
|
30 |
"./trained_models/ddpm/",
|
31 |
+
# map_location=device,
|
32 |
)
|
33 |
diffusion.eval()
|
34 |
|
requirements.txt
CHANGED
@@ -8,6 +8,3 @@ opencv-python==4.6.0.66
|
|
8 |
plotly==5.9.0
|
9 |
scikit-image==0.19.3
|
10 |
tqdm
|
11 |
-
|
12 |
-
-f https://download.pytorch.org/whl/torch_stable.html
|
13 |
-
torch==1.11.0+cpu
|
|
|
8 |
plotly==5.9.0
|
9 |
scikit-image==0.19.3
|
10 |
tqdm
|
|
|
|
|
|