Warvito commited on
Commit
160f4d3
1 Parent(s): 0043701

Try fix cpu only

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -19,17 +19,19 @@ ffmpeg_path = shutil.which("ffmpeg")
19
  mediapy.set_ffmpeg(ffmpeg_path)
20
 
21
  # Loading model
 
22
  vqvae = mlflow.pytorch.load_model(
23
- "./trained_models/vae/"
 
24
  )
25
  vqvae.eval()
26
 
27
  diffusion = mlflow.pytorch.load_model(
28
- "./trained_models/ddpm/"
 
29
  )
30
  diffusion.eval()
31
 
32
- device = torch.device("cpu")
33
  diffusion = diffusion.to(device)
34
  vqvae = vqvae.to(device)
35
 
 
19
  mediapy.set_ffmpeg(ffmpeg_path)
20
 
21
  # Loading model
22
+ device = torch.device("cpu")
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
 
 
35
  diffusion = diffusion.to(device)
36
  vqvae = vqvae.to(device)
37